/* ═══════════════════════════════════════════════════════════════
   CINEMATIC.CSS — Caring Vision Therapy Academy
   Phases 1-5: Inline evacuation · Parallax · 3D · Film grain
   · Smooth scroll · Text reveals · Magnetic interactions
   All styles previously scattered as inline style="" attrs
═══════════════════════════════════════════════════════════════ */


/* ─────────────────────────────────────────────────────────────
   NATIVE SMOOTH SCROLL
───────────────────────────────────────────────────────────── */

html { scroll-behavior: smooth; }

/* ─────────────────────────────────────────────────────────────
   PHASE 1A — HERO CINEMATIC LAYOUT
   (moved from 172-line <style> block in Index.cshtml)
───────────────────────────────────────────────────────────── */

.hero {
  background: #07111F !important;
  overflow: hidden;
}

.hero-bgs { display: block !important; }

.hero-bg[data-slide="1"] { background-position: center 30% !important; }
.hero-bg[data-slide="2"] { background-position: center 22% !important; }
.hero-bg[data-slide="3"] { background-position: center 15% !important; }

.hero-overlay {
  background:
    linear-gradient(180deg,
      rgba(7,17,31,.84) 0%,
      rgba(7,17,31,.30) 16%,
      rgba(7,17,31,.24) 52%,
      rgba(7,17,31,.68) 84%,
      rgba(7,17,31,.98) 100%),
    linear-gradient(rgba(7,17,31,.36), rgba(7,17,31,.36)),
    radial-gradient(ellipse 520px 520px at 94% 5%,
      rgba(79,163,255,.08) 0%, transparent 65%),
    radial-gradient(ellipse 360px 360px at 6% 94%,
      rgba(0,189,184,.05) 0%, transparent 65%) !important;
  animation: none !important;
}

.hero-overlay::after {
  content: '' !important;
  position: absolute !important;
  inset: 0 !important;
  background-image:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.04'/%3E%3C/svg%3E"),
    linear-gradient(rgba(255,255,255,.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.022) 1px, transparent 1px) !important;
  background-size: 200px, 70px 70px, 70px 70px !important;
  opacity: .55 !important;
  pointer-events: none !important;
}

.hs-right { display: none !important; }

.hero-content {
  position: relative !important;
  z-index: 3 !important;
  max-width: 1340px !important;
  margin: 0 auto !important;
  padding: 128px 5% 88px !important;
  width: 100% !important;
  min-height: 100vh !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-end !important;
  text-align: center !important;
}

.hero-slides {
  max-width: 800px !important;
  width: 100% !important;
  position: relative !important;
  margin: 0 !important;
}

.hero-slide {
  flex-direction: column !important;
  align-items: center !important;
  gap: 0 !important;
}

.hs-left { width: 100%; }

.hero-affiliation { margin-bottom: 1.8rem !important; }

.hs-title {
  font-size: clamp(2.4rem, 4.8vw, 4.4rem) !important;
  line-height: .90 !important;
  letter-spacing: -.038em !important;
  margin-bottom: .65em !important;
}

.hs-accent { display: inline !important; line-height: inherit !important; }

.hs-desc {
  font-size: clamp(.96rem, 1.05vw, 1.09rem) !important;
  line-height: 1.74 !important;
  color: rgba(255,255,255,.60) !important;
  max-width: 580px !important;
  margin: 0 auto 2.4rem !important;
}

.hs-actions { justify-content: center !important; }
.hs-trust   { justify-content: center !important; }

.hero-progress { display: none !important; }

#heroCounterCurrent { display: none; }

.hero-arrow {
  border: 1px solid rgba(255,255,255,.14) !important;
  background: rgba(255,255,255,.04) !important;
}
.hero-arrow:hover {
  background: rgba(255,255,255,.12) !important;
  border-color: rgba(255,255,255,.28) !important;
}

/* Dark-hero navbar overrides */
body.dark-hero .navbar {
  transition:
    background 0.45s cubic-bezier(0.16,1,0.3,1),
    box-shadow 0.45s cubic-bezier(0.16,1,0.3,1),
    border-radius 0.45s cubic-bezier(0.16,1,0.3,1),
    border-color 0.45s cubic-bezier(0.16,1,0.3,1) !important;
}
body.dark-hero .navbar:not(.scrolled) {
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  padding: 0 max(5vw, 28px) !important;
}
body.dark-hero .navbar:not(.scrolled) .nav-brand-text .accent { color: #fff !important; }
body.dark-hero .navbar:not(.scrolled) .nav-brand-tail { color: #fff !important; }
body.dark-hero .navbar.scrolled .nav-brand-text .accent { color: inherit !important; }

@media (max-width: 900px) {
  .hero-content { padding-top: 90px !important; padding-bottom: 80px !important; }
  .hero-slides  { max-width: 540px !important; }
}

@media (max-width: 640px) {
  .hs-title     { font-size: clamp(2rem, 9vw, 3rem) !important; }
  .hero-content { padding-top: 80px !important; padding-bottom: 76px !important; }
  .hero-slides  { max-width: 90vw !important; }
  .hs-desc      { font-size: .88rem !important; }
  .hero-progress-label { display: none !important; }
  .hero-progress { gap: 14px !important; }
  .hs-trust     { flex-wrap: wrap !important; gap: 8px 14px !important; justify-content: center !important; }
  .hs-trust-item { font-size: .74rem !important; }
  .hero-affiliation { font-size: .73rem !important; margin-bottom: 1.2rem !important; }
}


/* ─────────────────────────────────────────────────────────────
   PHASE 1B — MODIFIER CLASSES
   Replaces every style="" attribute across all pages
───────────────────────────────────────────────────────────── */

/* Stat icon color variants */
.sov-stat-icon--gold {
  background: linear-gradient(145deg, rgba(26,107,218,.22), rgba(26,107,218,.06));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 6px 20px rgba(26,107,218,.18);
  border: 1px solid rgba(26,107,218,.22);
}
.sov-stat-icon--violet {
  background: linear-gradient(145deg, rgba(139,92,246,.22), rgba(109,40,217,.06));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.10), 0 6px 20px rgba(109,40,217,.22);
  border: 1px solid rgba(139,92,246,.22);
}
.sov-stat-icon--emerald {
  background: linear-gradient(145deg, rgba(16,185,129,.22), rgba(16,185,129,.06));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.10), 0 6px 20px rgba(16,185,129,.22);
  border: 1px solid rgba(16,185,129,.22);
}
.sov-stat-icon--sky {
  background: linear-gradient(145deg, rgba(14,165,233,.22), rgba(14,165,233,.06));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.10), 0 6px 20px rgba(14,165,233,.22);
  border: 1px solid rgba(14,165,233,.22);
}

/* Stat num text variant (for label text like "COVD") */
.sov-stat-num--text {
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  letter-spacing: .02em;
}

/* Why-row icon orb gradients */
.orb-indigo  { background: linear-gradient(135deg, #818CF8, #4F46E5); }
.orb-purple  { background: linear-gradient(135deg, #C084FC, #9333EA); }
.orb-emerald { background: linear-gradient(135deg, #34D399, #059669); }
.orb-sky     { background: linear-gradient(135deg, #38BDF8, #0284C7); }

/* Why-row metric color variants via CSS custom properties */
.why-row-metric  { color: var(--m-color, var(--violet)); }
.why-metric-big  { color: var(--m-color, var(--violet)); }
.why-metric-desc { color: var(--m-desc, var(--m-color, var(--violet))); }

.metric-indigo  { background: linear-gradient(135deg,#EDE9FE,#DDD6FE); --m-color:#4F46E5; --m-desc:#6D28D9; }
.metric-purple  { background: linear-gradient(135deg,#F3E8FF,#E9D5FF); --m-color:#7C3AED; }
.metric-emerald { background: linear-gradient(135deg,#D1FAE5,#A7F3D0); --m-color:#059669; }
.metric-sky     { background: linear-gradient(135deg,#E0F2FE,#BAE6FD); --m-color:#0284C7; }

.why-metric-big--sm { font-size: clamp(3.2rem, 5.5vw, 5rem); }

/* Cinematic program panels — CSS custom property modifiers */
.cin-panel--gold   { --panel-accent: #1A6BDA; --panel-accent-rgb: 26,107,218; }
.cin-panel--green  { --panel-accent: #34D399; --panel-accent-rgb: 52,211,153; }
.cin-panel--sky    { --panel-accent: #38BDF8; --panel-accent-rgb: 56,189,248; }

/* Derive sub-element styling from panel accent CSS vars */
.cin-prog-icon {
  background: linear-gradient(145deg,
    rgba(var(--panel-accent-rgb),.20),
    rgba(var(--panel-accent-rgb),.05));
  border: 1px solid rgba(var(--panel-accent-rgb),.28);
  box-shadow: 0 8px 28px rgba(var(--panel-accent-rgb),.18),
    inset 0 1px 0 rgba(255,255,255,.08);
}
.cin-tag {
  color: var(--panel-accent);
  border-color: rgba(var(--panel-accent-rgb),.38);
  background: rgba(var(--panel-accent-rgb),.10);
}
.cin-stat-box  { border-color: rgba(var(--panel-accent-rgb),.24) !important; }
.cin-stat-num  { color: var(--panel-accent); }
.cin-stat-unit { color: var(--panel-accent); }
.cin-cta       { color: var(--panel-accent); }

.cin-stat-num--flex { font-size: clamp(2rem, 3.5vw, 3.2rem); }

/* Trust badge accent modifiers */
.trust-badge--amber   { --tb-accent: #F59E0B; }
.trust-badge--gold    { --tb-accent: #1A6BDA; }
.trust-badge--violet  { --tb-accent: #8B5CF6; }
.trust-badge--sky     { --tb-accent: #0EA5E9; }
.trust-badge--emerald { --tb-accent: #10B981; }
.trust-badge--pink    { --tb-accent: #EC4899; }

/* Testimonial avatar gradients */
.t-avatar--violet  { background: linear-gradient(135deg, var(--violet-light), var(--violet)); }
.t-avatar--emerald { background: linear-gradient(135deg, #34D399, var(--emerald)); }
.t-avatar--sky     { background: linear-gradient(135deg, #38BDF8, var(--sky)); }
.t-avatar--amber   { background: linear-gradient(135deg, #FCD34D, var(--amber)); }
.t-avatar--pink    { background: linear-gradient(135deg, #F9A8D4, #DB2777); }
.t-avatar--indigo  { background: linear-gradient(135deg, #818CF8, #4F46E5); }

/* Faculty role label colors */
.faculty-role--violet  { color: var(--violet); }
.faculty-role--emerald { color: var(--emerald); }

/* Faculty tag color variants */
.faculty-tag--violet {
  background: rgba(109,40,217,.08);
  color: var(--violet);
  border: 1px solid rgba(109,40,217,.16);
}
.faculty-tag--emerald {
  background: rgba(16,185,129,.08);
  color: var(--emerald);
  border: 1px solid rgba(16,185,129,.16);
}

/* Hero pill dot color variants */
.hero-pill-dot--gold {
  background: var(--sovereign-gold);
  box-shadow: 0 0 6px rgba(26,107,218,.6);
}
.hero-pill-dot--violet {
  background: var(--violet-light);
  box-shadow: 0 0 6px rgba(139,92,246,.6);
}
.hero-pill-dot--emerald {
  background: #34D399;
  box-shadow: 0 0 6px rgba(52,211,153,.6);
}

/* Mission panel bar variants */
.mission-bar--indigo  { background: linear-gradient(90deg, #818CF8, #4F46E5); }
.mission-bar--emerald { background: linear-gradient(90deg, #34D399, #059669); }
.mission-bar--gold    { background: linear-gradient(90deg, var(--sovereign-gold-l), var(--sovereign-gold)); }

/* Mission icon orb variants */
.mission-orb--indigo {
  background: linear-gradient(135deg, #818CF8, #4F46E5);
  box-shadow: 6px 6px 14px rgba(79,70,229,.28),
    -4px -4px 10px rgba(255,255,255,.40),
    inset 2px 2px 5px rgba(255,255,255,.25),
    inset -2px -2px 5px rgba(0,0,0,.12);
}
.mission-orb--emerald {
  background: linear-gradient(135deg, #34D399, #059669);
  box-shadow: 12px 12px 24px rgba(5,150,105,.28),
    -8px -8px 16px rgba(255,255,255,.40),
    inset 4px 4px 8px rgba(255,255,255,.40),
    inset -4px -4px 8px rgba(0,0,0,.10);
}
.mission-orb--gold {
  background: linear-gradient(135deg, var(--sovereign-gold-l), var(--sovereign-gold));
  box-shadow: 12px 12px 24px rgba(26,107,218,.28),
    -8px -8px 16px rgba(255,255,255,.40),
    inset 4px 4px 8px rgba(255,255,255,.40),
    inset -4px -4px 8px rgba(0,0,0,.10);
}

/* Value row icon variants */
.value-icon--gold {
  background: linear-gradient(135deg, var(--sovereign-gold-l), var(--sovereign-gold));
  box-shadow: 6px 6px 14px rgba(26,107,218,.28), -4px -4px 10px rgba(255,255,255,.40);
}
.value-icon--purple {
  background: linear-gradient(135deg, #A78BFA, #7C3AED);
  box-shadow: 6px 6px 14px rgba(124,58,237,.28),
    -4px -4px 10px rgba(255,255,255,.40),
    inset 2px 2px 5px rgba(255,255,255,.25),
    inset -2px -2px 5px rgba(0,0,0,.12);
}
.value-icon--pink {
  background: linear-gradient(135deg, #F9A8D4, #DB2777);
  box-shadow: 6px 6px 14px rgba(219,39,119,.28), -4px -4px 10px rgba(255,255,255,.40);
}
.value-icon--sky {
  background: linear-gradient(135deg, #38BDF8, #0EA5E9);
  box-shadow: 6px 6px 14px rgba(14,165,233,.28), -4px -4px 10px rgba(255,255,255,.40);
}
.value-icon--emerald {
  background: linear-gradient(135deg, #34D399, #10B981);
  box-shadow: 6px 6px 14px rgba(16,185,129,.28), -4px -4px 10px rgba(255,255,255,.40);
}
.value-icon--cyan {
  background: linear-gradient(135deg, #67E8F9, #06B6D4);
  box-shadow: 6px 6px 14px rgba(6,182,212,.28), -4px -4px 10px rgba(255,255,255,.40);
}

/* Section photo background overlay system */
.section-photo-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: -1;
  pointer-events: none;
}
.section-photo-bg--4 { opacity: .04; }
.section-photo-bg--5 { opacity: .05; }
.section-photo-bg--6 { opacity: .06; }

/* Section position context helpers */
.values-section        { position: relative; isolation: isolate; }
.journey-section       { position: relative; isolation: isolate; }
.timeline-dark-section { position: relative; isolation: isolate; overflow: hidden; }

/* Grain overlay host sections */
.sovereign-stats,
.programs-cinematic-section,
.testimonials-dark,
.cta-section,
.alumni-section { position: relative; overflow: hidden; }

/* Countdown text caption */
.countdown-caption {
  font-size: .78rem;
  color: var(--clay-muted);
  margin-bottom: 28px;
  margin-top: -14px;
  opacity: .6;
}

/* CTA sub spacing variant */
.cta-sub--mb { margin-bottom: 20px !important; }

/* FAQ header CTA button spacing */
.faq-header .btn { margin-top: 28px; }

/* Footer brand link */
footer .footer-brand .nav-brand {
  margin-bottom: 4px;
  display: inline-flex;
}

/* Footer contact footnote */
.contact-footnote {
  font-size: .75em;
  opacity: .8;
}


/* ─────────────────────────────────────────────────────────────
   PHASE 2 — PARALLAX & 3D DEPTH SYSTEM
───────────────────────────────────────────────────────────── */

/* Hero layers — animated by parallax.js via GSAP */
.hero-bg       { will-change: transform; transform-origin: center center; }
.hero-content  { will-change: transform, opacity; }
.hero-overlay  { will-change: transform; }

/* 3D perspective container */
.depth-scene {
  perspective: 1200px;
  perspective-origin: 50% 40%;
  transform-style: preserve-3d;
}

/* Parallax section backgrounds */
.section-photo-bg { will-change: transform; }


/* ─────────────────────────────────────────────────────────────
   PHASE 3 — CINEMATIC HERO POLISH
───────────────────────────────────────────────────────────── */


/* Animated film grain overlay */
.grain-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  opacity: .065;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
  animation: grain-shift 0.45s steps(1) infinite;
}

@keyframes grain-shift {
  0%   { background-position:   0    0;   }
  10%  { background-position:  -5%  -10%; }
  20%  { background-position: -15%   5%;  }
  30%  { background-position:   7%  -25%; }
  40%  { background-position:  -5%  25%;  }
  50%  { background-position: -15%  10%;  }
  60%  { background-position:  15%   0;   }
  70%  { background-position:   0   15%;  }
  80%  { background-position:   3%  35%;  }
  90%  { background-position: -10%  10%;  }
  100% { background-position:   0    0;   }
}

/* Vignette on photo sections */
.vignette-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background: radial-gradient(ellipse 85% 80% at 50% 50%,
    transparent 40%, rgba(0,0,0,.52) 100%);
}

/* Subtle scan lines for film texture */
.scan-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,.025) 2px,
    rgba(0,0,0,.025) 4px
  );
  opacity: .45;
}

/* Enhanced programme panel hover */
.cin-panel:hover {
  box-shadow: 0 24px 64px rgba(0,0,0,.35),
    0 0 0 1px rgba(var(--panel-accent-rgb),.20);
}

/* Scroll progress glow */
.scroll-progress {
  box-shadow:
    0 0 12px rgba(26,107,218,1),
    0 0 30px rgba(26,107,218,.45),
    0 0 64px rgba(26,107,218,.15) !important;
}


/* ─────────────────────────────────────────────────────────────
   PHASE 4 — MAGNETIC BUTTONS & CUSTOM CURSOR
───────────────────────────────────────────────────────────── */

/* Custom cursor elements */
.cursor-dot {
  position: fixed;
  left: 0; top: 0;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #1A6BDA;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 1.5px rgba(0,0,0,.25), 0 0 8px rgba(26,107,218,.7);
  will-change: left, top;
}

.cursor-ring {
  position: fixed;
  left: 0; top: 0;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1.5px solid rgba(26,107,218,.65);
  pointer-events: none;
  z-index: 99998;
  transform: translate(-50%, -50%);
  transition:
    width .35s cubic-bezier(0.16,1,0.3,1),
    height .35s cubic-bezier(0.16,1,0.3,1),
    border-color .25s;
  will-change: left, top;
}

.cursor-ring.cursor-hover {
  width: 58px; height: 58px;
  border-color: rgba(26,107,218,.95);
}

@media (hover: none) {
  .cursor-dot, .cursor-ring { display: none; }
}


/* ─────────────────────────────────────────────────────────────
   PHASE 5 — SCROLL-DRIVEN ANIMATIONS
───────────────────────────────────────────────────────────── */

/* Word-split text reveal */
.word-reveal .word {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  margin-right: .22em;
}
.word-reveal .word-inner {
  display: inline-block;
  transform: translateY(108%);
  opacity: 0;
  filter: blur(4px);
  transition:
    transform .9s cubic-bezier(0.16,1,0.3,1),
    opacity .65s ease,
    filter .9s ease;
}
.word-reveal.in-view .word-inner {
  transform: translateY(0);
  opacity: 1;
  filter: blur(0);
}

.word-reveal .word:nth-child(1)  .word-inner { transition-delay: .00s; }
.word-reveal .word:nth-child(2)  .word-inner { transition-delay: .07s; }
.word-reveal .word:nth-child(3)  .word-inner { transition-delay: .14s; }
.word-reveal .word:nth-child(4)  .word-inner { transition-delay: .21s; }
.word-reveal .word:nth-child(5)  .word-inner { transition-delay: .28s; }
.word-reveal .word:nth-child(6)  .word-inner { transition-delay: .35s; }
.word-reveal .word:nth-child(7)  .word-inner { transition-delay: .42s; }
.word-reveal .word:nth-child(8)  .word-inner { transition-delay: .49s; }

/* Journey timeline step entrance */
.tl-step {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity .65s ease,
    transform .65s cubic-bezier(0.16,1,0.3,1);
}
.tl-step.tl-in { opacity: 1; transform: none; }
.tl-step:nth-child(2) { transition-delay: .12s; }
.tl-step:nth-child(3) { transition-delay: .24s; }

/* Programme panel 3D entrance (initial hidden state for JS) */
.cin-panel[data-cinematic-init] {
  opacity: 0;
  transform: translateY(32px) rotateX(4deg);
}

/* Gallery item entrance */
.gallery-item[data-cinematic-init] {
  opacity: 0;
  transform: scale(.96);
}

/* Stat elastic entrance */
.sov-stat[data-cinematic-init] {
  opacity: 0;
  transform: translateY(20px);
}


/* ─────────────────────────────────────────────────────────────
   REDUCED MOTION
───────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .grain-overlay        { animation: none !important; }
  .cursor-dot,
  .cursor-ring          { display: none !important; }
  .word-reveal .word-inner {
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
    filter: blur(0) !important;
  }
  .tl-step {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .cin-panel[data-cinematic-init],
  .gallery-item[data-cinematic-init],
  .sov-stat[data-cinematic-init] {
    opacity: 1 !important;
    transform: none !important;
  }
  .hero-bg, .hero-content, .hero-overlay,
  .section-photo-bg { will-change: auto !important; }
}
