/* ============================================================
   RohanLearn — dark "liquid glass" theme
   Sections: 1 Tokens · 2 Base · 3 Background · 4 Glass · 5 Nav
             6 Buttons · 7 Hero · 8 Marquee · 9 Sections/Cards
             10 Teaser · 11 About page · 12 CTA · 13 Footer
             14 Animations · 15 Responsive · 16 Reduced motion
   ============================================================ */

/* ---------- 1. Design tokens ---------- */
:root {
  /* EDIT: change these two lines to re-colour the whole site */
  --accent:        #7c5cff;   /* violet  */
  --accent-2:      #22d3ee;   /* cyan    */
  --yt:            #ff3b30;   /* youtube red */

  --bg:            #000000;
  --bg-soft:       #050505;
  --text:          #ecebf5;
  --text-dim:      #a5a3b8;
  --text-faint:    #6f6d85;

  /* glass surface */
  --glass-bg:      rgba(255, 255, 255, .045);
  --glass-bg-2:    rgba(255, 255, 255, .075);
  --glass-brd:     rgba(255, 255, 255, .10);
  --glass-brd-hi:  rgba(255, 255, 255, .22);
  --glass-blur:    18px;

  --radius:        20px;
  --radius-lg:     28px;
  --radius-pill:   999px;

  --shadow:        0 18px 50px -12px rgba(0, 0, 0, .65);
  --shadow-lg:     0 40px 90px -20px rgba(0, 0, 0, .8);

  --maxw:          1160px;
  --ease:          cubic-bezier(.22, 1, .36, 1);
  --ease-soft:     cubic-bezier(.4, 0, .2, 1);
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* fade the whole page in on load */
body { opacity: 0; transition: opacity .6s var(--ease-soft); }
body.is-ready { opacity: 1; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3 {
  line-height: 1.1;
  letter-spacing: -.02em;
  margin: 0 0 .5em;
  font-weight: 600;
}

/* Classic editorial display type for the big headlines; body copy and
   small UI text (card titles, nav, buttons) stay on Inter for legibility —
   the same pairing serious finance/editorial sites use. */
h1, h2, .about-card__name {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  letter-spacing: -.01em;
}

p { margin: 0 0 1.1em; color: var(--text-dim); }
strong { color: var(--text); font-weight: 600; }

.serif-italic {
  font-family: "Fraunces", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  letter-spacing: -.01em;
}

.accent {
  background: linear-gradient(100deg, var(--accent) 0%, var(--accent-2) 60%, var(--accent) 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 7s linear infinite;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 24px;
}
.container--narrow { max-width: 800px; }

.skip-link {
  position: absolute; left: -9999px;
  background: var(--accent); color: #fff;
  padding: 10px 18px; border-radius: 0 0 12px 0; z-index: 999;
}
.skip-link:focus { left: 0; top: 0; }

:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- 3. Animated background ---------- */
/* Charcoal-grey fading to black — a neutral gradient, not a colour wash.
   Lighter graphite near the top, settling to pure black by mid-page. */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(130% 90% at 50% -15%, #232327 0%, #101012 42%, transparent 72%),
    var(--bg);
}

/* Soft neutral-grey accents for a little movement/depth — no hue. */
.bg__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: .14;
  background: radial-gradient(circle, #55555c 0%, transparent 68%);
  will-change: transform;
}
.bg__blob--1 {
  width: 620px; height: 620px;
  top: -180px; left: -120px;
  animation: drift1 26s ease-in-out infinite;
}
.bg__blob--2 {
  width: 560px; height: 560px;
  top: 18%; right: -180px;
  opacity: .1;
  animation: drift2 32s ease-in-out infinite;
}
.bg__blob--3 {
  width: 700px; height: 700px;
  bottom: -280px; left: 32%;
  opacity: .08;
  animation: drift3 38s ease-in-out infinite;
}

.bg__grid {
  position: absolute; inset: -10% -10%;
  background-image:
    linear-gradient(rgba(255,255,255,.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.028) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 75%);
  /* subtle scroll parallax — JS sets --scroll-parallax */
  transform: translateY(var(--scroll-parallax, 0px));
}

/* subtle film grain so the gradients don't band */
.bg__grain {
  position: absolute; inset: -50%;
  opacity: .16;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
  animation: grain 8s steps(6) infinite;
  pointer-events: none;
}

/* mouse-following glow */
.cursor-glow {
  position: fixed;
  top: 0; left: 0;
  width: 420px; height: 420px;
  margin: -210px 0 0 -210px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124,92,255,.16) 0%, transparent 62%);
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity .45s var(--ease-soft);
  will-change: transform;
}
body.has-pointer .cursor-glow { opacity: 1; }

/* scroll progress */
.progress {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 2px;
  z-index: 200;
  background: rgba(255,255,255,.05);
}
.progress__bar {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 14px var(--accent);
}

/* ---------- 4. The glass surface ---------- */
.glass {
  position: relative;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(165%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(165%);
  border: 1px solid var(--glass-brd);
  box-shadow:
    var(--shadow),
    inset 0 1px 0 rgba(255,255,255,.13),      /* top specular edge */
    inset 0 -1px 0 rgba(255,255,255,.04);
}

/* soft light streak across the top of every glass panel */
.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(160deg, rgba(255,255,255,.10) 0%, transparent 42%);
  pointer-events: none;
}

/* ---------- 5. Navigation ---------- */
.nav {
  position: fixed;
  top: 18px; left: 0; right: 0;
  z-index: 100;
  padding-inline: 24px;
  animation: navDrop .9s var(--ease) .15s both;
}

.nav__inner {
  max-width: var(--maxw);
  margin-inline: auto;
  border-radius: var(--radius-pill);
  /* --nav-compact (0→1, set by JS on scroll) gently tightens the capsule —
     a liquid-glass tab bar settling as you scroll, not a hard snap. */
  padding:
    calc(10px - var(--nav-compact, 0) * 3px)
    calc(10px - var(--nav-compact, 0) * 3px)
    calc(10px - var(--nav-compact, 0) * 3px)
    calc(20px - var(--nav-compact, 0) * 6px);
  transform: scale(calc(1 - var(--nav-compact, 0) * 0.035));
  display: flex;
  align-items: center;
  gap: 20px;
  transition: background .4s var(--ease-soft), border-color .4s var(--ease-soft), box-shadow .4s var(--ease-soft);
}
.nav.is-stuck .nav__inner {
  background: rgba(0,0,0,.8);
  border-color: var(--glass-brd-hi);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.14);
}

.nav__logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -.02em;
  margin-right: auto;
}
.nav__logo-mark {
  display: grid; place-items: center;
  width: 32px; height: 32px;
  border-radius: 10px;
  font-family: "Fraunces", Georgia, serif;
  font-size: 19px;
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  box-shadow: 0 6px 20px -4px var(--accent);
  transition: transform .5s var(--ease);
}
.nav__logo:hover .nav__logo-mark { transform: rotate(-10deg) scale(1.08); }
.nav__logo-text em { font-style: normal; color: var(--text-dim); font-weight: 400; }

.nav__links { position: relative; display: flex; gap: 4px; }
.nav__links a {
  position: relative;
  z-index: 1;                 /* sit above the sliding glass indicator */
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 15px;
  color: var(--text-dim);
  transition: color .3s var(--ease-soft);
}
.nav__links a:hover { color: var(--text); }
.nav__links a.is-active { color: var(--text); }

/* Liquid-glass pill — JS (nav__indicator) slides/resizes this under
   whichever link is hovered, and snaps back to the active page link.
   Apple Music tab-bar style: a soft frosted capsule that glides. */
.nav__indicator {
  position: absolute;
  top: 3px; bottom: 3px;
  left: 0; width: 0;
  z-index: 0;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, rgba(124,92,255,.4), rgba(34,211,238,.24));
  border: 1px solid rgba(255,255,255,.2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 6px 20px -8px var(--accent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  /* elastic "liquid" glide with a little overshoot, like a blob settling */
  transition:
    left .5s cubic-bezier(.34, 1.56, .64, 1),
    width .5s cubic-bezier(.34, 1.56, .64, 1),
    opacity .3s var(--ease-soft);
}
.nav__indicator.is-ready { opacity: 1; }

.nav__burger {
  display: none;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid var(--glass-brd);
  background: var(--glass-bg-2);
  cursor: pointer;
  padding: 0;
  place-items: center;
  gap: 5px;
}
.nav__burger span {
  display: block;
  width: 17px; height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .35s var(--ease), opacity .25s;
}
.nav__burger[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:last-child  { transform: translateY(-3px) rotate(-45deg); }

.nav__mobile {
  max-width: var(--maxw);
  margin: 10px auto 0;
  border-radius: var(--radius);
  padding: 10px;
  display: flex;
  flex-direction: column;
  background: rgba(0,0,0,.92);
  animation: menuIn .35s var(--ease) both;
}
.nav__mobile[hidden] { display: none; }
.nav__mobile a {
  padding: 13px 16px;
  border-radius: 14px;
  color: var(--text-dim);
  transition: background .25s, color .25s;
}
.nav__mobile a:hover { background: var(--glass-bg-2); color: var(--text); }

/* ---------- 6. Buttons ---------- */
.btn {
  --btn-bg: var(--glass-bg-2);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 20px;
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -.01em;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid var(--glass-brd);
  background: var(--btn-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16);
  overflow: hidden;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .3s;
  will-change: transform;
}
.btn--lg { padding: 15px 28px; font-size: 16px; }

/* sheen that sweeps across on hover */
.btn::after {
  content: "";
  position: absolute;
  top: 0; left: -120%;
  width: 55%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.28), transparent);
  transform: skewX(-18deg);
  transition: left .75s var(--ease);
}
.btn:hover::after { left: 160%; }

.btn:hover { border-color: var(--glass-brd-hi); }
.btn:active { transform: scale(.97) !important; }

.btn__arrow { transition: transform .4s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(5px); }

.btn--primary {
  background: linear-gradient(135deg, var(--accent), #5b6cff);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 10px 34px -8px var(--accent), inset 0 1px 0 rgba(255,255,255,.28);
}
.btn--primary:hover { box-shadow: 0 16px 46px -8px var(--accent), inset 0 1px 0 rgba(255,255,255,.35); }

.btn--yt {
  background: linear-gradient(135deg, #ff4d43, #e0271c);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 10px 34px -10px var(--yt), inset 0 1px 0 rgba(255,255,255,.3);
}
.btn--yt:hover { box-shadow: 0 16px 46px -10px var(--yt), inset 0 1px 0 rgba(255,255,255,.4); }

/* the big CTA buttons breathe gently when idle — a slow "alive" animation,
   distinct from anything triggered by hover or scroll */
.btn--lg.btn--primary, .btn--lg.btn--yt { animation: breathe 3.6s ease-in-out infinite; }
.btn--lg.btn--primary:hover, .btn--lg.btn--yt:hover { animation-play-state: paused; }

@keyframes breathe {
  0%, 100% { box-shadow: 0 10px 34px -8px var(--accent), inset 0 1px 0 rgba(255,255,255,.28); }
  50%      { box-shadow: 0 14px 44px -6px var(--accent), inset 0 1px 0 rgba(255,255,255,.32); }
}
.btn--lg.btn--yt {
  animation-name: breatheYt;
}
@keyframes breatheYt {
  0%, 100% { box-shadow: 0 10px 34px -10px var(--yt), inset 0 1px 0 rgba(255,255,255,.3); }
  50%      { box-shadow: 0 14px 44px -8px var(--yt), inset 0 1px 0 rgba(255,255,255,.34); }
}

.btn--ghost { color: var(--text); }
.btn--ghost:hover { background: rgba(255,255,255,.1); }

/* ---------- 7. Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 150px 0 90px;
}
.hero--sub { min-height: 72svh; padding-bottom: 40px; }

.hero__inner { text-align: center; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 16px 7px 12px;
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  color: var(--text-dim);
  background: var(--glass-bg);
  border: 1px solid var(--glass-brd);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  margin-bottom: 30px;
}
.pill__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 0 rgba(52,211,153,.65);
  animation: ping 2.4s ease-out infinite;
}

.hero__title {
  font-size: clamp(2.9rem, 8.5vw, 6.2rem);
  font-weight: 600;
  margin-bottom: 26px;
}
.hero__title--sub { font-size: clamp(2.5rem, 7vw, 5rem); }
.hero__title .line {
  display: block;
  overflow: hidden;
  padding-bottom: .08em;
  perspective: 700px;
}

/* each word flips up into place like a keynote title card — JS sets the stagger delay */
.hero__title .word {
  display: inline-block;
  transform: translateY(90%) rotateX(-95deg);
  transform-origin: 50% 100%;
  opacity: 0;
  animation: wordFlip 1.15s var(--ease) forwards;
}

.hero__sub {
  max-width: 620px;
  margin: 0 auto 38px;
  font-size: clamp(1rem, 2.2vw, 1.18rem);
  color: var(--text-dim);
}

.hero__actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 66px;
}

/* stats row */
.stats {
  display: inline-flex;
  align-items: center;
  gap: 30px;
  padding: 18px 34px;
  border-radius: var(--radius);
  background: var(--glass-bg);
  border: 1px solid var(--glass-brd);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1);
}
.stat { display: flex; flex-direction: column; }
.stat__num {
  font-size: 1.7rem;
  font-weight: 600;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}
.stat__label { font-size: 12.5px; color: var(--text-faint); text-transform: uppercase; letter-spacing: .1em; }
.stat__div { width: 1px; height: 34px; background: var(--glass-brd); }

.scroll-hint {
  position: absolute;
  bottom: 34px; left: 50%;
  transform: translateX(-50%);
  font-size: 11.5px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--text-faint);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.scroll-hint__line {
  width: 1px; height: 42px;
  background: linear-gradient(var(--text-faint), transparent);
  animation: scrollLine 2.2s var(--ease-soft) infinite;
}

/* ---------- 8. Marquee ---------- */
.marquee {
  position: relative;
  overflow: hidden;
  padding: 20px 0;
  border-block: 1px solid var(--glass-brd);
  background: rgba(255,255,255,.02);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee__track {
  display: flex;
  align-items: center;
  gap: 26px;
  width: max-content;
  animation: marquee 34s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee span {
  font-size: 14px;
  letter-spacing: .04em;
  color: var(--text-faint);
  white-space: nowrap;
}
.marquee__sep { color: var(--accent); }

/* ---------- 9. Sections & cards ---------- */
.section { padding: 120px 0; }
.section--tight { padding: 60px 0; }

.section__head { text-align: center; max-width: 700px; margin: 0 auto 60px; }

.eyebrow {
  display: inline-block;
  font-size: 12px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
  font-weight: 600;
}

.section__title { font-size: clamp(2rem, 4.5vw, 3.1rem); }
.section__title em { font-size: 1.08em; }
.section__lede { font-size: 1.05rem; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}

.card {
  border-radius: var(--radius-lg);
  padding: 34px 30px;
  transform-style: preserve-3d;
  transition: transform .5s var(--ease), border-color .4s var(--ease-soft), box-shadow .5s var(--ease);
}
.card:hover {
  border-color: var(--glass-brd-hi);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,.2);
}
.card h3 { font-size: 1.28rem; margin-bottom: 12px; }
.card p { margin: 0; font-size: .97rem; }

.card__icon {
  font-size: 26px;
  width: 54px; height: 54px;
  display: grid; place-items: center;
  border-radius: 16px;
  margin-bottom: 20px;
  background: linear-gradient(145deg, rgba(124,92,255,.28), rgba(34,211,238,.14));
  border: 1px solid var(--glass-brd);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2);
  transition: transform .45s cubic-bezier(.34, 1.56, .64, 1), border-radius .45s var(--ease);
}
/* icon pops and un-rounds into a diamond on hover — a different, playful
   animation language from the panel-level 3D tilt used elsewhere */
.card:hover .card__icon {
  transform: scale(1.12) rotate(-8deg);
  border-radius: 30% 70% 65% 35% / 40% 45% 55% 60%;
}

.card__num {
  font-family: "Fraunces", Georgia, serif;
  font-size: 2.4rem;
  line-height: 1;
  margin-bottom: 16px;
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
  transition: transform .45s cubic-bezier(.34, 1.56, .64, 1);
}
.card:hover .card__num { transform: translateY(-4px) scale(1.08); }

/* the glare follows the cursor across the card (set by JS) */
.card__glare {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  pointer-events: none;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,.13), transparent 65%);
  transition: opacity .4s var(--ease-soft);
}
.card:hover .card__glare { opacity: 1; }

/* ---------- 10. About teaser (home page) ---------- */
.teaser {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 52px;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
  align-items: center;
  overflow: hidden;
}
.teaser__glow,
.cta__glow,
.about-card__glow {
  position: absolute;
  width: 420px; height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent) 0%, transparent 68%);
  opacity: .16;
  top: -180px; left: -120px;
  pointer-events: none;
  filter: blur(40px);
}
.teaser__body p:last-of-type { margin-bottom: 26px; }
.teaser__title { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
.teaser__title em { font-size: 1.1em; }

/* ---- Poster row: Netflix-style hover-expand cards ---- */
.posters {
  display: flex;
  gap: 8px;
  height: 320px;
}

.poster {
  position: relative;
  display: block;
  flex: 1 1 0%;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--glass-brd);
  background: #111;
  transition: flex-grow .6s cubic-bezier(.22, 1, .36, 1), aspect-ratio .6s cubic-bezier(.22, 1, .36, 1), border-color .4s;
}
/* exact 16:9 on hover, at any viewport width — flex-shrink/grow drop to
   0 so the aspect-ratio (paired with the row's fixed height) sizes the
   card precisely, while the other two cards absorb the remaining space. */
.poster:hover,
.poster:focus-visible {
  flex: 0 0 auto;
  aspect-ratio: 16 / 9;
  border-color: var(--glass-brd-hi);
}

.poster img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .7s var(--ease);
}
.poster:hover img { transform: scale(1.05); }

.poster__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,.88) 0%, rgba(0,0,0,.2) 48%, transparent 72%);
}

.poster__text {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.poster__title {
  font-size: 13.5px;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.poster:hover .poster__title { white-space: normal; }

.poster__meta {
  font-size: 12px;
  color: rgba(255,255,255,.68);
  white-space: nowrap;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .35s var(--ease-soft), transform .35s var(--ease-soft);
}
.poster:hover .poster__meta { opacity: 1; transform: none; }

/* latest-video embed — a frosted frame around the YouTube player */
.video-frame {
  border-radius: var(--radius-lg);
  padding: 12px;
  overflow: hidden;
}
.video-frame iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: calc(var(--radius-lg) - 8px);
  background: #000;
}
.video-frame__hint {
  margin: 10px 4px 2px;
  text-align: center;
  font-size: 12.5px;
  color: var(--text-faint);
}
.video-frame__caption {
  text-align: center;
  margin: 18px 0 0;
}
.video-frame__caption a {
  font-size: 14.5px;
  color: var(--text-dim);
  transition: color .3s;
}
.video-frame__caption a:hover { color: var(--accent-2); }

/* contact page — single-column variant of .teaser, centered */
.contact-card {
  grid-template-columns: 1fr;
  text-align: center;
  padding: 56px 48px;
}
.contact-card__body { max-width: 480px; margin-inline: auto; }
.contact-card__body p { margin-bottom: 28px; }

.contact-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.contact-email-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-faint);
}
.contact-email-row svg { flex-shrink: 0; opacity: .7; }

.contact-divider {
  width: 48px;
  height: 1px;
  margin: 30px auto 20px;
  background: var(--glass-brd-hi);
}
.contact-card .eyebrow { display: block; margin-bottom: 14px; }
.contact-socials { justify-content: center; }

/* avatar — circular frame. .avatar--photo holds a real <img class="avatar-img">;
   without it, the gradient + initial below act as a placeholder. */
.avatar {
  position: relative;
  width: 200px; height: 200px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin-inline: auto;
  background: linear-gradient(150deg, rgba(124,92,255,.4), rgba(34,211,238,.18));
  border: 1px solid var(--glass-brd-hi);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.22), 0 24px 60px -18px var(--accent);
  transition: transform .6s var(--ease), box-shadow .6s var(--ease);
}
.avatar--lg { width: 168px; height: 168px; margin-bottom: 24px; }
.avatar__initial {
  font-family: "Fraunces", Georgia, serif;
  font-size: 5rem;
  line-height: 1;
  color: rgba(255,255,255,.94);
}
.avatar--lg .avatar__initial { font-size: 4.2rem; }
.avatar__ring {
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 1px dashed rgba(255,255,255,.16);
  animation: spin 28s linear infinite;
}

/* photo variant: the <img> fills the circular frame completely */
.avatar--photo:hover {
  box-shadow: inset 0 2px 0 rgba(255,255,255,.28), 0 30px 74px -16px var(--accent);
}
.avatar-img {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

/* ---------- 11. About page ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 52px;
  align-items: start;
}

.about-card {
  position: sticky;
  top: 110px;
  border-radius: var(--radius-lg);
  padding: 38px 30px;
  text-align: center;
  overflow: hidden;
}
.about-card__name { font-size: 1.6rem; margin-bottom: 4px; }
.about-card__role { color: var(--text-faint); font-size: .92rem; margin-bottom: 26px; }

.about-card__facts {
  list-style: none;
  margin: 0 0 26px;
  padding: 0;
  text-align: left;
  border-top: 1px solid var(--glass-brd);
}
.about-card__facts li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 2px;
  border-bottom: 1px solid var(--glass-brd);
  font-size: .93rem;
}
.about-card__facts span { color: var(--text-faint); }
.about-card__facts strong { font-weight: 500; }

.socials { display: flex; gap: 10px; justify-content: center; }
.social {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--text-dim);
  background: var(--glass-bg-2);
  border: 1px solid var(--glass-brd);
  transition: transform .4s var(--ease), color .3s, background .3s, box-shadow .4s;
  will-change: transform;
}
.social:hover {
  color: #fff;
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  box-shadow: 0 12px 30px -8px var(--accent);
}

.about-story .section__title { font-size: clamp(1.75rem, 3.4vw, 2.5rem); margin-bottom: 24px; }
.about-story .section__title em { font-size: 1.06em; }
.about-story p { font-size: 1.03rem; }

.quote {
  border-radius: var(--radius);
  border-left: 2px solid var(--accent);
  padding: 26px 30px;
  margin: 34px 0 0;
}
.quote p {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-style: italic;
  font-size: 1.32rem;
  line-height: 1.45;
  color: var(--text);
}

/* timeline */
.timeline { list-style: none; margin: 0; padding: 0 0 0 34px; position: relative; }
.timeline::before {
  content: "";
  position: absolute;
  left: 5px; top: 8px; bottom: 8px;
  width: 1px;
  background: linear-gradient(var(--accent), var(--accent-2), transparent);
  opacity: .45;
}
.timeline__item { position: relative; padding-bottom: 40px; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__dot {
  position: absolute;
  left: -34px; top: 7px;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(124,92,255,.16), 0 0 18px var(--accent);
}
.timeline__year {
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent-2);
  font-weight: 600;
}
.timeline__item h3 { font-size: 1.18rem; margin: 8px 0 8px; }
.timeline__item p { margin: 0; font-size: .96rem; }

/* ---------- 12. CTA ---------- */
.cta {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 74px 40px;
  text-align: center;
  overflow: hidden;
}
.cta__glow { top: auto; bottom: -230px; left: 50%; transform: translateX(-50%); opacity: .22; }
.cta__title { font-size: clamp(2rem, 4.5vw, 3rem); }
.cta__sub { max-width: 460px; margin: 0 auto 32px; }
.cta .hero__actions { margin-bottom: 0; }

/* ---------- 13. Footer ---------- */
.footer {
  border-top: 1px solid var(--glass-brd);
  padding: 40px 0;
  margin-top: 60px;
  background: rgba(255,255,255,.015);
}
.footer__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: space-between;
}
.footer__links { display: flex; gap: 22px; }
.footer__links a {
  font-size: 14.5px;
  color: var(--text-dim);
  transition: color .3s;
}
.footer__links a:hover { color: var(--accent-2); }
.footer__copy { margin: 0; font-size: 13.5px; color: var(--text-faint); }

/* ---------- 14. Animations ---------- */

/* Scroll-scrubbed 3D reveal — like Apple product pages: elements tilt up out
   of the page and settle as you scroll them into view, and un-settle if you
   scroll back up. JS drives --p (0→1) continuously per element; no fixed
   duration, so it always tracks the scrollbar exactly. */
.reveal {
  --p: 0;
  opacity: var(--p);
  transform:
    perspective(1400px)
    rotateX(calc((1 - var(--p)) * 26deg))
    translateY(calc((1 - var(--p)) * 54px))
    scale(calc(0.94 + var(--p) * 0.06));
  transform-origin: 50% 100%;
  will-change: transform, opacity;
}

/* cards get a little extra life: alternating rotateY so they feel like
   panels swinging into place rather than just rising */
.cards .reveal:nth-child(odd)  { transform:
    perspective(1400px)
    rotateX(calc((1 - var(--p)) * 24deg))
    rotateY(calc((1 - var(--p)) * -7deg))
    translateY(calc((1 - var(--p)) * 50px))
    scale(calc(0.94 + var(--p) * 0.06));
}
.cards .reveal:nth-child(even) { transform:
    perspective(1400px)
    rotateX(calc((1 - var(--p)) * 24deg))
    rotateY(calc((1 - var(--p)) * 7deg))
    translateY(calc((1 - var(--p)) * 50px))
    scale(calc(0.94 + var(--p) * 0.06));
}

/* gentle idle float for photo avatars */
.avatar--photo { animation: float 6s ease-in-out infinite; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

@keyframes wordFlip {
  to { transform: translateY(0) rotateX(0); opacity: 1; }
}

@keyframes navDrop {
  from { transform: translateY(-120%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

@keyframes menuIn {
  from { opacity: 0; transform: translateY(-10px) scale(.98); }
  to   { opacity: 1; transform: none; }
}

@keyframes shimmer {
  to { background-position: 220% 0; }
}

@keyframes ping {
  0%   { box-shadow: 0 0 0 0 rgba(52,211,153,.6); }
  70%  { box-shadow: 0 0 0 9px rgba(52,211,153,0); }
  100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); }
}

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes scrollLine {
  0%   { transform: scaleY(0); transform-origin: top; }
  45%  { transform: scaleY(1); transform-origin: top; }
  55%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

@keyframes drift1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(120px, 90px) scale(1.15); }
}
@keyframes drift2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(-140px, 120px) scale(1.2); }
}
@keyframes drift3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(90px, -110px) scale(1.1); }
}

@keyframes grain {
  0%,100% { transform: translate(0, 0); }
  20%     { transform: translate(-4%, 3%); }
  40%     { transform: translate(3%, -4%); }
  60%     { transform: translate(-3%, -3%); }
  80%     { transform: translate(4%, 2%); }
}

/* ---- Ripple: a click-triggered animation, distinct from anything
   hover/scroll driven. JS (main.js) injects .btn__ripple on pointerdown. */
.btn__ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.5);
  transform: scale(0);
  opacity: .6;
  pointer-events: none;
  animation: rippleOut .65s var(--ease-soft) forwards;
}
@keyframes rippleOut {
  to { transform: scale(1); opacity: 0; }
}

/* ---- Letter-stagger reveal for section headings — a text-level burst
   animation (triggered once) rather than the panel-level 3D tilt used
   for cards/CTAs elsewhere. JS (main.js) splits .reveal-chars text into
   per-character spans and toggles .is-in when the heading enters view. */
/* keeps a whole word together on one line — individual .char letters
   inside are still free to animate, they just can't be split apart by
   the browser's line-wrapping */
.reveal-chars .char-word { display: inline-block; white-space: nowrap; }

.reveal-chars .char {
  display: inline-block;
  opacity: 0;
  transform: translateY(.5em) rotate(6deg);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
  transition-delay: calc(var(--i, 0) * 22ms);
}
.reveal-chars.is-in .char { opacity: 1; transform: none; }

/* ---------- 15. Responsive ---------- */
@media (max-width: 980px) {
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .about-card { position: static; max-width: 420px; margin-inline: auto; }
  .teaser { grid-template-columns: 1fr; text-align: center; padding: 44px 28px; gap: 32px; }
  .teaser__body .btn { margin-inline: auto; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .nav { top: 12px; padding-inline: 16px; }
  .nav__links, .nav__cta { display: none; }
  .nav__burger { display: grid; }
  .container { padding-inline: 18px; }
  .section { padding: 84px 0; }
  .hero { padding-top: 130px; }
  .hero__actions { margin-bottom: 46px; }
  .btn--lg { padding: 13px 22px; font-size: 15px; }
  .stats { gap: 18px; padding: 16px 22px; }
  .stat__num { font-size: 1.4rem; }
  .stat__label { font-size: 11px; }
  .cta { padding: 56px 24px; }
  .card { padding: 28px 24px; }
  .footer__inner { justify-content: center; text-align: center; }

  /* Touch has no hover — the poster row becomes a swipeable filmstrip
     of fixed-width cards instead of the expand-on-hover interaction. */
  .posters {
    height: 260px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-left: 18px;
    -webkit-overflow-scrolling: touch;
  }
  .poster {
    flex: 0 0 74%;
    scroll-snap-align: start;
  }
  .poster:hover { flex-grow: 0; }
  .poster .poster__meta { opacity: 1; transform: none; }
  .poster .poster__title { white-space: normal; }
}

@media (max-width: 420px) {
  .stats { flex-direction: column; gap: 14px; }
  .stat { align-items: center; }
  .stat__div { display: none; }
  .avatar { width: 160px; height: 160px; }
  .avatar__initial { font-size: 4rem; }
}

/* ---------- 16. Respect "reduce motion" ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero__title .word { opacity: 1; transform: none; }
  .reveal-chars .char { opacity: 1; transform: none; }
  .btn--lg.btn--primary, .btn--lg.btn--yt { animation: none; }
  .cursor-glow { display: none; }
}
