/* ==========================================================================
   Rastro — styles.css
   Concept: "traces of matter". Warm stone editorial page (Creative Reference
   Library / StyleKit 编辑杂志风 + 自然有机风), huge grotesk headlines
   (Awwwards A24 / Cartier case pages), a dark rounded WebGL stage (Lusion),
   a dark center-stage carousel (GSAP Showcase) and AT-style particle glow.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --stone: #ece7de;
  --stone-2: #e2dbcf;
  --pale: #f4f2ee;
  --ink: #151310;
  --ink-soft: #5f584f;
  --line: rgba(21, 19, 16, 0.14);

  --night: #0d0e12;
  --night-2: #15171d;
  --obsidian: #08090c;
  --bone: #efe9df;
  --bone-soft: rgba(239, 233, 223, 0.62);
  --line-dark: rgba(239, 233, 223, 0.14);

  --clay: #c2512b;
  --clay-2: #de6a3f;
  --ochre: #d9a441;
  --cobalt: #3358ff;
  --cream: #f1e6d3;

  --f-sans: "Inter", "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --f-serif: "Cormorant Garamond", "Cormorant", "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Noto Serif SC", "Songti SC", "STSong", serif;
  --f-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

  --pad: clamp(20px, 4vw, 64px);
  --sec: clamp(96px, 12vw, 180px);
  --radius: 18px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.76, 0, 0.24, 1);
  --header-h: 76px;
}

@property --ax { syntax: "<percentage>"; inherits: true; initial-value: 50%; }
@property --ay { syntax: "<percentage>"; inherits: true; initial-value: 50%; }
@property --rx { syntax: "<percentage>"; inherits: true; initial-value: 12%; }
@property --ry { syntax: "<percentage>"; inherits: true; initial-value: 20%; }

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--stone);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img, canvas { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { font-weight: 500; }
em { font-style: italic; }
::selection { background: var(--clay); color: var(--bone); }
:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 3px; border-radius: 4px; }
main:focus { outline: none; }

/* ---------- Bilingual switching ---------- */
html[data-lang="en"] .zh,
html[data-lang="zh"] .en { display: none !important; }
html[data-lang="zh"] body { letter-spacing: 0.01em; }
/* CJK has no italics: render emphasis as serif + colour */
.zh em, :lang(zh-Hans) em { font-style: normal; font-family: var(--f-serif); color: var(--clay); }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; left: 12px; top: 12px; z-index: 3000;
  padding: 10px 16px; border-radius: 999px; background: var(--ink); color: var(--bone);
  transform: translateY(-160%); transition: transform 0.3s var(--ease-out);
}
.skip-link:focus { transform: none; }

/* ---------- Split text ---------- */
.split-w {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding: 0.08em 0.02em 0.12em;
  margin: -0.08em -0.02em -0.12em;
}
.split-c, .split-i { display: inline-block; will-change: transform; }
[data-scrub-words] .split-w { overflow: visible; }

/* ==========================================================================
   PRELOADER — Lusion-style black screen, large 3-digit counter bottom-left,
   thin progress bar; growth-ring motif in the middle.
   Never intercepts pointer events, and has a CSS failsafe exit.
   ========================================================================== */
.preloader {
  position: fixed; inset: 0; z-index: 2500;
  display: grid; grid-template-rows: auto 1fr auto;
  padding: var(--pad);
  background: var(--obsidian);
  color: var(--bone);
  pointer-events: none;
  clip-path: inset(0 0 0 0);
  animation: preloader-failsafe 0.6s ease 9s forwards;
}
html.no-js .preloader,
html.motion-off .preloader { display: none; }
@keyframes preloader-failsafe { to { opacity: 0; visibility: hidden; } }
.preloader__top { display: flex; justify-content: space-between; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.preloader__brand { font-weight: 600; letter-spacing: 0.18em; }
.preloader__meta { color: var(--bone-soft); }
.preloader__rings { display: grid; place-items: center; }
.preloader__rings span {
  width: min(46vmin, 420px); aspect-ratio: 1; border-radius: 50%;
  background:
    radial-gradient(circle, rgba(217, 164, 65, 0.9) 0 2px, transparent 3px),
    repeating-radial-gradient(circle, transparent 0 11px, rgba(239, 233, 223, 0.16) 11px 12px, transparent 12px 19px, rgba(194, 81, 43, 0.22) 19px 20px);
  -webkit-mask: radial-gradient(circle, #000 0 var(--p, 0%), transparent calc(var(--p, 0%) + 1%));
          mask: radial-gradient(circle, #000 0 var(--p, 0%), transparent calc(var(--p, 0%) + 1%));
  animation: rings-spin 14s linear infinite;
}
@keyframes rings-spin { to { transform: rotate(360deg); } }
.preloader__bottom { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.preloader__count {
  font-size: clamp(72px, 13vw, 210px);
  font-weight: 300; line-height: 0.78; letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
}
.preloader__label { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--bone-soft); padding-bottom: 8px; }
.preloader__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(239, 233, 223, 0.1); }
.preloader__bar span {
  display: block; height: 100%; transform-origin: left center; transform: scaleX(0);
  background: linear-gradient(90deg, var(--cobalt), var(--ochre), var(--clay));
}

/* ==========================================================================
   CURSOR (only when JS adds html.has-cursor; never blocks events)
   ========================================================================== */
.cursor-ring, .cursor-dot {
  position: fixed; left: 0; top: 0; z-index: 2400;
  pointer-events: none; display: none; border-radius: 50%;
}
html.has-cursor .cursor-ring, html.has-cursor .cursor-dot { display: block; }
html.has-cursor, html.has-cursor a, html.has-cursor button { cursor: none; }
.cursor-dot {
  width: 6px; height: 6px; margin: -3px 0 0 -3px;
  background: #fff; mix-blend-mode: difference;
}
.cursor-ring {
  width: 38px; height: 38px; margin: -19px 0 0 -19px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  mix-blend-mode: difference;
  display: none; place-items: center;
  transition: width 0.45s var(--ease-out), height 0.45s var(--ease-out), margin 0.45s var(--ease-out),
              background-color 0.3s, border-color 0.3s, opacity 0.3s;
}
html.has-cursor .cursor-ring { display: grid; }
.cursor-ring.is-hover { width: 64px; height: 64px; margin: -32px 0 0 -32px; background: rgba(255, 255, 255, 0.95); }
.cursor-ring.has-label {
  width: 88px; height: 88px; margin: -44px 0 0 -44px;
  mix-blend-mode: normal; background: var(--clay); border-color: var(--clay);
}
.cursor-ring.is-down { width: 26px; height: 26px; margin: -13px 0 0 -13px; }
.cursor-ring.is-hidden, .cursor-dot.is-hidden { opacity: 0; }
.cursor-ring__label {
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--bone);
  opacity: 0; transition: opacity 0.25s;
}
.cursor-ring.has-label .cursor-ring__label { opacity: 1; }

/* ==========================================================================
   HEADER — Lusion chrome: wordmark left, pills right; theme swaps per section
   ========================================================================== */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 900;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  height: var(--header-h);
  padding: 0 var(--pad);
  color: var(--ink);
  transition: color 0.45s var(--ease-out), transform 0.6s var(--ease-out);
}
.site-header[data-theme="dark"] { color: var(--bone); }
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: color-mix(in srgb, var(--stone) 74%, transparent);
  backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2);
  opacity: 0; transition: opacity 0.45s var(--ease-out), background-color 0.45s;
}
.site-header[data-theme="dark"]::before { background: rgba(10, 11, 15, 0.58); }
.site-header.is-scrolled::before { opacity: 1; }
body.menu-open .site-header::before { opacity: 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; font-size: 15px; }
.brand__mark {
  width: 22px; height: 22px; border-radius: 50%;
  background:
    radial-gradient(circle, currentColor 0 2px, transparent 2.5px),
    repeating-radial-gradient(circle, transparent 0 3px, currentColor 3px 4px);
  opacity: 0.9;
}
.nav__list { display: flex; gap: clamp(14px, 1.8vw, 28px); font-size: 13px; }
.nav__list a { position: relative; padding: 6px 0; opacity: 0.78; transition: opacity 0.3s; }
.nav__list a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform 0.5s var(--ease-out);
}
.nav__list a:hover, .nav__list a.is-current { opacity: 1; }
.nav__list a:hover::after, .nav__list a.is-current::after { transform: scaleX(1); transform-origin: left; }

.header__actions { display: flex; align-items: center; gap: 8px; }

.pill {
  display: inline-flex; align-items: center; gap: 10px;
  height: 40px; padding: 0 18px; border-radius: 999px;
  font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap;
  transition: background-color 0.35s, color 0.35s, border-color 0.35s;
}
html[data-lang="zh"] .pill { letter-spacing: 0.1em; }
.pill--dark { background: var(--ink); color: var(--bone); }
.pill--dark:hover { background: var(--clay); }
.site-header[data-theme="dark"] .pill--dark { background: var(--bone); color: var(--ink); }
.site-header[data-theme="dark"] .pill--dark:hover { background: var(--clay); color: var(--bone); }
.pill--light { background: rgba(255, 255, 255, 0.55); color: var(--ink); }
.pill--light:hover { background: #fff; }
.pill--ghost { border: 1px solid currentColor; border-color: color-mix(in srgb, currentColor 30%, transparent); }
.pill__dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.site-header[data-theme="dark"] .pill--light { background: rgba(239, 233, 223, 0.12); color: var(--bone); }

.lang-switch {
  display: inline-flex; padding: 3px; border-radius: 999px; height: 40px; align-items: center;
  border: 1px solid color-mix(in srgb, currentColor 30%, transparent);
}
.lang-switch__btn { height: 32px; min-width: 40px; padding: 0 10px; border-radius: 999px; font-size: 12px; letter-spacing: 0.04em; opacity: 0.6; transition: background-color 0.3s, color 0.3s, opacity 0.3s; }
.lang-switch__btn[aria-pressed="true"] { background: var(--ink); color: var(--bone); opacity: 1; }
.site-header[data-theme="dark"] .lang-switch__btn[aria-pressed="true"] { background: var(--bone); color: var(--ink); }

.motion-toggle__dot { width: 7px; height: 7px; border-radius: 50%; background: #3bbf6a; box-shadow: 0 0 0 3px rgba(59, 191, 106, 0.18); }
.motion-toggle[aria-pressed="false"] .motion-toggle__dot { background: transparent; border: 1px solid currentColor; box-shadow: none; }

.menu-toggle { display: none; }
.menu-toggle__dots { width: 12px; height: 4px; background: radial-gradient(circle, currentColor 1.6px, transparent 2px) 0 0 / 6px 4px repeat-x; }

/* Overlay menu */
.menu {
  position: fixed; inset: 0; z-index: 850;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 32px;
  padding: calc(var(--header-h) + 24px) var(--pad) var(--pad);
  background: var(--night); color: var(--bone);
}
.menu[hidden] { display: none; }
.menu__list a { display: flex; align-items: baseline; gap: 16px; padding: 8px 0; font-size: clamp(36px, 9vw, 72px); line-height: 1; letter-spacing: -0.04em; border-bottom: 1px solid var(--line-dark); }
.menu__num { font-size: 12px; letter-spacing: 0.06em; color: var(--bone-soft); }
.menu__mail { font-size: 15px; color: var(--ochre); }
body.menu-open { overflow: hidden; }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero { position: relative; padding-top: calc(var(--header-h) + clamp(16px, 4vh, 48px)); background: var(--stone); }
.hero__head { padding: 0 var(--pad); text-align: center; position: relative; z-index: 2; }
.hero__kicker { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 8px; font-size: 12px; letter-spacing: 0.05em; color: var(--ink-soft); }
.hero__kicker a { color: var(--ink); border-bottom: 1px solid var(--line); }
.hero__title {
  margin: 0.06em 0 0.1em;
  font-size: clamp(92px, 20.5vw, 390px);
  font-weight: 600; line-height: 0.8; letter-spacing: -0.07em;
  text-transform: uppercase;
  perspective: 900px;
}
.hero__title .split-c { transform-origin: 50% 100%; }
.hero__sub {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px 48px; align-items: end;
  text-align: left; padding-bottom: clamp(24px, 4vh, 40px);
}
.hero__tagline { font-family: var(--f-serif); font-size: clamp(26px, 3vw, 48px); line-height: 1.04; letter-spacing: -0.01em; max-width: 16ch; }
html[data-lang="zh"] .hero__tagline { font-family: var(--f-sans); font-weight: 500; letter-spacing: 0.02em; }
.hero__tagline em { color: var(--clay); }
.hero__desc { font-size: 14px; line-height: 1.6; color: var(--ink-soft); max-width: 42ch; justify-self: end; }

.hero__stage { position: relative; height: 100vh; height: 100svh; }
.stage-card {
  --clip-x: var(--pad);
  position: absolute; inset: 0;
  overflow: hidden;
  background:
    radial-gradient(70% 80% at 28% 30%, rgba(51, 88, 255, 0.22), transparent 60%),
    radial-gradient(60% 70% at 80% 80%, rgba(217, 164, 65, 0.12), transparent 60%),
    linear-gradient(180deg, #11131b, #0a0b10);
  color: var(--bone);
  clip-path: inset(0px var(--pad) 6vh var(--pad) round var(--radius));
}
.stage-card__fallback, .stage-card__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.stage-card__fallback { object-fit: contain; padding: 10vh 10vw 14vh; transition: opacity 1s var(--ease-out); }
.stage-card__canvas { opacity: 0; transition: opacity 1.2s var(--ease-out); }
.stage-card.is-live .stage-card__canvas { opacity: 1; }
.stage-card.is-live .stage-card__fallback { opacity: 0; }
.stage-card.is-static .stage-card__canvas { opacity: 0; }
.stage-card.is-static .stage-card__fallback { opacity: 1; }
.stage-card.is-static .stage-card__states,
.stage-card.is-static .stage-card__readout { display: none; }

.stage-card__caption {
  position: absolute; top: calc(var(--header-h) + 14px); left: 50%; transform: translateX(-50%);
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--bone-soft); white-space: nowrap; pointer-events: none;
}
.stage-card__ui {
  position: absolute; left: calc(var(--pad) + 24px); right: calc(var(--pad) + 24px); bottom: calc(6vh + 22px);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 16px;
  pointer-events: none;
}
.stage-card__readout { display: flex; align-items: baseline; gap: 12px; }
.stage-card__readout-num { font-size: clamp(40px, 5vw, 76px); font-weight: 300; line-height: 0.8; letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
.stage-card__readout-txt { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--bone-soft); }
.stage-card__states {
  display: flex; gap: 4px; padding: 4px; border-radius: 999px;
  background: rgba(239, 233, 223, 0.08); border: 1px solid var(--line-dark);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  pointer-events: auto;
}
.state-pill { height: 34px; padding: 0 14px; border-radius: 999px; font-size: 12px; letter-spacing: 0.04em; color: var(--bone-soft); transition: background-color 0.3s, color 0.3s; white-space: nowrap; }
.state-pill:hover { color: var(--bone); }
.state-pill[aria-pressed="true"] { background: var(--bone); color: var(--ink); }
.stage-card__scroll { justify-self: end; display: inline-flex; gap: 14px; align-items: center; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--bone-soft); }
.stage-card__scroll .cross { font-size: 14px; color: var(--bone); }

.hero__topics {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
  padding: clamp(40px, 6vw, 80px) var(--pad) clamp(56px, 7vw, 100px);
}
.hero__topics a { display: grid; gap: 6px; padding-top: 16px; border-top: 1px solid var(--line); transition: color 0.3s; }
.hero__topics a:hover { color: var(--clay); }
.hero__topic-num { font-size: 12px; color: var(--ink-soft); }
.hero__topic-zh { font-size: clamp(18px, 1.6vw, 24px); font-weight: 500; letter-spacing: 0.04em; }
.hero__topic-en { font-size: 13px; color: var(--ink-soft); }

/* ==========================================================================
   MARQUEE — GSAP Showcase "submit your site ✦" loop
   ========================================================================== */
.marquee { overflow: hidden; background: var(--ink); color: var(--bone); padding: 22px 0; }
.marquee__track { display: flex; width: max-content; will-change: transform; }
.marquee__group { display: flex; align-items: center; gap: 28px; padding-right: 28px; flex: none; }
.marquee__group span { font-size: clamp(22px, 2.6vw, 40px); letter-spacing: -0.02em; white-space: nowrap; }
.marquee__group span:nth-child(4n + 1) { font-family: var(--f-serif); font-style: italic; }
.marquee__group i { font-style: normal; color: var(--clay-2); font-size: 18px; }
html.js:not(.motion-off) .marquee__track { animation: marquee 48s linear infinite; }
html.gsap-marquee .marquee__track { animation: none !important; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ==========================================================================
   SECTION INDEX — sparse CRL-style "(01)" numbering
   ========================================================================== */
.section-index { display: flex; align-items: baseline; gap: 14px; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); }
.section-index__num { font-variant-numeric: tabular-nums; }
.section-index__title { font-size: 12px; font-weight: 500; letter-spacing: 0.08em; }
.section-index--dark { color: var(--bone-soft); }

/* ==========================================================================
   (01) ABOUT
   ========================================================================== */
.about { padding: var(--sec) var(--pad); background: var(--stone); }
.about__statement {
  margin: 40px 0 clamp(64px, 9vw, 140px);
  max-width: 22ch;
  font-size: clamp(34px, 5.4vw, 96px);
  line-height: 1.02; letter-spacing: -0.04em; font-weight: 500;
}
html[data-lang="zh"] .about__statement { max-width: 15em; font-size: clamp(30px, 4.4vw, 76px); line-height: 1.22; letter-spacing: 0; }
.about__statement em { font-family: var(--f-serif); font-weight: 400; color: var(--clay); letter-spacing: -0.02em; }
.about__grid {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px;
  align-items: start;
}
.about__fig--wood { grid-column: 1 / span 4; }
.about__fields { grid-column: 6 / span 4; padding-top: 12vh; }
.about__fig--clay { grid-column: 10 / span 3; margin-top: 30vh; }
.principles { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: clamp(64px, 8vw, 120px); }
.about__img { overflow: hidden; border-radius: 14px; background: var(--night); }
.about__img img { width: 100%; aspect-ratio: 11 / 18; object-fit: cover; }
.about__fig figcaption { margin-top: 12px; font-size: 12px; color: var(--ink-soft); }
.about__label { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 20px; font-weight: 500; }
.fields li { display: grid; gap: 4px; padding: 18px 0; border-top: 1px solid var(--line); counter-increment: field; }
.fields li:last-child { border-bottom: 1px solid var(--line); }
.fields__zh { font-size: clamp(22px, 2vw, 30px); font-weight: 500; letter-spacing: 0.04em; }
.fields__en { font-size: 14px; color: var(--ink-soft); }
.principle { padding-top: 18px; border-top: 1px solid var(--ink); }
.principle__num { font-size: 12px; color: var(--ink-soft); }
.principle h3 { margin: 14px 0 10px; font-size: clamp(20px, 1.7vw, 26px); line-height: 1.15; letter-spacing: -0.01em; }
.principle p { font-size: 15px; color: var(--ink-soft); max-width: 36ch; }

/* ==========================================================================
   (02) SERVICES — pinned horizontal center-stage (GSAP Showcase)
   ========================================================================== */
.services { position: relative; background: var(--night); color: var(--bone); overflow: hidden; }
.services__inner {
  --card-w: min(60vw, 900px, calc((100vh - 380px) * 1.7));
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: calc(var(--header-h) + 24px) 0 40px;
}
.services__head {
  display: grid; grid-template-columns: 1fr auto; grid-template-areas: "idx nav" "title nav";
  gap: 12px 24px; align-items: end; padding: 0 var(--pad); margin-bottom: clamp(24px, 4vh, 48px);
}
.services__head .section-index { grid-area: idx; }
.services__title { grid-area: title; font-size: clamp(40px, 5.5vw, 96px); line-height: 0.95; letter-spacing: -0.045em; }
.services__title em { font-family: var(--f-serif); font-weight: 400; color: var(--ochre); }
.services__nav { grid-area: nav; display: flex; align-items: center; gap: 10px; }
.services__count { margin-right: 14px; font-size: 13px; font-variant-numeric: tabular-nums; color: var(--bone-soft); }
.services__count #services-current { color: var(--bone); }
.round-btn {
  width: 52px; height: 52px; border-radius: 50%; border: 1px solid rgba(239, 233, 223, 0.5);
  display: grid; place-items: center; font-size: 18px;
  transition: background-color 0.3s, color 0.3s, opacity 0.3s;
}
.round-btn:hover { background: var(--bone); color: var(--ink); }
.round-btn:disabled { opacity: 0.3; cursor: default; }

.services__viewport {
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.services__viewport::-webkit-scrollbar { display: none; }
.services--pinned .services__viewport { overflow: visible; scroll-snap-type: none; }
.services__track {
  display: flex; gap: clamp(20px, 3vw, 48px); width: max-content;
  padding: 0 calc((100% - var(--card-w)) / 2);
}
.services__viewport { container-type: inline-size; }
.services__track { padding-inline: calc((100cqw - var(--card-w)) / 2); }
.service-card { width: var(--card-w); flex: none; scroll-snap-align: center; transform-origin: 50% 50%; }
.service-card__media { position: relative; overflow: hidden; border-radius: 14px; border: 1px solid var(--line-dark); background: #000; }
.service-card__media img { width: 100%; aspect-ratio: 720 / 380; object-fit: cover; transform: scale(1.08); transition: transform 1.2s var(--ease-out); }
.service-card.is-active .service-card__media img { transform: scale(1); }
.service-card__meta { display: flex; align-items: center; justify-content: space-between; margin: 18px 0 8px; font-size: 12px; color: var(--bone-soft); }
.tag { padding: 3px 9px; border: 1px solid rgba(217, 164, 65, 0.6); color: var(--ochre); border-radius: 4px; font-size: 11px; letter-spacing: 0.04em; }
.service-card__title { font-size: clamp(22px, 2.2vw, 34px); line-height: 1.1; letter-spacing: -0.02em; }
.service-card__text { margin-top: 10px; max-width: 58ch; font-size: 15px; color: var(--bone-soft); }
.services__progress { margin: clamp(24px, 4vh, 40px) var(--pad) 0; height: 1px; background: var(--line-dark); }
.services__progress span { display: block; height: 100%; background: var(--bone); transform-origin: left; transform: scaleX(0.25); transition: transform 0.4s var(--ease-out); }

/* ==========================================================================
   (03)/(04) SPECIMEN SECTIONS + LAYER EXPLORER
   ========================================================================== */
.specimen { position: relative; padding: var(--sec) var(--pad); }
.specimen--wood { background: var(--obsidian); color: var(--bone); }
.specimen--sherd { background: var(--pale); color: var(--ink); }
.specimen__head {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); grid-template-areas: "idx idx" "title lead";
  gap: 28px 64px; align-items: end; margin-bottom: clamp(48px, 6vw, 88px);
}
.specimen__head .section-index { grid-area: idx; }
.specimen__title { grid-area: title; font-size: clamp(44px, 6.4vw, 112px); line-height: 0.94; letter-spacing: -0.05em; }
html[data-lang="zh"] .specimen__title { letter-spacing: -0.01em; line-height: 1.08; }
.specimen__title em { font-family: var(--f-serif); font-weight: 400; letter-spacing: -0.02em; }
.specimen--wood .specimen__title em { color: var(--ochre); }
.specimen--sherd .specimen__title em { color: var(--clay); }
.specimen__lead { grid-area: lead; font-size: 16px; line-height: 1.65; max-width: 46ch; }
.specimen--wood .specimen__lead { color: var(--bone-soft); }
.specimen--sherd .specimen__lead { color: var(--ink-soft); }

.layer-explorer {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(280px, 1fr);
  grid-template-areas: "tabs tabs" "plate copy";
  gap: 28px clamp(28px, 4vw, 64px);
  align-items: start;
}
.layer-explorer--reverse { grid-template-columns: minmax(280px, 1fr) minmax(0, 1.8fr); grid-template-areas: "tabs tabs" "copy plate"; }
.layer-tabs { grid-area: tabs; display: flex; flex-wrap: wrap; gap: 8px; }
.layer-tab {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 0 18px; border-radius: 999px;
  font-size: 14px; border: 1px solid currentColor;
  border-color: color-mix(in srgb, currentColor 22%, transparent);
  transition: background-color 0.35s, color 0.35s, border-color 0.35s;
}
.layer-tab__num { font-size: 11px; font-variant-numeric: tabular-nums; opacity: 0.6; }
.specimen--wood .layer-tab:hover { border-color: var(--bone); }
.specimen--wood .layer-tab[aria-selected="true"] { background: var(--bone); color: var(--ink); border-color: var(--bone); }
.specimen--sherd .layer-tab:hover { border-color: var(--ink); }
.specimen--sherd .layer-tab[aria-selected="true"] { background: var(--ink); color: var(--bone); border-color: var(--ink); }

.plate { grid-area: plate; }
.plate__frame {
  position: relative; overflow: hidden; border-radius: 16px; background: #050608;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.6);
  transition: --ax 0.8s var(--ease-out), --ay 0.8s var(--ease-out), --rx 0.8s var(--ease-out), --ry 0.8s var(--ease-out);
}
.plate__img { width: 100%; user-select: none; -webkit-user-drag: none; }
.plate__lens, .plate__reticle, .plate__scan, .plate__loupe { pointer-events: none; }
.plate__lens {
  position: absolute; inset: 0; z-index: 1;
  background: radial-gradient(var(--rx) var(--ry) at var(--ax) var(--ay), transparent 0 70%, rgba(4, 5, 8, 0.66) 100%);
}
.plate__reticle {
  position: absolute; z-index: 2;
  left: calc(var(--ax) - var(--rx)); top: calc(var(--ay) - var(--ry));
  width: calc(var(--rx) * 2); height: calc(var(--ry) * 2);
  border: 1px dashed rgba(239, 233, 223, 0.55); border-radius: 50%;
}
.specimen--sherd .plate__reticle { border-radius: 999px; border-color: rgba(239, 233, 223, 0.5); }
.plate__scan {
  position: absolute; z-index: 3; top: 0; bottom: 0; left: 0; width: 18%;
  background: linear-gradient(90deg, transparent, rgba(120, 150, 255, 0.22), rgba(239, 233, 223, 0.5) 50%, transparent 52%);
  opacity: 0; transform: translateX(-110%);
}
.plate__loupe {
  position: absolute; z-index: 5; left: 0; top: 0;
  width: 150px; height: 150px; margin: -75px 0 0 -75px; border-radius: 50%;
  border: 1px solid rgba(239, 233, 223, 0.7);
  box-shadow: 0 0 0 6px rgba(8, 9, 12, 0.35), 0 20px 40px rgba(0, 0, 0, 0.45);
  background-repeat: no-repeat;
  opacity: 0; transform: scale(0.6);
  transition: opacity 0.3s, transform 0.4s var(--ease-out);
}
.plate__loupe.is-on { opacity: 1; transform: scale(1); }

.hotspot {
  position: absolute; z-index: 4;
  left: var(--x); top: var(--y);
  width: 48px; height: 48px; margin: -24px 0 0 -24px;
  display: grid; place-items: center; border-radius: 50%;
}
.hotspot__dot {
  grid-area: 1 / 1; width: 14px; height: 14px; border-radius: 50%;
  background: var(--bone); box-shadow: 0 0 0 4px rgba(8, 9, 12, 0.45);
  transition: transform 0.4s var(--ease-out), background-color 0.3s;
}
.hotspot__pulse {
  grid-area: 1 / 1; width: 14px; height: 14px; border-radius: 50%;
  border: 1px solid var(--bone);
  animation: hotspot-pulse 2.4s var(--ease-out) infinite;
}
@keyframes hotspot-pulse { 0% { transform: scale(1); opacity: 0.9; } 100% { transform: scale(3.2); opacity: 0; } }
.hotspot__num {
  position: absolute; left: calc(50% + 14px); top: 50%; transform: translateY(-50%);
  font-family: var(--f-mono); font-size: 11px; color: var(--bone);
  padding: 2px 6px; border-radius: 4px; background: rgba(8, 9, 12, 0.6);
  white-space: nowrap; pointer-events: none;
}
.hotspot:hover .hotspot__dot { transform: scale(1.3); }
.hotspot.is-active .hotspot__dot, .hotspot[aria-pressed="true"] .hotspot__dot { background: var(--clay-2); transform: scale(1.35); box-shadow: 0 0 0 4px rgba(222, 106, 63, 0.3); }
.hotspot.is-active .hotspot__pulse { border-color: var(--clay-2); }
.hotspot:focus-visible { outline: 2px solid var(--bone); outline-offset: 2px; }

.plate__caption { margin-top: 14px; font-size: 12px; line-height: 1.5; }
.specimen--wood .plate__caption { color: var(--bone-soft); }
.specimen--sherd .plate__caption { color: var(--ink-soft); }

.layer-copy {
  grid-area: copy; position: relative;
  padding: 28px 0 0; border-top: 1px solid currentColor;
}
.specimen--wood .layer-copy { border-color: var(--line-dark); }
.specimen--sherd .layer-copy { border-color: var(--line); }
.layer-copy:focus-visible { outline-offset: 8px; }
.layer-copy__num { font-size: clamp(56px, 6vw, 96px); font-weight: 300; line-height: 0.8; letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
.layer-copy__num span { font-size: 14px; letter-spacing: 0; opacity: 0.5; vertical-align: top; }
.layer-copy__title { margin: 24px 0 14px; font-family: var(--f-serif); font-size: clamp(30px, 2.8vw, 46px); font-weight: 400; line-height: 1.04; letter-spacing: -0.01em; }
html[data-lang="zh"] .layer-copy__title { font-family: var(--f-sans); font-weight: 500; letter-spacing: 0.02em; }
.layer-copy__body { font-size: 16px; line-height: 1.65; }
.specimen--wood .layer-copy__body { color: var(--bone-soft); }
.specimen--sherd .layer-copy__body { color: var(--ink-soft); }
.layer-copy__methods { margin-top: 24px; padding-top: 16px; border-top: 1px solid currentColor; border-color: inherit; font-size: 14px; }
.specimen--wood .layer-copy__methods { border-color: var(--line-dark); }
.specimen--sherd .layer-copy__methods { border-color: var(--line); }
.layer-copy__label { display: block; margin-bottom: 6px; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.6; }
.layer-copy .is-swap { animation: copy-in 0.7s var(--ease-out) both; }
@keyframes copy-in { from { opacity: 0; transform: translateY(14px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }

/* ==========================================================================
   (05) APPROACH — extruded rotating prisms (GSAP Showcase 3D type)
   ========================================================================== */
.approach { position: relative; background: var(--stone); color: var(--ink); }
.approach__inner {
  min-height: 100vh; min-height: 100svh;
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  grid-template-areas: "intro intro" "prisms steps";
  gap: clamp(32px, 4vw, 56px) clamp(32px, 5vw, 80px);
  align-content: center;
  padding: calc(var(--header-h) + 24px) var(--pad) 48px;
}
.approach__intro { grid-area: intro; display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; }
.approach__title { font-size: clamp(36px, 4.6vw, 80px); line-height: 0.98; letter-spacing: -0.045em; }
.approach__title em { font-family: var(--f-serif); font-weight: 400; color: var(--clay); }

.prisms { grid-area: prisms; display: grid; gap: clamp(10px, 1.4vw, 18px); perspective: 1400px; align-content: center; }
.prism {
  --h: clamp(64px, 9.5vh, 128px);
  position: relative; height: var(--h);
  transform-style: preserve-3d; transform: rotateX(0deg);
  will-change: transform;
}
.prism__face {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  background: var(--clay); color: var(--cream);
  border-radius: 6px;
  font-size: calc(var(--h) * 0.66); font-weight: 600; letter-spacing: -0.04em; line-height: 1; text-transform: uppercase;
}
.prism__face:nth-child(1) { transform: rotateX(0deg) translateZ(calc(var(--h) / 2)); }
.prism__face:nth-child(2) { transform: rotateX(90deg) translateZ(calc(var(--h) / 2)); background: var(--cream); color: var(--clay); }
.prism__face:nth-child(3) { transform: rotateX(180deg) translateZ(calc(var(--h) / 2)); }
.prism__face:nth-child(4) { transform: rotateX(270deg) translateZ(calc(var(--h) / 2)); background: var(--cream); color: var(--clay); }
.prism--num { width: 34%; }
.prism--zh { width: 72%; }
.prism--num .prism__face { background: var(--ink); color: var(--cream); }
.prism--num .prism__face:nth-child(even) { background: var(--cream); color: var(--ink); }
.prism--zh .prism__face { font-weight: 700; letter-spacing: 0.12em; }

.steps { grid-area: steps; display: grid; gap: 4px; align-content: center; }
.step {
  display: grid; grid-template-columns: 48px 1fr; gap: 4px 12px;
  padding: 18px 0; border-top: 1px solid var(--line);
  transition: opacity 0.5s var(--ease-out);
}
.step:last-child { border-bottom: 1px solid var(--line); }
.step__num { grid-row: span 2; font-size: 12px; color: var(--ink-soft); padding-top: 6px; font-variant-numeric: tabular-nums; }
.step__title { font-size: clamp(22px, 2vw, 30px); line-height: 1.1; letter-spacing: -0.02em; }
.step__text { font-size: 15px; color: var(--ink-soft); max-width: 42ch; }
html.js:not(.motion-off) .approach--live .step { opacity: 0.3; }
html.js:not(.motion-off) .approach--live .step.is-active { opacity: 1; }
.step.is-active .step__num { color: var(--clay); }

/* ==========================================================================
   (06) CONTACT + FOOTER — dark stage with Active Theory blue/gold glow
   ========================================================================== */
.contact {
  position: relative; overflow: hidden; isolation: isolate;
  padding: var(--sec) var(--pad) clamp(64px, 8vw, 120px);
  background: var(--night); color: var(--bone);
}
.contact__glow { position: absolute; z-index: -1; border-radius: 50%; filter: blur(60px); pointer-events: none; }
.contact__glow--blue { width: 60vw; height: 60vw; left: -20vw; bottom: -30vw; background: radial-gradient(circle, rgba(51, 88, 255, 0.4), transparent 65%); }
.contact__glow--gold { width: 50vw; height: 50vw; right: -14vw; bottom: -24vw; background: radial-gradient(circle, rgba(217, 164, 65, 0.28), transparent 65%); }
.contact__title {
  margin: clamp(24px, 4vw, 48px) 0 24px;
  font-size: clamp(72px, 15vw, 270px); font-weight: 600; line-height: 0.84; letter-spacing: -0.065em;
}
html[data-lang="zh"] .contact__title { letter-spacing: 0; font-size: clamp(60px, 12vw, 220px); line-height: 1; }
.contact__lead { max-width: 48ch; font-size: 17px; color: var(--bone-soft); }
.contact__mail-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; margin: clamp(48px, 7vw, 96px) 0; padding: 28px 0; border-top: 1px solid var(--line-dark); border-bottom: 1px solid var(--line-dark); }
.contact__email {
  position: relative; display: inline-block;
  font-size: clamp(34px, 6.4vw, 120px); font-weight: 500; letter-spacing: -0.05em; line-height: 1;
}
.contact__email::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -0.08em; height: 2px; background: var(--clay-2);
  transform: scaleX(0); transform-origin: right; transition: transform 0.7s var(--ease-out);
}
.contact__email:hover::after, .contact__email:focus-visible::after { transform: scaleX(1); transform-origin: left; }
.contact__actions { display: flex; align-items: center; gap: 14px; }
.contact .pill--light { background: rgba(239, 233, 223, 0.12); color: var(--bone); }
.contact .pill--light:hover { background: var(--bone); color: var(--ink); }
.contact__status { font-size: 13px; color: var(--ochre); min-width: 6em; }
.contact__topics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.contact__topics li { display: grid; gap: 4px; font-size: 13px; color: var(--bone-soft); }
.contact__topics li span:first-child { font-size: 18px; color: var(--bone); letter-spacing: 0.04em; }

.site-footer {
  display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap;
  padding: 24px var(--pad) 32px; background: var(--night); color: var(--bone-soft);
  font-size: 12px; border-top: 1px solid var(--line-dark);
}
.site-footer a:hover { color: var(--bone); }
.site-footer__top { display: inline-block; }

/* ==========================================================================
   Pre-reveal states (only set by JS/GSAP; content is visible without JS)
   ========================================================================== */
[data-reveal], [data-speed] { will-change: transform; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1180px) {
  .nav { display: none; }
  .menu-toggle { display: inline-flex; }
}
@media (max-width: 900px) {
  :root { --header-h: 64px; }
  .talk-pill, .motion-toggle .en, .motion-toggle .zh { display: none !important; }
  .motion-toggle { padding: 0 13px; }
  .hero__sub { grid-template-columns: 1fr; }
  .hero__desc { justify-self: start; }
  .hero__topics { grid-template-columns: 1fr; gap: 0; }
  .hero__topics a { padding: 16px 0; }
  .stage-card__ui { grid-template-columns: 1fr; justify-items: start; left: calc(var(--pad) + 14px); right: calc(var(--pad) + 14px); }
  .stage-card__scroll { display: none; }
  .stage-card__states { flex-wrap: wrap; border-radius: 20px; }
  .about__grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .about__fig--wood { grid-column: 1 / span 3; }
  .about__fig--clay { grid-column: 4 / span 3; margin-top: 12vh; }
  .about__fields { grid-column: 1 / -1; grid-row: 2; padding-top: 24px; }
  .principles { grid-template-columns: 1fr; }
  .services__inner { --card-w: 82vw; }
  .services__head { grid-template-columns: 1fr; grid-template-areas: "idx" "title" "nav"; }
  .specimen__head { grid-template-columns: 1fr; grid-template-areas: "idx" "title" "lead"; }
  .layer-explorer, .layer-explorer--reverse { grid-template-columns: 1fr; grid-template-areas: "tabs" "plate" "copy"; }
  .layer-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--pad) * -1); padding: 0 var(--pad); }
  .layer-tabs::-webkit-scrollbar { display: none; }
  .layer-tab { flex: none; }
  .hotspot__num { display: none; }
  .approach__inner { grid-template-columns: 1fr; grid-template-areas: "intro" "prisms" "steps"; }
  .contact__topics { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .lang-switch__btn { min-width: 34px; padding: 0 8px; }
  .pill { padding: 0 13px; }
  .hotspot { width: 40px; height: 40px; margin: -20px 0 0 -20px; }
}

/* ==========================================================================
   Motion off / reduced motion
   ========================================================================== */
html.motion-off *, html.motion-off *::before, html.motion-off *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
}
html.motion-off .hotspot__pulse { display: none; }
html.motion-off .marquee__track { animation: none !important; transform: none !important; }
html.motion-off .marquee { overflow-x: auto; scrollbar-width: none; }
html.motion-off .layer-copy .is-swap { animation: none; }
@media (prefers-reduced-motion: reduce) {
  html:not(.motion-on) *, html:not(.motion-on) *::before, html:not(.motion-on) *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
