/* ==========================================================================
   星光來了 Astro Light Ra — stylesheet
   Night → Light → Night. One page, one journey.
   ========================================================================== */

:root {
  /* palette */
  --night: #0b0a12;
  --night-2: #15131f;
  --night-3: #221f2e;
  --cream: #f3eee4;
  --cream-2: #e9e1d2;
  --cream-3: #d9cfbb;
  --ink: #1b1822;
  --ink-2: #4a4452;
  --ink-3: #8a8390;
  --gold: #c9a35c;
  --gold-2: #e6c98a;
  --gold-3: #9a7a3c;

  /* semantic (light sections default) */
  --bg: var(--cream);
  --fg: var(--ink);
  --fg-2: var(--ink-2);
  --fg-3: var(--ink-3);
  --line: rgba(27, 24, 34, 0.14);

  /* type */
  /* 霞鶩文楷：楷書骨架、手寫溫度，整站的「身心靈」語氣都靠它 */
  --serif-cn: "LXGW WenKai TC", "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  --sans-cn: "LXGW WenKai TC", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  --ui-cn: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  --serif-en: "Cormorant Garamond", "Times New Roman", serif;

  --fs-display: clamp(4.2rem, 12.5vw, 12.5rem);
  --fs-h2: clamp(2rem, 4.6vw, 4.4rem);
  --fs-h3: clamp(1.5rem, 2.6vw, 2.4rem);
  --fs-lead: clamp(1.05rem, 1.35vw, 1.3rem);
  --fs-body: clamp(1.02rem, 1.1vw, 1.14rem);
  --fs-label: 0.72rem;

  /* spacing */
  --gutter: clamp(1.25rem, 4vw, 4rem);
  --section: clamp(6rem, 14vw, 13rem);
  --nav-h: 4.5rem;

  --ease-out: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-io: cubic-bezier(0.76, 0, 0.24, 1);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  margin: 0;
  background: var(--night);
  color: var(--cream);
  font-family: var(--sans-cn);
  font-weight: 400;
  font-size: var(--fs-body);
  line-height: 2;
  letter-spacing: 0.04em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
body.is-menu-open { overflow: hidden; }
img, video, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
::selection { background: var(--gold); color: var(--night); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }

.skip {
  position: fixed; top: 0.5rem; left: 0.5rem; z-index: 1000;
  padding: 0.6rem 1rem; background: var(--gold); color: var(--night);
  transform: translateY(-200%); transition: transform 0.2s;
}
.skip:focus { transform: none; }

/* ---------- sections / theme ---------- */
main { background: var(--cream); }
.section { position: relative; padding: var(--section) var(--gutter); }
[data-theme="light"] { background: var(--bg); color: var(--fg); --line: rgba(27, 24, 34, 0.14); --fg-2: var(--ink-2); --fg-3: var(--ink-3); }
[data-theme="dark"] { background: var(--night); color: var(--cream); --line: rgba(243, 238, 228, 0.14); --fg-2: rgba(243,238,228,0.7); --fg-3: rgba(243,238,228,0.45); }

.section__head {
  display: grid; grid-template-columns: 1fr; gap: 1.5rem;
  margin-bottom: clamp(3rem, 6vw, 5.5rem);
}
@media (min-width: 900px) {
  .section__head { grid-template-columns: 1fr 3fr; align-items: start; }
  .section__head .label { padding-top: 0.9em; }
}
.section__title {
  font-family: var(--serif-cn); font-weight: 300;
  font-size: var(--fs-h2); line-height: 1.3; letter-spacing: 0.02em;
}
.section__hint {
  grid-column: 1 / -1; font-size: var(--fs-label); letter-spacing: 0.25em;
  color: var(--fg-3); text-transform: uppercase;
}

.label {
  display: inline-flex; align-items: baseline; gap: 0.8em;
  font-size: var(--fs-label); letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--fg-2); font-weight: 400;
}
.label i { font-style: normal; font-family: var(--serif-en); font-size: 1.1em; color: var(--gold); letter-spacing: 0.1em; }
.label em { font-style: italic; font-family: var(--serif-en); font-size: 1.2em; letter-spacing: 0.05em; text-transform: none; color: var(--fg-3); }
.label--light { color: rgba(243,238,228,0.75); }
.label--light em { color: rgba(243,238,228,0.5); }

/* ---------- buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 0.8em;
  padding: 0.95em 1.7em; border-radius: 999px;
  font-size: 0.86rem; letter-spacing: 0.2em; font-weight: 400;
  border: 1px solid var(--line); overflow: hidden; isolation: isolate;
  transition: color 0.5s var(--ease-out), border-color 0.5s;
  will-change: transform;
}
.btn > * { position: relative; z-index: 1; }
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: var(--gold); border-radius: inherit;
  transform: translateY(101%); transition: transform 0.6s var(--ease-out);
}
.btn:hover::before, .btn:focus-visible::before { transform: translateY(0); }
.btn--ghost { color: var(--cream); border-color: rgba(243,238,228,0.3); }
.btn--ghost:hover, .btn--ghost:focus-visible { color: var(--night); border-color: var(--gold); }
.btn--ghost.btn--dark { color: var(--ink); border-color: var(--line); }
.btn--ghost.btn--dark:hover, .btn--ghost.btn--dark:focus-visible { color: var(--night); border-color: var(--gold); }
.btn--text { border: 0; padding-inline: 0.4em; color: rgba(243,238,228,0.75); }
.btn--text::before { display: none; }
.btn--text span { position: relative; }
.btn--text span::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -0.3em; height: 1px;
  background: currentColor; transform-origin: right; transform: scaleX(0.35);
  transition: transform 0.6s var(--ease-out), opacity 0.3s;
}
.btn--text:hover span::after { transform: scaleX(1); transform-origin: left; }
.btn--text:hover { color: var(--gold-2); }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 90;
  height: var(--nav-h); padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
  color: #fff; mix-blend-mode: difference;
  transform: translateY(-110%); opacity: 0;
  transition: transform 0.9s var(--ease-out) 0.2s, opacity 0.6s 0.2s;
}
.is-ready .nav { transform: none; opacity: 1; }
.nav__brand { display: flex; align-items: center; gap: 0.7rem; line-height: 1.1; }
.nav__brand .mark { width: 2.9rem; height: auto; flex: none; --gold-2: currentColor; opacity: 0.95; }
.nav__brand-text { display: flex; flex-direction: column; }
.nav__brand-cn { font-family: var(--serif-cn); font-weight: 400; letter-spacing: 0.3em; font-size: 0.95rem; }
.nav__brand-en { font-family: var(--serif-en); font-style: italic; font-size: 0.78rem; letter-spacing: 0.12em; opacity: 0.7; }
.nav__links { display: none; gap: 2.2rem; }
.nav__links a {
  position: relative; font-size: 0.82rem; letter-spacing: 0.3em; padding: 0.4em 0;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0.15em; right: 0.45em; bottom: 0; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform 0.5s var(--ease-out);
}
.nav__links a:hover::after, .nav__links a.is-active::after { transform: scaleX(1); transform-origin: left; }
.nav__cta {
  display: none; align-items: center; gap: 0.6em;
  padding: 0.65em 1.2em; border: 1px solid rgba(255,255,255,0.35); border-radius: 999px;
  font-size: 0.78rem; letter-spacing: 0.2em; transition: background 0.4s, color 0.4s, border-color 0.4s;
}
.nav__cta:hover { background: #fff; color: #000; border-color: #fff; }
.nav__burger {
  width: 2.6rem; height: 2.6rem; display: grid; place-items: center; gap: 0;
  position: relative;
}
.nav__burger span {
  position: absolute; width: 1.5rem; height: 1px; background: currentColor;
  transition: transform 0.5s var(--ease-io), opacity 0.3s;
}
.nav__burger span:first-child { transform: translateY(-4px); }
.nav__burger span:last-child { transform: translateY(4px); }
.is-menu-open .nav__burger span:first-child { transform: rotate(45deg); }
.is-menu-open .nav__burger span:last-child { transform: rotate(-45deg); }
@media (min-width: 900px) {
  .nav__links { display: flex; }
  .nav__cta { display: inline-flex; }
  .nav__burger { display: none; }
}

/* mobile menu */
.menu {
  position: fixed; inset: 0; z-index: 80; background: var(--night); color: var(--cream);
  display: flex; flex-direction: column; justify-content: center; padding: var(--gutter);
  clip-path: inset(0 0 100% 0); transition: clip-path 0.8s var(--ease-io);
  visibility: hidden;
}
.menu[aria-hidden="false"] { clip-path: inset(0 0 0 0); visibility: visible; }
.menu__stars { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.6; }
.menu__links { position: relative; display: grid; gap: 0.2em; }
.menu__links a {
  display: flex; align-items: baseline; gap: 1rem;
  font-family: var(--serif-cn); font-weight: 300; font-size: clamp(2rem, 9vw, 3.4rem);
  letter-spacing: 0.08em; line-height: 1.5;
  transform: translateY(40px); opacity: 0;
  transition: transform 0.8s var(--ease-out), opacity 0.6s;
}
.menu__links a i { font-style: normal; font-family: var(--serif-en); font-size: 0.4em; color: var(--gold); letter-spacing: 0.1em; }
.menu[aria-hidden="false"] .menu__links a { transform: none; opacity: 1; }
.menu[aria-hidden="false"] .menu__links a:nth-child(1) { transition-delay: 0.25s; }
.menu[aria-hidden="false"] .menu__links a:nth-child(2) { transition-delay: 0.32s; }
.menu[aria-hidden="false"] .menu__links a:nth-child(3) { transition-delay: 0.39s; }
.menu[aria-hidden="false"] .menu__links a:nth-child(4) { transition-delay: 0.46s; }
.menu[aria-hidden="false"] .menu__links a:nth-child(5) { transition-delay: 0.53s; }
.menu[aria-hidden="false"] .menu__links a:nth-child(6) { transition-delay: 0.6s; }
.menu__foot {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: calc(var(--gutter) + env(safe-area-inset-bottom));
  display: flex; gap: 2rem; font-size: 0.8rem; letter-spacing: 0.2em; color: var(--fg-3);
}

/* ---------- preloader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 200; background: var(--night); color: var(--cream);
  display: grid; place-content: center; justify-items: center; gap: 0.6rem; overflow: hidden;
}
.loader__orbit { width: clamp(160px, 22vw, 240px); opacity: 0.95; }
.loader__ring { stroke: var(--cream); stroke-width: 1.4; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.6s var(--ease-io) forwards; }
.loader__ellipse { stroke: var(--gold); stroke-width: 1; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.8s var(--ease-io) 0.3s forwards; opacity: 0.85; }
.loader__star { fill: var(--gold-2); opacity: 0; animation: fadein 0.6s 0.9s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadein { to { opacity: 1; } }
.loader__word {
  position: relative; display: flex; gap: 0.3em; margin-top: -0.4rem;
  font-family: var(--serif-cn); font-weight: 300; font-size: clamp(1.4rem, 3vw, 2rem); letter-spacing: 0.3em;
}
.loader__word span { opacity: 0; transform: translateY(0.4em); animation: fadeup 0.9s var(--ease-out) forwards; }
.loader__word span:nth-child(1) { animation-delay: 0.5s; }
.loader__word span:nth-child(2) { animation-delay: 0.62s; }
.loader__word span:nth-child(3) { animation-delay: 0.74s; }
.loader__word span:nth-child(4) { animation-delay: 0.86s; }
@keyframes fadeup { to { opacity: 1; transform: none; } }
.loader__count {
  position: absolute; right: var(--gutter); bottom: var(--gutter);
  font-family: var(--serif-en); font-size: clamp(2.4rem, 6vw, 4.5rem); font-weight: 300; line-height: 1;
  color: rgba(243,238,228,0.5); font-variant-numeric: tabular-nums;
}
.loader.is-done { pointer-events: none; }

/* ---------- cursor ---------- */
.cursor { display: none; }
@media (hover: hover) and (pointer: fine) {
  .cursor { display: block; position: fixed; top: 0; left: 0; z-index: 300; pointer-events: none; mix-blend-mode: difference; }
  .cursor__dot {
    position: absolute; width: 6px; height: 6px; border-radius: 50%; background: #fff;
    transform: translate(-50%, -50%);
  }
  .cursor__ring {
    position: absolute; width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.7);
    transform: translate(-50%, -50%) scale(1); display: grid; place-items: center;
    transition: width 0.4s var(--ease-out), height 0.4s var(--ease-out), background 0.4s, border-color 0.4s;
  }
  .cursor__label { font-size: 0.7rem; letter-spacing: 0.2em; color: #000; opacity: 0; transition: opacity 0.3s; white-space: nowrap; }
  .cursor.is-link .cursor__ring { width: 56px; height: 56px; background: rgba(255,255,255,0.18); }
  .cursor.is-media .cursor__ring { width: 96px; height: 96px; background: #fff; border-color: #fff; }
  .cursor.is-media .cursor__label { opacity: 1; }
  .cursor.is-media .cursor__dot { opacity: 0; }
  .cursor.is-hidden { opacity: 0; }
  body.has-cursor { cursor: none; }
  body.has-cursor a, body.has-cursor button { cursor: none; }
}

/* ---------- grain ---------- */
.grain {
  position: fixed; inset: -20%; z-index: 150; pointer-events: none; opacity: 0.045; will-change: transform;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 0.6s steps(3) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 33% { transform: translate(-2%, 1%); } 66% { transform: translate(1%, -2%); } 100% { transform: translate(0, 0); }
}

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100svh; overflow: clip;
  display: grid; align-items: center; padding: calc(var(--nav-h) + 2rem) var(--gutter) 6rem;
}
.hero__stars { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__inner { position: relative; z-index: 2; max-width: 1400px; width: 100%; margin: 0 auto; }
.hero__eyebrow {
  display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap;
  font-size: var(--fs-label); letter-spacing: 0.3em; color: rgba(243,238,228,0.65);
  margin-bottom: clamp(1.5rem, 4vw, 3rem);
}
.hero__eyebrow span:first-child { font-family: var(--serif-en); font-style: italic; font-size: 1.1rem; letter-spacing: 0.15em; color: var(--gold-2); }
.hero__eyebrow-sep { width: 3rem; height: 1px; background: rgba(243,238,228,0.3); }
.hero__title {
  font-family: var(--serif-cn); font-weight: 300; font-size: var(--fs-display);
  line-height: 1; letter-spacing: 0.08em; display: grid; gap: 0.08em; margin: 0;
}
.hero__title-row { display: flex; }
.hero__title-row--sub { color: var(--gold-2); font-size: 0.38em; letter-spacing: 0.35em; margin-top: 0.5em; margin-left: 0.15em; }
.char { display: inline-block; will-change: transform, opacity; }
.js .char { opacity: 0; transform: translateY(0.5em) rotate(4deg); }
.hero__vertical {
  position: absolute; right: 0; top: 0; writing-mode: vertical-rl; text-orientation: upright;
  font-family: var(--serif-cn); font-size: 0.85rem; letter-spacing: 0.5em; color: rgba(243,238,228,0.45);
  display: none;
}
.hero__vertical::before { content: ""; display: block; width: 1px; height: 4rem; margin: 0 auto 1.5rem; background: var(--gold); opacity: 0.6; }
@media (min-width: 900px) { .hero__vertical { display: block; } }
.hero__actions { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; margin-top: clamp(2rem, 5vw, 4rem); }
.js .hero__actions, .js .hero__eyebrow { opacity: 0; transform: translateY(16px); }

.hero__portal {
  position: absolute; z-index: 1; left: 50%; bottom: -6vh;
  width: min(36vw, 520px); aspect-ratio: 3 / 4; transform: translateX(-50%);
  pointer-events: none;
}
@media (min-width: 900px) {
  .hero__portal { left: auto; right: 8vw; transform: none; width: min(30vw, 460px); bottom: -4vh; }
  .hero__vertical { right: 1.5vw; }
}
.hero__portal::before {
  content: ""; position: absolute; inset: -30% -40% -10%; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(230,201,138,0.22), rgba(230,201,138,0.06) 50%, transparent 72%);
  filter: blur(10px);
}
.hero__portal-mask {
  position: relative; width: 100%; height: 100%; overflow: hidden;
  border-radius: 999px 999px 0 0;
  box-shadow: 0 0 120px rgba(230,201,138,0.14);
}
.hero__img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; transform: scale(1.15); }
@media (max-width: 899px) {
  .hero { padding-bottom: 46vh; }
  .hero__portal { width: 62vw; bottom: -4vh; }
  .hero__scroll { display: none; }
  .br-desk { display: none; }
}
.hero__scroll {
  position: absolute; left: var(--gutter); bottom: 2rem; z-index: 2;
  display: flex; align-items: center; gap: 0.8rem;
  font-family: var(--serif-en); font-style: italic; font-size: 0.85rem; letter-spacing: 0.2em; color: rgba(243,238,228,0.5);
}
.hero__scroll-line { width: 3rem; height: 1px; background: rgba(243,238,228,0.4); position: relative; overflow: hidden; }
.hero__scroll-line::after { content: ""; position: absolute; inset: 0; background: var(--gold-2); transform: translateX(-100%); animation: scrollline 2.2s var(--ease-io) infinite; }
@keyframes scrollline { 0% { transform: translateX(-100%); } 50% { transform: translateX(0); } 100% { transform: translateX(100%); } }

/* ---------- about ---------- */
.about__grid { display: grid; gap: 3rem; grid-template-columns: 1fr; }
@media (min-width: 900px) {
  .about__grid {
    grid-template-columns: 7fr 5fr; column-gap: var(--gutter); row-gap: clamp(3rem, 6vw, 5rem); align-items: start;
  }
  .about__quote { grid-column: 1 / -1; }
  .about__body { padding-left: clamp(0px, 8vw, 8rem); }
}
.about__quote {
  font-family: var(--serif-cn); font-weight: 300; font-size: var(--fs-h2); line-height: 1.35; letter-spacing: 0.02em;
}
.about__body { display: grid; gap: 1.6em; max-width: 32em; font-size: var(--fs-lead); line-height: 2.1; color: var(--fg-2); }
.about__body p::first-letter { color: var(--gold-3); }
.about__photo { margin-top: 1rem; }
@media (min-width: 900px) { .about__photo { margin-top: -4rem; } }
.about__photo figcaption { margin-top: 0.8rem; font-size: var(--fs-label); letter-spacing: 0.25em; color: var(--fg-3); }
.img-reveal { position: relative; overflow: hidden; }
.img-reveal img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.18); transition: transform 1.4s var(--ease-out); }
.js .img-reveal { clip-path: inset(0 0 100% 0); }
.js .img-reveal.is-in { clip-path: inset(0 0 0 0); transition: clip-path 1.3s var(--ease-io); }
.js .img-reveal.is-in img { transform: scale(1.02); }

.about__video { margin-top: var(--section); }
.video {
  position: relative; overflow: hidden; border-radius: 4px; background: var(--night);
  aspect-ratio: 16 / 9; width: min(100%, calc(80vh * 16 / 9)); margin: 0 auto;
}
.video video { width: 100%; height: 100%; object-fit: cover; }
.video__play {
  position: absolute; inset: 0; display: grid; place-items: center; color: var(--cream);
  transition: opacity 0.5s, visibility 0.5s;
}
.video.is-playing .video__play { opacity: 0; visibility: hidden; }
.video__ring {
  width: clamp(120px, 14vw, 180px); animation: spin 14s linear infinite;
  font-family: var(--sans-cn); font-size: 7.2px; letter-spacing: 0.22em; fill: var(--cream);
}
.video__tri { position: absolute; width: 28px; color: var(--gold-2); }
@keyframes spin { to { transform: rotate(360deg); } }
.video__tag {
  position: absolute; left: 1.5rem; bottom: 1.2rem; font-size: var(--fs-label); letter-spacing: 0.25em;
  color: rgba(243,238,228,0.7); pointer-events: none;
}
.video.is-playing .video__tag { opacity: 0; }

/* ---------- ticker ---------- */
.ticker {
  overflow: hidden; border-top: 1px solid rgba(27,24,34,0.14); border-bottom: 1px solid rgba(27,24,34,0.14);
  background: var(--cream); color: var(--ink-2);
  padding: 1.1rem 0; font-family: var(--serif-cn); font-size: clamp(1rem, 1.6vw, 1.4rem); letter-spacing: 0.3em;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ticker__row { display: flex; width: max-content; animation: ticker 60s linear infinite; }
.ticker__row span { padding-right: 2.2em; white-space: nowrap; }
.ticker__row i { font-style: normal; color: var(--gold); padding-right: 2.2em; }
@keyframes ticker { to { transform: translateX(-50%); } }
.ticker--dark { color: rgba(243,238,228,0.65); --line: rgba(243,238,228,0.14); }

/* ---------- programs: sticky stack ---------- */
.programs { padding-bottom: 0; }
.stack { display: grid; gap: 0; }
.stack__card {
  position: sticky; top: calc(var(--nav-h) + 2vh);
  display: grid; grid-template-columns: 1fr; gap: 2rem;
  min-height: 74vh; padding: clamp(1.5rem, 3vw, 3rem);
  background: var(--cream); border-top: 1px solid var(--line);
  transform-origin: top center; will-change: transform;
}
.stack__card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; background: var(--cream-3);
  opacity: var(--dim, 0); transition: none;
}
.stack__card:nth-child(2) { background: var(--cream-2); top: calc(var(--nav-h) + 4vh); }
.stack__card:nth-child(3) { background: var(--cream-3); top: calc(var(--nav-h) + 6vh); }
.stack__card:nth-child(4) { background: var(--night-3); color: var(--cream); top: calc(var(--nav-h) + 8vh); --line: rgba(243,238,228,0.14); --fg-2: rgba(243,238,228,0.7); }
@media (min-width: 900px) {
  .stack__card { grid-template-columns: 1fr 1fr; gap: var(--gutter); align-items: center; }
}
.stack__media { overflow: hidden; aspect-ratio: 4 / 3; }
.stack__media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.05); transition: transform 1.6s var(--ease-out); }
.stack__card:hover .stack__media img { transform: scale(1); }
.stack__text { display: grid; gap: 0.6rem; align-content: center; max-width: 30em; }
.stack__index { font-family: var(--serif-en); font-size: 1.1rem; letter-spacing: 0.2em; color: var(--gold); }
.stack__text h3 { font-family: var(--serif-cn); font-weight: 300; font-size: clamp(2.4rem, 5vw, 4.6rem); line-height: 1.2; letter-spacing: 0.06em; }
.stack__sub { font-size: 1rem; letter-spacing: 0.4em; color: var(--gold-3); margin-top: -0.2rem; }
.stack__card:nth-child(4) .stack__sub { color: var(--gold-2); }
.stack__desc { margin-top: 1rem; font-size: var(--fs-lead); color: var(--fg-2); line-height: 2; }
.stack__spacer { height: 10vh; }

/* ---------- mentors ---------- */
.mentors__grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(1.5rem, 3vw, 3rem) clamp(1rem, 2vw, 2rem);
}
@media (min-width: 900px) { .mentors__grid { grid-template-columns: repeat(4, 1fr); } }
.mentor { display: grid; gap: 1rem; }
@media (min-width: 900px) { .mentor:nth-child(2n) { transform: translateY(clamp(0px, 5vw, 4rem)); } }
@media (max-width: 899px) { .mentor:nth-child(2n) { transform: translateY(3rem); } }
.mentor__photo { aspect-ratio: 3 / 4; }
.mentor__photo img { filter: saturate(0.85); transition: transform 1.4s var(--ease-out), filter 0.8s; }
.mentor:hover .mentor__photo img { transform: scale(1.06) !important; filter: saturate(1); }
.mentor__meta { display: grid; gap: 0.3rem; padding-top: 0.6rem; border-top: 1px solid var(--line); }
.mentor__meta h3 { font-family: var(--serif-cn); font-weight: 400; font-size: clamp(1.2rem, 1.8vw, 1.6rem); letter-spacing: 0.12em; }
.mentor__skills { display: flex; flex-wrap: wrap; gap: 0.2em 1em; font-size: 0.85rem; color: var(--fg-2); letter-spacing: 0.06em; }
.mentor__skills li { position: relative; }
.mentor__skills li + li::before { content: "·"; position: absolute; left: -0.65em; color: var(--gold); }

/* ---------- news: horizontal ---------- */
.news { padding-right: 0; overflow: clip; }
.news .section__head { padding-right: var(--gutter); }
.news__track {
  display: flex; gap: clamp(1rem, 2.5vw, 2.5rem);
  overflow-x: auto; scroll-snap-type: x mandatory; padding-right: var(--gutter); padding-bottom: 1rem;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.news__track::-webkit-scrollbar { display: none; }
@media (min-width: 900px) {
  /* pinned horizontal scroll: the whole section must fit one viewport, so posters scale with height */
  /* deterministic sizing: head row is fixed, poster height is a calc of the viewport, so the track
     width is identical before and during the pin (ScrollTrigger measures it on refresh) */
  .news { --news-head: 7.5rem; --news-body: 11.5rem; height: 100vh; padding-top: calc(var(--nav-h) + 2rem); padding-bottom: 2.5rem; display: grid; grid-template-rows: var(--news-head) 1fr; align-items: start; }
  .news .section__head { margin-bottom: 0; height: var(--news-head); align-content: start; }
  .news .section__title { font-size: clamp(1.8rem, 3vw, 2.8rem); }
  .news__track { overflow: visible; scroll-snap-type: none; width: max-content; padding-bottom: 0; align-items: start; }
}
.event { flex: 0 0 auto; width: min(78vw, 360px); scroll-snap-align: start; display: grid; gap: 1.2rem; }
.event__poster { overflow: hidden; aspect-ratio: 3 / 4; background: var(--cream-2); }
.event__poster img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease-out); }
.event:hover .event__poster img { transform: scale(1.05); }
.event__body { display: grid; gap: 0.8rem; }
.event__body h3 { font-family: var(--serif-cn); font-weight: 400; font-size: 1.35rem; letter-spacing: 0.08em; line-height: 1.4; }
.event dl { display: grid; gap: 0.15rem; font-size: 0.85rem; }
.event dl div { display: flex; gap: 1em; border-top: 1px solid var(--line); padding: 0.45em 0; }
.event dt { flex: 0 0 3em; color: var(--fg-3); letter-spacing: 0.2em; }
.event dd { color: var(--fg-2); font-variant-numeric: tabular-nums; font-family: var(--ui-cn); font-weight: 300; }
.event__link {
  justify-self: start; font-size: 0.82rem; letter-spacing: 0.25em; color: var(--gold-3);
  border-bottom: 1px solid currentColor; padding-bottom: 0.2em; transition: color 0.3s;
}
.event__link:hover { color: var(--ink); }
@media (min-width: 900px) {
  /* inside the pinned viewport: poster takes all remaining height, card width follows the 3:4 poster */
  .event { width: auto; display: grid; grid-template-rows: auto auto; gap: 1rem; }
  .event__poster { height: calc(100vh - var(--nav-h) - 2rem - var(--news-head) - 2.5rem - var(--news-body) - 1rem); min-height: 260px; width: auto; aspect-ratio: 3 / 4; }
  .event__body { width: 0; min-width: 100%; gap: 0.5rem; }
  .event__body h3 { font-size: clamp(1.05rem, 1.3vw, 1.3rem); }
  .event dl { font-size: 0.78rem; }
  .event dl div { padding: 0.3em 0; }
}
@media (min-width: 900px) and (max-height: 820px) {
  /* short desktop viewports: give the posters the room instead of the heading */
  .news { --news-head: 4.5rem; padding-top: calc(var(--nav-h) + 1rem); padding-bottom: 1.5rem; }
  .news .section__head { grid-template-columns: 1fr; gap: 0.4rem; }
  .event__poster { height: calc(100vh - var(--nav-h) - 1rem - var(--news-head) - 1.5rem - var(--news-body) - 1rem); }
  .news .section__head .label { padding-top: 0; }
  .news .section__title { font-size: 1.6rem; }
  .news .section__hint { display: none; }
}

/* ---------- moments: marquee ---------- */
.moments { padding-left: 0; padding-right: 0; }
.moments .section__head { padding: 0 var(--gutter); }
.marquee { overflow: hidden; padding: 0.5rem 0; }
.marquee__row { display: flex; gap: clamp(0.8rem, 1.5vw, 1.5rem); width: max-content; will-change: transform; }
.marquee figure { flex: 0 0 auto; height: clamp(180px, 28vw, 380px); overflow: hidden; }
.marquee figure img { height: 100%; width: auto; object-fit: cover; filter: saturate(0.9); transition: filter 0.6s, transform 1.2s var(--ease-out); }
.marquee figure:hover img { filter: saturate(1.05); transform: scale(1.04); }
.moments__more { display: flex; justify-content: center; margin-top: clamp(3rem, 6vw, 5rem); }

/* ---------- beyond ---------- */
.beyond { position: relative; min-height: 100svh; overflow: clip; display: grid; align-items: end; padding: var(--section) var(--gutter); isolation: isolate; }
.beyond__media { position: absolute; inset: -12% 0; z-index: -1; }
.beyond__media img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.8) brightness(0.55); }
.beyond__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(11,10,18,0.95) 0%, rgba(11,10,18,0.25) 50%, rgba(11,10,18,0.55) 100%); }
.beyond__inner { max-width: 1400px; width: 100%; margin: 0 auto; display: grid; gap: 1.5rem; }
.beyond__title { font-family: var(--serif-cn); font-weight: 300; font-size: clamp(3rem, 9vw, 8.5rem); line-height: 1.05; letter-spacing: 0.06em; }
.beyond__text { max-width: 32em; font-size: var(--fs-lead); color: rgba(243,238,228,0.75); }

/* ---------- contact ---------- */
.contact { position: relative; overflow: clip; padding-bottom: 3rem; }
.contact__stars { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.7; }
.contact .section__head, .contact__grid, .footer { position: relative; }
.contact__grid { display: grid; gap: 3rem; margin-bottom: var(--section); }
@media (min-width: 900px) { .contact__grid { grid-template-columns: 1.2fr 1fr; align-items: end; } }
.contact__title { font-family: var(--serif-cn); font-weight: 300; font-size: clamp(2.4rem, 5.6vw, 5.8rem); line-height: 1.2; letter-spacing: 0.04em; }
.contact__links { display: grid; }
.contact__item {
  display: grid; grid-template-columns: 1fr auto; grid-template-areas: "label arrow" "value arrow";
  padding: 1.6rem 0; border-top: 1px solid var(--line); transition: padding 0.5s var(--ease-out);
}
.contact__item:last-child { border-bottom: 1px solid var(--line); }
.contact__item:hover { padding-left: 1rem; }
.contact__item-label { grid-area: label; font-size: var(--fs-label); letter-spacing: 0.3em; color: var(--fg-3); }
.contact__item-value { grid-area: value; font-family: var(--serif-en); font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 300; letter-spacing: 0.04em; transition: color 0.4s; }
.contact__item:hover .contact__item-value { color: var(--gold-2); }
.contact__item-arrow { grid-area: arrow; align-self: center; font-size: 1.4rem; color: var(--gold); transition: transform 0.5s var(--ease-out); }
.contact__item:hover .contact__item-arrow { transform: translate(4px, -4px); }

.footer { display: grid; gap: 2rem; }
.footer__lockup { width: min(60vw, 420px); height: auto; margin: 0 auto; color: var(--cream); }
.footer__row {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem;
  padding-top: 1.5rem; border-top: 1px solid var(--line);
  font-size: 0.78rem; letter-spacing: 0.18em; color: var(--fg-3); font-family: var(--ui-cn);
}
.footer__tag { font-family: var(--serif-cn); color: rgba(243,238,228,0.7); letter-spacing: 0.25em; }
.footer__top { transition: color 0.3s; }
.footer__top:hover { color: var(--gold-2); }

/* ---------- reveal helpers ---------- */
.js .split .word { display: inline-block; overflow: hidden; vertical-align: top; }
.js .split .word > span { display: inline-block; transform: translateY(110%); }
.js .split-lines { opacity: 0; transform: translateY(24px); }
.js [data-reveal] { opacity: 0; transform: translateY(30px); }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .js .char, .js .hero__actions, .js .hero__eyebrow, .js .split-lines, .js [data-reveal] { opacity: 1; transform: none; }
  .js .split .word > span { transform: none; }
  .js .img-reveal { clip-path: none; }
  .js .img-reveal img { transform: none; }
  .grain { display: none; }
  .loader { display: none; }
  .nav { transform: none; opacity: 1; }
  .hero__stars, .contact__stars, .menu__stars { opacity: 0.5; }
}
