/* Sonoria EQ — site styles. Plain CSS, no build step. */

:root {
  --paper: #f7f4ee;
  --paper-2: #efeae0;
  --card: #fffdf9;
  --ink: #1e1a2b;
  --ink-2: #4a4458;
  --rule: #d9d2c4;
  --accent: #4f35c2;
  --accent-ink: #ffffff;
  --accent-soft: #e6e0fa;
  --magenta: #a3247a;
  --grid: #d9d2c4;
  --shade: #ece6da;
  --focus: #4f35c2;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #14111d;
    --paper-2: #1b1727;
    --card: #1f1a2d;
    --ink: #f1edf8;
    --ink-2: #bdb5cf;
    --rule: #393150;
    --accent: #a995ff;
    --accent-ink: #14111d;
    --accent-soft: #2b2342;
    --magenta: #f08ccc;
    --grid: #393150;
    --shade: #241e35;
    --focus: #c9bcff;
  }
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 "Public Sans", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

img, svg { max-width: 100%; height: auto; }

a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--card); color: var(--ink); padding: 8px 12px; z-index: 10;
}
.skip:focus { left: 16px; top: 12px; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 720px; }

h1, h2, h3 {
  font-family: "Newsreader", Georgia, "Times New Roman", serif;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.1rem, 5.5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.2rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; }
.muted { color: var(--ink-2); }
.num { font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace; font-size: 0.92em; }

/* Header */
.site-header { border-bottom: 1px solid var(--rule); background: var(--paper); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; padding-top: 14px; padding-bottom: 14px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none; font-weight: 700;
}
.brand img { width: 36px; height: 36px; }
.brand span { font-family: "Newsreader", Georgia, serif; font-size: 1.3rem; font-weight: 600; }
.site-nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.site-nav a {
  display: inline-block; padding: 6px 12px; border-radius: 999px;
  color: var(--ink); text-decoration: none; font-size: 0.95rem;
}
.site-nav a:hover { background: var(--paper-2); }
.site-nav a[aria-current="page"] { background: var(--accent-soft); color: var(--ink); font-weight: 600; }

/* Hero */
.hero { padding: 56px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 32px; align-items: center; }
@media (min-width: 880px) { .hero-grid { grid-template-columns: 1.05fr 1fr; gap: 48px; } }
.lede { font-size: 1.15rem; color: var(--ink-2); max-width: 36em; }
.facts { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 20px 0 0; }
.facts li {
  border: 1px solid var(--rule); background: var(--card);
  border-radius: 8px; padding: 6px 12px; font-size: 0.95rem;
}
.facts strong { font-weight: 700; }
.soon { margin-top: 16px; font-weight: 600; }

.plot {
  margin: 0; background: var(--card); border: 1px solid var(--rule);
  border-radius: 14px; padding: 16px 16px 12px;
}
.plot figcaption { font-size: 0.9rem; color: var(--ink-2); margin-top: 8px; }
.plot .grid line { stroke: var(--grid); stroke-width: 1; }
.plot .zero { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 3 4; }
.plot .shade { fill: var(--shade); }
.plot .curve { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; }
.plot .knob { fill: var(--card); stroke: var(--magenta); stroke-width: 2.5; }
.plot text { fill: var(--ink-2); font: 12px "IBM Plex Mono", ui-monospace, Menlo, monospace; }

/* Sections */
section { padding: 48px 0; }
section + section { border-top: 1px solid var(--rule); }
.section-intro { max-width: 40em; color: var(--ink-2); }

.cards { display: grid; gap: 16px; grid-template-columns: 1fr; margin-top: 24px; }
@media (min-width: 700px) { .cards { grid-template-columns: 1fr 1fr; } }
.card {
  background: var(--card); border: 1px solid var(--rule); border-radius: 12px;
  padding: 20px 22px;
}
.card h3 { margin-bottom: 0.35em; }
.card p:last-child { margin-bottom: 0; }
.tag {
  display: inline-block; font-size: 0.78rem; font-weight: 700;
  background: var(--accent-soft); color: var(--ink); border-radius: 6px;
  padding: 1px 8px; margin-left: 6px; vertical-align: middle;
}

.also { columns: 1; padding-left: 1.2em; }
@media (min-width: 700px) { .also { columns: 2; column-gap: 40px; } }
.also li { break-inside: avoid; margin-bottom: 0.5em; }

/* Tables */
.table-scroll { overflow-x: auto; margin: 16px 0; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; background: var(--card); }
caption { text-align: left; color: var(--ink-2); font-size: 0.9rem; padding-bottom: 6px; }
th, td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--rule); }
th { font-weight: 700; }

/* Signal chain */
.chain { list-style: none; counter-reset: step; padding: 0; margin: 20px 0 0; display: grid; gap: 8px; }
.chain li {
  counter-increment: step; position: relative; padding: 10px 14px 10px 52px;
  background: var(--card); border: 1px solid var(--rule); border-radius: 10px;
}
.chain li::before {
  content: counter(step); position: absolute; left: 12px; top: 9px;
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink);
  font: 700 0.85rem "IBM Plex Mono", ui-monospace, monospace;
}
.chain .opt { color: var(--ink-2); font-size: 0.9rem; }

/* Definition lists (requirements) */
dl.spec { display: grid; grid-template-columns: 1fr; gap: 4px 24px; margin: 16px 0 0; }
@media (min-width: 640px) { dl.spec { grid-template-columns: 12em 1fr; } }
dl.spec dt { font-weight: 700; padding-top: 10px; }
dl.spec dd { margin: 0; padding-top: 10px; color: var(--ink-2); }
@media (min-width: 640px) { dl.spec dt, dl.spec dd { border-top: 1px solid var(--rule); } }

/* FAQ */
details {
  background: var(--card); border: 1px solid var(--rule); border-radius: 10px;
  padding: 0 18px; margin-bottom: 10px;
}
summary {
  cursor: pointer; padding: 14px 0; font-weight: 600; list-style-position: inside;
}
details[open] summary { border-bottom: 1px solid var(--rule); margin-bottom: 12px; }
details > :last-child { margin-bottom: 14px; }

/* Long-form pages */
.page { padding: 48px 0 56px; }
.page h2 { font-size: 1.5rem; margin-top: 1.8em; }
.page h3 { font-size: 1.15rem; margin-top: 1.4em; }
.page ul, .page ol { padding-left: 1.3em; }
.page li { margin-bottom: 0.4em; }
.meta { color: var(--ink-2); font-size: 0.95rem; }
.callout {
  border-left: 4px solid var(--accent); background: var(--card);
  padding: 14px 18px; border-radius: 0 10px 10px 0; margin: 20px 0;
}
.callout p:last-child { margin-bottom: 0; }
kbd, code {
  font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace; font-size: 0.88em;
  background: var(--paper-2); border: 1px solid var(--rule); border-radius: 5px; padding: 0 5px;
  overflow-wrap: anywhere;
}
.path { font-weight: 600; }

/* Footer */
.site-footer { border-top: 1px solid var(--rule); background: var(--paper-2); padding: 28px 0 36px; font-size: 0.95rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 32px; justify-content: space-between; }
.site-footer ul { list-style: none; display: flex; gap: 18px; margin: 0; padding: 0; flex-wrap: wrap; }
.site-footer p { margin: 0; color: var(--ink-2); }

/* 404 */
.notfound { padding: 80px 0; text-align: center; }
.notfound img { width: 96px; height: 96px; margin-bottom: 16px; }
