/* GLYPHICA — type is the imagery. Bone paper, black ink, electric blue. */

:root {
  --paper: #faf8f4;
  --ink: #0a0a0a;
  --blue: #2b45ff;
  --ink-dim: #4c4a45;
  --rule: rgba(10, 10, 10, 0.16);
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --sans: "Anybody", system-ui, sans-serif;
  --serif: "Fraunces", Georgia, serif;
  --ease-elastic: cubic-bezier(0.34, 1.6, 0.44, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
html.lenis { scroll-behavior: auto; } /* Lenis owns scrolling when active */
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-variation-settings: "wght" 380, "wdth" 100;
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--blue); color: var(--paper); }

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

.skip {
  position: absolute; left: 1rem; top: -3rem; z-index: 200;
  background: var(--ink); color: var(--paper);
  padding: 0.6rem 1rem; text-decoration: none; font-size: 0.85rem;
  transition: top 0.2s;
}
.skip:focus { top: 1rem; }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.1rem clamp(1.25rem, 4vw, 3rem);
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s;
}
.nav.scrolled {
  background: rgba(250, 248, 244, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-color: var(--rule);
}
.mark {
  font-variation-settings: "wght" 780, "wdth" 118;
  letter-spacing: 0.06em; font-size: 1.05rem; text-decoration: none;
  display: inline-flex; align-items: center; gap: 0.45rem;
}
.mark-star { color: var(--blue); font-size: 1.15em; line-height: 1; }
.nav nav { display: flex; gap: clamp(0.9rem, 2.5vw, 2rem); align-items: center; }
.nav nav a {
  text-decoration: none; font-size: 0.82rem; letter-spacing: 0.14em;
  text-transform: uppercase; font-variation-settings: "wght" 520, "wdth" 100;
  position: relative;
}
.nav nav a:not(.nav-buy)::after {
  content: ""; position: absolute; left: 0; bottom: -4px; height: 2px; width: 100%;
  background: var(--blue); transform: scaleX(0); transform-origin: left;
  transition: transform 0.35s var(--ease-elastic);
}
.nav nav a:not(.nav-buy):hover::after,
.nav nav a:not(.nav-buy):focus-visible::after { transform: scaleX(1); }
.nav-buy {
  background: var(--ink); color: var(--paper); padding: 0.55rem 1.1rem;
  border-radius: 999px; transition: background 0.25s, transform 0.25s var(--ease-elastic);
}
.nav-buy:hover, .nav-buy:focus-visible { background: var(--blue); transform: scale(1.05); }
@media (max-width: 640px) {
  .nav nav a:not(.nav-buy) { display: none; }
}

/* ---------- hero ---------- */
.hero {
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 6.5rem clamp(1rem, 3vw, 3rem) 3.5rem;
  position: relative;
  touch-action: pan-y;
}
.hero-kicker {
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-dim);
  margin-bottom: clamp(0.5rem, 2vh, 1.5rem);
}
.hero-word-wrap { display: block; }
.hero-word {
  font-size: clamp(3.4rem, 16.5vw, 15.5rem);
  line-height: 0.92;
  letter-spacing: -0.015em;
  user-select: none;
  -webkit-user-select: none;
  cursor: crosshair;
  white-space: nowrap;
  display: flex;
  justify-content: space-between;
  width: 100%;
}
.hl {
  display: inline-block;
  font-variation-settings: "wght" var(--w, 300), "wdth" var(--d, 90);
  will-change: font-variation-settings;
}
.hero-foot {
  margin-top: clamp(1.2rem, 4vh, 2.6rem);
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 2rem; flex-wrap: wrap;
}
.hero-sub { max-width: 34rem; font-size: clamp(0.98rem, 1.4vw, 1.15rem); color: var(--ink-dim); }
.hero-axis { display: flex; gap: 0.5rem; }
.ax-chip {
  font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.05em;
  border: 1px solid var(--rule); border-radius: 999px; padding: 0.35rem 0.8rem;
  color: var(--ink-dim); background: rgba(255, 255, 255, 0.5);
}
.ax-chip b { color: var(--blue); font-weight: 700; font-variant-numeric: tabular-nums; display: inline-block; min-width: 2.2em; text-align: right; }
.hero-hint {
  position: absolute; bottom: 1.4rem; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-dim);
}
.hint-line { width: 1px; height: 2.4rem; background: var(--ink); position: relative; overflow: hidden; }
.hint-line::after {
  content: ""; position: absolute; inset: 0; background: var(--blue);
  animation: hint-drop 1.8s cubic-bezier(0.6, 0, 0.3, 1) infinite;
}
@keyframes hint-drop {
  0% { transform: translateY(-100%); }
  55%, 100% { transform: translateY(100%); }
}

/* ---------- marquee ---------- */
.marquee {
  border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink);
  overflow: hidden; background: var(--blue); color: var(--paper);
  padding: 0.65rem 0;
}
.marquee-track {
  display: flex; white-space: nowrap; width: max-content;
  animation: marquee 22s linear infinite;
}
.marquee-track span {
  font-variation-settings: "wght" 640, "wdth" 128;
  font-size: clamp(1.05rem, 2.4vw, 1.6rem);
  letter-spacing: 0.08em; text-transform: uppercase;
  padding-right: 0.5rem;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- manifesto ---------- */
.manifesto { padding: clamp(5rem, 14vh, 9rem) clamp(1.25rem, 6vw, 4rem); }
.manifesto-text {
  font-family: var(--serif);
  font-variation-settings: "wght" 360, "opsz" 60, "SOFT" 40, "WONK" 0;
  font-size: clamp(1.5rem, 3.4vw, 2.7rem);
  line-height: 1.32; max-width: 56rem; margin-inline: auto;
  text-wrap: balance;
}
.manifesto-text em {
  font-style: italic; color: var(--blue);
  font-variation-settings: "wght" 480, "opsz" 60, "SOFT" 40, "WONK" 1;
}

/* ---------- section scaffolding ---------- */
.sec-head { padding: 0 clamp(1.25rem, 4vw, 3rem); margin-bottom: clamp(2rem, 5vh, 3.5rem); }
.sec-index {
  font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--blue); margin-bottom: 0.8rem;
}
.sec-index::before { content: "✳ "; }
.sec-title {
  font-size: clamp(2.3rem, 6vw, 4.6rem); line-height: 1.02;
  font-variation-settings: "wght" 760, "wdth" 112;
  letter-spacing: -0.015em;
}
.sec-note { max-width: 38rem; margin-top: 1.2rem; color: var(--ink-dim); font-size: 1rem; }

/* ---------- faces ---------- */
.faces { padding: clamp(3rem, 8vh, 5rem) 0 clamp(4rem, 10vh, 7rem); border-top: 1px solid var(--rule); }
.face-card {
  display: grid; grid-template-columns: 1.1fr 1fr; align-items: stretch;
  border-top: 1px solid var(--ink);
  margin: 0 clamp(1.25rem, 4vw, 3rem) 3rem;
}
.face-card-rev { grid-template-columns: 1fr 1.1fr; }
.face-card-rev .face-demo { order: 2; }
.face-demo {
  display: flex; align-items: center; justify-content: center;
  min-height: clamp(16rem, 42vh, 26rem);
  background: var(--ink); color: var(--paper); overflow: hidden;
  position: relative; cursor: crosshair;
}
.face-demo-word { font-size: clamp(7rem, 16vw, 15rem); line-height: 1; user-select: none; -webkit-user-select: none; }
.face-demo-elastica .face-demo-word {
  font-variation-settings: "wght" var(--w, 700), "wdth" var(--d, 100);
}
.face-demo-marrow { background: var(--blue); }
.face-demo-marrow .face-demo-word {
  font-family: var(--serif);
  font-variation-settings: "wght" var(--w, 500), "opsz" 144, "SOFT" var(--s, 0), "WONK" 1;
}
.face-info { padding: clamp(1.4rem, 3vw, 2.6rem) clamp(1.2rem, 3vw, 2.6rem); }
.face-name { font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.05; margin-bottom: 0.4rem; }
.face-name-elastica { font-variation-settings: "wght" 850, "wdth" 140; }
.face-name-marrow { font-family: var(--serif); font-variation-settings: "wght" 600, "opsz" 144, "SOFT" 0, "WONK" 1; }
.face-tag { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--blue); margin-bottom: 1.1rem; }
.face-body { color: var(--ink-dim); max-width: 32rem; margin-bottom: 1.4rem; }
.face-axes { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.6rem; }
.face-axes li {
  font-family: var(--mono); font-size: 0.75rem;
  border: 1px solid var(--rule); border-radius: 4px; padding: 0.35rem 0.6rem;
  display: flex; gap: 0.6rem;
}
.ax-name { font-weight: 700; }
.ax-range { color: var(--ink-dim); }
.face-cta {
  display: inline-block; text-decoration: none; font-size: 0.85rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  font-variation-settings: "wght" 620, "wdth" 105;
  border-bottom: 2px solid var(--blue); padding-bottom: 0.25rem;
  transition: color 0.25s, letter-spacing 0.35s var(--ease-elastic);
}
.face-cta:hover, .face-cta:focus-visible { color: var(--blue); letter-spacing: 0.2em; }
@media (max-width: 820px) {
  .face-card, .face-card-rev { grid-template-columns: 1fr; }
  .face-card-rev .face-demo { order: 0; }
}

/* ---------- playground ---------- */
.playground { padding: clamp(3rem, 8vh, 5rem) 0 clamp(4rem, 10vh, 6rem); border-top: 1px solid var(--rule); }
.spec {
  margin: 0 clamp(1.25rem, 4vw, 3rem) 3.5rem;
  border: 1px solid var(--ink); border-radius: 10px; overflow: hidden;
  background: #fffefb;
  scroll-margin-top: 5.5rem;
}
.spec-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 0.7rem 1.1rem; border-bottom: 1px solid var(--rule);
  background: var(--paper);
}
.spec-face {
  font-variation-settings: "wght" 800, "wdth" 130;
  letter-spacing: 0.05em; text-transform: uppercase; font-size: 0.85rem;
}
.spec-face-serif { font-family: var(--serif); font-variation-settings: "wght" 640, "opsz" 30, "SOFT" 0, "WONK" 1; text-transform: none; font-size: 1rem; }
.spec-read { font-family: var(--mono); font-size: 0.72rem; color: var(--ink-dim); font-variant-numeric: tabular-nums; text-align: right; }
.spec-stage {
  padding: clamp(1.6rem, 5vw, 3rem) clamp(1.2rem, 4vw, 2.5rem);
  font-size: clamp(2.6rem, 9vw, 7.5rem);
  line-height: 1.04; min-height: 1.2em;
  outline-offset: -3px;
  overflow-wrap: anywhere;
  transition: font-variation-settings 0.45s var(--ease-elastic);
}
.stage-elastica { font-variation-settings: "wght" 700, "wdth" 125; }
.stage-marrow { font-family: var(--serif); font-variation-settings: "wght" 560, "opsz" 144, "SOFT" 0, "WONK" 1; }
.spec-stage:focus-visible { outline: 3px solid var(--blue); }
.spec-controls {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1.2rem 2rem; padding: 1.2rem 1.3rem 1.4rem;
  border-top: 1px solid var(--rule); background: var(--paper);
}
.ctl label {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-dim); margin-bottom: 0.55rem;
}
.ctl output { color: var(--blue); font-weight: 700; font-variant-numeric: tabular-nums; }

input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 26px; background: transparent; cursor: ew-resize;
}
input[type="range"]::-webkit-slider-runnable-track { height: 2px; background: var(--ink); }
input[type="range"]::-moz-range-track { height: 2px; background: var(--ink); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%;
  background: var(--blue); border: 3px solid var(--paper);
  box-shadow: 0 0 0 1.5px var(--ink); margin-top: -8px;
  transition: transform 0.25s var(--ease-elastic);
}
input[type="range"]::-moz-range-thumb {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--blue); border: 3px solid var(--paper);
  box-shadow: 0 0 0 1.5px var(--ink);
}
input[type="range"]:hover::-webkit-slider-thumb,
input[type="range"]:focus-visible::-webkit-slider-thumb { transform: scale(1.35); }
input[type="range"]:focus-visible { outline: none; }
input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px var(--blue); }
input[type="range"]:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 3px var(--blue); }

.ctl-btns { display: flex; align-items: flex-end; gap: 0.5rem; }
.preset {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em;
  text-transform: uppercase; padding: 0.5rem 0.9rem;
  background: transparent; border: 1px solid var(--ink); border-radius: 999px;
  cursor: pointer; color: var(--ink);
  transition: background 0.2s, color 0.2s, transform 0.3s var(--ease-elastic);
}
.preset:hover, .preset:focus-visible { background: var(--ink); color: var(--paper); transform: scale(1.06); }

.ctl-check { display: flex; align-items: flex-end; }
.ctl-check label { cursor: pointer; align-items: center; gap: 0.7rem; margin-bottom: 0.2rem; }
.ctl-check input { position: absolute; opacity: 0; width: 3rem; height: 1.6rem; cursor: pointer; }
.wonk-pill {
  width: 3rem; height: 1.6rem; border: 1.5px solid var(--ink); border-radius: 999px;
  display: inline-flex; align-items: center; padding: 2px; background: var(--paper);
  transition: background 0.25s;
}
.wonk-dot {
  width: 1.15rem; height: 1.15rem; border-radius: 50%; background: var(--ink);
  transition: transform 0.35s var(--ease-elastic), background 0.25s;
}
.ctl-check input:checked + .wonk-pill { background: var(--blue); border-color: var(--blue); }
.ctl-check input:checked + .wonk-pill .wonk-dot { transform: translateX(1.35rem); background: var(--paper); }
.ctl-check input:focus-visible + .wonk-pill { outline: 3px solid var(--blue); outline-offset: 3px; }

/* ---------- waterfall ---------- */
.waterfall { padding: clamp(3rem, 8vh, 5rem) 0 clamp(4rem, 10vh, 6rem); border-top: 1px solid var(--rule); }
.wf { margin: 0 clamp(1.25rem, 4vw, 3rem); border-top: 1px solid var(--ink); }
.wf-row {
  display: flex; align-items: baseline; gap: clamp(0.8rem, 3vw, 2rem);
  padding: 0.55em 0; border-bottom: 1px solid var(--rule);
  overflow: hidden;
  /* specimen-sheet convention: long rows bleed off, but fade instead of chopping */
  -webkit-mask-image: linear-gradient(90deg, #000 90%, transparent 99%);
  mask-image: linear-gradient(90deg, #000 90%, transparent 99%);
}
.wf-size {
  font-family: var(--mono); font-size: 0.72rem; color: var(--ink-dim);
  min-width: 2.4rem; text-align: right; flex: none; font-variant-numeric: tabular-nums;
}
.wf-size::after { content: " pt"; }
.wf-text {
  font-family: var(--serif);
  font-size: calc(var(--pt) * 1pt);
  line-height: 1.05;
  font-variation-settings: "wght" var(--wfw, 400), "opsz" var(--wfo, 40), "SOFT" 0, "WONK" 1;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .wf-text { font-size: calc(var(--pt) * 0.62pt); }
}

/* ---------- glyph grid ---------- */
.glyphs { padding: clamp(3rem, 8vh, 5rem) 0 clamp(4rem, 10vh, 6rem); border-top: 1px solid var(--rule); }
.glyph-toolbar { display: flex; gap: 0.5rem; padding: 0 clamp(1.25rem, 4vw, 3rem); margin-bottom: 1.4rem; }
.gt-btn {
  font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.55rem 1.1rem; border: 1px solid var(--ink); border-radius: 999px;
  background: transparent; color: var(--ink); cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.gt-btn.is-on { background: var(--ink); color: var(--paper); }
.gt-btn:hover:not(.is-on) { background: rgba(43, 69, 255, 0.1); }
.glyph-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(clamp(3rem, 8vw, 5rem), 1fr));
  border-top: 1px solid var(--rule); border-left: 1px solid var(--rule);
  margin: 0 clamp(1.25rem, 4vw, 3rem);
}
.glyph-cell {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  font-size: clamp(1.4rem, 3.6vw, 2.3rem);
  background: transparent; color: var(--ink); cursor: pointer;
  padding: 0; line-height: 1;
  font-variation-settings: "wght" 320, "wdth" 100;
  transition:
    font-variation-settings 0.5s var(--ease-elastic),
    background 0.18s, color 0.18s;
}
.glyph-grid.gg-serif .glyph-cell {
  font-family: var(--serif);
  font-variation-settings: "wght" 320, "opsz" 90, "SOFT" 0, "WONK" 1;
}
.glyph-cell:hover, .glyph-cell:focus-visible, .glyph-cell.is-hit {
  background: var(--blue); color: var(--paper);
  font-variation-settings: "wght" 880, "wdth" 145;
}
.glyph-grid.gg-serif .glyph-cell:hover,
.glyph-grid.gg-serif .glyph-cell:focus-visible,
.glyph-grid.gg-serif .glyph-cell.is-hit {
  font-variation-settings: "wght" 880, "opsz" 144, "SOFT" 100, "WONK" 1;
}
.glyph-cell:focus-visible { outline: 3px solid var(--ink); outline-offset: -3px; }
.glyph-detail {
  font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.08em;
  color: var(--ink-dim); padding: 1rem clamp(1.25rem, 4vw, 3rem) 0;
  min-height: 2.2rem;
}
.glyph-detail b { color: var(--blue); }

/* ---------- licensing ---------- */
.buy {
  background: var(--ink); color: var(--paper);
  padding: clamp(4rem, 10vh, 6.5rem) 0 clamp(4rem, 8vh, 5.5rem);
}
.sec-title-inv, .sec-note-inv { color: var(--paper); }
.sec-note-inv { color: #b8b5ae; }
.sec-index-inv { color: #9fb0ff; }
.tiers {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr));
  gap: 1.2rem; padding: 0 clamp(1.25rem, 4vw, 3rem); margin-bottom: 1.8rem;
}
.tier {
  border: 1px solid rgba(250, 248, 244, 0.25); border-radius: 12px;
  padding: 1.6rem 1.5rem 1.7rem; position: relative;
  transition: transform 0.4s var(--ease-elastic), border-color 0.25s;
}
.tier:hover { transform: translateY(-6px); border-color: rgba(250, 248, 244, 0.6); }
.tier-hot { border-color: var(--blue); background: rgba(43, 69, 255, 0.14); }
.tier-flag {
  position: absolute; top: -0.8rem; left: 1.2rem;
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase;
  background: var(--blue); color: var(--paper); padding: 0.25rem 0.7rem; border-radius: 999px;
}
.tier h3 {
  font-variation-settings: "wght" 750, "wdth" 120;
  font-size: 1.15rem; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 0.5rem;
}
.tier-price { font-family: var(--serif); font-variation-settings: "wght" 500, "opsz" 90, "SOFT" 0, "WONK" 0; font-size: 2.6rem; margin-bottom: 1rem; }
.tier-price span { font-family: var(--mono); font-size: 0.72rem; color: #b8b5ae; letter-spacing: 0.06em; }
.tier ul { list-style: none; margin-bottom: 1.5rem; }
.tier li { padding: 0.4rem 0; border-bottom: 1px solid rgba(250, 248, 244, 0.12); font-size: 0.92rem; color: #d9d6cf; }
.tier li::before { content: "✳ "; color: var(--blue); }
.tier-hot li::before { color: #8fa0ff; }
.tier-btn {
  width: 100%; padding: 0.85rem 1rem; border-radius: 999px;
  border: 1px solid var(--paper); background: transparent; color: var(--paper);
  font-family: var(--sans); font-variation-settings: "wght" 620, "wdth" 108;
  font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.3s var(--ease-elastic);
}
.tier-btn:hover, .tier-btn:focus-visible { background: var(--blue); border-color: var(--blue); transform: scale(1.04); }
.tier-btn:focus-visible { outline-color: var(--paper); }
.buy-confirm {
  font-family: var(--mono); font-size: 0.82rem; color: #9fb0ff;
  padding: 0 clamp(1.25rem, 4vw, 3rem); min-height: 1.4rem; margin-bottom: 0.8rem;
}
.buy-fine { font-size: 0.85rem; color: #8f8c85; padding: 0 clamp(1.25rem, 4vw, 3rem); max-width: 44rem; }

/* ---------- footer ---------- */
.footer {
  border-top: 1px solid var(--rule); text-align: center;
  padding: 3rem 1.5rem 2.5rem; font-size: 0.9rem; color: var(--ink-dim);
}
.footer-word { color: var(--blue); font-size: 2rem; line-height: 1; margin-bottom: 0.8rem; }
.footer nav { margin: 0.6rem 0 1.2rem; }
.footer a { color: var(--ink); text-decoration-color: var(--blue); text-underline-offset: 3px; }
.footer a:hover { color: var(--blue); }
.footer-fine { font-size: 0.78rem; max-width: 40rem; margin-inline: auto; }

/* ---------- reveal (JS-driven; must stay visible without JS) ---------- */
.js .reveal-up { opacity: 0; transform: translateY(26px); }
.js.rm .reveal-up { opacity: 1; transform: none; }

/* ---------- guide ---------- */
.guide-body {
  max-width: 46rem; margin-inline: auto;
  padding: 5rem clamp(1.25rem, 5vw, 2rem) 4rem;
}
.guide-body .back {
  font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.08em;
  text-decoration: none; color: var(--blue); display: inline-block; margin-bottom: 2.5rem;
}
.guide-body h1 {
  font-family: var(--serif); font-variation-settings: "wght" 560, "opsz" 144, "SOFT" 0, "WONK" 1;
  font-size: clamp(2.4rem, 6vw, 3.6rem); line-height: 1.05; margin-bottom: 1.2rem;
}
.guide-body h2 {
  font-variation-settings: "wght" 740, "wdth" 115;
  font-size: 1.35rem; margin: 2.6rem 0 0.8rem;
  padding-top: 1.4rem; border-top: 1px solid var(--rule);
}
.guide-body h2::before { content: "✳ "; color: var(--blue); }
.guide-body p, .guide-body li { color: #3a3833; }
.guide-body ul, .guide-body ol { padding-left: 1.3rem; margin: 0.6rem 0 1rem; }
.guide-body li { margin-bottom: 0.45rem; }
.guide-body code {
  font-family: var(--mono); font-size: 0.85em;
  background: rgba(43, 69, 255, 0.08); border-radius: 4px; padding: 0.1em 0.35em;
}
.guide-body a { color: var(--blue); }
.guide-body strong { font-variation-settings: "wght" 680, "wdth" 100; }

/* ---------- 404 ---------- */
.nf {
  min-height: 100svh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  padding: 2rem 1.25rem; gap: 1.2rem;
}
.nf-tofu {
  font-size: clamp(6rem, 22vw, 15rem); line-height: 1;
  font-variation-settings: "wght" 200, "wdth" 100;
  color: var(--blue);
  animation: tofu-throb 2.6s var(--ease-elastic) infinite alternate;
  cursor: crosshair; user-select: none; -webkit-user-select: none;
}
@keyframes tofu-throb {
  from { font-variation-settings: "wght" 200, "wdth" 75; }
  to { font-variation-settings: "wght" 900, "wdth" 150; }
}
.nf-title { font-size: clamp(1.6rem, 4.5vw, 2.6rem); font-variation-settings: "wght" 780, "wdth" 115; }
.nf-code { font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.12em; color: var(--ink-dim); text-transform: uppercase; }
.nf-body { max-width: 30rem; color: var(--ink-dim); }
.nf-body em { font-style: normal; color: var(--blue); }
.nf-link {
  display: inline-block; text-decoration: none; margin-top: 0.6rem;
  background: var(--ink); color: var(--paper); padding: 0.8rem 1.6rem; border-radius: 999px;
  font-variation-settings: "wght" 620, "wdth" 108; font-size: 0.85rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  transition: background 0.2s, transform 0.3s var(--ease-elastic);
}
.nf-link:hover, .nf-link:focus-visible { background: var(--blue); transform: scale(1.05); }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
  .hint-line::after { animation: none; }
  .nf-tofu { animation: none; font-variation-settings: "wght" 560, "wdth" 120; }
  .glyph-cell, .spec-stage, .tier, .preset, .tier-btn, .nav-buy, .wonk-dot, .face-cta { transition-duration: 0.01s; }
  .hl { --w: 620; --d: 112; }
}

/* ---------- small screens ---------- */
@media (max-width: 640px) {
  .br-d { display: none; }
  .hero { padding-top: 5.2rem; }
  .hero-word { letter-spacing: 0; }
  .hero-foot { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .spec-bar { flex-wrap: wrap; }
  .face-demo { min-height: 13rem; }
  .face-demo-word { font-size: clamp(5rem, 26vw, 9rem); }
}
