/* ── tokens ──────────────────────────────────────────────────────────────
   Light is the base. Dark redefines tokens only, in both the un-stamped
   (system) case and the explicitly-stamped case, so all three viewer states
   resolve as a complete set. No component styles live inside a theme block. */
:root {
  --ground:  #f6f7f9;
  --surface: #ffffff;
  --ink:     #14181f;
  --muted:   #5b6572;
  --faint:   #8a929d;
  --line:    #dde1e7;
  --rule:    #c8ced7;
  --accent:  #a63028;

  --sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --mono: "Cascadia Mono", "SF Mono", ui-monospace, Consolas, "Roboto Mono", monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground:  #101318;
    --surface: #171b22;
    --ink:     #e8ebf0;
    --muted:   #99a3b0;
    --faint:   #6f7885;
    --line:    #262c36;
    --rule:    #333b47;
    --accent:  #e0655a;
  }
}
:root[data-theme="dark"] {
  --ground:  #101318;
  --surface: #171b22;
  --ink:     #e8ebf0;
  --muted:   #99a3b0;
  --faint:   #6f7885;
  --line:    #262c36;
  --rule:    #333b47;
  --accent:  #e0655a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 46rem;
  margin: 0 auto;
  padding: clamp(2.5rem, 7vw, 5.5rem) clamp(1.25rem, 5vw, 2rem) 4rem;
  display: flex;
  flex-direction: column;
  gap: clamp(2.75rem, 6vw, 4rem);
}

/* ── masthead ─────────────────────────────────────────────────────────── */
.mast { display: flex; flex-direction: column; gap: 1.25rem; }

.wordmark {
  font-family: var(--serif);
  font-size: clamp(2.1rem, 6vw, 2.9rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.05;
  margin: 0;
}
.wordmark .zr { color: var(--accent); }

.mast-rule {
  height: 2px;
  background: var(--ink);
  width: 100%;
}

.thesis {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2.6vw, 1.4rem);
  line-height: 1.45;
  color: var(--ink);
  margin: 0;
  max-width: 34ch;
  text-wrap: balance;
}

/* ── section furniture: a legend sitting on a hairline, like a form ────── */
section { display: flex; flex-direction: column; gap: 1rem; }

.legend {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0;
  font-weight: 400;
}
.legend::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

p { margin: 0; max-width: 64ch; }
p + p { margin-top: 0.9rem; }
.muted { color: var(--muted); }

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ── the product block, shaped like the fieldset it fills ─────────────── */
.product {
  border: 1px solid var(--rule);
  background: var(--surface);
  padding: 1.6rem 1.5rem 1.5rem;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.product-legend {
  position: absolute;
  top: -0.62rem;
  left: 1.1rem;
  background: var(--surface);
  padding: 0 0.55rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}
.product h3 {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
}
.tagline {
  font-family: var(--serif);
  font-style: italic;
  color: var(--muted);
  margin: -0.4rem 0 0;
}

/* status reads from the word and the border, never from hue alone */
.status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  align-self: flex-start;
  border: 1px solid var(--rule);
  padding: 0.2rem 0.6rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.status::before {
  content: "";
  width: 0.42rem; height: 0.42rem;
  border: 1px solid currentColor;
  transform: rotate(45deg);
}

.price {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.92rem;
  color: var(--ink);
  padding-top: 0.2rem;
  border-top: 1px solid var(--line);
  margin-top: 0.2rem;
}
.price .note { color: var(--faint); }

/* ── principles: numbered only because they are not a sequence ─────────── */
.principles { display: flex; flex-direction: column; gap: 1.4rem; }
.principle { display: flex; flex-direction: column; gap: 0.35rem; }
.principle h3 {
  font-family: var(--serif);
  font-size: 1.12rem;
  font-weight: 600;
  margin: 0;
}

/* ── contact ──────────────────────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(6.5rem, max-content) 1fr;
  gap: 0.55rem 1.5rem;
  align-items: baseline;
}
.contact-grid dt {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}
.contact-grid dd { margin: 0; }

footer {
  border-top: 1px solid var(--line);
  padding-top: 1.25rem;
  font-size: 0.85rem;
  color: var(--faint);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
}
footer .mono { font-family: var(--mono); font-size: 0.78rem; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ── prose pages: terms, refunds ──────────────────────────────────────── */
.doc { display: flex; flex-direction: column; gap: 2rem; }

.doc h2 {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0 0 0.6rem;
  letter-spacing: -0.01em;
}
.doc section { gap: 0; }

.doc ul { margin: 0.7rem 0 0; padding-left: 1.15rem; max-width: 64ch; }
.doc li { margin-bottom: 0.45rem; }
.doc li::marker { color: var(--faint); }

.updated {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

/* Back-link doubles as the page's breadcrumb; no separate nav bar needed
   on a site this small. */
.back {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
}
.back:hover { text-decoration: underline; }

/* The one clause a reader must not skim past. Marked by a rule and a label,
   not by colour alone. */
.callout {
  border-left: 3px solid var(--accent);
  padding: 0.15rem 0 0.15rem 1rem;
  margin-top: 0.9rem;
  max-width: 64ch;
}
.callout .label {
  display: block;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.25rem;
}
