/* Hallmark · genre: editorial · macrostructure: Narrative Workflow · theme: Studio (adapted) · enrichment: none · nav: N9 · footer: Ft4
 * tone: editorial, plain-spoken · anchor hue: 120 leaf, accent forest green
 * pre-emit critique: P4 H4 E4 S4 R5 V4
 */
@import url("tokens.css");

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--color-paper); color: var(--color-ink);
  font-family: var(--font-body); font-size: var(--text-md); line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3 { font-family: var(--font-display); font-style: normal; font-weight: 560; line-height: 1.02; letter-spacing: -0.02em; margin: 0; overflow-wrap: anywhere; min-width: 0; }
p { margin: 0; }
a { color: inherit; text-decoration-thickness: var(--rule-hair); text-underline-offset: 0.2em; }
a:hover { color: var(--color-accent); }
:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; border-radius: var(--radius-sm); }
::selection { background: var(--color-accent); color: var(--color-accent-ink); }

.wrap { max-width: var(--page-max); margin-inline: auto; padding-inline: var(--page-gutter); }
.mono { font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: 0.02em; }
.skip { position: absolute; left: -200vw; }
.skip:focus { left: var(--page-gutter); top: var(--space-sm); background: var(--color-paper); padding: var(--space-xs) var(--space-sm); z-index: 5; }

/* ---- nav (N9: wordmark hard-left, one action hard-right, nothing between) ---- */
.nav-edge { display: flex; justify-content: space-between; align-items: center; gap: var(--space-md); padding-block: var(--space-lg); }
.wordmark { font-family: var(--font-display); font-weight: 640; font-size: var(--text-lg); letter-spacing: -0.03em; text-decoration: none; white-space: nowrap; }
.wordmark:hover { color: var(--color-ink); }
.btn {
  display: inline-flex; align-items: center; gap: var(--space-xs); min-height: 2.75rem; padding: 0 var(--space-md);
  border: var(--rule-hair) solid var(--color-ink); border-radius: var(--radius-sm); background: transparent; color: var(--color-ink);
  font-family: var(--font-body); font-size: var(--text-sm); font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.btn:hover { background: var(--color-ink); color: var(--color-paper); }
.btn:active { transform: translateY(1px); }
.btn-solid { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-accent-ink); }
.btn-solid:hover { background: var(--color-ink); border-color: var(--color-ink); color: var(--color-paper); }

/* ---- hero: left-biased statement, then the five stages as one line ---- */
.hero { padding-block: var(--space-2xl) var(--space-3xl); }
.hero h1 { font-size: var(--text-display); max-width: 11ch; font-weight: 520; }
.hero h1 b { font-weight: inherit; color: var(--color-accent); }
.hero-foot { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--space-xl); align-items: end; margin-top: var(--space-2xl); }
.lede { font-size: var(--text-lg); line-height: 1.45; max-width: var(--measure); color: var(--color-muted); }
.lede strong { color: var(--color-ink); font-weight: 600; }
.route { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2xs); justify-self: end; color: var(--color-muted); }
.route a { display: flex; gap: var(--space-md); text-decoration: none; padding-block: var(--space-2xs); white-space: nowrap; }
.route a span { color: var(--color-neutral); min-width: 2.2rem; }
.route a:hover { color: var(--color-accent); }

/* ---- stages: thick numbered rule, giant stage number, explanation + one small artefact ---- */
.stage { border-top: var(--rule-stage) solid var(--color-ink); padding-block: var(--space-lg) var(--space-3xl); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-xl) var(--space-2xl); }
.stage-no { font-family: var(--font-display); font-size: var(--text-stage); font-weight: 300; line-height: 0.9; letter-spacing: -0.04em; color: var(--color-ink); font-variant-numeric: tabular-nums; }
.stage-head h2 { font-size: var(--text-2xl); margin-top: var(--space-md); }
.stage-body { display: grid; gap: var(--space-lg); align-content: start; padding-top: var(--space-sm); }
.stage-body > p { max-width: var(--measure); }
.stage-body > p + p { color: var(--color-muted); }
.stage:nth-of-type(even) .stage-head { order: 2; }
.stage:nth-of-type(even) { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }

/* artefacts: working documents, set in mono on a slightly darker sheet */
.sheet { background: var(--color-paper-2); border: var(--rule-hair) solid var(--color-rule); border-radius: var(--radius-sm); padding: var(--space-md) var(--space-lg); max-width: 36rem; font-family: var(--font-mono); font-size: var(--text-xs); line-height: 1.7; }
.sheet-title { color: var(--color-neutral); margin-bottom: var(--space-xs); }
.sheet dl { margin: 0; display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr); gap: 0 var(--space-lg); }
.sheet dt, .sheet dd { margin: 0; padding-block: var(--space-2xs); border-top: var(--rule-hair) solid var(--color-rule); min-width: 0; overflow-wrap: anywhere; }
.sheet dt { color: var(--color-ink); }
.sheet dd { color: var(--color-muted); }
.sheet dl > :nth-child(-n + 2) { border-top: 0; }
.sheet .ok { color: var(--color-accent); }
.subject { font-family: var(--font-display); font-size: var(--text-lg); line-height: 1.25; letter-spacing: -0.01em; color: var(--color-ink); margin: 0; }
.subject + .subject { margin-top: var(--space-sm); padding-top: var(--space-sm); border-top: var(--rule-hair) solid var(--color-rule); }
.subject small { display: block; font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: 0.02em; color: var(--color-neutral); margin-bottom: var(--space-2xs); }
.subject s { color: var(--color-neutral); text-decoration-thickness: var(--rule-hair); }

/* ---- services: a spec sheet, hairlines between rows ---- */
.band { border-top: var(--rule-stage) solid var(--color-ink); padding-block: var(--space-lg) var(--space-3xl); }
.band > h2 { font-size: var(--text-2xl); max-width: 16ch; margin-bottom: var(--space-xl); }
.spec { margin: 0; }
.spec div { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--space-sm) var(--space-2xl); padding-block: var(--space-md); border-top: var(--rule-hair) solid var(--color-rule); }
.spec div:last-child { border-bottom: var(--rule-hair) solid var(--color-rule); }
.spec dt { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 520; letter-spacing: -0.015em; line-height: 1.1; }
.spec dd { margin: 0; color: var(--color-muted); max-width: var(--measure); }

/* ---- house rules: plain numbered sentences, two uneven columns ---- */
.rules { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: var(--space-2xl); counter-reset: rule; }
.rules li { break-inside: avoid; counter-increment: rule; padding: var(--space-md) 0 var(--space-md) 2.6rem; border-top: var(--rule-hair) solid var(--color-rule); position: relative; }
.rules li::before { content: counter(rule, upper-roman) "."; position: absolute; left: 0; font-family: var(--font-display); color: var(--color-accent); font-weight: 560; }
.rules strong { font-weight: 600; }

/* ---- contact ---- */
.contact { border-top: var(--rule-stage) solid var(--color-ink); padding-block: var(--space-2xl) var(--space-3xl); display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--space-xl) var(--space-2xl); align-items: end; }
.contact h2 { font-size: var(--text-display); font-weight: 520; max-width: 9ch; }
.contact p { color: var(--color-muted); max-width: 26rem; margin-bottom: var(--space-lg); }
.contact .mail { display: block; font-family: var(--font-display); font-size: var(--text-xl); letter-spacing: -0.015em; margin-top: var(--space-md); width: fit-content; }

/* ---- colophon (Ft4) ---- */
.foot-dense { border-top: var(--rule-hair) solid var(--color-rule); padding-block: var(--space-lg) var(--space-xl); color: var(--color-muted); }
.foot-dense p { max-width: 62rem; line-height: 1.8; }
.foot-dense a { white-space: nowrap; }

/* ---- prose page (privacy) ---- */
.prose { padding-block: var(--space-xl) var(--space-3xl); max-width: 44rem; }
.prose h1 { font-size: var(--text-2xl); margin-bottom: var(--space-sm); }
.prose h2 { font-size: var(--text-xl); margin: var(--space-xl) 0 var(--space-sm); line-height: 1.15; }
.prose p, .prose li { color: var(--color-muted); }
.prose p + p { margin-top: var(--space-md); }
.prose ul { padding-left: 1.2rem; margin: var(--space-sm) 0 0; }
.prose li + li { margin-top: var(--space-xs); }
.prose strong { color: var(--color-ink); font-weight: 600; }

/* ---- layout breakpoint: everything becomes one column ---- */
@media (max-width: 60rem) {
  .hero-foot, .stage, .stage:nth-of-type(even), .contact { grid-template-columns: minmax(0, 1fr); }
  .stage:nth-of-type(even) .stage-head { order: 0; }
  .route { justify-self: start; }
  .spec div { grid-template-columns: minmax(0, 1fr); }
  .rules { columns: 1; }
  .stage, .band { padding-bottom: var(--space-2xl); }
}
/* ---- typography breakpoint ---- */
@media (max-width: 40rem) {
  .hero { padding-block: var(--space-xl) var(--space-2xl); }
  .hero-foot { margin-top: var(--space-xl); }
  .sheet { padding: var(--space-sm) var(--space-md); }
  .sheet dl { grid-template-columns: minmax(0, 1fr); }
  .sheet dd { border-top: 0; padding-top: 0; }
  .sheet dl > :nth-child(2) { border-top: 0; }
  .sheet dl > dt:not(:first-child) { border-top: var(--rule-hair) solid var(--color-rule); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
