/* Variant J · Chroma Awards-style typography
   Display: KMR Waldenburg Normal · Body: Inter
   Larger body type · left brand+wordmark · right hover-expand nav
   Video card: shadow + play icon + accent track headline above frame
*/

@font-face {
  font-family: 'adineue PRO Black';
  src: url('../assets/fonts/adineue/adineuePRO-Black.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Babylonica';
  src: url('../assets/fonts/babylonica/Babylonica-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'KMR Waldenburg';
  src: url('../assets/fonts/waldenburg/KMRWaldenburg-Normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

#sceneCanvas {
  position: fixed; inset: 0; z-index: 1; display: block;
  width: 100vw; height: 100vh;
  transform: scale(calc(1 - 0.20 * var(--scrollT)));
  opacity: calc(1 - 1.15 * var(--scrollT));
  filter: blur(calc(max(0px, (var(--scrollT) - 0.55)) * 18px));
  /* 移除固定的 will-change */
}
/* 只在滚动期间添加 will-change */
body.is-scrolling #sceneCanvas {
  will-change: transform, opacity, filter;
}

/* ============================================================
 *  HERO STACK
 * ============================================================ */
.hero {
  position: fixed; inset: 0; z-index: 30;
  pointer-events: none;
  display: flex; align-items: center; justify-content: center;
  /* Slide fully off the top of the viewport (-100vh) while opacity
     ramps to 0 at the same scrollT — text and fade complete together,
     so the title doesn't "stop and disappear" mid-screen. */
  transform: translateY(calc(-100vh * var(--scrollT)));
  opacity: calc(1 - var(--scrollT));
}
body[data-mode="bloom"] .hero,
body[data-mode="lightbox"] .hero { opacity: 0; }
/* Critical: disable pointer-events on ALL hero children when bloomed or
   in lightbox — otherwise the (invisible) CTA pills swallow clicks meant
   for the bloomed video card and the user can't open the lightbox. */
body[data-mode="bloom"] .hero *,
body[data-mode="bloom"] .hud-nav *,
body[data-mode="bloom"] .hud-brand,
body[data-mode="lightbox"] .hero *,
body[data-mode="lightbox"] .hud-nav *,
body[data-mode="lightbox"] .hud-brand {
  pointer-events: none !important;
}

.hero-stack {
  display: flex; flex-direction: column; align-items: center; gap: 28px;
  pointer-events: none; position: relative;
  width: min(960px, 92vw);
  text-align: center;
}
.hero-stack > * { pointer-events: auto; }
.hero-stack::before {
  content: ''; position: absolute; inset: -120px -160px;
  background: radial-gradient(ellipse 60% 60% at center,
    rgba(0,0,0,0.66) 0%, rgba(0,0,0,0.30) 50%, transparent 100%);
  z-index: -1; pointer-events: none;
}

.hero-title {
  font-family: 'abcNormal';
  font-weight: 500;
  font-size: 90px;
  line-height: 1.0; letter-spacing: -0.012em;
  color: rgba(255,255,255,0.97);
  margin: 0;
  opacity: 0;
  animation: heroIn 1.2s 0.18s forwards cubic-bezier(0.2, 0.7, 0.2, 1);
}
.hero-title .ch {
  display: inline-block; will-change: transform;
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.hero-title .sp { display: inline-block; width: 0.32em; }

.hero-body {
  font-family: 'KMR Waldenburg', 'abcNormal';
  font-weight: 400;
  font-size: 17.5px;   /* bumped up vs G */
  line-height: 1.55;
  color: rgba(255,255,255,0.82);
  max-width: 760px;
  margin: 0;
  letter-spacing: -0.005em;
  opacity: 0;
  animation: heroFade 1s 0.55s forwards ease-out;
}

.hero-ctas {
  display: inline-flex; gap: 14px; flex-wrap: wrap; justify-content: center;
  margin-top: 16px;
  opacity: 0; animation: heroFade 1s 0.78s forwards ease-out;
}
.hero-cta {
  font-family: 'KMR Waldenburg', 'abcNormal';
  font-size: 15px; font-weight: 500;
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 9px;
  padding: 15px 28px;
  border-radius: 999px;
  cursor: none;
  transition: all 0.3s cubic-bezier(0.2,0.7,0.2,1);
}
.hero-cta.primary {
  background: #fff; color: #07080B;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.5), 0 8px 28px rgba(255,255,255,0.16);
}
.hero-cta.primary:hover {
  background: var(--cyan); transform: translateY(-2px);
  box-shadow: 0 0 0 1px var(--cyan), 0 12px 36px rgba(111,233,216,0.42);
}
.hero-cta.secondary {
  background: rgba(255,255,255,0.05); color: #fff;
  border: 1px solid rgba(255,255,255,0.16);
  backdrop-filter: blur(10px);
}
.hero-cta.secondary:hover {
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.36); transform: translateY(-2px);
}
.hero-cta.ghost {
  background: transparent; color: rgba(255,255,255,0.78);
  border: 1px solid rgba(255,255,255,0.10);
}
.hero-cta.ghost:hover {
  color: #fff; border-color: rgba(255,255,255,0.32);
  transform: translateY(-2px);
}
.hero-cta .arrow { transition: transform 0.25s ease; font-family: 'abcNormal'; }
.hero-cta:hover .arrow { transform: translateX(3px); }

/* ============================================================
 *  HUD (top bar)  ·  left brand · right hover-expand nav
 * ============================================================ */
.hud { position: fixed; inset: 0; pointer-events: none; z-index: 200; }
.hud > * { pointer-events: auto; }

.hud-brand {
  position: absolute; top: 22px; left: 28px;
  display: inline-flex; align-items: center; gap: 12px;
  text-decoration: none; cursor: none;
  font-family: 'KMR Waldenburg', 'abcNormal';
  font-size: 15px; letter-spacing: 0.005em;
  color: rgba(255,255,255,0.95);
}
.hud-brand img {
  width: 36px; height: 36px; object-fit: contain;
  display: block;
}
.hud-wordmark { display: inline-block; }
body[data-mode="lightbox"] .hud-brand { opacity: 0; pointer-events: none; transition: opacity .35s ease; }

.hud-nav {
  position: absolute; top: 22px; right: 28px;
  font-family: 'abcNormal';
}
.nav-stage {
  display: inline-flex; align-items: center;
  padding: 6px;
  background: rgba(18,18,22,0.52);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  box-shadow: 0 10px 32px rgba(0,0,0,0.36), inset 0 1px 0 rgba(255,255,255,0.06);
  transition: padding-left 0.4s cubic-bezier(0.2,0.7,0.2,1);
}
.nav-extra {
  display: inline-flex; align-items: center;
  max-width: 0; overflow: hidden;
  opacity: 0;
  transform: translateX(8px);
  transition:
    max-width 0.45s cubic-bezier(0.2,0.7,0.2,1),
    opacity   0.30s ease,
    transform 0.40s cubic-bezier(0.2,0.7,0.2,1);
}
.nav-stage:hover .nav-extra,
.nav-stage:focus-within .nav-extra {
  max-width: 520px;
  opacity: 1;
  transform: translateX(0);
}
.nav-base { display: inline-flex; align-items: center; }

.hud-nav a {
  padding: 9px 14px;
  font-size: 13.5px; font-weight: 500;
  color: rgba(255,255,255,0.74);
  text-decoration: none;
  border-radius: 999px;
  cursor: none;
  white-space: nowrap;
  letter-spacing: -0.005em;
  transition: color 0.22s, background 0.22s;
}
.hud-nav a:hover { color: #fff; background: rgba(255,255,255,0.06); }

.nav-submit {
  background: #fff; color: #07080B !important;
  padding: 9px 18px !important; margin-left: 4px;
  display: inline-flex; align-items: center; gap: 6px;
}
.nav-submit:hover { background: var(--cyan); }
.nav-submit .arrow { transition: transform .22s ease; }
.nav-submit:hover .arrow { transform: translateX(3px); }

.nav-toggle {
  width: 32px; height: 32px;
  margin-left: 4px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  display: inline-flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px;
  cursor: none;
  transition: background .22s, border-color .22s, transform .35s;
}
.nav-toggle span {
  display: block; width: 12px; height: 1.5px;
  background: rgba(255,255,255,0.85);
  border-radius: 2px;
  transition: width 0.30s ease, opacity 0.22s ease;
}
.nav-toggle span:nth-child(2) { width: 8px; }
.nav-toggle span:nth-child(3) { width: 10px; }
.nav-stage:hover .nav-toggle,
.nav-stage:focus-within .nav-toggle {
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.22);
  transform: rotate(90deg);
}
.nav-stage:hover .nav-toggle span,
.nav-stage:focus-within .nav-toggle span { width: 12px; }

body[data-mode="lightbox"] .hud-nav { opacity: 0; pointer-events: none; transition: opacity .35s ease; }

/* ============================================================
 *  Scroll cue
 * ============================================================ */
.scroll-cue {
  position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%);
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(6px);
  color: rgba(255,255,255,0.85);
  pointer-events: none; z-index: 38;
  opacity: calc(1 - var(--scrollT) * 4);
  animation: bobUp 2.0s ease-in-out infinite, fadeIn 1s 1.2s forwards ease-out;
}
.scroll-cue svg { width: 14px; height: 14px; }
@keyframes bobUp { 0%,100% { translate: -50% 0; } 50% { translate: -50% -5px; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
body[data-mode="bloom"] .scroll-cue,
body[data-mode="lightbox"] .scroll-cue { opacity: 0 !important; }

/* ============================================================
 *  Lightbox HUD  ·  Track tag ABOVE the video frame, not on it
 * ============================================================ */
.lb-hud {
  position: fixed; inset: 0; z-index: 60; pointer-events: none;
  opacity: 0; transition: opacity 0.45s ease;
}
body[data-mode="lightbox"] .lb-hud { opacity: 1; }
body[data-mode="lightbox"] .lb-hud > * { pointer-events: auto; }

/* Lightbox big track name — SVG with textLength so the word ALWAYS spans
   the full video width, edge-aligned. Width pinned to ~64vw to match the
   video lightbox horizontal extent (video lightbox is centered, ~64vw on
   16:9 viewport). Height is proportional so the type reads big. */
/* Lightbox layered-logo headline — sized to roughly match video width.
   Bold occupies 91% of viewBox width, so SVG width = (video width / 0.91).
   Video lightbox is ~64vw on landscape viewport → SVG width ≈ 70vw.
   Element bottom is positioned slightly INSIDE the video so Fest descenders
   dip into the video edge — the user explicitly OK'd this overlap. */
.lb-headline {
  position: fixed;
  /* viewBox 1500 × 380 → aspect 3.947. width 38vw / 3.947 = 9.63vw height.
     Bold baseline at viewBox y=300 (78.95% from element top):
       CSS top = element_bottom = video_top + 0.2105 × 9.63vw ≈ video_top + 2.03vw */
  top:  calc(50vh - 35.5vh + 2vw);
  left: 50vw;
  transform: translate(-50%, -100%);
  width: 38vw;
  height: 9.63vw;
  pointer-events: none;
  overflow: visible;
}
.lb-headline .lb-bold {
  font-family: 'adineue PRO Black', 'Archivo Black', 'Inter Tight', sans-serif;
  font-weight: 900;
  font-size: 270px;                   /* viewBox units — natural letter spacing */
  fill: var(--accent, #6FE9D8);
  text-transform: uppercase;
}
.lb-headline .lb-script {
  font-family: 'Babylonica', 'Brush Script MT', cursive;
  font-weight: 400;
  fill: rgba(255,255,255,0.98);
  /* No drop-shadow, no stroke — clean white script per reference. */
}
.lb-headline .lb-script-tl { font-size: 200px; }
.lb-headline .lb-script-br { font-size: 200px; }

/* Lightbox subtitle — thin, dimmed, subtitled under the video. Reads as a
   quiet caption rather than a chunky pill. Pure caps Inter 300. */
.lb-subtitle {
  position: fixed;
  /* Video bottom is at ≈85.4vh (see headline note); the subtitle now sits
     ~50px below that for breathing room — was too close before. */
  top:  calc(50vh + 35.5vh + 50px);
  left: 50vw;
  transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 12px;
  font-family: 'abcNormal';
  font-size: 12px; font-weight: 300;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.42);
  pointer-events: none;
}
.lb-subtitle .lb-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent, #6FE9D8);
  display: inline-block;
  opacity: 0.85;
  box-shadow: 0 0 8px color-mix(in srgb, var(--accent, #6FE9D8) 60%, transparent);
}
.lb-subtitle .lb-num {
  color: rgba(255,255,255,0.42);
}

.lb-close {
  position: absolute; top: 24px; right: 28px;
  width: 36px; height: 36px; border-radius: 999px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.16);
  color: #fff; cursor: none;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(8px);
}
.lb-close:hover { background: rgba(255,255,255,0.14); }
.lb-close svg { width: 14px; height: 14px; }

/* Prev / next track navigation — circular frosted-glass buttons matching
   the top nav's visual language. Refined hover: subtle scale + accent
   border tint + arrow shifts in the direction of travel. */
.lb-nav {
  position: fixed;
  top: 50vh;
  width: 44px; height: 44px;
  border-radius: 999px;
  background: rgba(18,18,22,0.40);
  border: 1px solid rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.85);
  cursor: none;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  box-shadow:
    0 8px 28px rgba(0,0,0,0.32),
    inset 0 1px 0 rgba(255,255,255,0.10);
  transition:
    background 0.28s ease,
    border-color 0.28s ease,
    color 0.28s ease,
    transform 0.32s cubic-bezier(0.2,0.7,0.2,1);
  z-index: 70;
}
.lb-nav.lb-prev { left:  3.2vw; transform: translateY(-50%) scale(1); }
.lb-nav.lb-next { right: 3.2vw; transform: translateY(-50%) scale(1); }
.lb-nav:hover {
  background: rgba(28,28,34,0.55);
  border-color: rgba(255,255,255,0.55);
  color: #fff;
  box-shadow:
    0 12px 36px rgba(0,0,0,0.42),
    inset 0 1px 0 rgba(255,255,255,0.18),
    0 0 0 4px rgba(255,255,255,0.06);
}
.lb-nav.lb-prev:hover { transform: translateY(-50%) translateX(-4px) scale(1.06); }
.lb-nav.lb-next:hover { transform: translateY(-50%) translateX( 4px) scale(1.06); }
.lb-nav:active { transform: translateY(-50%) scale(0.96); }
.lb-nav svg {
  width: 16px; height: 16px;
  transition: transform 0.32s cubic-bezier(0.2,0.7,0.2,1);
}
.lb-nav.lb-prev:hover svg { transform: translateX(-2px); }
.lb-nav.lb-next:hover svg { transform: translateX( 2px); }

/* Close button — tone-match the prev/next look */
.lb-close {
  background: rgba(18,18,22,0.40);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.18);
  transition: background 0.22s ease, border-color 0.22s ease, transform 0.2s ease;
}
.lb-close:hover {
  background: rgba(28,28,34,0.55);
  border-color: rgba(255,255,255,0.55);
  transform: scale(1.06);
}

/* ============================================================
 *  Cursor + boilerplate
 * ============================================================ */
.cursor {
  position: fixed; pointer-events: none; z-index: 1000;
  width: 18px; height: 18px;
  transform: translate(-50%,-50%);
  mix-blend-mode: difference;
}
.cursor::after {
  content:''; position:absolute; inset:0; border-radius:50%;
  border:1px solid rgba(255,255,255,0.7);
}
.cursor::before {
  content:''; position:absolute; left:50%; top:50%;
  transform: translate(-50%,-50%);
  width:3px; height:3px; border-radius:50%;
  background: rgba(255,255,255,0.9);
}
.video-sources { position: fixed; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.focus-ring { display: none !important; }

@keyframes heroIn {
  from { opacity: 0; transform: translateY(10px); filter: blur(6px); }
  to   { opacity: 1; transform: translateY(0);    filter: blur(0); }
}
@keyframes heroFade {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
