/* ============ TALENT WORLD SCHOOL AND COLLEGE — shared styles ============ */
html { scroll-behavior: smooth; }
body { font-family: 'Inter', sans-serif; background:#F7F7FB; color:#0E1130; }
.font-display { font-family: 'Fraunces', serif; }
.font-mono2 { font-family: 'IBM Plex Mono', monospace; }

/* ---------- Reveal on scroll (continuous — re-triggers every time) ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s cubic-bezier(.16,.84,.44,1), transform .8s cubic-bezier(.16,.84,.44,1); will-change: transform, opacity; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1.is-visible{ transition-delay:.08s; }
.reveal-delay-2.is-visible{ transition-delay:.16s; }
.reveal-delay-3.is-visible{ transition-delay:.24s; }
.reveal-delay-4.is-visible{ transition-delay:.32s; }
.reveal-delay-5.is-visible{ transition-delay:.4s; }
.reveal-delay-6.is-visible{ transition-delay:.48s; }

/* ---------- Kinetic headline ---------- */
.kinetic-word { display:inline-block; opacity:0; filter: blur(6px); transform: translateY(24px) rotateX(35deg); transform-origin: bottom; animation: wordIn .9s cubic-bezier(.2,.7,.2,1) forwards; }
@keyframes wordIn { to { opacity:1; filter: blur(0); transform: translateY(0) rotateX(0); } }

.gradient-sheen {
  background: linear-gradient(100deg, #F0A63A 0%, #F8D28D 25%, #F0A63A 50%, #F8D28D 75%, #F0A63A 100%);
  background-size: 250% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: sheen 6s linear infinite;
}
@keyframes sheen { to { background-position: -250% center; } }

/* ---------- Ambient continuous motion (never stops) ---------- */
.float-slow { animation: floatY 6.5s ease-in-out infinite; }
.float-slower { animation: floatY 8.5s ease-in-out infinite; }
.float-slowest { animation: floatY 10.5s ease-in-out infinite; }
@keyframes floatY { 0%,100% { transform: translateY(0px); } 50% { transform: translateY(-14px); } }

.float-x { animation: floatX 9s ease-in-out infinite; }
@keyframes floatX { 0%,100% { transform: translateX(0px); } 50% { transform: translateX(10px); } }

.spin-slow { animation: spin 18s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.pulse-ring { animation: pulseRing 2.4s ease-in-out infinite; }
@keyframes pulseRing { 0%,100% { box-shadow: 0 0 0 0 rgba(240,166,58,.45);} 50% { box-shadow: 0 0 0 8px rgba(240,166,58,0);} }

.bob-icon { animation: bob 3.2s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0) rotate(0deg);} 50% { transform: translateY(-6px) rotate(3deg);} }

/* ---------- 3D tilt cards ---------- */
.tilt-card { transform-style: preserve-3d; transition: transform .25s cubic-bezier(.2,.7,.2,1), box-shadow .25s ease; }
.tilt-inner { transform: translateZ(40px); transform-style: preserve-3d; }

/* ---------- Glass ---------- */
.glass { background: rgba(255,255,255,0.08); backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%); border: 1px solid rgba(255,255,255,0.18); }
.glass-light { background: rgba(255,255,255,0.72); backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%); border: 1px solid rgba(255,255,255,0.6); }

/* Solid white banner stat-bar — opaque on purpose so it never picks up the
   dark hero color behind it and the light page color below it at the same
   time (that mix was the "broken two-tone card" look). */
.stat-bar-solid {
  background: #FFFFFF;
  border: 1px solid #EDEFF9;
  box-shadow: 0 24px 60px -20px rgba(11,16,66,0.28), 0 2px 8px rgba(11,16,66,0.04);
  position: relative;
  z-index: 20;
}

/* ---------- Header ---------- */
.nav-blur { background: rgba(11,16,66,0.72); backdrop-filter: blur(14px) saturate(160%); -webkit-backdrop-filter: blur(14px) saturate(160%); }
.nav-link { position: relative; }
.nav-link::after { content:''; position:absolute; left:0; right:0; bottom:-6px; height:2px; background: linear-gradient(90deg,#F0A63A,#F8D28D); transform: scaleX(0); transform-origin:left; transition: transform .3s cubic-bezier(.2,.7,.2,1); }
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); }
.nav-link.active { color: #fff; }

/* ---------- Buttons ---------- */
.btn-primary { position: relative; overflow: hidden; isolation: isolate; }
.btn-primary::before { content:''; position:absolute; inset:0; background: linear-gradient(120deg, transparent, rgba(255,255,255,.35), transparent); transform: translateX(-120%) skewX(-15deg); transition: transform .7s cubic-bezier(.2,.7,.2,1); z-index:1; }
.btn-primary:hover::before { transform: translateX(120%) skewX(-15deg); }

.ripple-btn { position: relative; overflow: hidden; cursor: pointer; }
.ripple { position: absolute; border-radius: 50%; transform: scale(0); animation: rippleAnim .7s linear; background: rgba(255,255,255,0.55); pointer-events:none; }
@keyframes rippleAnim { to { transform: scale(3.2); opacity: 0; } }

.glow-pulse { animation: glowPulse 3s ease-in-out infinite; }
@keyframes glowPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(240,166,58,.55), 0 10px 40px -10px rgba(240,166,58,.7); }
  50% { box-shadow: 0 0 0 10px rgba(240,166,58,0), 0 14px 46px -8px rgba(240,166,58,.9); }
}

/* clickable card lift */
.click-card { cursor: pointer; transition: transform .3s cubic-bezier(.2,.7,.2,1), box-shadow .3s ease, border-color .3s ease; }
.click-card:hover { transform: translateY(-6px); }
.click-card:active { transform: translateY(-2px) scale(.99); }

/* ---------- Stats ---------- */
.stat-num { font-variant-numeric: tabular-nums; }

/* ---------- Blob shapes ---------- */
.blob { border-radius: 42% 58% 63% 37% / 41% 44% 56% 59%; }
.blob-morph { animation: morph 12s ease-in-out infinite; }
@keyframes morph {
  0%,100% { border-radius: 42% 58% 63% 37% / 41% 44% 56% 59%; }
  50% { border-radius: 58% 42% 37% 63% / 55% 40% 60% 45%; }
}

.eyebrow-rule { width: 42px; height: 3px; background: linear-gradient(90deg,#F0A63A,#5B7FFF); border-radius: 2px; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #F7F7FB; }
::-webkit-scrollbar-thumb { background: #C9CDEA; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #A6ACD9; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid #F0A63A; outline-offset: 3px; border-radius: 4px;
}

.clip-badge { clip-path: polygon(50% 0%, 100% 20%, 100% 80%, 50% 100%, 0 80%, 0 20%); }

/* page loader */
#pageLoader { position: fixed; inset: 0; z-index: 999; background:#0B1042; display:flex; align-items:center; justify-content:center; transition: opacity .5s ease, visibility .5s ease; }
#pageLoader.hide { opacity:0; visibility:hidden; }
.loader-ring { width:44px; height:44px; border-radius:50%; border:3px solid rgba(240,166,58,.25); border-top-color:#F0A63A; animation: spin 1s linear infinite; }

/* ============ Responsive hardening (mobile / tablet / desktop) ============ */

/* Fluid type for big display headings so they never overflow small screens */
h1.font-display { font-size: clamp(2rem, 6.5vw, 3.75rem); }

/* Prevent horizontal scroll from any absolute-positioned floating decorations */
html, body { overflow-x: hidden; }

/* Tighten section padding on small screens */
@media (max-width: 640px) {
  section { scroll-margin-top: 90px; }
  .shadow-card, .shadow-softcard { box-shadow: 0 10px 30px -14px rgba(11,16,66,0.28); }
  #erpTilt { position: static !important; width: 100% !important; margin-top: 1rem; }
  .clip-badge { display: none; }
}

/* Tablet: soften grid columns already handled by Tailwind sm:/lg: classes,
   but ensure stat bars and step indicators wrap gracefully */
@media (max-width: 480px) {
  .glass-light.rounded-full { border-radius: 1.5rem; }
}

/* Ensure tilt-card transforms don't break layout flow on touch devices (no hover) */
@media (hover: none) {
  .tilt-card:hover, .tilt-card { transform: none !important; }
  .click-card:hover { transform: translateY(-3px); }
}

/* Admission form step labels: hide long labels on very small screens, keep dots */
@media (max-width: 380px) {
  .step-label { display: none; }
}

/* Make sure modals never exceed viewport height on small screens */
#teacherModal .relative, #eventModal .relative, #erpModal .relative {
  max-height: 90vh;
  overflow-y: auto;
}

/* Search panel input full width on mobile */
@media (max-width: 640px) {
  #searchPanel form { flex-direction: column; align-items: stretch; }
  #searchPanel button { align-self: flex-end; }
}
