/* MonkeyHub Institute homepage prototype v1
   Tokens first. One accent. Sans only (mono for evidence). */
:root {
  --ink: #090B0E;
  --ink-2: #0F1216;
  --char: #1B1F24;
  --char-2: #2A2F35;
  --paper: #E9E9E5;
  --paper-2: #DEDED8;
  --sheet: #F4F4F1;
  --mute: #9BA1A7;          /* on ink: 7.6:1 */
  --mute-ink: #545A60;      /* on paper: 5.9:1 */
  --line: rgba(233, 233, 229, 0.16);
  --line-ink: rgba(9, 11, 14, 0.18);
  --accent: #FF5B1F;        /* the only accent; on ink 6.4:1, never as text on paper */

  --sans: "Inter", "Helvetica Neue", Helvetica, Arial, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, "Cascadia Mono", "DejaVu Sans Mono", "Roboto Mono", monospace;
  --zh: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Source Han Sans SC", "Hiragino Sans GB", sans-serif;

  --gutter: clamp(16px, 5vw, 72px);
  --maxw: 1600px;
  --nav-h: 64px;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
html.rm { scroll-behavior: auto; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.journey :focus-visible { outline-color: var(--ink); }

.mono { font-family: var(--mono); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip {
  position: fixed; left: 12px; top: -60px; z-index: 100;
  background: var(--paper); color: var(--ink); padding: 10px 14px;
  font: 600 13px/1 var(--sans); letter-spacing: .08em; text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---------- type ---------- */
.display {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 0.92;
  font-size: clamp(2.5rem, 7.2vw, 8.25rem);
  text-wrap: balance;
  hyphens: none;
}
.display--m { font-size: clamp(2.25rem, 5.4vw, 6rem); }
.display span { display: block; }
.eyebrow, .label, .caption, .tag, .idx {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.lede { font-size: clamp(1.05rem, 1.35vw, 1.3rem); line-height: 1.45; max-width: 34em; margin: 0; }
.body { font-size: clamp(1rem, 1.15vw, 1.15rem); line-height: 1.55; max-width: 36em; margin: 0; color: var(--paper); }
.mute { color: var(--mute); }

/* ---------- CTA ---------- */
.cta {
  display: inline-flex; align-items: center; gap: 14px;
  min-height: 48px; padding: 0 22px;
  border: 1px solid currentColor;
  font: 600 13px/1 var(--sans); letter-spacing: 0.14em; text-transform: uppercase;
  text-decoration: none;
  transition: background .25s var(--ease), color .25s var(--ease);
}
.cta svg { width: 18px; height: 10px; flex: none; transition: transform .25s var(--ease); }
.cta:hover { background: var(--paper); color: var(--ink); }
.cta:hover svg { transform: translateX(4px); }
.cta--solid { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.cta--solid:hover { background: transparent; color: var(--paper); }
.journey .cta:hover { background: var(--ink); color: var(--paper); }

.textlink {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
  font: 600 13px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.textlink:hover { border-color: var(--paper); }

/* ---------- tags ---------- */
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.tag { display: inline-flex; align-items: center; gap: 8px; height: 26px; padding: 0 10px; border: 1px solid var(--line); color: var(--paper); }
.tag::before { content: ""; width: 6px; height: 6px; background: currentColor; }
.tag--concept { border-style: dashed; border-color: var(--accent); color: var(--accent); }
.tag--concept::before { background: transparent; border: 1px solid currentColor; }
.tag--exp { border-color: rgba(233,233,229,.5); }
.tag--exp::before { border-radius: 0; transform: rotate(45deg); }
.tag--muted { color: var(--mute); }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--gutter);
  transition: background .3s var(--ease), border-color .3s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-solid { background: var(--ink); border-color: var(--line); }
.nav__mark { font: 700 13px/1 var(--sans); letter-spacing: .16em; text-decoration: none; white-space: nowrap; }
.nav__links { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 40px); }
.nav__links > a, .nav__work {
  font: 500 12px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px; height: 44px;
  opacity: .86;
}
.nav__links > a:hover, .nav__work:hover, .nav__work[aria-expanded="true"] { opacity: 1; }
.nav__work svg { width: 10px; height: 6px; transition: transform .2s var(--ease); }
.nav__work[aria-expanded="true"] svg { transform: rotate(180deg); }
.nav__menu { display: none; font: 500 12px/1 var(--sans); letter-spacing: .16em; height: 44px; }

.workpanel {
  position: absolute; left: 0; right: 0; top: var(--nav-h);
  background: var(--ink); border-bottom: 1px solid var(--line);
  padding: 28px var(--gutter) 40px;
}
.workpanel[hidden] { display: none; }
.workpanel ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; border-top: 1px solid var(--line); }
.workpanel li { border-right: 1px solid var(--line); }
.workpanel li:last-child { border-right: 0; }
.workpanel a { display: flex; flex-direction: column; gap: 28px; padding: 20px 20px 4px 0; text-decoration: none; min-height: 120px; }
.workpanel li + li a { padding-left: 20px; }
.workpanel a strong { font-weight: 500; font-size: clamp(1.1rem, 1.6vw, 1.6rem); letter-spacing: -0.01em; line-height: 1.15; }
.workpanel a:hover strong { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }

.mmenu {
  position: fixed; inset: var(--nav-h) 0 0 0; z-index: 49; background: var(--ink);
  padding: 24px var(--gutter) 40px; overflow-y: auto;
}
.mmenu[hidden] { display: none; }
.mmenu p { margin: 0 0 8px; }
.mmenu ol, .mmenu ul { list-style: none; margin: 0 0 32px; padding: 0; border-top: 1px solid var(--line); }
.mmenu li a { display: flex; align-items: baseline; gap: 14px; min-height: 52px; padding: 14px 0; border-bottom: 1px solid var(--line); text-decoration: none; font-size: 1.35rem; font-weight: 500; letter-spacing: -0.01em; }

/* ---------- act rail ---------- */
.rail {
  position: fixed; right: 10px; top: 50%; transform: translateY(-50%); z-index: 40;
  display: flex; flex-direction: column; gap: 2px;
  mix-blend-mode: difference;
}
.rail a {
  position: relative; display: flex; align-items: center; justify-content: flex-end; gap: 6px; height: 28px; padding: 0 4px;
  font: 500 11px/1 var(--mono); letter-spacing: .08em; text-decoration: none; color: #E9E9E5; opacity: .45;
}
.rail a em { position: absolute; right: 100%; font-style: normal; white-space: nowrap; opacity: 0; transform: translateX(6px); transition: opacity .2s, transform .2s; pointer-events: none; }
.rail a::after { content: ""; width: 8px; height: 1px; background: currentColor; transition: width .3s var(--ease); }
.rail a.is-active { opacity: 1; }
.rail a.is-active::after { width: 16px; }
.rail a:hover em, .rail a:focus-visible em { opacity: 1; transform: none; }
.rail a:hover { opacity: 1; }

/* ---------- reveal ---------- */
[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
[data-reveal].is-in { opacity: 1; transform: none; }
html.rm [data-reveal] { opacity: 1; transform: none; transition: none; }

/* ---------- 01 hero ---------- */
.hero { position: relative; min-height: 100svh; min-height: 100vh; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; isolation: isolate; }
@supports (height: 100svh) { .hero { min-height: 100svh; } }
.hero__media { position: absolute; inset: 0; z-index: -2; background: var(--ink); }
.hero__img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 38%; transform: scale(1.06); transition: transform 2.4s var(--ease); will-change: transform; }
.hero.is-loaded .hero__img { transform: scale(1); }
html.rm .hero__img { transform: none; transition: none; }
html[data-hero="b"] .hero__img { image-rendering: pixelated; image-rendering: crisp-edges; object-position: 63% 50%; }
.hero__shade {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to top, rgba(9,11,14,.97) 0%, rgba(9,11,14,.92) 25%, rgba(9,11,14,.8) 42%, rgba(9,11,14,.5) 56%, rgba(9,11,14,.12) 70%, rgba(9,11,14,0) 80%),
    linear-gradient(to right, rgba(9,11,14,.35) 0%, rgba(9,11,14,0) 50%),
    linear-gradient(to bottom, rgba(9,11,14,.45) 0%, rgba(9,11,14,0) 14%);
}
html[data-hero="b"] .hero__shade {
  background:
    linear-gradient(to top, rgba(9,11,14,.94) 0%, rgba(9,11,14,.7) 26%, rgba(9,11,14,.15) 55%, rgba(9,11,14,0) 70%),
    linear-gradient(to bottom, rgba(9,11,14,.5) 0%, rgba(9,11,14,0) 16%);
}
.hero__content { padding: calc(var(--nav-h) + 48px) var(--gutter) 0; max-width: var(--maxw); width: 100%; display: grid; gap: clamp(20px, 2.4vw, 32px); }
.hero__content .eyebrow { margin: 0; color: var(--paper); }
.hero h1, .hero .eyebrow, .hero .lede { text-shadow: 0 1px 18px rgba(9,11,14,.55); }
.hero h1 { font-size: clamp(2.5rem, 5.5vw, 7.25rem); max-width: 16em; }
.hero h1 .l2 { color: var(--paper); }
.hero__foot {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  padding: clamp(28px, 4vw, 48px) var(--gutter) 64px;
}
.scrollcue { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.scrollcue i { position: relative; display: block; width: 1px; height: 40px; background: var(--line); overflow: hidden; }
.scrollcue i::after { content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--paper); animation: cue 2.2s var(--ease) infinite; }
@keyframes cue { to { top: 100%; } }
html.rm .scrollcue i::after { animation: none; top: 30%; }
.caption { color: var(--mute); margin: 0; }
.caption b { color: var(--paper); font-weight: 500; }
.hero .caption { text-align: right; max-width: 46ch; }

/* ---------- 02 question ---------- */
.question { position: relative; padding: clamp(96px, 14vw, 200px) var(--gutter) clamp(96px, 12vw, 180px); max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 120px); }
.question__head { position: sticky; top: calc(var(--nav-h) + 40px); align-self: start; }
.question__head .display { font-size: clamp(2.5rem, 6.2vw, 7.5rem); }
.whatif { list-style: none; margin: 0; padding: 0; counter-reset: q; }
.whatif li {
  counter-increment: q;
  display: grid; grid-template-columns: 44px 1fr; gap: 12px;
  padding: clamp(28px, 3.4vw, 48px) 0; border-top: 1px solid var(--line);
  font-size: clamp(1.35rem, 2.2vw, 2.3rem); line-height: 1.18; font-weight: 500; letter-spacing: -0.015em;
}
.whatif li::before { content: counter(q, decimal-leading-zero); font: 400 12px/2.2 var(--mono); color: var(--mute); letter-spacing: .06em; }
.question__close { margin: 0; padding-top: clamp(28px, 3.4vw, 48px); border-top: 1px solid var(--line); font-size: clamp(1.05rem, 1.35vw, 1.3rem); color: var(--mute); padding-left: 56px; }

/* ---------- section head ---------- */
.sechead { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 96px); align-items: end; }
.sechead__copy { display: grid; gap: 18px; }
.sechead__copy .body + .body { color: var(--mute); }

/* ---------- 03 technology ---------- */
.tech { padding: clamp(80px, 10vw, 160px) 0 clamp(80px, 10vw, 140px); border-top: 1px solid var(--line); }
.frontiers { max-width: var(--maxw); margin: clamp(56px, 7vw, 112px) auto 0; padding: 0 var(--gutter); display: grid; gap: clamp(64px, 8vw, 136px); }
.frontier { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr); gap: clamp(24px, 4vw, 72px); align-items: start; }
.frontier__text { position: sticky; top: calc(var(--nav-h) + 32px); display: grid; gap: 18px; padding-top: 20px; border-top: 1px solid var(--paper); }
.frontier__text h3 { margin: 0; font-weight: 600; font-size: clamp(1.6rem, 2.7vw, 2.9rem); line-height: 1; letter-spacing: -0.025em; }
.frontier__text p { margin: 0; font-size: clamp(1rem, 1.15vw, 1.15rem); color: var(--paper); max-width: 26em; }
.stage { margin: 0; display: grid; gap: 14px; }
.frame { position: relative; border: 1px solid var(--line); background: var(--ink-2); overflow: hidden; }
.frame img { width: 100%; height: auto; }
.stage .caption { display: flex; flex-wrap: wrap; gap: 6px 18px; }

/* compare slider */
.compare { position: relative; aspect-ratio: 1400 / 875; overflow: hidden; border: 1px solid var(--line); background: #b8bec6; --pos: 50%; touch-action: pan-y; }
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.compare__top { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.compare__handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 0; pointer-events: none; }
.compare__handle::before { content: ""; position: absolute; top: 0; bottom: 0; left: -1px; width: 2px; background: var(--ink); }
.compare__handle span { position: absolute; top: 50%; left: 0; transform: translate(-50%, -50%); width: 44px; height: 44px; background: var(--ink); color: var(--paper); display: grid; place-items: center; }
.compare__handle svg { width: 22px; height: 10px; }
.compare__range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.compare__range:focus-visible + .compare__handle span { outline: 2px solid var(--accent); outline-offset: 2px; }
.compare__label { position: absolute; bottom: 12px; padding: 6px 8px; background: var(--ink); color: var(--paper); pointer-events: none; }
.compare__label--l { left: 12px; }
.compare__label--r { right: 12px; }

/* concept (MonkeyMesh) */
.concept { border: 1px dashed rgba(255, 91, 31, .6); padding: clamp(16px, 2vw, 24px); display: grid; gap: 18px; }
.concept__head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.mesh { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; }
.mesh li { position: relative; padding: 14px 12px 14px 0; border-top: 1px dashed var(--line); }
.mesh li::before { content: ""; position: absolute; left: 0; top: -4px; width: 7px; height: 7px; border: 1px solid var(--accent); background: var(--ink); }
.mesh li span { display: block; color: var(--mute); }
.mesh li strong { display: block; font-weight: 500; font-size: 14px; line-height: 1.25; margin-top: 8px; padding-right: 8px; }

/* sketch -> section pair */
.pair { display: grid; grid-template-columns: minmax(0, 0.62fr) 48px minmax(0, 1fr); align-items: center; gap: 0; }
.pair figure { margin: 0; display: grid; gap: 10px; }
.pair .sheet { background: var(--sheet); border: 1px solid var(--line); }
.pair .sheet img { width: 100%; height: auto; }
.pair__arrow { display: grid; place-items: center; color: var(--mute); }
.pair__arrow svg { width: 28px; height: 12px; }

.tech__cta, .worlds__cta, .journey__cta { max-width: var(--maxw); margin: clamp(56px, 7vw, 96px) auto 0; padding: 0 var(--gutter); }

/* ---------- 04 worlds ---------- */
.worlds { padding: clamp(80px, 10vw, 160px) 0 clamp(80px, 10vw, 140px); border-top: 1px solid var(--line); }
.worlds .sechead .kicker { margin: 0; font-weight: 500; font-size: clamp(1.15rem, 1.6vw, 1.6rem); letter-spacing: -0.01em; line-height: 1.3; }
.worlds .sechead .em { margin: 0; font-weight: 600; font-size: clamp(1.05rem, 1.35vw, 1.3rem); }
.gallery { margin-top: clamp(48px, 6vw, 96px); }
.gallery__track {
  display: flex; gap: clamp(12px, 1.6vw, 24px);
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
  padding: 0 var(--gutter) 8px; scroll-padding: 0 var(--gutter);
  scrollbar-width: none;
}
.gallery__track::-webkit-scrollbar { display: none; }
.world { flex: 0 0 min(76vw, 1240px); scroll-snap-align: start; display: grid; gap: 16px; }
.world figure { margin: 0; position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--ink-2); }
.world figure img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.world:hover figure img { transform: scale(1.025); }
html.rm .world:hover figure img { transform: none; }
.world--pixel figure img { image-rendering: pixelated; image-rendering: crisp-edges; object-position: 60% 50%; }
.world--sheet figure { background: var(--sheet); }
.world--sheet figure img { object-fit: contain; padding: 4%; }
.world__meta { display: grid; grid-template-columns: auto 1fr; gap: 6px 24px; align-items: baseline; }
.world__meta .idx { color: var(--mute); }
.world__meta h3 { margin: 0; font-weight: 600; font-size: clamp(1.25rem, 2vw, 2rem); letter-spacing: -0.02em; line-height: 1.05; }
.specs { grid-column: 2; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 28px; }
.specs div { display: flex; gap: 10px; }
.specs dt { font: 400 12px/1.6 var(--mono); color: var(--mute); text-transform: uppercase; letter-spacing: .06em; }
.specs dd { margin: 0; font-size: 14px; line-height: 1.5; }
.gallery__ctrl { display: flex; align-items: center; gap: 16px; padding: 24px var(--gutter) 0; max-width: var(--maxw); margin: 0 auto; }
.gbtn { width: 48px; height: 48px; border: 1px solid var(--line); display: grid; place-items: center; transition: border-color .2s, background .2s; }
.gbtn:hover { border-color: var(--paper); }
.gbtn:disabled { opacity: .3; cursor: default; }
.gbtn svg { width: 18px; height: 10px; }
.gbtn--prev svg { transform: scaleX(-1); }
.gallery__progress { flex: 1; height: 1px; background: var(--line); position: relative; }
.gallery__progress i { position: absolute; left: 0; top: -1px; height: 3px; background: var(--paper); width: 20%; transition: left .2s linear; }
.gallery__count { min-width: 5ch; text-align: right; color: var(--mute); }

/* ---------- research identity (between 04 and 05) ---------- */
.identity {
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center; gap: clamp(28px, 4vw, 48px);
  padding: clamp(96px, 12vw, 160px) var(--gutter);
  border-top: 1px solid var(--line);
  max-width: var(--maxw); margin: 0 auto;
}
.identity .label { margin: 0; color: var(--mute); display: flex; align-items: center; gap: 14px; }
.identity .label::before { content: ""; width: 32px; height: 1px; background: var(--mute); }
.identity__title { font-size: clamp(2.4rem, 6.4vw, 9rem); line-height: .94; }
.identity__title .l1 { font-weight: 400; }
.identity__title .l2 { font-weight: 600; color: var(--accent); margin-top: .08em; }
.identity__title .l1 span, .identity__title .l2 span { display: inline; }
.identity__zh { margin: 0; font-family: var(--zh); font-weight: 400; font-size: clamp(15px, 1.2vw, 18px); letter-spacing: .08em; color: var(--mute); }

/* ---------- 05 journey (bright reading system) ---------- */
.journey { background: var(--paper); color: var(--ink); padding: clamp(80px, 10vw, 160px) 0 clamp(80px, 10vw, 140px); }
.journey .body { color: var(--ink); }
.journey .sechead__copy .body + .body { color: var(--mute-ink); }
.journey .caption, .journey .idx { color: var(--mute-ink); }
.strip { max-width: var(--maxw); margin: clamp(56px, 7vw, 104px) auto 0; padding: 0 var(--gutter); }
.strip__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-bottom: 14px; border-bottom: 1px solid var(--ink); }
.strip__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); column-gap: clamp(12px, 1.6vw, 24px); }
.strip__list li { padding: 16px 0 0; display: grid; gap: 10px; align-content: start; }
.strip__list figure { margin: 0; aspect-ratio: 1 / 1; background: #fff; display: grid; place-items: center; overflow: hidden; }
.strip__list img { width: 92%; height: 92%; object-fit: contain; }
.strip__list .is-superseded img { filter: grayscale(1) contrast(.9); opacity: .55; }
.strip__meta { display: grid; gap: 4px; }
.strip__meta b { font-weight: 600; font-size: 14px; }
.state { font: 500 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.state--sup { color: var(--mute-ink); text-decoration: line-through; text-decoration-thickness: 1px; }
.state--cur { display: inline-block; width: fit-content; background: var(--ink); color: var(--paper); padding: 5px 7px; }

.log { max-width: var(--maxw); margin: clamp(56px, 7vw, 104px) auto 0; padding: 0 var(--gutter); }
.log__bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--ink); }
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.fbtn { height: 36px; padding: 0 12px; border: 1px solid var(--line-ink); font: 500 12px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 8px; }
.fbtn span { color: var(--mute-ink); }
.fbtn[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.fbtn[aria-pressed="true"] span { color: var(--mute); }
.log__table { width: 100%; border-collapse: collapse; }
.log__table th { text-align: left; font: 400 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mute-ink); padding: 14px 16px 12px 0; border-bottom: 1px solid var(--line-ink); }
.log__table td { padding: 16px 16px 16px 0; border-bottom: 1px solid var(--line-ink); vertical-align: top; }
.log__table td.d, .log__table td.t, .log__table td.p { font: 400 12.5px/1.6 var(--mono); letter-spacing: .02em; white-space: nowrap; }
.log__table td.p { font-weight: 500; text-transform: uppercase; }
.log__table td.s { font-size: 15px; line-height: 1.45; max-width: 60ch; }
.log__table td.s a { display: inline-block; margin-left: 6px; font: 500 12px/1 var(--mono); text-underline-offset: 3px; }
.log__table tr[hidden] { display: none; }
.res { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; font: 500 11px/1 var(--mono); letter-spacing: .08em; border: 1px solid var(--ink); white-space: nowrap; }
.res--fail { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.res--partial { border-style: dashed; }
.res--sup { border-color: var(--line-ink); color: var(--mute-ink); text-decoration: line-through; }
.log__note { margin: 18px 0 0; }
.log__more { margin-top: 18px; height: 44px; padding: 0 16px; border: 1px solid var(--ink); font: 500 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.log__more:hover { background: var(--ink); color: var(--paper); }
.log__table tr.is-extra { display: none; }
.log.is-all .log__table tr.is-extra:not([hidden]) { display: table-row; }

/* ---------- 06 invitation ---------- */
.invite { position: relative; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; isolation: isolate; overflow: hidden; }
.invite__media { position: absolute; inset: 0; z-index: -2; }
.invite__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; filter: saturate(.85); }
.invite__shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(9,11,14,.97) 0%, rgba(9,11,14,.84) 30%, rgba(9,11,14,.42) 58%, rgba(9,11,14,.12) 100%); }
.invite__content { max-width: var(--maxw); width: 100%; margin: 0 auto; padding: calc(var(--nav-h) + 64px) var(--gutter) 0; display: grid; gap: clamp(24px, 3vw, 40px); }
.invite__lines { margin: 0; display: grid; gap: 2px; font-size: clamp(1.35rem, 2.4vw, 2.5rem); font-weight: 500; letter-spacing: -0.015em; line-height: 1.15; }
.invite__lines span:not(:first-child) { color: var(--paper); }
.invite__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; }
.invite__foot { max-width: var(--maxw); width: 100%; margin: 0 auto; padding: clamp(40px, 5vw, 72px) var(--gutter) 22px; display: flex; justify-content: flex-end; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); padding: clamp(56px, 7vw, 96px) var(--gutter) 72px; }
.foot__grid { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: 40px; }
.sig__name { margin: 0; font-weight: 700; letter-spacing: .14em; font-size: 15px; }
.sig__line { margin: 10px 0 0; color: var(--mute); }
.foot h2 { margin: 0 0 14px; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.foot ul a { display: inline-flex; align-items: center; min-height: 36px; text-decoration: none; font-size: 15px; }
.foot ul a:hover { text-decoration: underline; text-underline-offset: 4px; }
.foot__bar { max-width: var(--maxw); margin: 56px auto 0; padding-top: 18px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; color: var(--mute); }
.foot__bar button { font: 500 12px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; min-height: 36px; padding: 0 10px; border: 1px solid var(--line); }
.foot__bar button[aria-pressed="true"] { border-color: var(--paper); color: var(--paper); }
.foot__toggles { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- prototype layer ---------- */
.proto-pill {
  position: fixed; left: 12px; bottom: 12px; z-index: 60;
  height: 32px; padding: 0 10px; background: var(--ink); color: var(--paper); border: 1px solid var(--line);
  font: 500 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 8px;
}
.proto-pill::before { content: ""; width: 6px; height: 6px; border: 1px solid var(--accent); }
.proto-pill[aria-pressed="true"]::before { background: var(--accent); }
.concept, .pair, .strip { position: relative; }
.show-status [data-status]::after {
  content: attr(data-status);
  position: absolute; left: 8px; top: 8px; z-index: 5; max-width: calc(100% - 16px);
  padding: 5px 7px; font: 500 11px/1.3 var(--mono); letter-spacing: .04em; text-transform: uppercase;
  background: var(--ink); color: var(--paper); border: 1px solid var(--paper);
}
.show-status [data-status^="GATE"]::after { border-color: var(--accent); color: var(--accent); }
.show-status [data-status^="INTERNAL"]::after { border-style: dashed; border-color: var(--accent); color: var(--accent); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); z-index: 70; background: var(--paper); color: var(--ink); padding: 12px 16px; font: 500 12px/1.3 var(--mono); letter-spacing: .04em; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .rail { display: none; }
  .workpanel ol { grid-template-columns: repeat(3, 1fr); }
  .frontier { grid-template-columns: 1fr; }
  .frontier__text { position: static; }
  .sechead { grid-template-columns: 1fr; align-items: start; }
}
@media (max-width: 760px) {
  :root { --nav-h: 56px; }
  .nav__links { display: none; }
  .nav__menu { display: inline-flex; align-items: center; }
  .display { font-size: 11vw; letter-spacing: -0.03em; }
  .display--m { font-size: 10.4vw; }
  .hero__content { padding-top: calc(var(--nav-h) + 32px); }
  .hero__foot { flex-direction: column; align-items: flex-start; gap: 16px; }
  .hero__shade { background:
    linear-gradient(to top, rgba(9,11,14,.97) 0%, rgba(9,11,14,.92) 38%, rgba(9,11,14,.78) 58%, rgba(9,11,14,.4) 72%, rgba(9,11,14,0) 84%),
    linear-gradient(to bottom, rgba(9,11,14,.45) 0%, rgba(9,11,14,0) 12%); }
  .hero .caption { text-align: left; }
  .question { grid-template-columns: 1fr; padding-top: 88px; }
  .question__head { position: static; }
  .question__head .display { font-size: 11vw; }
  .whatif li { grid-template-columns: 1fr; gap: 10px; font-size: 1.35rem; }
  .whatif li::before { line-height: 1; }
  .question__close { padding-left: 0; }
  .mesh { grid-template-columns: 1fr; }
  .mesh li { padding: 12px 0 12px 22px; border-top: 0; border-left: 1px dashed var(--line); }
  .mesh li::before { left: -4px; top: 16px; }
  .mesh li strong { margin-top: 4px; }
  .pair { grid-template-columns: 1fr; gap: 10px; }
  .pair__arrow svg { transform: rotate(90deg); }
  .pair__a { max-width: 70%; }
  .world { flex-basis: 86vw; }
  .world figure { aspect-ratio: 4 / 3; }
  .world__meta { grid-template-columns: 1fr; }
  .specs { grid-column: 1; flex-direction: column; gap: 4px; }
  .identity__title { font-size: 10vw; }
  .identity__title .l1 span, .identity__title .l2 span { display: block; }
  .cta { width: 100%; justify-content: space-between; padding: 0 16px; gap: 10px; letter-spacing: .08em; }
  .log.is-all .log__table tr.is-extra:not([hidden]) { display: grid; }
  .strip__list { grid-template-columns: repeat(5, 62vw); overflow-x: auto; scroll-snap-type: x mandatory; margin-right: calc(-1 * var(--gutter)); padding-right: var(--gutter); scrollbar-width: none; }
  .strip__list li { scroll-snap-align: start; }
  .log__table thead { display: none; }
  .log__table, .log__table tbody, .log__table tr, .log__table td { display: block; width: 100%; }
  .log__table tr:not(.is-extra):not([hidden]) { display: grid; }
  .log__table tr { grid-template-columns: auto 1fr auto; gap: 6px 12px; padding: 16px 0; border-bottom: 1px solid var(--line-ink); }
  .log__table td { padding: 0; border: 0; }
  .log__table td.p { grid-column: 2; }
  .log__table td.r { grid-column: 3; grid-row: 1; }
  .log__table td.t { grid-column: 1 / -1; grid-row: 2; color: var(--mute-ink); }
  .log__table td.s { grid-column: 1 / -1; }
  .foot__grid { grid-template-columns: 1fr 1fr; }
  .foot__grid > :first-child { grid-column: 1 / -1; }
  .proto-pill { bottom: 10px; left: 10px; }
}
@media (max-width: 400px) {
  .identity__title { font-size: 9.6vw; }
}


/* =================== v2: from the universe to the saw blade =================== */
/* 01 hero: Earthrise. Keep the lunar horizon, darken only behind the text. */
.hero__img { object-position: 50% 70%; }
/* desktop: the whole frame at full height on the right, so the Earth stays small; the left edge fades into space */
@media (min-width: 761px) {
  .hero__img { position: absolute; right: 0; max-width: none; top: 0; width: auto; height: 100%; aspect-ratio: 1 / 1; object-fit: cover;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 32%); mask-image: linear-gradient(to right, transparent 0%, #000 32%); }
  .hero h1 { font-size: clamp(2.5rem, 4.2vw, 6rem); }
  html[data-hero="b"] .hero__img { position: static; width: 100%; aspect-ratio: auto; -webkit-mask-image: none; mask-image: none; }
  html[data-hero="b"] .hero h1 { font-size: clamp(2.5rem, 5.5vw, 7.25rem); }
}
@media (min-width: 761px) and (max-width: 1100px) { .hero__img { right: -7vw; } .hero h1 { font-size: 4vw; } }
html[data-hero="b"] .hero__foot .scrollcue { visibility: hidden; }
.hero__shade {
  background:
    radial-gradient(ellipse 75% 70% at 0% 100%, rgba(9,11,14,.88) 0%, rgba(9,11,14,.62) 45%, rgba(9,11,14,0) 75%),
    linear-gradient(to top, rgba(9,11,14,1) 0%, rgba(9,11,14,.6) 9%, rgba(9,11,14,0) 30%),
    linear-gradient(to bottom, rgba(9,11,14,.35) 0%, rgba(9,11,14,0) 12%);
}
html[data-hero="b"] .hero { justify-content: flex-start; }
html[data-hero="b"] .hero__content { padding-top: calc(var(--nav-h) + 9vh); }
html[data-hero="b"] .hero__foot { margin-top: auto; }
html[data-hero="b"] .hero__img { image-rendering: auto; object-position: 50% 40%; }
html[data-hero="b"] .hero__shade {
  background: linear-gradient(to bottom, rgba(9,11,14,.55) 0%, rgba(9,11,14,.42) 40%, rgba(9,11,14,0) 62%),
              linear-gradient(to right, rgba(9,11,14,.35) 0%, rgba(9,11,14,0) 55%);
}

/* small transition lines: never a new slogan */
.bridge { margin: 28px 0 0; max-width: 34em; font-size: 15px; line-height: 1.55; color: var(--mute); padding-top: 14px; border-top: 1px solid var(--line); }
.question .bridge { margin-left: 56px; }
.worlds__bridge { max-width: var(--maxw); margin: 40px auto 0; padding: 14px var(--gutter) 0; border-top: 0; }
.journey .bridge { color: var(--mute-ink); border-color: var(--line-ink); }

/* 02: the Earth at night behind the questions */
.qwrap { position: relative; isolation: isolate; overflow: hidden; }
.qwrap__media { position: absolute; inset: 0; z-index: -1; }
.qwrap__media img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 50%; }
.identity[hidden] { display: none; }
.qwrap__shade { position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to bottom, var(--ink) 0%, rgba(9,11,14,.3) 16%, rgba(9,11,14,.35) 80%, var(--ink) 100%),
              linear-gradient(to right, rgba(9,11,14,.78) 0%, rgba(9,11,14,.15) 50%, rgba(9,11,14,.45) 100%); }

/* 05: model -> material */
.eng { max-width: var(--maxw); margin: clamp(56px, 7vw, 104px) auto 0; padding: 0 var(--gutter); }
.eng__thesis { margin: 0 0 clamp(36px, 4vw, 56px); max-width: 30em; font-size: clamp(1.35rem, 2.2vw, 2.1rem); line-height: 1.25; letter-spacing: -0.015em; font-weight: 400; }
.eng__case { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .8fr) minmax(0, .9fr); gap: clamp(16px, 2vw, 32px); align-items: start; border-top: 1px solid var(--ink); padding-top: 24px; }
.eng__title { margin: 0 0 14px; font-weight: 600; font-size: clamp(1.3rem, 1.8vw, 1.75rem); letter-spacing: -0.02em; }
.eng__specs { margin: 22px 0 0; display: grid; gap: 0; }
.eng__specs div { display: grid; grid-template-columns: 10.5em 1fr; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line-ink); }
.eng__specs dt { font: 400 11.5px/1.5 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--mute-ink); }
.eng__specs dd { margin: 0; font-size: 14.5px; line-height: 1.45; }
.eng__fig { margin: 0; display: grid; gap: 10px; position: relative; }
.eng__fig img { width: 100%; height: auto; background: #fff; border: 1px solid var(--line-ink); }
.state--plan { display: inline-block; padding: 4px 7px; border: 1px dashed var(--ink); color: var(--ink); }

/* 06: studio daylight, placeholders instead of invented footage */
.invite { min-height: auto; display: block; overflow: visible; background: var(--paper-2); color: var(--ink); padding: clamp(80px, 10vw, 150px) 0 clamp(56px, 6vw, 88px); }
.invite__grid { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 88px); align-items: start; }
.invite__text { display: grid; gap: clamp(20px, 2.4vw, 32px); }
.invite .lede { color: var(--ink); }
.invite__lines { color: var(--ink); }
.invite__lines span:not(:first-child) { color: var(--ink); }
.invite .cta--solid { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.invite .cta--solid:hover { background: transparent; color: var(--ink); }
.invite .textlink { border-color: var(--line-ink); }
.invite .textlink:hover { border-color: var(--ink); }
.invite :focus-visible { outline-color: var(--ink); }
.hands { margin: 0; display: grid; gap: 12px; position: relative; }
.hands__head { color: var(--mute-ink); }
.hands__head b { color: var(--ink); }
.hands__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.hands__list li { aspect-ratio: 4 / 3; border: 1px dashed rgba(9,11,14,.35); padding: 10px; display: flex; flex-direction: column; justify-content: space-between; font-size: 14px; font-weight: 500; }
.hands__list li span { font: 400 11px/1 var(--mono); color: var(--mute-ink); }
.hands__list li:nth-child(7) { grid-column: span 2; aspect-ratio: auto; }
.hands__ph { color: var(--mute-ink); }
.invite__end { max-width: var(--maxw); margin: clamp(56px, 7vw, 96px) auto 0; padding: 18px var(--gutter) 0; border-top: 1px solid var(--line-ink); font-size: 15px; color: var(--mute-ink); }

/* People preview */
.people { position: fixed; inset: 0; z-index: 80; background: rgba(9,11,14,.72); display: grid; place-items: center; padding: 16px; }
.people[hidden] { display: none; }
.strip__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.people__panel { padding-top: 64px !important; }
.people__panel { position: relative; width: min(760px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--ink); border: 1px solid var(--line); padding: clamp(24px, 4vw, 48px); display: grid; gap: 16px; }
.people__panel .label { margin: 0; color: var(--mute); font-family: var(--mono); font-size: 11px; letter-spacing: .1em; }
.people__name { margin: 0; font-weight: 600; font-size: clamp(1.8rem, 3.4vw, 2.8rem); letter-spacing: -0.03em; }
.people__identity { margin-top: 18px; padding-top: 22px; border-top: 1px solid var(--line); display: grid; gap: 6px; }
.people__l1, .people__l2 { margin: 0; font-size: clamp(1.7rem, 4vw, 3.2rem); line-height: .98; letter-spacing: -0.035em; }
.people__l1 { font-weight: 400; }
.people__l2 { font-weight: 600; color: var(--accent); }
.people__zh { margin: 12px 0 0; font: 400 14px/1.6 var(--zh); letter-spacing: .08em; color: var(--mute); }
.people__note { margin: 10px 0 0; }
.people__close { position: absolute; right: 14px; top: 14px; height: 36px; padding: 0 12px; border: 1px solid var(--line); font: 500 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; }

/* footer credits */
.foot__credits { max-width: var(--maxw); margin: 48px auto 0; display: grid; gap: 8px; color: var(--mute); text-transform: none; letter-spacing: .02em; line-height: 1.6; }
.foot__credits p { margin: 0; max-width: 110ch; }
.foot__credits b { color: var(--paper); font-weight: 500; letter-spacing: .08em; margin-right: 8px; }

@media (max-width: 1100px) {
  .eng__case { grid-template-columns: 1fr 1fr; }
  .eng__text { grid-column: 1 / -1; }
  .invite__grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .hero__img { position: absolute; max-width: none; width: 140%; height: auto; aspect-ratio: 1 / 1; left: -18%; top: -2%;
    -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent 96%); mask-image: linear-gradient(to bottom, #000 70%, transparent 96%); }
  .hero__foot .scrollcue { display: none; }
  .hero__foot { padding-bottom: 60px; }
  .hero__shade { background:
    linear-gradient(to top, rgba(9,11,14,.94) 0%, rgba(9,11,14,.82) 34%, rgba(9,11,14,.45) 52%, rgba(9,11,14,0) 66%),
    linear-gradient(to bottom, rgba(9,11,14,.4) 0%, rgba(9,11,14,0) 12%); }
  html[data-hero="b"] .hero__img { position: static; width: 100%; height: 100%; aspect-ratio: auto; -webkit-mask-image: none; mask-image: none; object-position: 55% 50%; }
  html[data-hero="b"] .hero__content { padding-top: calc(var(--nav-h) + 4vh); }
  html[data-hero="b"] .hero__shade { background: linear-gradient(to bottom, rgba(9,11,14,.72) 0%, rgba(9,11,14,.6) 55%, rgba(9,11,14,.15) 80%); }
  .question .bridge { margin-left: 0; }
  .strip__list { grid-template-columns: repeat(3, 62vw); }
  .eng__case { grid-template-columns: 1fr; }
  .eng__specs div { grid-template-columns: 1fr; gap: 4px; }
  .hands__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hands__list li:nth-child(7) { grid-column: span 2; aspect-ratio: auto; }
}


/* =================== Earthrise layers (hero A) =================== */
.hero__stage { position: absolute; background: #000; overflow: hidden; transform: scale(1.03); transform-origin: 70% 55%; transition: transform 2.4s var(--ease); }
.hero.is-loaded .hero__stage { transform: none; }
html.rm .hero__stage { transform: none; transition: none; }
.hero__stage img { position: absolute; display: block; max-width: none; will-change: transform; }
.hero__moon { left: 0; top: 0; width: 100%; height: 100%; }
.hero__earth { left: 48.833%; top: 45.8%; width: 15.533%; height: auto; }
@media (min-width: 761px) {
  /* 16 % taller than the hero, so the rising horizon never uncovers an edge */
  .hero__stage { right: -4vw; top: -4%; height: 116%; aspect-ratio: 1 / 1;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 32%); mask-image: linear-gradient(to right, transparent 0%, #000 32%); }
}
@media (min-width: 761px) and (max-width: 1100px) { .hero__stage { right: -12vw; } }
@media (max-width: 760px) {
  .hero__stage { width: 140%; aspect-ratio: 1 / 1; left: -18%; top: -2%;
    -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent 96%); mask-image: linear-gradient(to bottom, #000 70%, transparent 96%); }
}
