/* ==========================================================================
   Bharani Park Matric Hr Sec School - Coming Soon
   Plain HTML/CSS/JS. No fonts, CDNs or frameworks, so the page works offline
   and over file:// as well as through nginx.

   PERFORMANCE
   Colour washes are STATIC gradients, not animated blurred elements, and
   nothing uses backdrop-filter - both were measured causes of jank earlier.
   Only opacity/transform are animated, which the GPU composites cheaply.
   ========================================================================== */

:root {
	--navy-950: #1c2350;
	--navy-900: #232b5e;
	--navy-800: #2b3573;
	--navy-600: #4a5490;
	--gold: #b8912a;
	--gold-soft: #a67f1f;
	--paper: #1a1f38;
	--muted: #6b7391;
	--muted-dim: #6b7391;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
	margin: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
		"Helvetica Neue", Arial, sans-serif;
	color: var(--paper);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	overflow-x: hidden;

	/* light base with static aurora washes - painted once */
	background-color: #eef2fb;
	background-image:
		radial-gradient(42rem 34rem at 12% 6%,   rgba(43, 53, 115, 0.13), transparent 68%),
		radial-gradient(36rem 30rem at 88% 94%,  rgba(212, 175, 55, 0.18), transparent 68%),
		radial-gradient(30rem 26rem at 92% 18%,  rgba(74, 84, 144, 0.10), transparent 70%),
		radial-gradient(34rem 28rem at 50% 108%, rgba(43, 53, 115, 0.08), transparent 70%),
		linear-gradient(165deg, #fbfcff 0%, #eef2fb 48%, #f5f2ea 100%);
	background-attachment: fixed;
}

/* ==========================================================================
   backdrop layers
   ========================================================================== */
.bg {
	position: fixed;
	inset: 0;
	z-index: 0;
	pointer-events: none;
}

/* Drifting star particles, drawn by main.js into a single <canvas>.
   One canvas beats many animated DOM nodes: the browser composites one layer
   instead of recalculating dozens, which is what kept the earlier versions
   of this page smooth. */
.grid {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	display: block;
}

/* corner vignette for depth */
.vignette {
	position: absolute;
	inset: 0;
	/* soft white glow in each of the four corners */
	background:
		radial-gradient(26rem 26rem at 0% 0%,     rgba(255, 255, 255, 0.85), transparent 62%),
		radial-gradient(26rem 26rem at 100% 0%,   rgba(255, 255, 255, 0.85), transparent 62%),
		radial-gradient(26rem 26rem at 0% 100%,   rgba(255, 255, 255, 0.85), transparent 62%),
		radial-gradient(26rem 26rem at 100% 100%, rgba(255, 255, 255, 0.85), transparent 62%);
}

/* ==========================================================================
   layout - content sits directly on the background, no card
   ========================================================================== */
.page {
	position: relative;
	z-index: 1;
	min-height: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 48px 22px;
	text-align: center;
}

/* ==========================================================================
   logo
   ========================================================================== */
.logo-wrap {
	position: relative;
	display: inline-block;
	margin-bottom: 34px;
}

/* warm halo behind the crest */
.logo-glow {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 300px;
	height: 300px;
	margin: -150px 0 0 -150px;
	border-radius: 50%;
	background: radial-gradient(circle,
		rgba(212, 175, 55, 0.22) 0%,
		rgba(255, 255, 255, 0.55) 34%,
		transparent 68%);
	pointer-events: none;
	animation: fade 1.1s 0.15s ease both;
}

.logo {
	position: relative;
	display: block;
	width: auto;
	height: 196px;
	max-width: 100%;
	opacity: 0;
	filter: drop-shadow(0 12px 26px rgba(28, 35, 80, 0.20));
}

.logo.is-ready { animation: rise 0.75s ease both; }
.no-js .logo   { opacity: 1; }

/* ==========================================================================
   school name - typed by main.js
   ========================================================================== */
.school-name {
	margin: 0 0 20px;
	font-family: Georgia, "Times New Roman", serif;
	font-size: 54px;
	line-height: 1.22;
	font-weight: bold;
	letter-spacing: -0.5px;
	min-height: 1.22em;             /* stops the layout jumping while typing */

	/* Solid navy. A gradient with a gold stop mid-way washed the middle words
	   out to a muddy khaki, so the name is a single strong colour instead. */
	color: #1c2350;
}

/* blinking caret - keeps blinking after the typing finishes */
.caret {
	display: none;
	width: 5px;
	height: 1.1em;
	margin-left: 6px;
	vertical-align: -0.2em;
	border-radius: 1px;
	background: var(--gold);
}

.school-name.is-typing .caret,
.school-name.is-done .caret {
	display: inline-block;
	animation: blink 1.1s steps(1, end) infinite;
}

/* ==========================================================================
   tagline with flanking rules
   ========================================================================== */
.tagline {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	margin: 0 0 40px;
	animation: rise 0.7s 0.34s ease both;
}

.tag-rule {
	width: 46px;
	height: 1px;
	background: linear-gradient(90deg, transparent, rgba(184, 145, 42, 0.9));
}

.tagline .tag-rule:last-child {
	background: linear-gradient(90deg, rgba(184, 145, 42, 0.9), transparent);
}

.tag-text {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 4px;
	text-transform: uppercase;
	color: var(--gold-soft);
	white-space: nowrap;
}

/* ==========================================================================
   coming soon pill
   ========================================================================== */
/* Frosted glass pill.
   backdrop-filter was a measured cause of jank when it covered a large card,
   so it is used here only on this small pill - a tiny area for the compositor
   to blur, and it never moves. */
.coming-soon {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 16px;
	margin: 0 0 26px;
	padding: 18px 46px;
	border-radius: 99px;
	/* no overflow:hidden here - it would clip the status dot's ping ring.
	   The sheen below is clipped by its own border-radius instead. */

	/* translucent glass */
	background: linear-gradient(135deg,
		rgba(255, 255, 255, 0.72) 0%,
		rgba(255, 255, 255, 0.34) 52%,
		rgba(255, 255, 255, 0.58) 100%);
	-webkit-backdrop-filter: blur(14px) saturate(165%);
	backdrop-filter: blur(14px) saturate(165%);

	/* soft rim + inner highlight so the edge reads as glass, not a flat border */
	border: 1px solid rgba(255, 255, 255, 0.85);
	box-shadow:
		0 12px 34px -12px rgba(28, 35, 80, 0.30),
		0 2px 6px rgba(28, 35, 80, 0.06),
		inset 0 1px 1px rgba(255, 255, 255, 0.95),
		inset 0 -1px 1px rgba(28, 35, 80, 0.05);

	animation: rise 0.7s 0.42s ease both;
}

/* diagonal sheen across the glass, masked to the pill's own rounded shape */
.coming-soon::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	pointer-events: none;
	background: linear-gradient(104deg,
		transparent 30%,
		rgba(255, 255, 255, 0.60) 46%,
		rgba(255, 255, 255, 0.18) 56%,
		transparent 68%);
}

.cs-text {
	position: relative;      /* sit above the ::before sheen */
	z-index: 1;
	font-size: 24px;
	font-weight: 700;
	letter-spacing: 6px;
	text-transform: uppercase;
	background: linear-gradient(100deg, #1c2350, var(--gold) 55%, #1c2350);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: #1c2350;
}

/* pulsing status dot - one 9px element, cheap to composite */
.coming-soon .dot {
	position: relative;
	z-index: 1;              /* sit above the ::before sheen */
	width: 12px;
	height: 12px;
	flex: 0 0 12px;
	border-radius: 50%;
	background: #d4af37;
	box-shadow: 0 0 8px rgba(212, 175, 55, 0.7);
}

.coming-soon .dot::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: #d4af37;
	transform-origin: center;
	will-change: transform, opacity;
	animation: ping 2.1s cubic-bezier(0, 0, 0.2, 1) infinite;
}

/* ==========================================================================
   note
   ========================================================================== */
.note {
	max-width: 620px;        /* wide enough to sit on one line on desktop */
	margin: 0;
	font-size: 15.5px;
	line-height: 1.7;
	color: var(--muted-dim);
	animation: rise 0.7s 0.5s ease both;
}

/* ==========================================================================
   animation - opacity/transform only
   ========================================================================== */
@keyframes rise {
	from { opacity: 0; transform: translate3d(0, 16px, 0); }
	to   { opacity: 1; transform: none; }
}

@keyframes fade {
	from { opacity: 0; }
	to   { opacity: 1; }
}

@keyframes blink {
	0%, 49%   { opacity: 1; }
	50%, 100% { opacity: 0; }
}

@keyframes ping {
	0%       { transform: scale(1);   opacity: 0.6; }
	70%,100% { transform: scale(2.8); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::after { animation: none !important; transition: none !important; }
	.logo, .logo-glow { opacity: 1; }
	.caret { display: none !important; }
}

/* ==========================================================================
   responsive
   ========================================================================== */
@media (max-width: 700px) {
	body { background-attachment: scroll; }   /* fixed backdrops are slow on mobile */
	.page { padding: 40px 20px; }
	.logo { height: 158px; }
	.logo-glow { width: 240px; height: 240px; margin: -120px 0 0 -120px; }
	.logo-wrap { margin-bottom: 28px; }
	.school-name { font-size: 36px; letter-spacing: -0.3px; }
	.tagline { gap: 11px; margin-bottom: 32px; }
	.tag-rule { width: 32px; }
	.tag-text { font-size: 11px; letter-spacing: 3px; }
	.cs-text { font-size: 18px; letter-spacing: 4px; }
	.coming-soon { padding: 14px 32px; gap: 13px; }
	.coming-soon .dot { width: 10px; height: 10px; flex: 0 0 10px; }
	.note { font-size: 14px; max-width: 440px; }
}

@media (max-width: 420px) {
	.logo { height: 132px; }
	.logo-glow { width: 200px; height: 200px; margin: -100px 0 0 -100px; }
	.school-name { font-size: 28px; }
	.tag-rule { width: 22px; }
	.tag-text { font-size: 10px; letter-spacing: 2.4px; }
	.cs-text { font-size: 15px; letter-spacing: 3px; }
	.coming-soon { padding: 12px 26px; }
}
