/* hunkworks.app — Organic, the app's default theme, sampled from
   crates/hunkworks-app/src/palette.rs (ORGANIC). Light only; no toggle,
   matching the app's default. No framework, no build step. */

:root {
  --bg: #f5ead8;            /* ground */
  --surface: #ebddc5;       /* elevated surface — panels, pre blocks */
  --raised: #f9f4ed;        /* n[0], the highest plane */
  --ink: #201e1d;           /* text */
  --ink-soft: #645c50;      /* n[6] — secondary text, AA on ground */
  --divider: #d3c9ba;
  --accent: #c67139;        /* accent_solid — fills, borders */
  --accent-ink: #b2622d;    /* a[5] — links and button fills, AA on ground */
  --accent-deep: #8c491a;   /* a[6] — hover, small text on accent tint */
  --on-accent: #f5ead8;     /* on_accent */
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --sans: "Figtree", -apple-system, "Helvetica Neue", sans-serif;
}

@font-face {
  font-family: "Figtree";
  src: url("../fonts/figtree-latin.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+21C4,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "Figtree";
  src: url("../fonts/figtree-semibold-latin.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+21C4,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrainsmono-latin.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF,U+2000-206F,U+2190-2193,U+2212,U+2500-257F,U+25A0-25FF,U+27E6-27FF,U+FEFF,U+FFFD;
}

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

body {
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 68rem;
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2.5rem);
}

a { color: var(--accent-deep); text-underline-offset: 0.2em; }
a:hover { color: var(--accent-ink); }

code, kbd, pre { font-family: var(--mono); font-size: 0.875em; }
code { background: var(--surface); border-radius: 5px; padding: 0.1em 0.35em; }
kbd {
  background: var(--raised);
  border: 1px solid var(--divider);
  border-bottom-width: 2px;
  border-radius: 6px;
  padding: 0.05em 0.45em;
  font-size: 0.8em;
  white-space: nowrap;
}

/* Hero */

.hero { padding-block: clamp(4rem, 12vw, 8rem) clamp(2.5rem, 7vw, 4.5rem); }
.wordmark {
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent-deep);
  margin-bottom: 1.25rem;
}
.hero h1 {
  font-size: clamp(2.3rem, 6vw, 3.6rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
  max-width: 18ch;
}
.hero .sub {
  font-size: clamp(1.15rem, 2.5vw, 1.4rem);
  color: var(--ink-soft);
  max-width: 44ch;
  margin-top: 1.25rem;
}
.hero .meta { margin-top: 1.5rem; color: var(--ink-soft); }
.hero .meta strong { color: var(--ink); }

/* Sections */

section { padding-block: clamp(2.75rem, 7vw, 5rem); }
section > .wrap > h2 {
  font-size: clamp(1.55rem, 3.5vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 1.5rem;
}
#loop, #buy { background: var(--raised); }
#loop p, #buy .fineprint { color: var(--ink-soft); }

#how article { margin-top: clamp(2.25rem, 5vw, 3.5rem); }
#how article:first-of-type { margin-top: 0; }
#how h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}
#how article > p { max-width: 60ch; }

.panel {
  background: var(--surface);
  border-radius: 12px;
  padding: clamp(1rem, 3vw, 1.5rem);
  overflow-x: auto;
  margin-top: 1.25rem;
  font-size: 0.8rem;
  line-height: 1.5;
}
pre.panel code { background: none; padding: 0; font-size: inherit; }

/* Keys tables */

#keys h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 2.25rem 0 0.75rem;
}
#keys table { border-collapse: collapse; width: 100%; max-width: 56rem; }
#keys td {
  padding: 0.55rem 1rem 0.55rem 0;
  border-bottom: 1px solid var(--divider);
  vertical-align: top;
}
#keys td:first-child { white-space: nowrap; width: 1%; }
#keys tr:last-child td { border-bottom: none; }

/* Buy */

#buy .price {
  font-size: clamp(2.6rem, 6vw, 3.6rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--accent-deep);
}
#buy .price span { font-size: 0.45em; color: var(--ink-soft); letter-spacing: 0; }
#buy .wrap > p:not(.price) { max-width: 52ch; margin-top: 1rem; }

/* Footer */

footer {
  border-top: 1px solid var(--divider);
  padding-block: 2.5rem 3rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
}
footer nav { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
footer nav a { font-weight: 600; text-decoration: none; }
footer nav a:hover { text-decoration: underline; }
footer .colophon { margin-bottom: 0.75rem; }

/* The download button, styled now, wired when /dl serves (plan 21 §4.1). */
.button {
  display: inline-block;
  background: var(--accent-ink);
  color: var(--on-accent);
  font-weight: 600;
  text-decoration: none;
  border-radius: 10px;
  padding: 0.7em 1.4em;
  margin-top: 1.75rem;
}
.button:hover { background: var(--accent-deep); color: var(--on-accent); }

@media (max-width: 48rem) {
  #keys td { padding-right: 0.5rem; }
}
