@import url("/assets/css/tokens.css");

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% -10%, var(--glow-cyan), transparent 36%),
    radial-gradient(circle at 82% 0%, var(--glow-magenta), transparent 34%);
  z-index: 0;
}
main, header, footer { position: relative; z-index: 1; }
img { max-width: 100%; display: block; }
a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--btn-hover); }

.rail { width: var(--rail); margin-inline: auto; }

/* ---------- header ---------- */
.site-head {
  display: flex; align-items: center; gap: 2rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; }
.brand img { width: 34px; height: 34px; }
.brand .brand-name {
  font-family: var(--font-display); font-size: 1.3rem; letter-spacing: -.02em;
}
.tabs { display: flex; gap: 1.6rem; margin-left: auto; }
.tabs a {
  text-decoration: none; color: var(--muted);
  font-size: .82rem; letter-spacing: .08em; text-transform: uppercase;
  padding: .3rem 0;
}
.tabs a:hover { color: var(--text); }
.tabs a[aria-current="page"] { color: var(--text); border-bottom: 1px solid var(--accent); }
.btn {
  display: inline-block; background: var(--btn); color: var(--bg);
  font-weight: 550; font-size: .95rem; letter-spacing: .02em;
  padding: .72rem 1.5rem; border-radius: 999px; text-decoration: none;
  transition: background .18s ease, transform .18s ease;
}
.btn:hover { background: var(--btn-hover); color: var(--bg); transform: translateY(-1px); }
.btn.small { padding: .5rem 1.1rem; font-size: .88rem; }
.head-enter { margin-left: .4rem; }

/* ---------- type ---------- */
.eyebrow {
  color: var(--accent); font-size: .78rem; font-weight: 590;
  letter-spacing: .09em; text-transform: uppercase; margin: 0 0 1.2rem;
}
.display {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(48px, 8vw, 82px); letter-spacing: -.045em;
  line-height: .94; margin: 0 0 1.4rem;
}
.display.mid { font-size: clamp(39px, 5.5vw, 55px); }
.lede { color: var(--soft); font-size: var(--step-1); line-height: 1.55; max-width: 65ch; margin: 0 0 2rem; }
.body-copy { color: var(--soft); max-width: 65ch; }
.muted { color: var(--muted); }
.status-line {
  font-family: var(--font-mono); font-size: .9rem; color: var(--live);
  letter-spacing: .02em; margin: 0 0 1.6rem;
}
.status-line::before { content: "● "; font-size: .7em; vertical-align: .12em; }

/* ---------- layout ---------- */
.hero { padding: 6.5rem 0 4.5rem; }
.section { padding: 4.5rem 0; border-top: 1px solid var(--line); }
.section h2 {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(25px, 3.4vw, 31px); letter-spacing: -.02em;
  line-height: 1.15; margin: 0 0 1rem;
}
.cta-row { display: flex; align-items: center; gap: 1.6rem; flex-wrap: wrap; }
.cta-row .quiet-link { font-size: .95rem; }

/* ---------- fact rows ---------- */
.rows { border-top: 1px solid var(--line); }
.row {
  display: grid; grid-template-columns: 3.2rem 1fr 2fr; gap: 1.4rem;
  padding: 1.5rem 0; border-bottom: 1px solid var(--line); align-items: baseline;
}
.row .num { font-family: var(--font-mono); color: var(--muted); font-size: .85rem; }
.row h3 { margin: 0; font-size: var(--step-1); font-weight: 550; letter-spacing: -.01em; }
.row p { margin: 0; color: var(--soft); max-width: 62ch; }
.row ul { margin: 0; padding: 0; list-style: none; color: var(--soft); }
.row ul li { padding: .18rem 0; }
.fact-strip {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem;
  padding: 2rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.fact-strip p { margin: 0; color: var(--soft); font-size: .98rem; }
.fact-strip strong { display: block; color: var(--text); font-weight: 590; margin-bottom: .3rem; }

/* ---------- state stage (door) ---------- */
.stage {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: center;
  padding: 3.5rem 0 1rem;
}
.stage-figure {
  position: relative; aspect-ratio: 4 / 3.4; display: grid; place-items: center;
}
.stage-figure img {
  position: absolute; max-height: 100%; width: auto; max-width: 92%;
  opacity: 0; transform: translateX(26px) scale(.975);
  transition: opacity .55s ease, transform .55s ease;
  filter: drop-shadow(0 0 28px var(--orb-shadow));
  pointer-events: none;
}
.stage-figure img.on { opacity: 1; transform: translateX(0) scale(1); }
.stage-word {
  font-family: var(--font-display); font-size: clamp(31px, 4vw, 39px);
  letter-spacing: -.02em; margin: 0 0 .8rem;
}
.stage p { color: var(--soft); max-width: 46ch; }
.state-ctl { margin-top: 1.8rem; }
.state-ctl input[type="range"] {
  width: 100%; accent-color: var(--accent); height: 2rem; cursor: ew-resize;
}
.state-marks { display: flex; justify-content: space-between; }
.state-marks button {
  background: none; border: 0; color: var(--muted); cursor: pointer;
  font-family: var(--font-mono); font-size: .8rem; letter-spacing: .06em;
  text-transform: uppercase; padding: .3rem 0;
}
.state-marks button.on { color: var(--text); }
.slogan {
  font-family: var(--font-display); font-size: clamp(25px, 3.6vw, 31px);
  letter-spacing: -.02em; padding: 3.2rem 0; border-top: 1px solid var(--line);
}

/* ---------- terminal ---------- */
.terminal {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  font-family: var(--font-mono); font-size: .88rem; line-height: 1.9;
  padding: 1.4rem 1.6rem; color: var(--soft); overflow: hidden;
}
.terminal .t-head { color: var(--muted); letter-spacing: .06em; text-transform: uppercase; font-size: .72rem; margin-bottom: .8rem; }
.terminal .k { color: var(--muted); }
.terminal .v-live { color: var(--live); }
.terminal .caret { display: inline-block; width: .55em; height: 1.05em; background: var(--soft); vertical-align: -.15em; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- cases ---------- */
.case { padding: 2.6rem 0; border-bottom: 1px solid var(--line); }
.case:first-of-type { border-top: 1px solid var(--line); }
.case h3 { font-family: var(--font-display); font-weight: 400; font-size: var(--step-2); letter-spacing: -.02em; margin: 0 0 .6rem; }
.case .task { color: var(--soft); max-width: 65ch; margin: 0 0 1.1rem; }
.case .meta { font-family: var(--font-mono); font-size: .78rem; color: var(--accent); letter-spacing: .07em; text-transform: uppercase; margin-bottom: 1rem; }
.case ul { margin: 0 0 1.1rem; padding: 0; list-style: none; color: var(--soft); }
.case ul li { padding: .22rem 0 .22rem 1.3rem; position: relative; }
.case ul li::before { content: "—"; position: absolute; left: 0; color: var(--muted); }
.case .note { color: var(--muted); max-width: 65ch; margin: 0; font-size: .95rem; }

/* ---------- pricing ---------- */
.tier { display: grid; grid-template-columns: 1fr auto; gap: 1rem 2.5rem; padding: 2.4rem 0; border-bottom: 1px solid var(--line); }
.tier:first-of-type { border-top: 1px solid var(--line); }
.tier h3 { margin: 0 0 .4rem; font-size: var(--step-1); font-weight: 550; }
.tier .blurb { color: var(--soft); margin: 0 0 1rem; max-width: 52ch; }
.tier ul { margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: .95rem; }
.tier ul li { padding: .16rem 0; }
.price { font-family: var(--font-display); font-size: clamp(39px, 5vw, 55px); letter-spacing: -.03em; line-height: 1; text-align: right; }
.price small { display: block; font-family: var(--font-mono); font-size: .75rem; color: var(--muted); letter-spacing: .07em; text-transform: uppercase; margin-top: .5rem; }
.tier .btn { grid-column: 1; justify-self: start; }
.flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.6rem; padding: 2rem 0; }
.flow div { border-top: 1px solid var(--line); padding-top: 1rem; }
.flow .num { font-family: var(--font-mono); color: var(--muted); font-size: .8rem; display: block; margin-bottom: .4rem; }
.flow p { margin: 0; color: var(--soft); font-size: .95rem; }

/* ---------- faq ---------- */
.faq details { border-bottom: 1px solid var(--line); padding: 1.2rem 0; }
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 550; font-size: 1.02rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-mono); color: var(--muted); }
.faq details[open ] summary::after { content: "–"; }
.faq details p { color: var(--soft); max-width: 65ch; margin: .8rem 0 0; }

/* ---------- gallery (canon) ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.plate { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.plate figure { margin: 0; aspect-ratio: 4 / 3; display: grid; place-items: center; padding: 1.2rem; }
.plate img { max-height: 100%; width: auto; max-width: 100%; object-fit: contain; }
.plate figcaption { padding: 0 1.2rem 1.2rem; }
.plate figcaption strong { display: block; font-weight: 590; margin-bottom: .2rem; }
.plate figcaption span { color: var(--muted); font-size: .9rem; }
.plate.wide { grid-column: span 2; }
.plate.wide figure { aspect-ratio: 8 / 3.2; }

/* ---------- token table ---------- */
.tokens-table { width: 100%; border-collapse: collapse; font-size: .94rem; }
.tokens-table th, .tokens-table td { text-align: left; padding: .8rem .6rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tokens-table th { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); font-weight: 400; }
.tokens-table td code { font-family: var(--font-mono); font-size: .86rem; color: var(--soft); }
.swatch { display: inline-block; width: 1.1rem; height: 1.1rem; border-radius: 50%; border: 1px solid var(--line); vertical-align: -.2em; margin-right: .6rem; }

/* ---------- wide plate ---------- */
.wide-plate { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.wide-plate img { width: 100%; height: auto; }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--line); padding: 2.6rem 0 3rem; margin-top: 2rem; }
.foot-grid { display: flex; gap: 2.5rem; align-items: flex-start; flex-wrap: wrap; }
.foot-grid img.mark { width: 44px; height: 44px; }
.foot-grid .who { color: var(--muted); font-size: .92rem; max-width: 40ch; }
.foot-grid .who strong { color: var(--text); display: block; font-size: 1rem; margin-bottom: .3rem; }
.foot-nav { display: flex; gap: 1.4rem; margin-left: auto; flex-wrap: wrap; }
.foot-nav a { color: var(--muted); text-decoration: none; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; }
.foot-nav a:hover { color: var(--text); }
.foot-line { margin-top: 2rem; color: var(--muted); font-family: var(--font-display); font-style: italic; font-size: 1.05rem; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .tabs { display: none; }
  .stage { grid-template-columns: 1fr; gap: 1.6rem; }
  .fact-strip { grid-template-columns: 1fr; gap: 1.2rem; }
  .row { grid-template-columns: 1fr; gap: .4rem; }
  .flow { grid-template-columns: 1fr 1fr; }
  .gallery { grid-template-columns: 1fr; }
  .plate.wide { grid-column: span 1; }
  .tier { grid-template-columns: 1fr; }
  .price { text-align: left; }
  .hero { padding: 4rem 0 3rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .stage-figure img { transition: none; }
  .terminal .caret { animation: none; }
}
