/* ============================================================
   PROPER PAGES — Starry Night design system
   Palette borrowed from Van Gogh, Starry Night Over the Rhône.
   All colour flows through CSS custom properties; dawn.js drives
   them with scroll. Without JS (or reduced motion) the site sits
   in the static lamplight-cream theme below.
   ============================================================ */

@font-face { font-family: 'Space Grotesk'; src: url('../fonts/space-grotesk-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Space Grotesk'; src: url('../fonts/space-grotesk-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Source Serif 4'; src: url('../fonts/source-serif-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Source Serif 4'; src: url('../fonts/source-serif-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('../fonts/jetbrains-mono-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }

:root {
  /* static fallback theme = footer state (lamplight cream) */
  --bg: #F1EFDC;
  --h: #203020;
  --text: #203020;
  --muted: #5A6349;
  --accent: #9A8616;
  --accent-ink: #F5F3E6;
  --rule: #C9C6B2;
  --card: rgba(255,255,255,.35);

  --font-head: 'Space Grotesk', sans-serif;
  --font-body: 'Source Serif 4', serif;
  --font-mono: 'JetBrains Mono', monospace;

  --wrap: 68rem;
  --gutter: clamp(1.25rem, 5vw, 4rem);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.1875rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: var(--accent-ink); }

/* ---------- structure ---------- */
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
section + section { border-top: 1px solid var(--rule); }

/* ---------- header ---------- */
.site-head {
  display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 1rem;
  padding: 1.75rem var(--gutter);
  border-bottom: 1px solid var(--rule);
}
.wordmark {
  font-family: var(--font-head); font-weight: 700; font-size: 1.375rem; letter-spacing: -.02em;
  color: var(--h); text-decoration: none;
}
.site-nav a {
  font-family: var(--font-head); font-weight: 500; font-size: .875rem;
  color: var(--text); text-decoration: none; margin-left: 1.75rem; opacity: .7;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { opacity: 1; text-decoration: underline; text-underline-offset: .3em; }

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--font-head); font-weight: 500; letter-spacing: -.025em; color: var(--h); }
h1 { font-size: clamp(2.5rem, 6.5vw, 4rem); line-height: 1.08; max-width: 20ch; }
h2 { font-size: clamp(1.75rem, 4vw, 2.375rem); line-height: 1.15; margin-bottom: 1.5rem; max-width: 26ch; }
h3 { font-size: 1.25rem; margin: 2.25rem 0 .75rem; }
p { max-width: 62ch; }
p + p { margin-top: 1em; }
.lede { font-size: 1.25rem; color: var(--muted); }
.small { font-size: .9375rem; color: var(--muted); }
.mono { font-family: var(--font-mono); font-size: .875rem; color: var(--accent); margin-top: 1.5rem; }
em { font-style: italic; }
a { color: var(--accent); }

/* ---------- hero ---------- */
.hero { padding-block: clamp(4.5rem, 10vw, 7.5rem) clamp(3.5rem, 8vw, 6rem); }
.tagline {
  font-family: var(--font-mono); font-size: .875rem; color: var(--accent);
  letter-spacing: .02em; margin-bottom: 2.25rem;
}
.hero .sub { margin-top: 2rem; max-width: 38rem; color: var(--muted); font-size: 1.25rem; }
.cta-row { margin-top: 2.75rem; display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.cta-note { font-size: .9375rem; color: var(--muted); font-style: italic; }
.mono-note { font-family: var(--font-mono); font-size: .8125rem; color: var(--accent); margin-top: 2.5rem; opacity: .8; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; font-family: var(--font-head); font-weight: 500; font-size: 1rem;
  background: var(--accent); color: var(--accent-ink);
  padding: 1rem 1.75rem; border-radius: 3px; text-decoration: none;
}
.btn:hover { filter: brightness(1.07); }
.btn-ghost {
  background: transparent; color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}
a[data-c] { cursor: pointer; } /* hrefs assembled by main.js */

/* ---------- stats strip ---------- */
.stats { display: flex; flex-wrap: wrap; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.stat { flex: 1 1 10rem; padding: 1.75rem 1rem 1.5rem; text-align: center; border-left: 1px solid var(--rule); }
.stat:first-child { border-left: none; }
.stat b { display: block; font-family: var(--font-mono); font-weight: 400; font-size: 1.625rem; color: var(--h); }
.stat span { font-family: var(--font-head); font-size: .8125rem; color: var(--muted); }

/* ---------- cards & tables ---------- */
.card { border: 1px solid var(--rule); border-radius: 4px; padding: clamp(1.5rem, 4vw, 3rem); background: var(--card); }
table { width: 100%; border-collapse: collapse; font-size: 1rem; margin-top: 1.5rem; }
caption { text-align: left; font-family: var(--font-head); font-weight: 500; margin-bottom: .75rem; color: var(--h); }
th, td { text-align: left; padding: .8rem 1rem .8rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-family: var(--font-head); font-weight: 500; color: var(--muted); font-size: .875rem; }
td:last-child, th:last-child { padding-right: 0; }
.table-note { font-size: .875rem; color: var(--muted); font-style: italic; margin-top: .9rem; }

/* ---------- process steps ---------- */
.steps { list-style: none; counter-reset: step; margin-top: 2rem; }
.steps li { counter-increment: step; padding: 1.75rem 0; border-top: 1px solid var(--rule); display: grid; grid-template-columns: 4rem 1fr; gap: 1rem; }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-mono); font-size: 1rem; color: var(--accent); padding-top: .35rem;
}
.steps b { display: block; font-family: var(--font-head); font-weight: 500; font-size: 1.25rem; color: var(--h); margin-bottom: .35rem; }
.steps p { color: var(--muted); font-size: 1.0625rem; }

/* ---------- package blocks ---------- */
.package { border-top: 1px solid var(--rule); padding-block: clamp(1.75rem, 4vw, 2.5rem); }
#prices .package:first-of-type { border-top: none; padding-top: 0; }
.package h3 { margin-top: 0; }
.package .price { font-family: var(--font-mono); font-size: 1.0625rem; color: var(--accent); margin: 0 0 1rem; }
.package p { color: var(--muted); font-size: 1.0625rem; }
.terms { font-size: .9375rem; color: var(--muted); margin-top: 1.5rem; font-style: italic; }

/* ---------- figures ---------- */
figure.shot { margin-top: 2.5rem; }
figure.shot img { display: block; max-width: 100%; height: auto; border: 1px solid var(--rule); border-radius: 4px; background: var(--card); }
#proof figure.shot img { max-width: 22rem; }
figure.shot figcaption { font-size: .875rem; color: var(--muted); font-style: italic; margin-top: .75rem; max-width: 44ch; }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--rule); padding: 2.5rem var(--gutter) 3rem; font-size: .875rem; color: var(--muted); }
.site-foot .foot-line { font-style: italic; max-width: 62ch; }
.site-foot .foot-meta { margin-top: 1rem; font-family: var(--font-mono); font-size: .75rem; opacity: .75; }
.site-foot .foot-meta a { white-space: nowrap; }

/* ---------- depth readout + blueprint toggle ---------- */
.depth {
  position: fixed; right: 1.25rem; bottom: .9rem; z-index: 10;
  font-family: var(--font-mono); font-size: .6875rem; color: var(--accent); opacity: .75;
  pointer-events: none;
}
.bp-toggle {
  position: fixed; left: 1.25rem; bottom: .9rem; z-index: 30;
  font-family: var(--font-mono); font-size: .6875rem; color: var(--accent);
  background: transparent; border: 0; padding: 0; cursor: pointer; opacity: .75;
}
.bp-toggle:hover { opacity: 1; }

/* ---------- blueprint mode: the bones under the paint ---------- */
html.blueprint [data-bp] { outline: 1px dashed var(--accent); outline-offset: 3px; position: relative; }
html.blueprint .depth[data-bp], html.blueprint .bp-toggle[data-bp] { position: fixed; }
html.blueprint [data-bp]::before {
  content: attr(data-bp);
  position: absolute; top: -1.5em; left: -3px; z-index: 40;
  font-family: var(--font-mono); font-size: .625rem; line-height: 1.5; letter-spacing: .02em;
  color: var(--accent); background: var(--bg); padding: 0 .35em; white-space: nowrap;
}

/* ---------- helpers ---------- */
.mt-0 { margin-top: 0; }
.center { text-align: center; }
.nobr { white-space: nowrap; }

@media (max-width: 40rem) {
  .site-nav a { margin-left: 1rem; }
  .steps li { grid-template-columns: 3rem 1fr; }
  /* fixed corner toggle would sit on top of the hero CTA on phones —
     on small screens it becomes a footer toy instead */
  .bp-toggle { position: static; display: inline-block; margin: 0 var(--gutter) 2rem; }
  html.blueprint .bp-toggle[data-bp] { position: static; }
}
