/* PineAI — pineai.dev
   System fonts only. No external requests. Light + dark via prefers-color-scheme. */

:root {
  color-scheme: light dark;

  --bg: #f4f0e6;
  --bg-alt: #ece7d9;
  --surface: #fbf9f3;
  --ink: #111512;
  --muted: #4b544e;
  --pine: #1b4d3c;
  --btn-bg: #1b4d3c;
  --btn-bg-hover: #123628;
  --btn-ink: #f4f0e6;
  --accent: #b55a12;
  --accent-text: #9a4a0f;
  --line: rgba(17, 21, 18, 0.14);
  --line-strong: rgba(17, 21, 18, 0.32);
  --topo: rgba(27, 77, 60, 0.6);
  --grid-line: rgba(17, 21, 18, 0.055);
  --band: #0f2b21;
  --band-ink: #f4f0e6;
  --band-muted: #a9bfb3;
  --band-accent: #e9a24f;
  --live-bg: #dce8dd;
  --live-ink: #1b4d3c;
  --dev-bg: #f6e3cf;
  --dev-ink: #8a410b;
  --focus: #9a4a0f;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", "Noto Serif KR", "Noto Serif CJK KR", ui-serif, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --display: var(--serif);
  --display-weight: 500;
  --display-track: -0.028em;

  --max: 1180px;
  --pad: clamp(1.25rem, 4vw, 2.5rem);
  --header-h: 64px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c110e;
    --bg-alt: #101712;
    --surface: #131a16;
    --ink: #eeeadf;
    --muted: #a3ada5;
    --pine: #86c4a3;
    --btn-bg: #86c4a3;
    --btn-bg-hover: #a7dbbf;
    --btn-ink: #0c110e;
    --accent: #e69a4a;
    --accent-text: #e69a4a;
    --line: rgba(238, 234, 223, 0.14);
    --line-strong: rgba(238, 234, 223, 0.34);
    --topo: rgba(134, 196, 163, 0.62);
    --grid-line: rgba(238, 234, 223, 0.05);
    --band: #123a2c;
    --live-bg: #1b3a2e;
    --live-ink: #a7dbbf;
    --dev-bg: #3a2a18;
    --dev-ink: #f0b574;
    --focus: #e69a4a;
  }
}

/* Korean: sans display, tighter, heavier */
html[lang="ko"] {
  --display: var(--sans);
  --display-weight: 700;
  --display-track: -0.04em;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

:lang(ko) {
  word-break: keep-all;
  line-break: strict;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

::selection {
  background: color-mix(in srgb, var(--accent) 32%, transparent);
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.75rem 1.1rem;
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
}

.skip-link:focus {
  top: 0.75rem;
}

.wrap {
  width: 100%;
  max-width: calc(var(--max) + var(--pad) * 2);
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  margin-right: auto;
  text-decoration: none;
  color: var(--ink);
}

.brand svg {
  width: 28px;
  height: 28px;
  color: var(--pine);
}

.brand-name {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-list a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.85rem;
  font-size: 0.95rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav-list a::after {
  content: "";
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: 9px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.nav-list a:hover,
.nav-list a:focus-visible {
  color: var(--ink);
}

.nav-list a:hover::after,
.nav-list a:focus-visible::after {
  transform: scaleX(1);
}

/* Language toggle */
.lang {
  display: inline-flex;
  align-items: center;
  margin-left: 0.5rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}

.lang button {
  position: relative;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: 600 0.78rem/1 var(--mono);
  letter-spacing: 0.06em;
  cursor: pointer;
  border-radius: 999px;
}

.lang button::before {
  content: "";
  position: absolute;
  inset: 7px 3px;
  border-radius: 999px;
  background: transparent;
  transition: background 0.2s ease;
}

.lang button span {
  position: relative;
}

.lang button[aria-pressed="true"] {
  color: var(--btn-ink);
}

.lang button[aria-pressed="true"]::before {
  background: var(--btn-bg);
}

.lang button:not([aria-pressed="true"]):hover {
  color: var(--ink);
}

.menu-btn {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.menu-btn svg {
  width: 24px;
  height: 24px;
}

.menu-btn .icon-close {
  display: none;
}

.menu-btn[aria-expanded="true"] .icon-open {
  display: none;
}

.menu-btn[aria-expanded="true"] .icon-close {
  display: block;
}

@media (max-width: 779px) {
  html.js .menu-btn {
    display: inline-flex;
  }

  html.js .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 0.5rem var(--pad) 1.25rem;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
  }

  html.js .site-nav[data-open] {
    display: block;
  }

  html.js .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  html.js .nav-list a {
    display: flex;
    min-height: 52px;
    padding: 0;
    font-family: var(--display);
    font-size: 1.35rem;
    font-weight: var(--display-weight);
    color: var(--ink);
    border-bottom: 1px solid var(--line);
  }

  html.js .nav-list a::after {
    display: none;
  }

  /* No-JS fallback: nav wraps under the brand row */
  html:not(.js) .header-inner {
    flex-wrap: wrap;
    padding-bottom: 0.25rem;
  }

  html:not(.js) .site-nav {
    order: 5;
    width: 100%;
  }

  html:not(.js) .nav-list {
    flex-wrap: wrap;
  }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 52px;
  padding: 0 1.6rem;
  border: 1px solid transparent;
  border-radius: 6px;
  font: 600 1rem/1 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn svg {
  width: 18px;
  height: 18px;
  transition: transform 0.25s ease;
}

.btn:hover svg {
  transform: translateX(3px);
}

.btn-primary {
  background: var(--btn-bg);
  color: var(--btn-ink);
}

.btn-primary:hover {
  background: var(--btn-bg-hover);
}

.btn-ghost {
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--ink);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 30%, transparent 100%);
}

.topo {
  position: absolute;
  top: 50%;
  right: -14%;
  width: min(1000px, 120vw);
  aspect-ratio: 1.12;
  transform: translateY(-52%);
  color: var(--topo);
  -webkit-mask-image: radial-gradient(closest-side, #000 55%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 55%, transparent 100%);
}

.hero-inner {
  position: relative;
  padding-top: clamp(3.5rem, 9vw, 7.5rem);
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1.75rem;
  font: 500 0.78rem/1.4 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow::before {
  content: "";
  width: 2.25rem;
  height: 1px;
  background: var(--accent);
}

:lang(ko) .eyebrow,
:lang(ko) .sec-label,
:lang(ko) .facts dt,
:lang(ko) .badge,
:lang(ko) .about-list dt {
  letter-spacing: 0.02em;
  text-transform: none;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-track);
  text-wrap: balance;
}

h1 {
  max-width: 14ch;
  font-size: clamp(2.7rem, 1.2rem + 7vw, 6rem);
  line-height: 1.02;
}

:lang(ko) h1 {
  max-width: 13ch;
  line-height: 1.16;
}

h1 .l1,
h1 .l2 {
  display: block;
}

h1 .l2 {
  font-style: italic;
  color: var(--accent-text);
}

:lang(ko) h1 .l2 {
  font-style: normal;
}

.lede {
  max-width: 38rem;
  margin: 1.75rem 0 0;
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.3rem);
  line-height: 1.6;
  color: var(--muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2.25rem;
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: clamp(3rem, 7vw, 5.5rem) 0 0;
  padding: 0;
  border-top: 1px solid var(--line-strong);
}

.facts > div {
  padding: 1.1rem 1.25rem 0 0;
}

.facts > div + div {
  padding-left: 1.25rem;
  border-left: 1px solid var(--line);
}

.facts dt {
  margin: 0 0 0.35rem;
  font: 500 0.72rem/1.4 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.facts dd {
  margin: 0;
  font-family: var(--display);
  font-weight: var(--display-weight);
  font-size: clamp(1.05rem, 0.9rem + 0.6vw, 1.4rem);
  line-height: 1.3;
  letter-spacing: -0.015em;
}

@media (max-width: 639px) {
  .facts {
    grid-template-columns: 1fr;
  }

  .facts > div,
  .facts > div + div {
    padding: 0.9rem 0;
    border-left: 0;
  }

  .facts > div + div {
    border-top: 1px solid var(--line);
  }

  .topo {
    right: -40%;
    opacity: 0.55;
  }
}

/* ---------- Sections ---------- */

.section {
  padding-block: clamp(4.5rem, 9vw, 8rem);
}

.section-alt {
  background: var(--bg-alt);
  border-block: 1px solid var(--line);
}

.sec-label {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 0 0 1.5rem;
  font: 500 0.78rem/1.4 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.sec-label .num {
  color: var(--accent-text);
}

.sec-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

h2 {
  max-width: 20ch;
  font-size: clamp(2rem, 1.2rem + 3.4vw, 3.6rem);
  line-height: 1.08;
}

:lang(ko) h2 {
  line-height: 1.22;
}

.section-intro {
  max-width: 40rem;
  margin: 1.25rem 0 0;
  color: var(--muted);
  font-size: 1.125rem;
}

/* ---------- Product cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
  margin: clamp(2.5rem, 5vw, 3.75rem) 0 0;
  padding: 0;
  list-style: none;
}

.card {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1.5rem 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.card:nth-child(n + 4) {
  grid-column: span 3;
}

.card:hover {
  border-color: var(--pine);
}

.card-dev-only {
  border-style: dashed;
  border-color: var(--line-strong);
  background: transparent;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.idx {
  font: 500 0.8rem/1 var(--mono);
  letter-spacing: 0.1em;
  color: var(--muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.38rem 0.75rem;
  border-radius: 999px;
  font: 600 0.7rem/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.badge-live {
  background: var(--live-bg);
  color: var(--live-ink);
}

.badge-dev {
  background: var(--dev-bg);
  color: var(--dev-ink);
}

.badge-dev .dot {
  background: transparent;
  border: 1.5px solid currentColor;
}

@media (prefers-reduced-motion: no-preference) {
  .badge-live .dot {
    animation: pulse 2.6s ease-out infinite;
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 45%, transparent);
  }
  70%,
  100% {
    box-shadow: 0 0 0 7px transparent;
  }
}

.card-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.15rem 0.75rem;
  font-size: clamp(1.5rem, 1.2rem + 0.9vw, 1.9rem);
  line-height: 1.15;
}

.card-title .alt {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--muted);
}

html[lang="ko"] .card-title .primary:not(:only-child) {
  order: 2;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--muted);
}

html[lang="ko"] .card-title .alt {
  order: 1;
  font-family: var(--display);
  font-size: clamp(1.5rem, 1.2rem + 0.9vw, 1.9rem);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-track);
  color: var(--ink);
}

.card-desc {
  flex: 1;
  margin: 0.9rem 0 1.5rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
}

.card-foot {
  display: flex;
  align-items: center;
  min-height: 56px;
  margin-top: auto;
  border-top: 1px solid var(--line);
}

.card-link {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 56px;
  font: 500 0.9rem/1.3 var(--mono);
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}

.card-link svg {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--accent-text);
  transition: transform 0.25s ease;
}

.card-link:hover span:first-child {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
}

.card-link:hover svg {
  transform: translate(3px, -3px);
}

.no-link {
  font: 500 0.85rem/1.3 var(--mono);
  color: var(--muted);
}

@media (max-width: 1039px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .card,
  .card:nth-child(n + 4) {
    grid-column: span 1;
  }

  .card:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 639px) {
  .cards {
    grid-template-columns: 1fr;
  }

  .card:last-child {
    grid-column: auto;
  }
}

/* ---------- How we build ---------- */

.points {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: clamp(2.5rem, 5vw, 3.75rem) 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line-strong);
}

.point {
  padding: 1.75rem 2rem 0 0;
}

.point + .point {
  padding-left: 2rem;
  border-left: 1px solid var(--line);
}

.point .n {
  display: block;
  margin-bottom: 1.1rem;
  font: 500 0.85rem/1 var(--mono);
  letter-spacing: 0.1em;
  color: var(--accent-text);
}

.point h3 {
  font-size: clamp(1.35rem, 1.1rem + 0.8vw, 1.7rem);
  line-height: 1.2;
}

.point p {
  margin: 0.8rem 0 0;
  color: var(--muted);
}

.fineprint {
  max-width: 44rem;
  margin: 2.75rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

@media (max-width: 859px) {
  .points {
    grid-template-columns: 1fr;
  }

  .point,
  .point + .point {
    padding: 1.5rem 0;
    border-left: 0;
  }

  .point + .point {
    border-top: 1px solid var(--line);
  }
}

/* ---------- About ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
  margin-top: 0.25rem;
}

.about-copy p {
  max-width: 34rem;
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: 1.125rem;
}

.about-list {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line-strong);
}

.about-list > div {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
}

.about-list dt {
  font: 500 0.75rem/1.7 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.about-list dd {
  margin: 0;
  font-family: var(--display);
  font-weight: var(--display-weight);
  font-size: 1.25rem;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

@media (max-width: 859px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 479px) {
  .about-list > div {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
}

/* ---------- Contact band ---------- */

.band {
  position: relative;
  overflow: hidden;
  background: var(--band);
  color: var(--band-ink);
}

.band .topo {
  right: auto;
  left: -22%;
  top: 50%;
  color: rgba(169, 191, 179, 0.5);
  transform: translateY(-50%) scaleX(-1);
}

.band .wrap {
  position: relative;
}

.band .sec-label {
  color: var(--band-muted);
}

.band .sec-label .num {
  color: var(--band-accent);
}

.band .sec-label::after {
  background: rgba(244, 240, 230, 0.2);
}

.band h2 {
  max-width: 16ch;
}

.band .section-intro {
  color: var(--band-muted);
}

.email-link {
  display: inline-flex;
  align-items: center;
  min-height: 56px;
  margin-top: 2rem;
  font-family: var(--display);
  font-weight: var(--display-weight);
  font-size: clamp(1.5rem, 0.8rem + 3.6vw, 2.9rem);
  letter-spacing: -0.02em;
  color: var(--band-ink);
  text-decoration: underline;
  text-decoration-color: var(--band-accent);
  text-decoration-thickness: 3px;
  text-underline-offset: 8px;
  overflow-wrap: anywhere;
  transition: color 0.2s ease;
}

.email-link:hover {
  color: var(--band-accent);
}

.band :focus-visible {
  outline-color: var(--band-accent);
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 1.75rem 2.25rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
}

.footer-inner p {
  margin: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.6rem;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 4px;
}

.footer-links a:hover {
  text-decoration-color: var(--accent);
}

/* ---------- Document pages (privacy, 404) ---------- */

.doc {
  padding-block: clamp(3.5rem, 8vw, 6.5rem) clamp(4rem, 9vw, 7rem);
}

.doc h1 {
  max-width: 18ch;
  font-size: clamp(2.3rem, 1.2rem + 5vw, 4.25rem);
}

.doc .updated {
  margin: 1.25rem 0 0;
  font: 500 0.8rem/1.4 var(--mono);
  letter-spacing: 0.06em;
  color: var(--muted);
}

.doc-body {
  max-width: 44rem;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
}

.doc-body section {
  padding-block: 1.75rem;
  border-top: 1px solid var(--line);
}

.doc-body h2 {
  max-width: none;
  font-size: clamp(1.35rem, 1.1rem + 0.8vw, 1.7rem);
  line-height: 1.25;
}

.doc-body p {
  margin: 0.8rem 0 0;
  color: var(--muted);
}

.doc-body p strong {
  color: var(--ink);
  font-weight: 600;
}

.doc-body a,
.inline-link {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.lead-note {
  margin: 1.75rem 0 0;
  padding: 1.25rem 1.5rem;
  border-left: 3px solid var(--accent);
  background: var(--surface);
  font-size: 1.1rem;
  max-width: 44rem;
}

.lead-note p {
  margin: 0;
  color: var(--ink);
}

.notfound {
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - var(--header-h) - 120px);
  min-height: calc(100svh - var(--header-h) - 120px);
  display: flex;
  align-items: center;
}

.notfound .code {
  display: block;
  margin-bottom: 1rem;
  font: 500 0.9rem/1 var(--mono);
  letter-spacing: 0.18em;
  color: var(--accent-text);
}

.notfound .hero-inner {
  width: 100%;
}

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: no-preference) {
  .hero-inner > * {
    animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .hero-inner > :nth-child(2) {
    animation-delay: 0.08s;
  }

  .hero-inner > :nth-child(3) {
    animation-delay: 0.18s;
  }

  .hero-inner > :nth-child(4) {
    animation-delay: 0.28s;
  }

  .hero-inner > :nth-child(5) {
    animation-delay: 0.4s;
  }

  .topo {
    animation: settle 2.4s ease-out both;
  }

  @supports (animation-timeline: view()) {
    .reveal {
      animation: rise-soft linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 40%;
    }
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes rise-soft {
  from {
    opacity: 0.8;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes settle {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
