/* ballastapp.app. Colours follow the Ballast app's own (frontend/src/styles/tokens.css).
   Light by default, dark when the visitor's device is set to dark. System fonts only,
   so the page loads nothing from other companies' servers. */
:root {
  --bg: #F2F5FA; --bg-alt: #E8EDF6; --surface: #FFFFFF;
  --line: #C8D5E5; --line-soft: #DDE5F0;
  --text: #0D1829; --text-dim: #3E5470;
  --accent: #8F5A17; --accent-strong: #0E1A2B; --on-accent: #FFFFFF;
  --brand: #B8782A;
  --ok: #2A7D4F; --ok-bg: #DCF0E5; --room: #2A7A94; --full: #9E600F; --over: #C8382A;
  --error: #B3261E; --focus: #2F62C8; --field-line: #6B7F99;
  --radius: 12px;
  --font-display: 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E1A2B; --bg-alt: #11203A; --surface: #162943;
    --line: #2A4368; --line-soft: #203A5C;
    --text: #EBEFF5; --text-dim: #A9B8D1;
    --accent: #E0A55C; --accent-strong: #E0A55C; --on-accent: #0E1A2B;
    --brand: #D99A4E;
    --ok: #6FBF8B; --ok-bg: #2E5240; --room: #5BA3B8; --full: #E0A94D; --over: #E0654D;
    --error: #FF9C8F; --focus: #8DB4FF; --field-line: #6F89AE;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
/* The form and thank-you box are shown and hidden with the hidden attribute; keep it winning over display rules. */
[hidden] { display: none !important; }
/* Room for the sticky header when jumping to #waitlist or tabbing to a field. */
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.2; font-weight: 600; margin: 0 0 16px; }
h1 { font-size: clamp(32px, 5.5vw, 52px); letter-spacing: -0.01em; max-width: 20ch; }
h2 { font-size: clamp(26px, 3.6vw, 34px); }
h3 { font-size: 20px; }
p { margin: 0 0 16px; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 620px; }
section { padding: 64px 0; }
section + section { border-top: 1px solid var(--line-soft); }

.skip-link { position: absolute; left: 12px; top: -48px; background: var(--surface); color: var(--text); padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip-link:focus { top: 12px; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 5; }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 28px; height: 28px; color: var(--brand); flex: none; }
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 20px; letter-spacing: 0.02em; }
.brand-for { color: var(--text-dim); font-weight: 500; }

/* Buttons */
.button {
  display: inline-block; border: 0; border-radius: 10px; cursor: pointer;
  background: var(--accent-strong); color: var(--on-accent);
  font: 600 17px/1 var(--font-body); padding: 15px 24px; text-decoration: none;
}
.button:hover { color: var(--on-accent); filter: brightness(1.12); }
.button:disabled { opacity: 0.6; cursor: wait; }
.button-small { font-size: 15px; padding: 10px 16px; white-space: nowrap; }

/* Hero */
.hero { padding: 80px 0 72px; }
.eyebrow { color: var(--accent); font-weight: 600; font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase; }
.lede { font-size: 19px; color: var(--text-dim); max-width: 60ch; margin-bottom: 28px; }

/* Problem */
.problem { background: var(--bg-alt); }
.problem-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; max-width: 62ch; }
.problem-list li { padding-left: 28px; position: relative; font-size: 18px; }
.problem-list li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 12px; height: 12px; border-radius: 3px; background: var(--over); }

/* Features */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 28px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card p { color: var(--text-dim); margin: 0; }
.different { max-width: 70ch; font-size: 18px; }
@media (max-width: 820px) { .cards { grid-template-columns: 1fr; } }

/* Demo illustration */
.demo { background: var(--bg-alt); }
.demo-figure { margin: 0; }
/* On a phone the illustration keeps a readable size and scrolls sideways. */
.demo-scroll { overflow-x: auto; border-radius: 14px; }
.demo-art { width: 100%; min-width: 560px; height: auto; display: block; font-family: var(--font-body); }
.legend { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 15px; }
.legend li { display: flex; align-items: center; gap: 8px; }
.swatch { width: 14px; height: 14px; border-radius: 3px; flex: none; }
.art-ok-bg { background: var(--ok); } .art-room-bg { background: var(--room); } .art-full-bg { background: var(--full); } .art-over-bg { background: var(--over); }
.demo-figure figcaption { color: var(--text-dim); font-size: 15px; margin-top: 12px; }
.art-panel { fill: var(--surface); stroke: var(--line); }
.art-title { fill: var(--text); font: 600 20px var(--font-display); }
.art-text { fill: var(--text); }
.art-dim { fill: var(--text-dim); }
.art-num { fill: #FFFFFF; font-weight: 600; }
.art-ok { fill: var(--ok); } .art-room { fill: var(--room); } .art-full { fill: var(--full); } .art-over { fill: var(--over); }
.art-suggest { fill: var(--bg-alt); stroke: var(--line); }
.art-button { fill: var(--accent-strong); }
.art-button-text { fill: var(--on-accent); font-weight: 600; }
@media (prefers-color-scheme: dark) { .art-num { fill: #0E1A2B; } }

/* Form */
.form { display: grid; gap: 18px; margin-top: 24px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; }
.field input[type="email"], .field select {
  width: 100%; font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--field-line); border-radius: 10px; padding: 12px 14px; min-height: 48px;
}
.field select { appearance: auto; }
.field [aria-invalid="true"] { border-color: var(--error); border-width: 2px; }
.field-error { color: var(--error); font-size: 15px; margin: 0; font-weight: 600; }
.field-check { grid-template-columns: auto 1fr; align-items: start; column-gap: 12px; }
.field-check input { width: 22px; height: 22px; margin: 3px 0 0; accent-color: var(--accent-strong); }
.field-check label { font-weight: 400; }
.field-check .field-error { grid-column: 1 / -1; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.turnstile:empty { display: none; }
.form .button { justify-self: start; }
.form-note { margin: 0; color: var(--text-dim); font-size: 15px; }
.form-status { margin: 0; min-height: 1.6em; color: var(--text-dim); }
.thanks { margin-top: 24px; background: var(--surface); border: 1px solid var(--ok); border-left-width: 6px; border-radius: var(--radius); padding: 22px; }
.thanks:focus { outline: none; }
.thanks:focus-visible { outline: 3px solid var(--focus); }
.thanks p { margin: 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: 15px; color: var(--text-dim); }
.footer-row { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: baseline; }
.footer-row p { margin: 0; }
.footer-row nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-note { flex-basis: 100%; font-size: 13px; }

/* Privacy, terms, unsubscribe and 404 pages */
.doc, .simple-page { max-width: 720px; margin: 0 auto; padding: 48px 20px 64px; }
.doc h1, .simple-page h1 { font-size: clamp(30px, 5vw, 40px); }
.doc h2 { font-size: 24px; margin-top: 36px; }
.doc .updated { color: var(--text-dim); }
.doc ul { padding-left: 22px; }
.doc li { margin-bottom: 8px; }
.simple-brand { font-family: var(--font-display); font-weight: 600; font-size: 20px; margin-bottom: 32px; }
.simple-page form { margin-top: 24px; }

@media (max-width: 520px) {
  body { font-size: 16px; }
  section { padding: 48px 0; }
  .hero { padding: 56px 0 48px; }
  .brand-name { font-size: 18px; }
  .form .button { justify-self: stretch; text-align: center; }
}
