/* ============================================================
   ALEX LIU — DECISION INSTRUMENT v2
   frost paper · serif display · dark instrument panels
   semantic blue / green / amber
   ============================================================ */

:root {
  /* warm ivory paper, forest ink, muted steel / forest / brass accents */
  --frost:  #F7F6F1;
  --paper:  #FFFFFF;
  --pine:   #17211B;
  --pine-deep: #0F1A13;
  --ink-2:  rgba(23, 33, 27, .64);
  --ink-3:  rgba(23, 33, 27, .38);
  --blue:   #56688A;
  --green:  #23744C;
  --amber:  #A8823E;
  --blue-t:  #EEF0F3;
  --green-t: #E9F1EB;
  --amber-t: #F4EDDD;
  --rule:   #D8D8CF;
  /* light variants for dark panels */
  --blue-l:  #A4B4CE;
  --green-l: #82CBA2;
  --amber-l: #D9B36A;

  --font-sans:  'Archivo', 'PingFang SC', 'Noto Sans SC', -apple-system, sans-serif;
  --font-serif: 'Newsreader', 'Noto Serif SC', 'Songti SC', Georgia, serif;
  --font-mono:  'IBM Plex Mono', 'SF Mono', 'Menlo', monospace;

  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --maxw: 1120px;

  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--pine);
  background-color: var(--frost);
  background-image:
    radial-gradient(1100px 700px at 88% -180px, rgba(86, 104, 138, .05), transparent 62%),
    radial-gradient(1200px 800px at -12% 34%, rgba(35, 116, 76, .05), transparent 60%),
    radial-gradient(900px 700px at 105% 78%, rgba(168, 130, 62, .05), transparent 60%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* film grain */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: var(--noise);
  opacity: .045;
  pointer-events: none;
  z-index: 2147483647;
  mix-blend-mode: multiply;
}

::selection { background: var(--amber-t); color: var(--pine); }

a { color: inherit; }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 2px; }

/* language visibility */
.en-only { display: none; }
html[lang="en"] .zh-only { display: none; }
html[lang="en"] .en-only { display: inline; }

/* ---------- type utilities ---------- */
.mono-blue, .mono-green, .mono-amber {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .14em; font-weight: 500;
}
.mono-blue  { color: var(--blue); }
.mono-green { color: var(--green); }
.mono-amber { color: var(--amber); }

/* ============================================================
   HEADER
   ============================================================ */
.site-head {
  position: sticky; top: 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  height: 68px;
  padding: 0 clamp(20px, 4vw, 48px);
  background: rgba(244, 247, 246, .82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.site-head.scrolled { border-bottom-color: var(--rule); }

.wordmark {
  font-family: var(--font-serif);
  font-style: italic; font-weight: 600; font-size: 19px;
  letter-spacing: .01em;
  text-decoration: none;
}

.head-nav { display: flex; align-items: center; gap: clamp(16px, 3vw, 36px); }
.head-nav a {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .14em;
  color: var(--ink-2); text-decoration: none;
  padding-bottom: 2px;
  background: linear-gradient(var(--amber), var(--amber)) left bottom / 0 1px no-repeat;
  transition: color .2s, background-size .25s var(--ease-out);
}
.head-nav a:hover { color: var(--pine); background-size: 100% 1px; }

.lang-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .05em;
  background: none; border: 1px solid var(--rule); border-radius: 4px;
  padding: 6px 10px; cursor: pointer; color: var(--ink-3);
  transition: border-color .2s;
}
.lang-toggle:hover { border-color: var(--pine); }
.lang-toggle .on { color: var(--pine); font-weight: 500; }
.lang-sep { color: var(--rule); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(48px, 9vh, 104px) 24px 0;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.eyebrow {
  font-family: var(--font-mono); font-size: 11.5px;
  letter-spacing: .18em; color: var(--ink-3);
  margin-bottom: 30px;
}

.display {
  font-family: var(--font-serif);
  font-size: clamp(36px, 4.7vw, 62px);
  line-height: 1.22; font-weight: 600; letter-spacing: -.01em;
}
.display .line { display: block; overflow: hidden; padding-bottom: .14em; margin-bottom: -.14em; }
.display .line-in { display: inline-block; }
.display .accent { font-style: normal; color: var(--green); }
html[lang="en"] .display { font-size: clamp(32px, 4.1vw, 54px); }
html[lang="en"] .display .accent { font-style: italic; }

.hero-sub {
  margin-top: 28px;
  font-size: 17px; line-height: 1.8; color: var(--ink-2);
  max-width: 30em;
}

.hero-cta { margin-top: 36px; display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center;
  height: 46px; padding: 0 24px;
  font-family: var(--font-sans); font-weight: 600; font-size: 14.5px;
  border-radius: 6px; text-decoration: none;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s var(--ease-out), box-shadow .2s;
}
.btn:active { transform: scale(.98); }
.btn-primary {
  background: var(--pine); color: #fff;
  box-shadow: 0 1px 2px rgba(16,35,29,.2), 0 8px 20px rgba(16,35,29,.15);
}
.btn-primary:hover { background: var(--green); box-shadow: 0 2px 4px rgba(47,125,87,.25), 0 10px 26px rgba(47,125,87,.25); }
.btn-ghost { border: 1px solid rgba(16,35,29,.35); color: var(--pine); }
.btn-ghost:hover { border-color: var(--green); color: var(--green); }

/* ---------- entrance: rise ---------- */
.rise {
  opacity: 0;
  transform: translateY(28px);
  animation: rise .9s var(--ease-out) forwards;
  animation-delay: var(--d, 0s);
}
@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}
.display .line-in.rise { transform: translateY(108%); }

/* ============================================================
   HERO 3D INSTRUMENT STACK
   ============================================================ */
.hero-stage {
  perspective: 1300px;
  perspective-origin: 60% 40%;
  min-height: 510px;
  position: relative;
}

.stack-shadow {
  position: absolute; left: 12%; right: 8%; bottom: -34px;
  height: 44px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(16,35,29,.14), transparent);
  filter: blur(6px);
  animation: shadowPulse 9s ease-in-out infinite;
}
@keyframes shadowPulse {
  0%, 100% { transform: scaleX(1); opacity: 1; }
  50%      { transform: scaleX(.94); opacity: .75; }
}

.stack-float { animation: floaty 9s ease-in-out infinite; }
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

.stack-tilt {
  position: relative;
  width: 100%; height: 510px;
  transform-style: preserve-3d;
  transform: rotateX(4deg) rotateY(-8deg);
  will-change: transform;
}

.icard {
  position: absolute;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 16px 18px;
  transform: translateZ(var(--tz)) translateY(36px) rotateX(-14deg);
  opacity: 0;
  animation: cardIn 1s var(--ease-out) forwards;
  animation-delay: var(--d, 0s);
}
@keyframes cardIn {
  to { transform: translateZ(var(--tz)) translateY(0) rotateX(0deg); opacity: 1; }
}

.icard-data {
  width: 272px; top: 4px; right: 0;
  box-shadow: 0 1px 2px rgba(16,35,29,.05), 0 10px 28px rgba(16,35,29,.05);
}
.icard-calc {
  width: 296px; top: 168px; left: 0;
  box-shadow: 0 2px 4px rgba(16,35,29,.06), 0 18px 44px rgba(16,35,29,.09);
}
.icard-ai {
  width: 258px; top: 384px; right: 14px;
  box-shadow: 0 2px 6px rgba(16,35,29,.07), 0 24px 56px rgba(16,35,29,.12);
}
.icard-decide {
  display: flex; align-items: center; gap: 10px;
  width: max-content; top: -20px; left: 8px;
  padding: 12px 16px;
  border-color: rgba(200,135,43,.5);
  box-shadow: 0 2px 6px rgba(16,35,29,.06), 0 26px 60px rgba(200,135,43,.16);
}

.tag {
  display: inline-block;
  font-family: var(--font-mono); font-size: 9.5px; font-weight: 500;
  letter-spacing: .14em;
  padding: 3px 8px; border-radius: 4px;
  margin-bottom: 10px;
}
.tag-blue  { color: var(--blue);  background: var(--blue-t); }
.tag-green { color: var(--green); background: var(--green-t); }

.mono-rows { font-family: var(--font-mono); font-size: 10.5px; line-height: 2; color: var(--ink-2); }
.mr { display: flex; justify-content: space-between; gap: 12px; white-space: nowrap; }
.mr-head { color: var(--ink-3); font-size: 9.5px; letter-spacing: .08em; border-bottom: 1px solid var(--rule); margin-bottom: 2px; }

.icard-title { font-weight: 600; font-size: 15px; margin-bottom: 12px; }
.readout {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px;
  padding: 12px 14px;
  background: var(--frost); border-radius: 6px;
}
.ro em {
  display: block; font-style: normal;
  font-family: var(--font-mono); font-size: 15px; font-weight: 500;
}
.ro span {
  font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .12em; color: var(--ink-3);
}
.ro-green { color: var(--green); }
.ro-blue  { color: var(--blue); }

.risk-line { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.risk-label { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .12em; color: var(--ink-3); }
.risk-bar { flex: 1; height: 3px; border-radius: 2px; background: var(--rule); overflow: hidden; }
.risk-bar i {
  display: block; height: 100%; width: var(--w, 0%);
  background: var(--amber); border-radius: 2px;
  transform-origin: left;
  animation: riskFill 1.2s var(--ease-out) 1.5s backwards;
}
@keyframes riskFill { from { transform: scaleX(0); } }
.risk-num { font-family: var(--font-mono); font-size: 10px; color: var(--ink-2); }

.ai-text { font-size: 13px; line-height: 1.75; color: var(--ink-2); }

.decide-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--amber); flex: none;
  animation: breathe 2.4s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { box-shadow: 0 0 0 0 rgba(200,135,43,.35); }
  50%      { box-shadow: 0 0 0 6px rgba(200,135,43,0); }
}
.decide-text { font-size: 13.5px; font-weight: 600; }
.decide-chip {
  font-family: var(--font-mono); font-size: 9px; letter-spacing: .14em;
  color: var(--amber); background: var(--amber-t);
  padding: 3px 8px; border-radius: 4px;
}

/* ============================================================
   DECISION TRACE
   ============================================================ */
.trace-wrap { padding: clamp(64px, 10vh, 104px) 0 clamp(40px, 6vh, 64px); }

.trace { width: 100%; height: auto; display: block; overflow: visible; }

.scatter circle { opacity: 0; }
.trace.play .scatter circle {
  animation: scatterIn .6s ease forwards, drift 6s ease-in-out infinite;
}
.trace.play .scatter circle:nth-child(1) { animation-delay: 0s, .6s; }
.trace.play .scatter circle:nth-child(2) { animation-delay: .08s, .6s; animation-duration: .6s, 7s; }
.trace.play .scatter circle:nth-child(3) { animation-delay: .16s, .6s; animation-duration: .6s, 5.5s; }
.trace.play .scatter circle:nth-child(4) { animation-delay: .24s, .6s; animation-duration: .6s, 6.5s; }
.trace.play .scatter circle:nth-child(5) { animation-delay: .32s, .6s; animation-duration: .6s, 8s; }
@keyframes scatterIn { to { opacity: .5; } }
@keyframes drift {
  0%, 100% { transform: translate(0, 0); }
  50%      { transform: translate(2px, -4px); }
}

.rail-base { stroke: var(--rule); stroke-width: 1; }
.rail-draw {
  stroke: var(--pine); stroke-width: 1.5;
  stroke-dasharray: 870; stroke-dashoffset: 870;
}
.trace.play .rail-draw {
  transition: stroke-dashoffset 2.2s cubic-bezier(.3, 0, .25, 1) .5s;
  stroke-dashoffset: 0;
}

.dotmark { opacity: 0; }
.trace.play .dotmark {
  opacity: 1;
  transform: translateX(870px);
  transition: transform 2.2s cubic-bezier(.3, 0, .25, 1) .5s, opacity .2s .5s;
}

.node { fill: var(--paper); stroke-width: 1.5; }
.node-blue  { stroke: var(--blue); }
.node-green { stroke: var(--green); }
.node-amber { fill: var(--amber); stroke: var(--amber); }

.tl {
  font-family: var(--font-mono); font-size: 12.5px; font-weight: 500;
  text-anchor: middle;
}
.tl-blue  { fill: var(--blue); }
.tl-green { fill: var(--green); }
.tl-amber { fill: var(--amber); }
.tzh { font-family: var(--font-sans); font-size: 10.5px; fill: var(--ink-3); text-anchor: middle; }
.st-5 .tzh, .st-5 .tl { text-anchor: end; }

.st { opacity: 0; transform: translateY(6px); }
.trace.play .st { transition: opacity .5s ease, transform .5s var(--ease-out); opacity: 1; transform: none; }
.trace.play .st-1 { transition-delay: .5s; }
.trace.play .st-2 { transition-delay: 1.05s; }
.trace.play .st-3 { transition-delay: 1.6s; }
.trace.play .st-4 { transition-delay: 2.1s; }
.trace.play .st-5 { transition-delay: 2.6s; }

.pulse-ring { fill: none; stroke: var(--amber); opacity: 0; }
.trace.play .pulse-ring { animation: ringOut 1.1s ease-out 2.75s; }
@keyframes ringOut {
  0%   { opacity: .7; r: 6.5; stroke-width: 2; }
  100% { opacity: 0;  r: 26;  stroke-width: .5; }
}

.trace-mobile { display: none; }

/* ============================================================
   SECTIONS — shared
   ============================================================ */
.sect {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(72px, 11vh, 120px) 24px 0;
}

.sect-index {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .18em;
  color: var(--ink-3);
  display: flex; gap: 14px; align-items: baseline;
  margin-bottom: clamp(30px, 5vh, 48px);
}
.sect-index b { color: var(--amber); font-weight: 500; }
.sect-index::after {
  content: '';
  flex: 1; height: 1px; background: var(--rule);
  align-self: center; margin-left: 10px;
}

.reveal {
  opacity: 0; transform: translateY(26px);
  transition: opacity .8s ease, transform .8s var(--ease-out);
  transition-delay: var(--rd, 0s);
}
.reveal.in { opacity: 1; transform: none; }

/* ============================================================
   01 PHILOSOPHY — dark instrument panel
   ============================================================ */
.panel-dark {
  position: relative;
  background:
    radial-gradient(900px 480px at 82% -20%, rgba(130, 203, 162, .16), transparent 55%),
    radial-gradient(700px 420px at -8% 118%, rgba(217, 179, 106, .12), transparent 55%),
    linear-gradient(160deg, #2A4033 0%, #22362A 58%, #1D2F24 100%);
  border-radius: 18px;
  padding: clamp(40px, 6vw, 72px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.08),
    0 2px 6px rgba(23,33,27,.08),
    0 28px 64px rgba(23,33,27,.16);
  overflow: hidden;
}
.panel-dark::after {
  content: '';
  position: absolute; inset: 0;
  background-image: var(--noise);
  opacity: .07; pointer-events: none;
}

.panel-label {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .22em;
  color: rgba(255,255,255,.38);
  margin-bottom: 30px;
}

.thesis {
  font-family: var(--font-serif);
  font-size: clamp(25px, 3.2vw, 42px);
  line-height: 1.6; font-weight: 600; letter-spacing: 0;
  color: #F3F7F5;
  max-width: 21em;
}

.sem {
  text-decoration: none;
  color: inherit;
  transition: color .9s ease;
}
.reveal.in .sem-blue  { color: var(--blue-l);  transition-delay: .3s; }
.reveal.in .sem-green { color: var(--green-l); transition-delay: .7s; }
.reveal.in .sem-blue ~ .sem-blue { transition-delay: 1.1s; }
.reveal.in .sem-amber { color: var(--amber-l); transition-delay: 1.5s; }

.thesis-note {
  margin-top: 34px;
  font-size: 15px; line-height: 1.8;
  color: rgba(255,255,255,.52);
}

.panel-strip {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-top: 44px;
  padding-top: 26px;
  border-top: 1px solid rgba(255,255,255,.1);
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .18em;
}
.panel-strip i { color: rgba(255,255,255,.22); font-style: normal; }
.ps-blue  { color: var(--blue-l); }
.ps-green { color: var(--green-l); }
.ps-amber { color: var(--amber-l); }

/* ============================================================
   02 NOW — copy + payoff instrument
   ============================================================ */
.now-grid {
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  gap: clamp(32px, 5vw, 72px); align-items: center;
}

.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; letter-spacing: .16em;
  color: var(--green); background: var(--green-t);
  border: 1px solid rgba(47,125,87,.18);
  padding: 6px 14px; border-radius: 999px;
  margin-bottom: 22px;
}
.status-pill i {
  width: 6px; height: 6px; border-radius: 50%; background: var(--green);
  animation: breathe-g 2.4s ease-in-out infinite;
}
@keyframes breathe-g {
  0%, 100% { box-shadow: 0 0 0 0 rgba(47,125,87,.35); }
  50%      { box-shadow: 0 0 0 5px rgba(47,125,87,0); }
}

.now-title {
  font-family: var(--font-serif);
  font-size: clamp(32px, 3.6vw, 48px); font-weight: 600; letter-spacing: -.01em;
}
.now-line {
  margin-top: 16px; font-size: 16.5px; line-height: 1.8; color: var(--ink-2);
  max-width: 27em;
}

.now-stats {
  display: flex; gap: clamp(24px, 3vw, 44px);
  margin-top: 32px;
}
.stat { display: grid; gap: 4px; }
.stat em {
  font-style: normal; font-family: var(--font-mono);
  font-size: 30px; font-weight: 500; color: var(--pine);
}
.stat span {
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .12em; color: var(--ink-3);
}

.link-mono {
  display: inline-block; margin-top: 30px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em;
  color: var(--pine); text-decoration: none;
  padding-bottom: 3px;
  background: linear-gradient(var(--amber), var(--amber)) left bottom / 0 1px no-repeat;
  transition: color .2s, background-size .3s var(--ease-out);
}
.link-mono:hover { color: var(--amber); background-size: 100% 1px; }

/* payoff instrument */
.payoff-card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 14px;
  box-shadow: 0 2px 6px rgba(16,35,29,.05), 0 24px 64px rgba(16,35,29,.1);
  overflow: hidden;
}
/* corner ticks */
.payoff-card::before, .payoff-card::after {
  content: '';
  position: absolute; width: 14px; height: 14px;
  border: 1px solid rgba(16,35,29,.3);
  pointer-events: none;
}
.payoff-card::before { top: 10px; left: 10px; border-right: 0; border-bottom: 0; }
.payoff-card::after  { bottom: 10px; right: 10px; border-left: 0; border-top: 0; }

.payoff-cap {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--rule);
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em;
  color: var(--ink-2);
}
.payoff-cap b { color: var(--amber); font-weight: 500; }
.cap-live { display: inline-flex; align-items: center; gap: 7px; color: var(--green); }
.cap-live i {
  width: 5px; height: 5px; border-radius: 50%; background: var(--green);
  animation: breathe-g 2.4s ease-in-out infinite;
}

.payoff { display: block; width: 100%; height: auto; padding: 10px 6px 0; }

.zone { opacity: 0; transition: opacity 1s ease 1.2s; }
.zone-loss { fill: rgba(158, 90, 68, .1); }
.zone-gain { fill: rgba(35, 116, 76, .12); }
.payoff-card.in .zone { opacity: 1; }

.ax { stroke: var(--rule); stroke-width: 1; }

.curve {
  stroke: var(--pine); stroke-width: 2; stroke-linejoin: round;
  stroke-dasharray: 510; stroke-dashoffset: 510;
}
.payoff-card.in .curve {
  transition: stroke-dashoffset 1.6s cubic-bezier(.3, 0, .25, 1) .3s;
  stroke-dashoffset: 0;
}

.be-line {
  stroke: var(--amber); stroke-width: 1; stroke-dasharray: 4 5;
  opacity: 0; transition: opacity .6s ease 1.5s;
}
.be-dot {
  fill: var(--amber);
  opacity: 0; transform: scale(.4); transform-origin: 244px 170px;
  transition: opacity .5s ease 1.7s, transform .5s var(--ease-out) 1.7s;
}
.payoff-card.in .be-line { opacity: .9; }
.payoff-card.in .be-dot  { opacity: 1; transform: scale(1); }

.pl {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .1em;
  opacity: 0; transition: opacity .6s ease 1.9s;
}
.payoff-card.in .pl { opacity: 1; }
.pl-amber { fill: var(--amber); }
.pl-loss  { fill: #9E5A44; }
.pl-gain  { fill: var(--green); }
.pl-ax    { fill: var(--ink-3); letter-spacing: .06em; }

.payoff-foot {
  padding: 14px 24px 16px;
  border-top: 1px solid var(--rule);
  font-size: 12.5px; color: var(--ink-3);
}

.fineprint {
  margin-top: clamp(28px, 4vh, 40px);
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .08em; color: var(--ink-3);
}

/* ============================================================
   03 SYSTEM — paper band + rail with thumbnails
   ============================================================ */
.sect-system {
  max-width: none;
  padding-left: 0; padding-right: 0;
  margin-top: clamp(72px, 11vh, 120px);
  padding-top: clamp(64px, 9vh, 96px);
  padding-bottom: clamp(64px, 9vh, 96px);
  background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.85) 12%, rgba(255,255,255,.85) 88%, rgba(255,255,255,0) 100%);
  border-top: 1px solid rgba(203,213,209,.5);
  border-bottom: 1px solid rgba(203,213,209,.5);
}
.sect-system + .sect { padding-top: clamp(72px, 11vh, 120px); }
.sect-inner { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.sys-intro {
  font-size: 16.5px; line-height: 1.85; color: var(--ink-2);
  max-width: 36em;
  margin-bottom: clamp(40px, 6vh, 56px);
}

.rail { list-style: none; position: relative; }
.rail::before {
  content: '';
  position: absolute; left: 5px; top: 20px; bottom: 20px;
  width: 1px;
  background: linear-gradient(180deg, var(--blue) 0%, var(--green) 35%, var(--blue) 65%, var(--amber) 100%);
  opacity: .35;
}

.rail-row {
  position: relative;
  display: flex; align-items: center; gap: 28px;
  padding: 20px 0;
  border-radius: 12px;
  transition: background-color .25s;
}
.rail-node {
  flex: none; align-self: flex-start;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--paper); border: 1.5px solid;
  margin-top: 8px;
  position: relative; z-index: 1;
}
.rail-blue  { border-color: var(--blue); }
.rail-green { border-color: var(--green); }
.rail-amber { border-color: var(--amber); background: var(--amber); }

.rail-body { display: grid; grid-template-columns: 158px 1fr; gap: 6px 32px; align-items: baseline; flex: 1; min-width: 0; }
.rail-layer { grid-row: 1; }
.rail-name {
  font-size: 19px; font-weight: 600; text-decoration: none;
  width: max-content; max-width: 100%;
  background: linear-gradient(var(--amber), var(--amber)) left bottom / 0 1.5px no-repeat;
  transition: background-size .3s var(--ease-out), color .2s;
}
.rail-name:hover { background-size: 100% 1.5px; }
.rail-desc { grid-column: 2; font-size: 14.5px; line-height: 1.7; color: var(--ink-2); max-width: 30em; }

/* ---------- system layout: rail selector + 3D deck stage ---------- */
.system-grid {
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}

.rail-row { cursor: pointer; }
.rail-row:hover { background: rgba(255,255,255,.7); }
.rail-row.is-active { background: var(--paper); box-shadow: 0 1px 3px rgba(23,33,27,.05), 0 10px 26px rgba(23,33,27,.06); }
.rail-row { padding-left: 14px; padding-right: 18px; margin-left: -14px; }
.rail-row.is-active .rail-name { background-size: 100% 1.5px; }
.rail-row.is-active .rail-node { transform: scale(1.35); }
.rail-node { transition: transform .3s var(--ease-out); }

/* the stage: one deck of instrument cards per project */
.system-stage {
  position: sticky; top: 96px;
  perspective: 1200px;
  perspective-origin: 55% 38%;
  height: 500px;
}
.deck {
  position: absolute; inset: 0;
  transform-style: preserve-3d;
  transform: rotateX(3deg) rotateY(-7deg);
  pointer-events: none;
  visibility: hidden;
}
.deck.active { visibility: visible; }

.dcard {
  position: absolute;
  width: 250px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 14px 16px;
  box-shadow: 0 2px 5px rgba(23,33,27,.06), 0 16px 40px rgba(23,33,27,.1);
  opacity: 0;
}
.deck.active .dcard {
  animation: deckIn .7s var(--ease-out) forwards;
  animation-delay: var(--d, 0s);
}
@keyframes deckIn {
  from { opacity: 0; transform: translateZ(var(--tz)) translateY(34px) rotateX(-16deg); }
  to   { opacity: 1; transform: translateZ(var(--tz)) translateY(0)    rotateX(0deg); }
}

/* card slots — five per deck: three cards, one small card, one status chip */
.s1 { top: 24px;  left: 0;     width: 258px; }
.s2 { top: 176px; right: 0;    width: 246px; }
.s3 { top: 332px; left: 26px;  width: 250px; }
.s5 { top: 338px; right: 4px;  width: 212px; }
.s4 { top: -14px; right: 20px; }

/* small brass status chip */
.dchip {
  display: flex; align-items: center; gap: 9px;
  width: max-content;
  padding: 10px 14px;
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .14em;
  color: var(--amber);
  border-color: rgba(168,130,62,.45);
  box-shadow: 0 2px 5px rgba(23,33,27,.05), 0 18px 44px rgba(168,130,62,.14);
}
.dchip-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--amber); flex: none;
  animation: breathe 2.4s ease-in-out infinite;
}

.chip-score-light { color: var(--green); }
.chip-score-light span { color: var(--ink-3); }
.chip-line-q {
  font-family: var(--font-serif); font-style: italic;
  font-size: 14.5px; line-height: 1.55; color: var(--ink-2);
}

.chip-tag {
  display: inline-block;
  font-family: var(--font-mono); font-size: 9px; font-weight: 500;
  letter-spacing: .14em;
  padding: 3px 8px; border-radius: 4px;
  margin-bottom: 10px;
  color: var(--blue); background: var(--blue-t);
}
.chip-tag.chip-green { color: var(--green); background: var(--green-t); }
.chip-tag.chip-brass { color: var(--amber); background: var(--amber-t); }

.dcard pre {
  font-family: var(--font-mono); font-size: 10.5px; line-height: 1.8;
  color: var(--ink-2); white-space: pre-wrap;
}

.chip-checks { list-style: none; display: grid; gap: 6px; }
.chip-checks li {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .04em;
  color: var(--ink-2);
  display: flex; align-items: center; gap: 8px;
}
.chip-checks li::before {
  content: '✓';
  font-size: 10px; color: var(--green);
}
.chip-checks li.warn::before { content: '✕'; color: #A4523F; }
.chip-checks li.warn { color: #A4523F; }

.chip-foot {
  display: inline-block; margin-top: 11px;
  font-family: var(--font-mono); font-size: 9px; letter-spacing: .14em;
  color: var(--amber); background: var(--amber-t);
  padding: 3px 8px; border-radius: 4px;
}

.chip-dark {
  background:
    radial-gradient(220px 120px at 80% 0%, rgba(217,179,106,.14), transparent 60%),
    linear-gradient(165deg, #17251C, var(--pine-deep));
  border-color: rgba(23,33,27,.5);
}
.chip-dark .chip-tag { color: var(--amber-l); background: rgba(217,179,106,.13); }
.chip-score {
  display: flex; align-items: baseline; gap: 10px;
  font-family: var(--font-mono); font-size: 34px; font-weight: 500;
  color: var(--amber-l);
}
.chip-score span { font-size: 8.5px; letter-spacing: .16em; color: rgba(255,255,255,.4); }
.chip-impact {
  margin-top: 8px; padding-top: 9px;
  border-top: 1px solid rgba(255,255,255,.09);
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .05em;
  color: rgba(255,255,255,.5);
}

.chip-line { font-size: 12.5px; font-weight: 600; color: var(--pine); }
.chip-pl {
  margin-top: 8px;
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .1em;
  color: var(--ink-3);
}
.chip-pl b { color: var(--green); font-weight: 500; font-size: 12px; margin-left: 6px; }

/* ============================================================
   04 METHOD — build console
   ============================================================ */
.console {
  background:
    radial-gradient(760px 300px at 90% -10%, rgba(130, 203, 162, .16), transparent 60%),
    linear-gradient(170deg, #29402F 0%, #203226 70%);
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.08),
    0 2px 6px rgba(23,33,27,.08),
    0 28px 64px rgba(23,33,27,.18);
  position: relative;
}
.console::after {
  content: '';
  position: absolute; inset: 0;
  background-image: var(--noise);
  opacity: .06; pointer-events: none;
}

.console-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 20px;
  background: rgba(0,0,0,.28);
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.cdot { width: 10px; height: 10px; border-radius: 50%; }
.cdot-r { background: #D26A5A; }
.cdot-a { background: #D9A441; }
.cdot-g { background: #58A279; }
.console-title {
  margin-left: 12px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em;
  color: rgba(255,255,255,.42);
}
.console-status {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .18em;
  color: var(--green-l);
}
.console-status i {
  width: 5px; height: 5px; border-radius: 50%; background: var(--green-l);
  animation: breathe-g 2.4s ease-in-out infinite;
}

.console-body {
  list-style: none;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: clamp(20px, 3vw, 28px);
  position: relative; z-index: 1;
}
.c-card {
  background: rgba(255,255,255,.035);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  padding: 24px 26px 26px;
  transition: background-color .3s, border-color .3s, transform .3s var(--ease-out), box-shadow .3s;
}
.c-card:hover {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.14);
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(0,0,0,.22);
}

.c-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.c-head em {
  font-style: normal; font-family: var(--font-mono);
  font-size: 12px; color: var(--green-l); letter-spacing: .1em;
}
.c-tag {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: 9px; letter-spacing: .18em;
  color: rgba(255,255,255,.44);
  border: 1px solid rgba(255,255,255,.12);
  padding: 4px 10px; border-radius: 999px;
}
.ct-dot { width: 5px; height: 5px; border-radius: 50%; }
.ctd-steel { background: var(--blue-l); }
.ctd-green { background: var(--green-l); }
.ctd-brass { background: var(--amber-l); }

.c-main {
  font-size: clamp(16px, 1.6vw, 18.5px); font-weight: 600; line-height: 1.55;
  color: #F3F7F5;
}
.c-sub {
  margin-top: 9px;
  font-size: 13.5px; line-height: 1.7;
  color: rgba(255,255,255,.46);
}

.console-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 2px clamp(22px, 3vw, 30px) 22px;
  position: relative; z-index: 1;
}
.console-cursor {
  font-family: var(--font-mono); font-size: 13px;
  color: rgba(255,255,255,.4);
}
.console-cursor i {
  font-style: normal; color: var(--green-l);
  margin-left: 8px;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.console-note {
  font-family: var(--font-mono); font-size: 9px; letter-spacing: .18em;
  color: rgba(255,255,255,.3);
}

/* ============================================================
   05 BACKGROUND
   ============================================================ */
.bg-lede { font-size: 15px; color: var(--ink-3); margin-bottom: 32px; }
.bg-list { list-style: none; max-width: 640px; }
.bg-list li {
  display: flex; gap: 28px; align-items: baseline;
  padding: 13px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 15px; color: var(--ink-2);
}
.bg-list li:last-child { border-bottom: 0; }
.bg-list em {
  font-style: normal; font-family: var(--font-mono); font-size: 11.5px;
  color: var(--ink-3); min-width: 64px; letter-spacing: .04em;
}

/* ============================================================
   06 CONTACT
   ============================================================ */
.sect-contact { padding-bottom: clamp(80px, 12vh, 140px); }

.contact-quote {
  font-family: var(--font-serif);
  font-size: clamp(24px, 2.8vw, 36px);
  font-weight: 600; line-height: 1.6; letter-spacing: 0;
  max-width: 24em;
}
.contact-quote .accent { font-style: normal; color: var(--amber); }
html[lang="en"] .contact-quote .accent { font-style: italic; }

.contact-links { display: flex; gap: clamp(20px, 4vw, 44px); flex-wrap: wrap; margin-top: 40px; }
.contact-links .link-mono { margin-top: 0; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-foot {
  max-width: var(--maxw); margin: 0 auto;
  padding: 28px 24px 36px;
  border-top: 1px solid var(--rule);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em;
  color: var(--ink-3);
}
.foot-trace b { color: var(--amber); font-weight: 500; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-stage {
    min-height: 510px;
    max-width: 480px;
    margin: 8px auto 0;
    width: 100%;
  }
  .now-grid { grid-template-columns: 1fr; align-items: start; }
  .rail-body { grid-template-columns: 1fr; }
  .rail-desc { grid-column: 1; }
  .system-grid { grid-template-columns: 1fr; }
  .system-stage { position: relative; top: 0; max-width: 520px; margin: 12px auto 0; width: 100%; }
}

@media (max-width: 720px) {
  .system-stage { display: none; }
  .rail-row { cursor: default; }
}

@media (max-width: 640px) {
  .now-stats { flex-wrap: wrap; }

  .hero-stage { perspective: none; min-height: 0; max-width: 420px; }
  .stack-float { animation: none; }
  .stack-shadow { display: none; }
  .stack-tilt { transform: none; height: auto; display: grid; gap: 14px; padding: 8px 2px; }
  .icard { position: static; width: 100% !important; }
  .icard-decide { width: max-content !important; }

  .trace { display: none; }
  .trace-mobile {
    display: grid; gap: 0; list-style: none;
    padding-left: 6px;
  }
  .trace-mobile li {
    position: relative;
    padding: 0 0 26px 26px;
    border-left: 1px solid var(--rule);
  }
  .trace-mobile li:last-child { border-left-color: transparent; padding-bottom: 0; }
  .trace-mobile li::before {
    content: '';
    position: absolute; left: -6px; top: 2px;
    width: 9px; height: 9px; border-radius: 50%;
    background: var(--paper); border: 1.5px solid;
  }
  .tm-blue::before  { border-color: var(--blue); }
  .tm-green::before { border-color: var(--green); }
  .tm-amber::before { border-color: var(--amber); background: var(--amber); }
  .trace-mobile em {
    font-style: normal; font-family: var(--font-mono);
    font-size: 13px; font-weight: 500; display: block;
  }
  .tm-blue em  { color: var(--blue); }
  .tm-green em { color: var(--green); }
  .tm-amber em { color: var(--amber); }
  .trace-mobile span { font-size: 11.5px; color: var(--ink-3); }

  .console-body { grid-template-columns: 1fr; }
  .head-nav a:not(:last-of-type) { display: none; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise, .icard { animation: none; opacity: 1; transform: translateZ(var(--tz, 0)); }
  .display .line-in { transform: none; }
  .stack-float, .stack-shadow { animation: none; }
  .risk-bar i { animation: none; }
  .decide-dot, .status-pill i, .cap-live i, .console-status i, .console-cursor i { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .trace .scatter circle { opacity: .5; animation: none !important; }
  .trace .rail-draw { stroke-dashoffset: 0; transition: none; }
  .trace .dotmark { opacity: 0; }
  .trace .st { opacity: 1; transform: none; transition: none; }
  .trace .pulse-ring { animation: none; }
  .sem { transition: none; }
  .reveal.in .sem-blue, .reveal.in .sem-green { transition-delay: 0s; }
  .zone, .curve, .be-line, .be-dot, .pl { transition: none; opacity: 1; }
  .curve { stroke-dashoffset: 0; }
  .be-dot { transform: scale(1); }
  .deck { transform: none; }
  .deck.active .dcard { animation: none; opacity: 1; transform: translateZ(var(--tz, 0)); }
  .dchip-dot { animation: none; }
}
