/* Signal Beats Noise. One stylesheet for the whole site. Mobile first. */

/* Brand palette: Hei Se Black #142030, Blue Whale #1E3442, Grauzone #85A3B2,
   Siesta Tan #E9D8C8, Pico Eggplant #732553, Stellar Strawberry #FF5C8D. */

:root {
  --bg: #e9d8c8;
  --surface: #f3eae1;
  --text: #142030;
  --muted: #476070;
  --line: rgba(20, 32, 48, 0.14);
  --accent: #732553;
  --accent-ink: #e9d8c8;
  --signal: #ff5c8d;
  --mark-noise: #85a3b2;
  /* Homepage motion: each universe is the next colour in this loop. */
  --zoom-cycle: #1e3442, #ff5c8d, #732553, #85a3b2;
  --radius: 10px;
  --measure: 40rem;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #142030;
    --surface: #1e3442;
    --text: #e9d8c8;
    --muted: #85a3b2;
    --line: rgba(233, 216, 200, 0.14);
    --accent: #ff5c8d;
    --accent-ink: #142030;
    --signal: #ff5c8d;
    --mark-noise: #85a3b2;
    --zoom-cycle: #e9d8c8, #ff5c8d, #85a3b2;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--font);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main { flex: 1; }

.wrap {
  width: 100%;
  max-width: calc(var(--measure) + 2rem);
  margin: 0 auto;
  padding: 0 1rem;
}

a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--surface); padding: 0.5rem 1rem;
}
.skip:focus { left: 1rem; top: 1rem; z-index: 10; }

/* Header */

.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 3.75rem;
}

.brand {
  display: inline-flex; align-items: center; gap: 0.55rem;
  color: var(--text); text-decoration: none;
  font-weight: 650; letter-spacing: -0.01em;
}
.brand svg { flex: none; }
.brand .n { fill: var(--mark-noise); }
.brand .sig { fill: var(--signal); }

.site-nav { display: flex; gap: 1.1rem; font-size: 0.95rem; }
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); }

/* Type */

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 0.6em; }
h1 { font-size: clamp(2rem, 7vw, 3rem); font-weight: 700; }
h2 { font-size: 1.35rem; font-weight: 650; margin-top: 2.2em; }
h3 { font-size: 1.05rem; font-weight: 650; margin-top: 1.6em; }
p, ul, ol { margin: 0 0 1em; }
ul, ol { padding-left: 1.25rem; }
li + li { margin-top: 0.35em; }

.eyebrow {
  font: 600 0.8rem/1 var(--mono); text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--accent); margin-bottom: 1rem;
}
.lead { font-size: 1.2rem; color: var(--muted); max-width: 34rem; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }

/* Sections */

.hero { padding: 3.5rem 0 2.5rem; }
.section { padding: 1rem 0 2.5rem; }
.section .wrap > h2:first-child { margin-top: 0; }

/* Homepage motion: full-bleed band under the hero, drawn by assets/zoom.js. */
.zoom { margin: 0 0 3rem; border-block: 1px solid var(--line); }
.zoom canvas { display: block; width: 100%; height: clamp(260px, 60vw, 460px); }
.zoom canvas { opacity: 0; transition: opacity 0.6s ease; }
.zoom canvas.ready { opacity: 1; }

.cards { display: grid; gap: 1rem; margin: 0; padding: 0; list-style: none; }
.cards li { margin: 0; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.card h3 { margin: 0 0 0.35rem; font-size: 1.15rem; }
.card p { margin: 0; color: var(--muted); }
.card .card-link { display: inline-block; margin-top: 0.75rem; font-weight: 600; }

@media (min-width: 40rem) {
  .cards.two { grid-template-columns: 1fr 1fr; }
  .hero { padding: 5rem 0 3rem; }
}

.benefits { display: grid; gap: 1.5rem; margin: 0; padding: 0; list-style: none; counter-reset: b; }
.benefits li { margin: 0; padding-left: 2.75rem; position: relative; }
.benefits li::before {
  counter-increment: b; content: counter(b);
  position: absolute; left: 0; top: 0.1rem;
  width: 1.9rem; height: 1.9rem; border-radius: 50%;
  display: grid; place-items: center;
  font: 600 0.85rem/1 var(--mono);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
}
.benefits h3 { margin: 0 0 0.25rem; }
.benefits p { margin: 0; color: var(--muted); }

.example {
  font-family: var(--mono); font-size: 0.95rem;
  background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--signal);
  border-radius: 6px; padding: 0.85rem 1rem; margin: 1.5rem 0;
}

.button {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 650; text-decoration: none;
  padding: 0.85rem 1.25rem; border-radius: 999px;
  min-height: 3rem;
}
.button:hover { filter: brightness(1.06); text-decoration: none; }

.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 1.75rem; }

/* Long-form documents (privacy, terms) */

.doc { padding: 2.5rem 0 3rem; }
.doc h1 { font-size: clamp(1.8rem, 6vw, 2.4rem); }
.doc .meta { color: var(--muted); font-size: 0.95rem; margin-bottom: 2rem; }
.doc table { width: 100%; border-collapse: collapse; font-size: 0.95rem; margin: 0 0 1.25rem; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 0.6rem 0.5rem 0.6rem 0; border-bottom: 1px solid var(--line); }
.doc th { font-weight: 650; }
.table-scroll { overflow-x: auto; }

/* FAQ */

.faq details {
  border-bottom: 1px solid var(--line);
  padding: 0.25rem 0;
}
.faq summary {
  cursor: pointer; list-style: none;
  font-weight: 600; padding: 0.85rem 2rem 0.85rem 0; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 0.25rem; top: 0.7rem;
  font: 400 1.4rem/1 var(--mono); color: var(--muted);
}
.faq details[open] summary::after { content: "\2212"; }
.faq details p { color: var(--muted); margin: 0 0 1rem; }

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted); font-size: 0.9rem;
  padding: 1.75rem 0 2.25rem;
}
.site-footer p { margin: 0 0 0.4rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; margin-top: 0.75rem; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }
