/* Inter (SIL OFL 1.1, see fonts/LICENSE.txt) — self-hosted Latin subset.
   Apple devices keep SF Pro; everyone else gets Inter instead of the OS default. */
@font-face {
  font-family: "Inter LZ";
  src: url("fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* ==========================================================================
   Liu Zhaoyue — cinematic personal site
   Black · Gold · Liquid metal · Deep space
   ========================================================================== */

:root {
  --bg: #000;
  --ink: #f5f5f7;
  --ink-2: #d2d2d7;
  --muted: #86868b;
  --faint: rgba(245, 245, 247, .12);
  --line: rgba(255, 255, 255, .085);
  --gold: #d4a85a;
  --gold-hi: #f6e7b8;
  --gold-lo: #6b4d1c;
  --chrome: linear-gradient(180deg, #ffffff 0%, #f4e6c0 30%, #c39345 58%, #fbf1d6 76%, #7d5c24 100%);
  --liquid: linear-gradient(115deg, #5c4318 0%, #f6e7b8 18%, #b8862f 34%, #fff6dd 50%, #8a6526 66%, #e9cf91 82%, #5c4318 100%);
  --sans: "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Inter LZ", "Segoe UI Variable Display", "Segoe UI", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --serif: "Didot", "Bodoni 72", "Bodoni MT", "Playfair Display", "Noto Serif SC", "Songti SC", "STSong", Georgia, "Times New Roman", serif;
  --mono: "SF Mono", ui-monospace, "JetBrains Mono", "Cascadia Code", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.76, 0, .24, 1);
  --gutter: clamp(20px, 4vw, 64px);
  --nav-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; scroll-behavior: auto; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}
body.locked { overflow: hidden; height: 100vh; }
::selection { background: var(--gold); color: #000; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
em { font-style: normal; }
.muted { color: var(--muted); }
.gold, .contact-title em, .panel-title em {
  background: var(--chrome);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

@media (pointer: fine) {
  body.has-cursor, body.has-cursor a, body.has-cursor button { cursor: none; }
}

/* ---------- Layers ---------- */
#gl { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; display: block; }
body.no-gl #gl { background: radial-gradient(60% 50% at 50% 35%, #3a2a10 0%, #0d0a05 45%, #000 80%); }
.vignette {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 45%, transparent 55%, rgba(0, 0, 0, .55) 100%);
}
.grain {
  position: fixed; inset: -100%; z-index: 80; pointer-events: none;
  background-image: var(--noise);
  opacity: .055;
  animation: grain 1.1s steps(7) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 15% { transform: translate(-6%, 4%); } 30% { transform: translate(5%, -8%); }
  45% { transform: translate(-9%, 2%); } 60% { transform: translate(7%, 7%); } 75% { transform: translate(-3%, -6%); }
  90% { transform: translate(8%, -2%); } 100% { transform: translate(0, 0); }
}
main { position: relative; z-index: 2; }

/* ---------- Opening titles ---------- */
#intro { position: fixed; inset: 0; z-index: 100; pointer-events: none; }
#intro.done { display: none; }
.bar {
  position: absolute; left: 0; right: 0; height: 50.5vh; background: #000;
  transition: height 2.2s var(--ease-io);
}
.bar-top { top: 0; }
.bar-bottom { bottom: 0; }
#intro.open .bar { height: 10.5vh; }
#intro.wide .bar { height: 0; transition-duration: 1.6s; }

.intro-line {
  position: absolute; top: 50%; left: 0; right: 0; height: 1px; margin-top: -.5px;
  background: linear-gradient(90deg, transparent, rgba(246, 231, 184, .2) 15%, #f6e7b8 50%, rgba(246, 231, 184, .2) 85%, transparent);
  box-shadow: 0 0 18px rgba(246, 210, 140, .8), 0 0 60px rgba(212, 168, 90, .5);
  transform: scaleX(0); opacity: 0;
  transition: transform 1.4s var(--ease-io), opacity .6s ease;
}
#intro.line .intro-line { transform: scaleX(1); opacity: 1; }
#intro.open .intro-line { opacity: 0; transform: scaleX(1.4) scaleY(30); transition: opacity 1.2s ease, transform 1.6s var(--ease); }

.intro-load {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  transition: opacity .6s ease, filter .6s ease;
}
.intro-count { font-family: var(--mono); font-size: 13px; letter-spacing: .4em; color: var(--gold-hi); padding-left: .4em; }
.intro-load-label { font-family: var(--mono); font-size: 10px; letter-spacing: .35em; text-transform: uppercase; color: rgba(246, 231, 184, .38); padding-left: .35em; }
#intro.line .intro-load { opacity: 0; filter: blur(8px); }

.intro-card {
  position: absolute; left: 50%; top: 50%; width: 92vw; text-align: center;
  transform: translate(-50%, -50%);
  font-size: clamp(12px, 1.25vw, 17px); font-weight: 400;
  letter-spacing: .22em; text-transform: uppercase; color: #e9dcb8;
  opacity: 0; filter: blur(12px);
  text-shadow: 0 0 30px rgba(246, 210, 140, .35);
}
.intro-card.play { animation: card 2.3s var(--ease) forwards; }
@keyframes card {
  0% { opacity: 0; filter: blur(12px); letter-spacing: .22em; }
  30% { opacity: 1; filter: blur(0); }
  70% { opacity: 1; filter: blur(0); }
  100% { opacity: 0; filter: blur(10px); letter-spacing: .5em; }
}
.intro-skip {
  position: absolute; right: var(--gutter); bottom: 28px; pointer-events: auto;
  font-family: var(--mono); font-size: 10px; letter-spacing: .3em; text-transform: uppercase;
  color: rgba(246, 231, 184, .45); padding: 10px 0; transition: color .3s, opacity .6s;
}
.intro-skip:hover { color: var(--gold-hi); }
#intro.open .intro-skip { opacity: 0; pointer-events: none; }

/* ---------- Cursor ---------- */
#cursor { position: fixed; left: 0; top: 0; z-index: 120; pointer-events: none; display: none; }
body.has-cursor #cursor { display: block; }
.c-dot, .c-ring { position: fixed; left: 0; top: 0; border-radius: 50%; will-change: transform; }
.c-dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: var(--gold-hi); box-shadow: 0 0 12px rgba(246, 210, 140, .9); }
.c-ring {
  width: 40px; height: 40px; margin: -20px 0 0 -20px;
  border: 1px solid rgba(246, 231, 184, .45);
  display: grid; place-items: center;
  transition: width .5s var(--ease), height .5s var(--ease), margin .5s var(--ease), background .4s, border-color .4s;
}
.c-label { font-style: normal; font-family: var(--mono); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: #000; opacity: 0; transition: opacity .3s; white-space: nowrap; }
#cursor.hover .c-ring { width: 64px; height: 64px; margin: -32px 0 0 -32px; border-color: rgba(246, 231, 184, .9); }
#cursor.label .c-ring { width: 96px; height: 96px; margin: -48px 0 0 -48px; background: var(--gold-hi); border-color: transparent; }
#cursor.label .c-label { opacity: 1; }
#cursor.label .c-dot { opacity: 0; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60; height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--gutter);
  opacity: 0; transform: translateY(-14px);
  transition: opacity 1.4s var(--ease), transform 1.4s var(--ease);
}
body.ready .nav { opacity: 1; transform: none; }
.nav::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(0, 0, 0, .65), rgba(0, 0, 0, 0));
  pointer-events: none;
}
.nav-logo { display: block; width: 40px; height: 40px; }
.nav-logo svg { width: 100%; height: 100%; display: block; }
.nav-links { display: flex; gap: clamp(18px, 3vw, 44px); }
.nav-links a {
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2);
  position: relative; padding: 6px 0; transition: color .3s;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: var(--gold); transform: scaleX(0); transform-origin: right; transition: transform .6s var(--ease);
}
.nav-links a:hover { color: #fff; }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); transform-origin: left; }
.nav-links a.active { color: var(--gold-hi); }
.nav-sound { display: flex; align-items: center; gap: 10px; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); padding: 8px 0; }
.eq { display: flex; align-items: flex-end; gap: 2px; height: 12px; }
.eq i { width: 2px; height: 3px; background: var(--gold-hi); border-radius: 1px; transition: height .3s; }
.nav-sound[aria-pressed="true"] .eq i { animation: eq 1s ease-in-out infinite; }
.nav-sound[aria-pressed="true"] .eq i:nth-child(2) { animation-delay: -.3s; }
.nav-sound[aria-pressed="true"] .eq i:nth-child(3) { animation-delay: -.6s; }
.nav-sound[aria-pressed="true"] .eq i:nth-child(4) { animation-delay: -.15s; }
@keyframes eq { 0%, 100% { height: 3px; } 50% { height: 12px; } }
.nav-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: rgba(255, 255, 255, .05); }
.nav-progress i { display: block; height: 100%; width: 100%; transform-origin: left; transform: scaleX(0); background: linear-gradient(90deg, var(--gold-lo), var(--gold-hi)); box-shadow: 0 0 10px rgba(246, 210, 140, .7); }

/* ---------- Slates (film scene labels) ---------- */
.slate { display: flex; flex-direction: column; gap: 4px; font-family: var(--mono); text-transform: uppercase; }
.slate span { font-size: 10px; letter-spacing: .32em; color: var(--gold); }
.slate b { font-weight: 400; font-size: 11px; letter-spacing: .2em; color: rgba(245, 245, 247, .6); }
.slate-tl, .slate-tr { position: absolute; top: calc(var(--nav-h) + 24px); z-index: 3; }
.slate-tl { left: var(--gutter); }
.slate-tr { right: var(--gutter); text-align: right; align-items: flex-end; }

/* ---------- Reveal ---------- */
.reveal {
  opacity: 0; transform: translateY(46px); filter: blur(12px);
  transition: opacity 1.4s var(--ease), transform 1.4s var(--ease), filter 1.4s var(--ease);
  transition-delay: var(--d, 0s);
}
.reveal.in { opacity: 1; transform: none; filter: none; }

/* ---------- HERO ---------- */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; }
.hero .slate { opacity: 0; transition: opacity 1.6s ease 1.2s; }
body.ready .hero .slate { opacity: 1; }
.hero-inner {
  position: absolute; left: 0; right: 0; bottom: max(15vh, 124px);
  text-align: center; padding: 0 var(--gutter);
}
.hero-eyebrow {
  font-size: clamp(11px, 1vw, 14px); letter-spacing: .5em; text-transform: uppercase; color: var(--gold-hi);
  margin-bottom: clamp(10px, 1.6vw, 22px); padding-left: .5em; overflow: hidden;
}
.hero-eyebrow span { display: inline-block; transform: translateY(110%); opacity: 0; transition: transform 1.6s var(--ease), opacity 1.6s ease; }
body.titles .hero-eyebrow span { transform: none; opacity: 1; }
.hero-title {
  font-size: clamp(58px, 13.4vw, 236px); font-weight: 600; letter-spacing: -.045em; line-height: .9;
  white-space: nowrap; perspective: 800px;
}
.hero-title .ch {
  display: inline-block; padding: 0 .02em .16em; margin: 0 -.02em -.16em;
  background-image: linear-gradient(100deg, transparent 42%, rgba(255, 255, 255, .95) 50%, transparent 58%), var(--chrome);
  background-size: 320% 100%, 100% 100%;
  background-position: 160% 0, 0 0;
  background-repeat: no-repeat;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  opacity: 0; filter: blur(22px);
  transform: translate3d(0, .42em, 0) rotateX(-70deg) scale(1.1);
  transform-origin: 50% 100%;
  transition: opacity 1.8s var(--ease), filter 1.8s var(--ease), transform 2s var(--ease);
  transition-delay: calc(var(--i) * 75ms + .35s);
  filter: drop-shadow(0 0 0 transparent);
}
.hero-title .ch { filter: blur(22px); }
.hero-title .sp { display: inline-block; width: .26em; }
body.titles .hero-title .ch {
  opacity: 1; filter: blur(0) drop-shadow(0 10px 40px rgba(212, 168, 90, .18)); transform: none;
  animation: sweep 7s var(--ease-io) calc(var(--i) * 90ms + 2.4s) infinite;
}
@keyframes sweep {
  0% { background-position: 160% 0, 0 0; }
  38%, 100% { background-position: -60% 0, 0 0; }
}
.hero-sub {
  margin-top: clamp(16px, 2vw, 30px);
  display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 6px 18px;
  font-size: clamp(12px, 1.15vw, 16px); letter-spacing: .26em; text-transform: uppercase; color: var(--ink-2);
}
.hero-sub span, .hero-sub i { opacity: 0; transform: translateY(14px); transition: opacity 1.4s var(--ease), transform 1.4s var(--ease); }
.hero-sub i { width: 4px; height: 4px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px var(--gold); }
body.titles .hero-sub span, body.titles .hero-sub i { opacity: 1; transform: none; }
body.titles .hero-sub > :nth-child(1) { transition-delay: 1.6s; }
body.titles .hero-sub > :nth-child(2) { transition-delay: 1.75s; }
body.titles .hero-sub > :nth-child(3) { transition-delay: 1.9s; }
body.titles .hero-sub > :nth-child(4) { transition-delay: 2.05s; }
body.titles .hero-sub > :nth-child(5) { transition-delay: 2.2s; }
.scroll-cue {
  position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: 9px; letter-spacing: .4em; text-transform: uppercase; color: rgba(245, 245, 247, .45);
  opacity: 0; transition: opacity 1.5s ease 2.6s;
}
body.ready .scroll-cue { opacity: 1; }
.scroll-cue i { width: 1px; height: 46px; background: linear-gradient(var(--gold-hi), transparent); transform-origin: top; animation: cue 2.4s var(--ease-io) infinite; }
@keyframes cue { 0% { transform: scaleY(0); opacity: 1; } 60% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- Sticky scenes ---------- */
.scene { position: relative; }
.sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }

/* ---------- MANIFESTO ---------- */
.manifesto { height: 200vh; }
.manifesto .sticky { display: flex; align-items: center; padding: 0 var(--gutter); }
.manifesto-text {
  max-width: 1180px;
  font-size: clamp(30px, 4.7vw, 76px); font-weight: 600; letter-spacing: -.028em; line-height: 1.1;
}
.manifesto-text .w {
  display: inline-block;
  color: rgba(245, 245, 247, calc(.1 + .9 * var(--o, 0)));
  filter: blur(calc((1 - var(--o, 0)) * 3px));
  transform: translateY(calc((1 - var(--o, 0)) * .12em));
  text-shadow: 0 0 calc(var(--o, 0) * 40px) rgba(255, 230, 180, calc(var(--o, 0) * .12));
}
.manifesto-text em .w, .manifesto-text .w.em {
  font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.01em;
  background: var(--chrome); -webkit-background-clip: text; background-clip: text;
  color: transparent; opacity: calc(.15 + .85 * var(--o, 0)); padding-right: .06em;
}

/* ---------- VIBE ---------- */
.vibe { height: 190vh; }
.vibe .sticky { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 var(--gutter); }
.vibe-kicker, .kicker, .card-label, .step-k {
  font-family: var(--mono); font-size: 11px; letter-spacing: .32em; text-transform: uppercase; color: var(--gold);
}
.vibe-title {
  margin: 18px 0 10px;
  font-size: clamp(84px, 19vw, 340px); font-weight: 700; letter-spacing: -.065em; line-height: .84;
  display: flex; flex-direction: column; align-items: center;
  will-change: transform;
}
.vibe-title span {
  display: block; padding: 0 .04em .14em; margin-bottom: -.1em;
  background: var(--liquid); background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: liquid 9s ease-in-out infinite;
  filter: drop-shadow(0 20px 60px rgba(212, 168, 90, .22));
}
.vibe-title span:nth-child(2) { animation-delay: -3s; }
@keyframes liquid { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.vibe-cn { font-family: var(--serif); font-size: clamp(18px, 2vw, 28px); letter-spacing: .3em; color: var(--gold-hi); margin-top: 18px; padding-left: .3em; --d: .1s; }
.vibe-copy { max-width: 560px; margin-top: 18px; font-size: clamp(16px, 1.35vw, 20px); color: var(--muted); line-height: 1.55; --d: .2s; }

/* ---------- ABOUT / BENTO ---------- */
.about { position: relative; padding: 18vh var(--gutter) 16vh; max-width: 1360px; margin: 0 auto; }
.section-head { display: flex; flex-direction: column; gap: 28px; margin-bottom: clamp(40px, 6vw, 80px); }
.section-head h2 { font-size: clamp(40px, 6.4vw, 104px); font-weight: 600; letter-spacing: -.045em; line-height: 1; }
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; perspective: 1400px; }
.card {
  position: relative; overflow: hidden; isolation: isolate;
  padding: clamp(26px, 2.6vw, 40px);
  border-radius: 30px;
  background: linear-gradient(165deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .015) 55%, rgba(212, 168, 90, .035));
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 30px 80px rgba(0, 0, 0, .35);
  -webkit-backdrop-filter: blur(22px) saturate(150%); backdrop-filter: blur(22px) saturate(150%);
  transform: perspective(1200px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .7s var(--ease), border-color .5s, opacity 1.4s var(--ease), filter 1.4s var(--ease);
  transform-style: preserve-3d;
}
.card.reveal { transform: perspective(1200px) translateY(60px) rotateX(10deg); }
.card.reveal.in { transform: perspective(1200px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); }
.card:hover { border-color: rgba(246, 231, 184, .22); }
.card-glow {
  position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .5s;
  background: radial-gradient(520px circle at var(--mx, 50%) var(--my, 50%), rgba(246, 214, 150, .16), transparent 45%);
}
.card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), rgba(246, 231, 184, .75), transparent 45%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: 0; transition: opacity .5s;
}
.card:hover .card-glow, .card:hover::after { opacity: 1; }
.card h3 { font-size: clamp(28px, 3vw, 48px); font-weight: 600; letter-spacing: -.035em; line-height: 1.04; margin: 14px 0 16px; }
.card-copy { color: var(--muted); font-size: clamp(15px, 1.15vw, 18px); line-height: 1.55; max-width: 46ch; }
.card-copy strong { color: var(--ink); font-weight: 600; }
.card-intro { grid-column: span 4; grid-row: span 2; display: flex; flex-direction: column; justify-content: space-between; min-height: 520px; }
.card-intro h3 { font-size: clamp(48px, 6.4vw, 112px); line-height: .95; letter-spacing: -.055em; }
.card-term { grid-column: span 2; grid-row: span 2; padding: 0; display: flex; flex-direction: column; background: linear-gradient(180deg, rgba(14, 12, 8, .72), rgba(8, 8, 10, .6)); --d: .1s; }
.term-head { display: flex; align-items: center; gap: 7px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.term-head i { width: 11px; height: 11px; border-radius: 50%; background: #3a3a3c; }
.term-head i:nth-child(1) { background: #ff5f57; } .term-head i:nth-child(2) { background: #febc2e; } .term-head i:nth-child(3) { background: #28c840; }
.term-head span { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: .08em; }
.term { flex: 1; padding: 22px; font-family: var(--mono); font-size: 13px; line-height: 1.75; color: #c9c3b4; white-space: pre-wrap; word-break: break-word; min-height: 300px; }
.term .p { color: var(--gold-hi); } .term .ok { color: #7ee2a8; } .term .dim { color: #6e6e73; } .term .hl { color: #fff; }
.term .cur { display: inline-block; width: 8px; height: 15px; vertical-align: -2px; background: var(--gold-hi); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.card-stat { grid-column: span 2; --d: .05s; }
.stat { font-size: clamp(96px, 10vw, 168px); font-weight: 700; letter-spacing: -.07em; line-height: .9; margin: 18px 0 14px; background: var(--chrome); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.card-vibe { grid-column: span 4; --d: .12s; }
.wave { position: absolute; right: clamp(24px, 3vw, 44px); bottom: clamp(24px, 3vw, 40px); display: flex; align-items: center; gap: 4px; height: 70px; }
.wave i { width: 3px; border-radius: 2px; height: 20%; background: linear-gradient(var(--gold-hi), var(--gold-lo)); animation: wave 1.6s ease-in-out infinite; }
.wave i:nth-child(odd) { animation-duration: 1.25s; }
.wave i:nth-child(3n) { animation-duration: 1.9s; }
.wave i:nth-child(4n) { animation-duration: 1.45s; }
.wave i:nth-child(n) { animation-delay: calc(var(--k, 0) * -.11s); }
@keyframes wave { 0%, 100% { height: 14%; } 50% { height: 100%; } }
.card-now { grid-column: span 6; display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; --d: .08s; }
.card-now h3 { margin: 0; font-size: clamp(24px, 2.6vw, 40px); }
.card-now .card-label { display: flex; align-items: center; gap: 12px; }
.pulse { position: relative; width: 8px; height: 8px; border-radius: 50%; background: #7ee2a8; box-shadow: 0 0 12px #7ee2a8; }
.pulse::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 1px solid #7ee2a8; animation: ping 2s var(--ease) infinite; }
@keyframes ping { 0% { transform: scale(.4); opacity: 1; } 100% { transform: scale(2.2); opacity: 0; } }

/* ---------- WORK (MealLedger) ---------- */
.work { height: 430vh; }
.work-bgword {
  position: absolute; left: 50%; top: 50%; white-space: nowrap;
  font-size: clamp(120px, 24vw, 420px); font-weight: 700; letter-spacing: -.06em; line-height: 1;
  color: transparent; -webkit-text-stroke: 1px rgba(246, 231, 184, .16);
  transform: translate(-50%, -50%); will-change: transform; pointer-events: none; user-select: none;
}
.work-cn {
  position: absolute; right: var(--gutter); top: 50%; transform: translateY(-50%);
  writing-mode: vertical-rl; font-family: var(--serif); font-size: clamp(56px, 8vw, 140px); letter-spacing: .2em; line-height: 1;
  background: var(--chrome); -webkit-background-clip: text; background-clip: text; color: transparent;
  opacity: .9; filter: drop-shadow(0 0 30px rgba(212, 168, 90, .25));
}
.work-steps { position: absolute; left: var(--gutter); top: 50%; transform: translateY(-50%); width: min(420px, 31vw); height: 360px; z-index: 4; }
.step {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center;
  opacity: 0; transform: translateY(40px); filter: blur(10px); pointer-events: none;
  transition: opacity .9s var(--ease), transform .9s var(--ease), filter .9s var(--ease);
}
.step.on { opacity: 1; transform: none; filter: none; pointer-events: auto; }
.step.past { transform: translateY(-40px); }
.step h3 { font-size: clamp(34px, 3.8vw, 64px); font-weight: 600; letter-spacing: -.04em; line-height: 1.02; margin: 16px 0 18px; }
.step h3 .cn { display: block; font-family: var(--serif); font-weight: 400; font-size: .62em; letter-spacing: .18em; margin-top: 10px; background: var(--chrome); -webkit-background-clip: text; background-clip: text; color: transparent; }
.step p:last-of-type { color: var(--muted); font-size: clamp(15px, 1.2vw, 19px); }
.appstore {
  margin-top: 28px; align-self: flex-start;
  display: inline-flex; align-items: center; gap: 12px; padding: 12px 24px 12px 18px; border-radius: 16px;
  background: #f5f5f7; color: #000; box-shadow: 0 18px 50px rgba(246, 214, 150, .18);
  transition: box-shadow .4s, background .4s;
}
.appstore:hover { background: #fff; box-shadow: 0 20px 70px rgba(246, 214, 150, .4); }
.appstore svg { width: 30px; height: 30px; }
.appstore span { display: flex; flex-direction: column; font-size: 21px; font-weight: 600; letter-spacing: -.02em; line-height: 1.05; }
.appstore small { font-size: 11px; font-weight: 400; letter-spacing: .01em; }

.phone-stage { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); perspective: 1800px; z-index: 3; }
.phone {
  --w: min(300px, 35vh);
  position: relative; width: var(--w); height: calc(var(--w) * 2.05); border-radius: calc(var(--w) * .18);
  padding: calc(var(--w) * .035);
  background: linear-gradient(140deg, #4a4741 0%, #1b1a18 18%, #0b0b0b 50%, #262420 82%, #5b554a 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .22),
    inset 0 0 0 3px #0a0a0a,
    0 0 0 1px rgba(0, 0, 0, .9),
    0 50px 120px rgba(0, 0, 0, .7),
    0 0 120px rgba(212, 168, 90, .16);
  transform-style: preserve-3d; will-change: transform;
}
.phone-shine {
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 5;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .14) 45%, transparent 55%);
  background-size: 250% 100%; background-position: var(--shine, 50%) 0; mix-blend-mode: screen;
}
.phone-screen {
  position: relative; height: 100%; border-radius: calc(var(--w) * .147); overflow: hidden;
  background: radial-gradient(120% 60% at 50% 0%, #1d1810 0%, #0b0a09 55%, #060606 100%);
  color: #f5f5f7; font-size: calc(var(--w) * .043);
}
.island { position: absolute; top: calc(var(--w) * .035); left: 50%; width: calc(var(--w) * .3); height: calc(var(--w) * .088); margin-left: calc(var(--w) * -.15); border-radius: 99px; background: #000; z-index: 4; }
.sb { position: absolute; top: calc(var(--w) * .05); left: calc(var(--w) * .09); right: calc(var(--w) * .08); display: flex; justify-content: space-between; font-size: calc(var(--w) * .047); font-weight: 600; z-index: 3; }
.sb-r { display: flex; align-items: center; gap: 4px; }
.sb-r i { width: 4px; height: 7px; background: #fff; border-radius: 1px; }
.sb-r i:nth-child(2) { height: 9px; }
.sb-r b { width: 20px; height: 9px; border: 1px solid rgba(255, 255, 255, .6); border-radius: 3px; position: relative; }
.sb-r b::after { content: ""; position: absolute; inset: 1px 4px 1px 1px; background: #fff; border-radius: 1px; }
.scr {
  position: absolute; inset: 0; padding: calc(var(--w) * .22) calc(var(--w) * .07) calc(var(--w) * .07);
  opacity: 0; transform: scale(1.04); filter: blur(6px);
  transition: opacity .8s var(--ease), transform .8s var(--ease), filter .8s var(--ease);
}
.scr.on { opacity: 1; transform: none; filter: none; }
.ui-date { font-size: .78em; color: var(--gold); letter-spacing: .06em; text-transform: uppercase; font-weight: 600; }
.ui-h { font-size: 2.05em; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; margin: .15em 0 .8em; }
.ui-ring { position: relative; width: 52%; margin: 0 auto 1.1em; aspect-ratio: 1; }
.ui-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ui-ring circle { fill: none; stroke-width: 9; stroke-linecap: round; }
.ui-ring .trk { stroke: rgba(255, 255, 255, .08); }
.ui-ring .val { stroke: url(#lg); stroke: var(--gold); stroke-dasharray: 314; stroke-dashoffset: calc(314 * (1 - var(--v))); filter: drop-shadow(0 0 6px rgba(212, 168, 90, .6)); transition: stroke-dashoffset 1.6s var(--ease); }
.scr:not(.on) .ui-ring .val { stroke-dashoffset: 314; }
.ui-ring div { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ui-ring b { font-size: 2.6em; font-weight: 700; letter-spacing: -.04em; line-height: 1; }
.ui-ring span { font-size: .78em; color: var(--muted); }
.ui-item { display: flex; align-items: center; gap: .8em; padding: .75em .8em; margin-bottom: .55em; border-radius: 1.1em; background: rgba(255, 255, 255, .055); border: 1px solid rgba(255, 255, 255, .05); }
.ui-item div { flex: 1; display: flex; flex-direction: column; line-height: 1.25; }
.ui-item b { font-size: .95em; font-weight: 600; }
.ui-item span { font-size: .78em; color: var(--muted); }
.ui-item em { font-size: .75em; color: var(--muted); font-variant-numeric: tabular-nums; }
.ic { width: 2.2em; height: 2.2em; border-radius: .7em; flex: none; }
.ic1 { background: linear-gradient(135deg, #f6e7b8, #c99a45); }
.ic2 { background: linear-gradient(135deg, #ff9f6e, #c2410c); }
.ic3 { background: linear-gradient(135deg, #8fb8ff, #3949ab); }
.ui-input { display: flex; align-items: center; min-height: 3em; padding: 0 1em; border-radius: 1em; background: rgba(255, 255, 255, .07); border: 1px solid rgba(212, 168, 90, .45); font-size: 1.05em; }
.caret { width: 2px; height: 1.2em; background: var(--gold-hi); margin-left: 2px; animation: blink 1s steps(1) infinite; }
.ui-chips { display: flex; flex-wrap: wrap; gap: .5em; margin: 1.1em 0; }
.ui-chips span { font-size: .8em; padding: .45em .9em; border-radius: 99px; background: rgba(255, 255, 255, .07); color: var(--ink-2); }
.ui-chips span.on { background: var(--gold); color: #000; font-weight: 600; }
.ui-photo { height: 34%; border-radius: 1.2em; border: 1px dashed rgba(255, 255, 255, .18); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6em; color: var(--muted); font-size: .85em; }
.ui-photo i { width: 2.4em; height: 2.4em; border-radius: 50%; border: 1.5px solid rgba(246, 231, 184, .6); position: relative; }
.ui-photo i::before, .ui-photo i::after { content: ""; position: absolute; left: 50%; top: 50%; width: 1em; height: 1.5px; background: var(--gold-hi); transform: translate(-50%, -50%); }
.ui-photo i::after { transform: translate(-50%, -50%) rotate(90deg); }
.ui-btn { margin-top: 1.1em; text-align: center; padding: .95em; border-radius: 1em; background: linear-gradient(180deg, #f6e7b8, #c99a45); color: #1a1206; font-weight: 700; box-shadow: 0 10px 30px rgba(212, 168, 90, .35); }
.ui-big { display: flex; align-items: baseline; gap: .5em; margin-bottom: 1.2em; }
.ui-big b { font-size: 4em; font-weight: 700; letter-spacing: -.05em; line-height: 1; background: var(--chrome); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ui-big span { color: var(--muted); font-size: .9em; }
.ui-bars { display: flex; align-items: flex-end; justify-content: space-between; height: 36%; padding: 0 .2em; }
.ui-bars i { width: 10%; border-radius: .5em; height: calc(var(--h) * 100%); background: linear-gradient(180deg, #f6e7b8, #8a6526); box-shadow: 0 0 18px rgba(212, 168, 90, .3); transform-origin: bottom; transition: transform 1.2s var(--ease); }
.scr:not(.on) .ui-bars i { transform: scaleY(.05); }
.ui-bars i:nth-child(2) { transition-delay: .05s; } .ui-bars i:nth-child(3) { transition-delay: .1s; } .ui-bars i:nth-child(4) { transition-delay: .15s; }
.ui-bars i:nth-child(5) { transition-delay: .2s; } .ui-bars i:nth-child(6) { transition-delay: .25s; } .ui-bars i:nth-child(7) { transition-delay: .3s; }
.ui-days { display: flex; justify-content: space-between; padding: .6em .4em 0; font-size: .72em; color: var(--muted); }
.ui-note { margin-top: 1.6em; padding: .9em 1em; border-radius: 1em; background: rgba(255, 255, 255, .055); font-size: .85em; color: var(--ink-2); }
.ui-note b { color: var(--gold-hi); }
.scr-splash { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5em; padding: 0; }
.app-icon { width: 38%; aspect-ratio: 1; border-radius: 23%; display: grid; place-items: center; background: linear-gradient(150deg, #2c2416, #0d0b08); box-shadow: inset 0 0 0 1px rgba(246, 231, 184, .25), 0 20px 60px rgba(212, 168, 90, .35); margin-bottom: .8em; }
.app-icon span { font-family: var(--serif); font-size: 3.6em; background: var(--chrome); -webkit-background-clip: text; background-clip: text; color: transparent; }
.scr-splash p { font-size: 1.5em; font-weight: 700; letter-spacing: -.02em; }
.scr-splash small { font-size: .9em; letter-spacing: .3em; color: var(--gold); }
.phone-reflection { position: absolute; left: 10%; right: 10%; bottom: -60px; height: 60px; background: radial-gradient(50% 50% at 50% 0%, rgba(212, 168, 90, .35), transparent 70%); filter: blur(18px); }
.work-dots { position: absolute; left: 50%; bottom: 36px; transform: translateX(-50%); display: flex; gap: 10px; z-index: 4; }
.work-dots i { width: 6px; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .2); transition: width .6s var(--ease), background .6s; }
.work-dots i.on { width: 28px; background: var(--gold-hi); }

/* ---------- PROCESS (horizontal) ---------- */
.process .sticky { display: flex; align-items: center; }
.track { display: flex; align-items: center; gap: clamp(18px, 2vw, 32px); padding: 0 var(--gutter); will-change: transform; }
.panel {
  position: relative; flex: none; width: min(440px, 78vw); height: min(560px, 66vh);
  padding: clamp(28px, 3vw, 44px); border-radius: 32px; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end;
  background: linear-gradient(165deg, rgba(255, 255, 255, .065), rgba(255, 255, 255, .012) 60%);
  border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
}
.panel .num {
  position: absolute; top: clamp(20px, 2.4vw, 34px); left: clamp(28px, 3vw, 44px);
  font-size: clamp(90px, 9vw, 150px); font-weight: 700; letter-spacing: -.06em; line-height: 1;
  color: transparent; -webkit-text-stroke: 1px rgba(246, 231, 184, .45);
}
.panel .art { position: absolute; right: -10px; top: 18%; width: 58%; fill: none; stroke: var(--gold-hi); stroke-width: 1.1; stroke-linecap: round; stroke-linejoin: round; opacity: .85; filter: drop-shadow(0 0 8px rgba(246, 214, 150, .45)); }
.panel .art * { stroke-dasharray: 600; stroke-dashoffset: 600; transition: stroke-dashoffset 2.6s var(--ease); }
.panel .art .fill { fill: var(--gold-hi); }
.panel.in .art * { stroke-dashoffset: 0; }
.panel h3 { font-size: clamp(36px, 3.6vw, 58px); font-weight: 600; letter-spacing: -.045em; line-height: 1; margin-bottom: 14px; }
.panel p { color: var(--muted); font-size: clamp(15px, 1.15vw, 18px); max-width: 32ch; }
.panel-title { width: min(640px, 86vw); background: none; border-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; justify-content: center; padding-left: 0; }
.panel-title h2 { font-size: clamp(48px, 6.6vw, 112px); font-weight: 600; letter-spacing: -.05em; line-height: .98; margin: 20px 0 22px; }
.panel-title h2 em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.02em; padding-right: .08em; }
.process-bar { position: absolute; left: var(--gutter); right: var(--gutter); bottom: 44px; height: 1px; background: rgba(255, 255, 255, .08); }
.process-bar i { display: block; height: 100%; transform-origin: left; transform: scaleX(0); background: linear-gradient(90deg, var(--gold-lo), var(--gold-hi)); }

/* ---------- MARQUEE ---------- */
.marquee { position: relative; padding: 12vh 0; overflow: hidden; }
.mq { white-space: nowrap; will-change: transform; }
.mq > div { display: inline-flex; align-items: center; gap: .4em; animation: mq 46s linear infinite; font-size: clamp(54px, 9vw, 160px); font-weight: 700; letter-spacing: -.05em; line-height: 1.08; }
.mq-b > div { animation-direction: reverse; animation-duration: 52s; }
.mq span { color: var(--ink); }
.mq span.o { color: transparent; -webkit-text-stroke: 1px rgba(246, 231, 184, .55); }
.mq b { font-size: .32em; color: var(--gold); font-weight: 400; }
@keyframes mq { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- CONTACT / FINALE ---------- */
.contact { position: relative; min-height: 100vh; padding: 22vh var(--gutter) 0; display: flex; flex-direction: column; }
.contact-inner { text-align: center; display: flex; flex-direction: column; align-items: center; }
.contact-title { font-size: clamp(48px, 8.6vw, 156px); font-weight: 600; letter-spacing: -.055em; line-height: .96; margin: 22px 0 56px; max-width: 12ch; --d: .1s; }
.contact-title em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.02em; padding-right: .08em; }
.gh-btn {
  --d: .2s;
  position: relative; display: inline-flex; align-items: center; gap: 16px;
  padding: 18px 30px 18px 22px; border-radius: 999px;
  background: rgba(10, 9, 7, .55); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .5), 0 0 60px rgba(212, 168, 90, .12);
}
.gh-border {
  position: absolute; inset: 0; border-radius: inherit; padding: 1.2px; pointer-events: none;
  background: conic-gradient(from var(--ang, 0deg), #6b4d1c, #f6e7b8, #b8862f, #fff6dd, #6b4d1c);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: spin 5s linear infinite;
}
@property --ang { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@keyframes spin { to { --ang: 360deg; } }
.gh-btn svg { width: 34px; height: 34px; color: var(--gold-hi); }
.gh-text { display: flex; flex-direction: column; text-align: left; font-size: clamp(17px, 1.6vw, 22px); font-weight: 600; letter-spacing: -.01em; line-height: 1.2; }
.gh-text small { font-size: 11px; font-weight: 400; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; }
.gh-arrow { font-size: 22px; color: var(--gold-hi); transition: transform .5s var(--ease); }
.gh-btn:hover .gh-arrow { transform: translateX(6px); }

.credits {
  position: relative; height: 46vh; min-height: 300px; margin-top: 12vh; overflow: hidden;
  -webkit-mask: linear-gradient(transparent, #000 25%, #000 75%, transparent);
  mask: linear-gradient(transparent, #000 25%, #000 75%, transparent);
}
.credits-roll { position: absolute; left: 0; right: 0; top: 100%; display: flex; flex-direction: column; gap: 26px; }
.credits.in .credits-roll { animation: roll 24s linear infinite; }
@keyframes roll { from { transform: translateY(0); } to { transform: translateY(calc(-100% - 46vh)); } }
.credits p { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: baseline; }
.credits span { text-align: right; font-family: var(--mono); font-size: 11px; letter-spacing: .28em; text-transform: uppercase; color: var(--gold); }
.credits b { font-weight: 500; font-size: clamp(15px, 1.4vw, 20px); color: var(--ink); letter-spacing: .02em; }
.credits .tbc { display: block; text-align: center; font-family: var(--serif); font-style: italic; font-size: clamp(22px, 2.4vw, 34px); color: var(--gold-hi); margin-top: 30px; }

.footer {
  margin-top: auto; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 28px 0 34px; border-top: 1px solid var(--line);
  font-size: 12px; letter-spacing: .08em; color: var(--muted);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .card-intro { grid-column: span 6; min-height: 420px; }
  .card-term { grid-column: span 6; grid-row: auto; }
  .card-stat { grid-column: span 3; }
  .card-vibe { grid-column: span 3; }
  .wave { display: none; }
}
@media (max-width: 820px) {
  :root { --nav-h: 64px; }
  .nav-links { display: none; }
  .slate-tr { display: none; }
  .bento { grid-template-columns: 1fr; }
  .card-intro, .card-term, .card-stat, .card-vibe, .card-now { grid-column: auto; grid-row: auto; }
  .card-intro { min-height: 0; }
  .term { min-height: 280px; }
  .work-cn { display: none; }
  .work-steps { left: var(--gutter); right: var(--gutter); width: auto; top: auto; bottom: 64px; transform: none; height: 230px; text-align: center; }
  .step { justify-content: flex-end; align-items: center; }
  .step h3 { font-size: 30px; margin: 10px 0 8px; }
  .step h3 .cn { display: inline; margin: 0 0 0 .4em; }
  .appstore { align-self: center; margin-top: 16px; }
  .phone-stage { top: 38%; }
  .phone { --w: min(46vw, 210px); }
  .phone-screen { font-size: calc(var(--w) * .043); }
  .credits p { grid-template-columns: 1fr; gap: 4px; text-align: center; }
  .credits span { text-align: center; }
  .footer { justify-content: center; text-align: center; }
  .footer-mid { display: none; }
}
@media (max-height: 640px) and (min-width: 821px) {
  .phone { --w: 230px; }
}

@media (prefers-reduced-motion: reduce) {
  .grain, .scroll-cue i, .mq > div, .gh-border, .wave i { animation: none !important; }
  .reveal { transition-duration: .4s; transform: none; filter: none; }
  .hero-title .ch { transition-duration: .6s; transition-delay: 0s; }
  body.titles .hero-title .ch { animation: none; }
}

/* ==========================================================================
   v3 refinements
   ========================================================================== */
body { font-kerning: normal; font-optical-sizing: auto; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

/* Nav gains a glass backing once you leave the hero */
.nav::before { transition: background .6s ease, -webkit-backdrop-filter .6s ease, backdrop-filter .6s ease, border-color .6s ease; border-bottom: 1px solid transparent; }
.nav.scrolled::before {
  background: rgba(0, 0, 0, .52);
  -webkit-backdrop-filter: blur(20px) saturate(150%); backdrop-filter: blur(20px) saturate(150%);
  border-bottom-color: rgba(255, 255, 255, .06);
}

/* Scene transitions driven from JS */
.manifesto-text, .vibe .sticky > *, .process .track { will-change: opacity, transform; }

/* Terminal card footer */
.term { padding-bottom: 12px; }
.term-foot {
  display: flex; gap: 18px; flex-wrap: wrap; align-items: center;
  padding: 14px 22px; border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: 11px; letter-spacing: .06em; color: var(--muted);
}
.term-foot span:first-child { display: inline-flex; align-items: center; gap: 10px; color: #7ee2a8; }
.term-foot .pulse { width: 6px; height: 6px; }
.term-foot span:last-child { margin-left: auto; }

/* Burger (mobile) */
.nav-burger { display: none; position: relative; width: 40px; height: 40px; margin-left: 14px; }
.nav-burger i { position: absolute; left: 10px; right: 10px; height: 1.5px; background: var(--gold-hi); border-radius: 1px; transition: transform .6s var(--ease), top .6s var(--ease); }
.nav-burger i:nth-child(1) { top: 16px; }
.nav-burger i:nth-child(2) { top: 23px; }
body.menu-open .nav-burger i:nth-child(1) { top: 19.5px; transform: rotate(45deg); }
body.menu-open .nav-burger i:nth-child(2) { top: 19.5px; transform: rotate(-45deg); }
.nav-right { display: flex; align-items: center; }

.menu {
  position: fixed; inset: 0; z-index: 55;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: calc(var(--nav-h) + 6vh) var(--gutter) max(28px, env(safe-area-inset-bottom));
  background: radial-gradient(120% 70% at 50% 0%, rgba(60, 44, 18, .55), rgba(0, 0, 0, .92) 60%);
  -webkit-backdrop-filter: blur(24px) saturate(140%); backdrop-filter: blur(24px) saturate(140%);
  opacity: 0; visibility: hidden; transition: opacity .6s var(--ease), visibility 0s linear .6s;
}
body.menu-open .menu { opacity: 1; visibility: visible; transition: opacity .6s var(--ease), visibility 0s; }
body.menu-open { overflow: hidden; }
.menu-links { display: flex; flex-direction: column; gap: 6px; }
.menu-links a {
  display: flex; align-items: baseline; gap: 16px; padding: 8px 0;
  font-size: clamp(40px, 12vw, 64px); font-weight: 600; letter-spacing: -.045em; line-height: 1.05;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  opacity: 0; transform: translateY(30px); filter: blur(8px);
  transition: opacity .8s var(--ease), transform .8s var(--ease), filter .8s var(--ease), color .3s;
}
.menu-links a small { font-family: var(--mono); font-size: 11px; font-weight: 400; letter-spacing: .3em; color: var(--gold); transform: translateY(-1.2em); }
.menu-links a:active { color: var(--gold-hi); }
body.menu-open .menu-links a { opacity: 1; transform: none; filter: none; }
body.menu-open .menu-links a:nth-child(1) { transition-delay: .08s; }
body.menu-open .menu-links a:nth-child(2) { transition-delay: .14s; }
body.menu-open .menu-links a:nth-child(3) { transition-delay: .2s; }
body.menu-open .menu-links a:nth-child(4) { transition-delay: .26s; }
body.menu-open .menu-links a:nth-child(5) { transition-delay: .32s; }
.menu-foot { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.menu-foot a { color: var(--gold-hi); }

@media (min-width: 821px) { .menu { display: none; } }
@media (max-width: 820px) {
  .nav-burger { display: block; }
  .nav-sound { margin-left: auto; }
  .nav-sound-label { display: none; }
  .hero-title { font-size: 15.2vw; }
  .hero-eyebrow { letter-spacing: .36em; }
  .hero-sub { letter-spacing: .2em; font-size: 11px; }
  .manifesto-text { font-size: clamp(28px, 8.4vw, 40px); line-height: 1.14; }
  .section-head h2 { font-size: clamp(38px, 11vw, 56px); }
  .about { padding-top: 12vh; padding-bottom: 10vh; }
  .card { border-radius: 24px; }
  .card-intro h3 { font-size: clamp(44px, 14vw, 64px); }
  .stat { font-size: 104px; }
  .term { font-size: 12px; min-height: 250px; }
  .term-foot span:last-child { display: none; }
  .panel { height: min(520px, 64vh); border-radius: 26px; }
  .panel-title h2 { font-size: clamp(42px, 12vw, 60px); }
  .mq > div { font-size: 15vw; }
  .contact { padding-top: 16vh; }
  .contact-title { font-size: clamp(44px, 13vw, 72px); margin-bottom: 40px; }
  .gh-btn { padding: 14px 22px 14px 16px; gap: 12px; }
  .gh-btn svg { width: 28px; height: 28px; }
  .gh-text { font-size: 15px; }
  .credits { margin-top: 8vh; height: 40vh; }
}
body:not(.ready) .nav { pointer-events: none; }
.contact-title em { text-shadow: none; filter: drop-shadow(0 4px 18px rgba(0, 0, 0, .85)) drop-shadow(0 0 2px rgba(0, 0, 0, .6)); }
.contact-title { text-shadow: 0 6px 40px rgba(0, 0, 0, .6); }
@media (max-width: 820px) { .contact { padding-top: calc(var(--nav-h) + 96px); } }

/* ==========================================================================
   v5 — particle opening, sound gate, HUD, living typography
   ========================================================================== */
body.gl .grain { opacity: .025; }
body.gl .vignette { background: radial-gradient(120% 90% at 50% 45%, transparent 60%, rgba(0, 0, 0, .35) 100%); }

/* letterbox opens to scope as soon as the galaxy is on screen */
#intro.scope .bar { height: 12.5vh; transition-duration: 2.8s; }
#intro.open .bar { height: 10.5vh; }
#intro.wide .bar { height: 0; }
body.pmode .intro-line { display: none; }
.intro-skip { opacity: 0; pointer-events: none; transition: color .3s, opacity .8s; }
#intro.running .intro-skip { opacity: 1; pointer-events: auto; }
#intro.open .intro-skip { opacity: 0; pointer-events: none; }
.intro-card { z-index: 2; text-shadow: 0 0 30px rgba(246, 210, 140, .35), 0 0 2px rgba(0, 0, 0, .9); }

/* sound gate */
.gate {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px;
  opacity: 0; visibility: hidden; transition: opacity 1s var(--ease), visibility 0s linear 1s;
}
#intro.gate-on .gate { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity 1.4s var(--ease) .2s, visibility 0s; }
#intro.gate-on .intro-load { opacity: 0; filter: blur(8px); }
.gate-enter {
  position: relative; width: 138px; height: 138px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--mono); font-size: 12px; letter-spacing: .44em; text-transform: uppercase; color: var(--gold-hi);
  padding-left: .44em; background: radial-gradient(circle, rgba(212, 168, 90, .14), rgba(0, 0, 0, .2) 70%);
  transition: transform .8s var(--ease), color .4s;
}
.gate-ring { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(246, 231, 184, .3); transition: border-color .5s, box-shadow .5s; }
.gate-ring::before { content: ""; position: absolute; inset: -1px; border-radius: 50%; border: 1px solid transparent; border-top-color: var(--gold-hi); border-right-color: rgba(246, 231, 184, .35); animation: spin360 2.6s linear infinite; }
.gate-ring::after { content: ""; position: absolute; inset: -16px; border-radius: 50%; border: 1px solid rgba(246, 231, 184, .14); animation: breathe 2.8s ease-in-out infinite; }
.gate-enter:hover, .gate-enter:focus-visible { transform: scale(1.06); color: #fff; outline: none; }
.gate-enter:hover .gate-ring, .gate-enter:focus-visible .gate-ring { border-color: rgba(246, 231, 184, .85); box-shadow: 0 0 50px rgba(212, 168, 90, .35), inset 0 0 30px rgba(212, 168, 90, .2); }
.gate-hint { font-family: var(--mono); font-size: 10px; letter-spacing: .34em; text-transform: uppercase; color: rgba(246, 231, 184, .5); padding-left: .34em; }
.gate-silent { font-family: var(--mono); font-size: 10px; letter-spacing: .28em; text-transform: uppercase; color: rgba(245, 245, 247, .38); padding: 8px 2px; border-bottom: 1px solid rgba(245, 245, 247, .14); transition: color .3s, border-color .3s; }
.gate-silent:hover, .gate-silent:focus-visible { color: var(--ink); border-color: var(--gold); outline: none; }
@keyframes spin360 { to { transform: rotate(360deg); } }
@keyframes breathe { 0%, 100% { transform: scale(.95); opacity: .35; } 50% { transform: scale(1.06); opacity: 1; } }

/* title: particles hand over to real type (no slide), then letters respond to the cursor */
.hero-title .ch { font-weight: var(--wt, 600); translate: 0 calc(var(--lift, 0) * -1px); }
body.pmode .hero-title .ch {
  transform: none; filter: blur(10px);
  transition: opacity 1.5s var(--ease), filter 1.5s var(--ease), translate .6s var(--ease), font-weight .6s var(--ease);
  transition-delay: calc(var(--i) * 40ms);
}
body.pmode.titles .hero-title .ch { filter: blur(0) drop-shadow(0 10px 40px rgba(212, 168, 90, .18)); }
body.ready .hero-title .ch { transition: opacity 1.5s var(--ease), filter 1.5s var(--ease), transform 1.5s var(--ease), translate .6s var(--ease), font-weight .6s var(--ease); transition-delay: 0s; }

/* cursor press */
#cursor.press .c-ring { width: 120px; height: 120px; margin: -60px 0 0 -60px; border-color: rgba(246, 231, 184, .0); transition-duration: .35s; }

/* film HUD */
.hud {
  position: fixed; bottom: 22px; left: var(--gutter); z-index: 58; pointer-events: none;
  display: flex; gap: 18px; align-items: center;
  font-family: var(--mono); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; font-variant-numeric: tabular-nums;
  color: rgba(245, 245, 247, .5);
  opacity: 0; transition: opacity 1.6s ease 1.2s;
}
body.ready .hud { opacity: 1; }
body.menu-open .hud { opacity: 0; transition-delay: 0s; }
.hud-r { left: auto; right: var(--gutter); }
.rec { display: inline-flex; gap: 8px; align-items: center; color: #ff6a5f; }
.rec i { width: 6px; height: 6px; border-radius: 50%; background: #ff5a4f; box-shadow: 0 0 8px #ff5a4f; animation: blink 1.2s steps(1) infinite; }
#hudScene { color: var(--gold-hi); min-width: 22ch; }
.hero .scroll-cue { bottom: 56px; }
.footer { padding-bottom: 64px; }
@media (max-width: 820px) {
  .hud-r { display: none; }
  .hud { bottom: 12px; font-size: 9px; gap: 12px; }
  .hero .scroll-cue { bottom: 40px; }
  .gate-enter { width: 120px; height: 120px; }
}
@media (prefers-reduced-motion: reduce) {
  .gate-ring::before, .gate-ring::after, .rec i { animation: none; }
}

/* v9 — "best on a computer" note for phones & tablets */
.device-note {
  position: absolute; left: 50%; bottom: max(16px, calc(6.25vh - 16px), env(safe-area-inset-bottom));
  transform: translateX(-50%); width: max-content; max-width: 90vw;
  display: none; transition: opacity .9s var(--ease), filter .9s var(--ease);
}
#intro.note .device-note { display: block; }
#intro.running .device-note, #intro.line .device-note { opacity: 0; filter: blur(6px); }
.device-note-in {
  display: flex; align-items: center; gap: 14px; padding: 9px 18px 9px 14px;
  border: 1px solid rgba(246, 231, 184, .16); border-radius: 999px;
  background: linear-gradient(180deg, rgba(40, 30, 14, .5), rgba(10, 8, 4, .5));
  box-shadow: inset 0 1px 0 rgba(255, 240, 200, .06), 0 0 40px rgba(212, 168, 90, .08);
  animation: noteIn 1.6s var(--ease) .45s both;
}
.device-note-icon { width: 26px; height: 20px; flex: none; color: var(--gold-hi); filter: drop-shadow(0 0 6px rgba(246, 210, 140, .45)); }
.device-note-text { display: flex; flex-direction: column; gap: 4px; text-align: left; }
.device-note-en { font-family: var(--mono); font-size: 10px; letter-spacing: .26em; text-transform: uppercase; color: rgba(246, 231, 184, .78); }
.device-note-zh { font-family: var(--sans); font-size: 11px; letter-spacing: .3em; color: rgba(245, 245, 247, .46); }
@keyframes noteIn { from { opacity: 0; transform: translateY(10px); filter: blur(8px); } }
@media (prefers-reduced-motion: reduce) { .device-note-in { animation: none; } }

/* ==========================================================================
   v11 — identity & finish
   ========================================================================== */
/* identity: an eclipse — a dark disc in front of the light, a gold crescent and a diamond-ring spark */
.nav-logo { width: auto; height: auto; display: inline-flex; align-items: center; gap: 13px; padding: 6px 0; }
.nav-logo .mark { width: 32px; height: 32px; flex: none; display: block; overflow: visible; }
.mk-moon { transition: transform 1.4s var(--ease); }
.mk-glow { transform-origin: 26px 26px; opacity: .8; transition: opacity .9s ease, transform 1.4s var(--ease); }
.mk-spark { transform-origin: 29.6px 28.8px; filter: drop-shadow(0 0 1.4px #fff3d0) drop-shadow(0 0 3px rgba(246, 214, 150, .9)); transition: transform 1.4s var(--ease); animation: mkTwinkle 5.5s ease-in-out infinite; }
@keyframes mkTwinkle { 0%, 100% { opacity: .85; } 50% { opacity: 1; } 55% { opacity: .6; } }
.nav-logo:hover .mk-moon, .nav-logo:focus-visible .mk-moon { transform: translate(-1.1px, -1.1px); }
.nav-logo:hover .mk-glow, .nav-logo:focus-visible .mk-glow { opacity: 1; transform: scale(1.15); }
.nav-logo:hover .mk-spark, .nav-logo:focus-visible .mk-spark { transform: scale(1.5) rotate(45deg); }
@media (prefers-reduced-motion: reduce) { .mk-spark { animation: none; } }
.wordmark {
  font-size: 11px; font-weight: 600; letter-spacing: .34em; text-transform: uppercase; white-space: nowrap;
  background: linear-gradient(90deg, var(--ink) 0%, var(--ink) 40%, var(--gold-hi) 50%, var(--ink) 60%, var(--ink) 100%);
  background-size: 250% 100%; background-position: 100% 0; -webkit-background-clip: text; background-clip: text; color: transparent;
  transition: background-position 1.4s var(--ease);
}
.nav-logo:hover .wordmark, .nav-logo:focus-visible .wordmark { background-position: 0 0; }
.nav-logo:focus-visible { outline: none; }
.nav-logo:focus-visible .mark { filter: drop-shadow(0 0 8px rgba(246, 214, 150, .6)); }

/* consistent keyboard focus */
:focus-visible { outline: 1px solid rgba(246, 231, 184, .7); outline-offset: 4px; }
a:focus:not(:focus-visible), button:focus:not(:focus-visible) { outline: none; }

/* scrollbar: a thin gold filament */
html { scrollbar-width: thin; scrollbar-color: rgba(212, 168, 90, .5) #000; }
::-webkit-scrollbar { width: 9px; }
::-webkit-scrollbar-track { background: #000; }
::-webkit-scrollbar-thumb { background: linear-gradient(#f0d595, #8a6428); border-radius: 9px; border: 3px solid #000; }
::selection { background: rgba(212, 168, 90, .85); color: #000; }

/* lower edge fade so the film HUD never collides with content */
.edge-fade {
  position: fixed; left: 0; right: 0; bottom: 0; height: 96px; z-index: 57; pointer-events: none;
  background: linear-gradient(to top, rgba(0, 0, 0, .86), rgba(0, 0, 0, .5) 45%, rgba(0, 0, 0, 0));
  opacity: 0; transition: opacity 1.6s ease 1.2s;
}
body.ready .edge-fade { opacity: 1; }
body.menu-open .edge-fade { opacity: 0; transition-delay: 0s; }

/* hero: legibility over the metal */
.hero-eyebrow { text-shadow: 0 1px 14px rgba(0, 0, 0, .85), 0 0 2px rgba(0, 0, 0, .6); }
.hero-sub { text-shadow: 0 1px 12px rgba(0, 0, 0, .8); }

/* ghost type: gradient fills instead of strokes (variable fonts show inner contours when stroked) */
.mq span.o {
  -webkit-text-stroke: 0; color: transparent;
  background: linear-gradient(180deg, rgba(246, 231, 184, .62), rgba(212, 168, 90, .16)); -webkit-background-clip: text; background-clip: text;
}
.work-bgword {
  -webkit-text-stroke: 0; color: transparent;
  background: linear-gradient(180deg, rgba(246, 231, 184, .05), rgba(246, 231, 184, .008)); -webkit-background-clip: text; background-clip: text;
}
.panel .num {
  -webkit-text-stroke: 0; color: transparent;
  background: linear-gradient(180deg, rgba(246, 231, 184, .34), rgba(246, 231, 184, 0) 88%); -webkit-background-clip: text; background-clip: text;
}
.panel .art .dim { opacity: .3; }

/* vibe: bilingual line, latin kept at its natural rhythm */
.vibe-cn {
  display: inline-flex; align-items: center; gap: 18px; font-family: var(--sans); font-weight: 500;
  font-size: clamp(14px, 1.15vw, 17px); letter-spacing: .42em; padding-left: .42em; color: rgba(246, 231, 184, .86);
}
.vibe-cn .lat { letter-spacing: .08em; margin: 0 .3em 0 0; font-weight: 600; color: var(--gold-hi); }
.vibe-cn::before, .vibe-cn::after { content: ""; width: 44px; height: 1px; flex: none; }
.vibe-cn::before { background: linear-gradient(90deg, transparent, var(--gold)); }
.vibe-cn::after { background: linear-gradient(90deg, var(--gold), transparent); }
@media (max-width: 820px) {
  .nav-logo { gap: 10px; }
  .nav-logo .mark { width: 30px; height: 30px; }
  .wordmark { font-size: 10px; letter-spacing: .28em; }
  .vibe-cn { letter-spacing: .3em; gap: 12px; }
  .vibe-cn::before, .vibe-cn::after { width: 22px; }
  .edge-fade { height: 72px; }
}
@media (max-width: 360px) { .wordmark { display: none; } }
