/* Moonbench storefront. Mobile-first, light/dark aware, no external fonts. */
:root {
  --bg: #fbf7f0;
  --surface: #ffffff;
  --surface-2: #f3ede2;
  --ink: #1d2130;
  --muted: #565b6a;
  --line: #e2d9ca;
  --accent: #b54708;        /* links + primary buttons (white text passes AA) */
  --accent-ink: #ffffff;
  --accent-soft: #fde9da;
  --moon: #f2c14e;
  --night: #24304f;
  --error: #b42318;
  --ok: #1d7a46;
  --focus: #2563eb;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(29, 33, 48, .06), 0 6px 20px rgba(29, 33, 48, .06);
  --font: ui-rounded, "SF Pro Rounded", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12151f;
    --surface: #1a1f2d;
    --surface-2: #222839;
    --ink: #ece7dc;
    --muted: #a9adba;
    --line: #2f3649;
    --accent: #ff9f5c;
    --accent-ink: #1a1208;
    --accent-soft: #3a2a20;
    --moon: #f5cf6e;
    --night: #0c0f17;
    --error: #ff8a80;
    --ok: #6fd39b;
    --focus: #8ab4ff;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 1.0625rem/1.6 var(--font);
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; outline: none; }
img, svg { max-width: 100%; }
a { color: var(--accent); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 6vw, 2.8rem); }
h2 { font-size: clamp(1.35rem, 4vw, 1.7rem); margin-top: .2em; }
h3, .h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 720px; }
.section { padding-top: 2rem; padding-bottom: 2rem; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; font-weight: 700; color: var(--accent); margin-bottom: .5em; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.skip { position: absolute; left: -999px; top: 0; background: var(--surface); padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: 8px; top: 8px; }

/* banner, header, footer */
.banner { background: var(--night); color: #f5efe2; font-size: .85rem; text-align: center; padding: .45rem 16px; }
.site-header { border-bottom: 1px solid var(--line); background: var(--surface); }
.header-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .25rem 1rem; padding-top: .6rem; padding-bottom: .6rem; }
.wordmark { display: inline-flex; align-items: center; gap: .5rem; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.3rem; letter-spacing: -.02em; }
.wordmark .mark { width: 40px; height: 32px; }
.mark-moon { fill: var(--moon); }
.mark-bench { fill: var(--accent); }
.nav { list-style: none; display: flex; flex-wrap: wrap; gap: .1rem .9rem; margin: 0; padding: 0; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; display: inline-block; padding: .35rem 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--accent); }
.site-footer { border-top: 1px solid var(--line); margin-top: 2rem; padding: 1.5rem 0 2rem; background: var(--surface); font-size: .95rem; }
.footer-links { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; }
.fine { color: var(--muted); font-size: .85rem; margin: 0; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 48px; padding: .7rem 1.3rem; border-radius: 999px;
  border: 2px solid var(--accent); background: transparent; color: var(--accent);
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--accent-soft); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent); filter: brightness(1.08); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn-block { width: 100%; }
.cta-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }

/* cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); }
.cards { display: grid; gap: 1rem; }
.product { display: flex; flex-direction: column; align-items: flex-start; }
.product h3 a { color: var(--ink); text-decoration: none; }
.product .price { font-weight: 700; margin-top: auto; }
.steps { padding-left: 1.3rem; }
.steps li { margin-bottom: .6rem; }
.honesty { border-left: 6px solid var(--moon); }
.notice, .info { background: var(--accent-soft); border-radius: 10px; padding: .75rem 1rem; }

/* hero */
.hero { background: linear-gradient(180deg, var(--surface-2), var(--bg)); padding: 2rem 0 1rem; }
.hero-grid { display: grid; gap: 1.5rem; align-items: center; }
.hero-art svg { width: 100%; max-width: 360px; display: block; margin: 0 auto; }
.hero-art { margin: 0; }
.art-moon { fill: var(--moon); }
.art-line { stroke: var(--muted); stroke-width: 2; }
.art-peg rect { fill: #F26A1B; }
.art-peg-2 rect { fill: #2b2b2e; }
@media (prefers-color-scheme: dark) { .art-peg-2 rect { fill: #9b9ca0; } }
.art-bench { fill: var(--accent); }

/* forms */
fieldset { border: 0; padding: 0; margin: 0 0 1.5rem; min-width: 0; }
legend { font-weight: 800; font-size: 1.15rem; margin-bottom: .6rem; padding: 0; }
.field { margin-bottom: 1rem; }
.field label, .group-label { display: block; font-weight: 600; margin-bottom: .3rem; }
.group-label { margin: .75rem 0 .3rem; }
.req { font-weight: 400; color: var(--muted); font-size: .9rem; }
input[type="text"], input[type="email"], input[type="number"], input[type="date"], select, textarea {
  width: 100%; min-height: 48px; padding: .6rem .8rem; font: inherit; color: var(--ink);
  background: var(--surface); border: 2px solid var(--line); border-radius: 10px;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--focus); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 30%, transparent); }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--error); }
input[type="file"] { font: inherit; max-width: 100%; }
.hint { color: var(--muted); font-size: .9rem; margin: .3rem 0 0; }
.field-error { color: var(--error); font-size: .9rem; font-weight: 600; margin: .3rem 0 0; min-height: 0; }
.field-error:empty { display: none; }
.form-errors { color: var(--error); font-weight: 600; outline: none; }
.form-errors:empty { display: none; }
.form-errors .info { color: var(--ink); font-weight: 400; }
.grid-2 { display: grid; gap: 0 1rem; }
.stack > * + * { margin-top: 0; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* choice cards and swatches (radio inputs stay in the DOM for keyboard + screen readers) */
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: .6rem; }
.choice-wrap, .swatch-wrap { position: relative; }
.choice-wrap input, .swatch-wrap input { position: absolute; opacity: 0; inset: 0; margin: 0; }
.choice { display: flex; flex-direction: column; align-items: center; padding: .75rem .5rem; border: 2px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; }
.choice-main { font-weight: 700; }
.choice-sub { color: var(--muted); font-size: .9rem; }
.choice-wrap input:checked + .choice, .swatch-wrap input:checked + .swatch { border-color: var(--accent); background: var(--accent-soft); }
.choice-wrap input:focus-visible + .choice, .swatch-wrap input:focus-visible + .swatch { outline: 3px solid var(--focus); outline-offset: 2px; }
.swatches { display: flex; flex-wrap: wrap; gap: .5rem; }
.swatch { display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .8rem .45rem .5rem; border: 2px solid var(--line); border-radius: 999px; cursor: pointer; background: var(--surface); }
.swatch-dot { display: inline-block; width: 1.4rem; height: 1.4rem; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .35); flex: none; }
.colourway { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: 0; padding: .7rem .9rem; border: 2px solid var(--line); border-radius: 12px; background: var(--surface); font-weight: 600; }
.colourway .muted { font-weight: 400; }

/* configurator */
.configurator { display: grid; gap: 1.5rem; margin-top: 1rem; }
.preview { padding: 1rem; background: radial-gradient(circle at 80% 15%, color-mix(in srgb, var(--moon) 25%, transparent), transparent 45%), var(--surface); }
.preview svg { display: block; width: 100%; height: auto; aspect-ratio: 79 / 38; }
.preview-caption { text-align: center; margin: .5rem 0 0; font-weight: 600; }
.summary { margin-bottom: 1rem; }
.name-list { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: .35rem; }
.name-list li { background: var(--surface-2); border-radius: 999px; padding: .15rem .7rem; font-size: .95rem; }
.totals { display: grid; grid-template-columns: 1fr auto; gap: .2rem 1rem; margin: 0; }
.totals dd { margin: 0; text-align: right; }
.totals .total { font-weight: 800; border-top: 1px solid var(--line); padding-top: .35rem; margin-top: .2rem; }

/* status */
.status { margin-top: 1.5rem; outline: none; }
.status .note { background: var(--surface-2); border-radius: 10px; padding: .6rem .9rem; }
.sent { margin-bottom: 1.5rem; outline: none; border-left: 6px solid var(--ok); }

/* prose (legal pages) */
.prose h2 { margin-top: 1.6em; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: .45rem; }
.wont-make summary { cursor: pointer; font-weight: 700; }
.wont-make ul { padding-left: 1.2rem; }
details.card { margin: 1rem 0; box-shadow: none; }

@media (min-width: 720px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .hero { padding: 3.5rem 0 2rem; }
  .hero-grid { grid-template-columns: 1.3fr 1fr; }
}
@media (min-width: 900px) {
  .configurator { grid-template-columns: 1.1fr 1fr; align-items: start; }
  .preview-col { position: sticky; top: 1rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .btn, .choice, .swatch, .nav a { transition: background-color .15s, border-color .15s, filter .15s; }
}
@media (prefers-color-scheme: dark) { .swatch-dot { border-color: rgba(255, 255, 255, .55); } }
