/* Claviger site. The only stylesheet: the Content-Security-Policy allows no inline style.
   Colours and type follow brand/BRAND.md in doodlemania2/claviger. */

@font-face {
  font-family: "Newsreader";
  src: url("/fonts/newsreader-latin.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Public Sans";
  src: url("/fonts/public-sans-latin.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/fonts/jetbrains-mono-latin.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #FAF7F0; --band: #F2EEE3; --surface: #FFFFFF; --line: #E3DED0;
  --ink: #1B2540; --muted: #4A556B; --link: #2F4F8F;
  --gold-text: #86621A; --gold: #B8862B; --silver: #7A8595;
  --btn-bg: #1B2540; --btn-ink: #FAF7F0; --focus: #B8862B;
  --code-bg: #1B2540; --code-ink: #ECEEF3; --code-muted: #A9B1C2;
  --shadow: 0 1px 2px rgba(27,37,64,.06), 0 18px 40px -20px rgba(27,37,64,.28);
  --display: "Newsreader", Georgia, "Times New Roman", serif;
  --body: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --wrap: 72rem;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F1522; --band: #131B2B; --surface: #172033; --line: #263048;
    --ink: #ECEEF3; --muted: #A9B1C2; --link: #9DB6F0;
    --gold-text: #E3B85C; --gold: #E3B85C; --silver: #C2C9D3;
    --btn-bg: #E3B85C; --btn-ink: #1B2540; --focus: #E3B85C;
    --code-bg: #0A0F19; --code-ink: #ECEEF3;
    --shadow: 0 1px 2px rgba(0,0,0,.45), 0 18px 40px -20px rgba(0,0,0,.7);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1.0625rem/1.65 var(--body); -webkit-font-smoothing: antialiased; }
a { color: var(--link); text-underline-offset: .2em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.15; letter-spacing: -.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.1rem); font-weight: 500; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 500; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
code, pre { font-family: var(--mono); font-size: .9em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1rem; }
@media (min-width: 40rem) { .wrap { padding: 0 1.5rem; } }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: .5rem; background: var(--btn-bg); color: var(--btn-ink); padding: .5rem 1rem; border-radius: 8px; z-index: 10; }
.skip:focus { left: .5rem; }
.eyebrow { font: 600 .8rem/1.4 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--gold-text); margin: 0 0 .9rem; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 40rem; }

/* The mark and wordmark, defined once in the page and coloured by the theme. */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.k-silver { fill: var(--silver); }
.k-gold { fill: var(--gold); stroke: var(--bg); stroke-width: 5; stroke-linejoin: round; paint-order: stroke; }
.w-ink { stroke: var(--ink); }
.w-dot { fill: var(--gold); }

/* header */
header.site { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
header.site .wrap { display: flex; align-items: center; gap: 1rem; min-height: 4rem; }
.brand { display: flex; align-items: center; gap: .55rem; color: var(--ink); text-decoration: none; }
.brand .m { width: 36px; height: 36px; }
.brand .w { width: 104px; height: 31px; }
nav.primary { margin-left: auto; display: flex; gap: 1.25rem; align-items: center; }
nav.primary a { color: var(--ink); text-decoration: none; font-size: .95rem; }
nav.primary a:hover { color: var(--link); text-decoration: underline; }
nav.primary .hide-sm { display: none; }
@media (min-width: 52rem) { nav.primary .hide-sm { display: inline; } }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .8rem 1.3rem; border-radius: 999px; font-weight: 600; text-decoration: none; border: 2px solid var(--btn-bg); background: var(--btn-bg); color: var(--btn-ink); }
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--ink); }
nav.primary a.btn:hover { text-decoration: none; color: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }

/* hero */
.hero { padding: 4.5rem 0 4rem; }
.hero .wrap { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 56rem) { .hero .wrap { grid-template-columns: 1.25fr 1fr; } }
.hero-art { justify-self: center; width: min(340px, 62vw); }
.hero-art svg { display: block; width: 100%; height: auto; aspect-ratio: 1; }
.facts { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin: 1.5rem 0 0; padding: 0; list-style: none; color: var(--muted); font-size: .95rem; }
.facts li::before { content: ""; display: inline-block; width: .5rem; height: .5rem; margin-right: .5rem; border-radius: 2px; background: var(--gold); transform: rotate(45deg) translateY(-2px); }

section { padding: 4.5rem 0; }
section.band { background: var(--band); border-block: 1px solid var(--line); }
.section-head { max-width: 46rem; margin-bottom: 2.5rem; }

/* audiences */
.two { display: grid; gap: 1.25rem; }
@media (min-width: 48rem) { .two { grid-template-columns: 1fr 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 1.75rem; box-shadow: var(--shadow); }
.card h3 { display: flex; align-items: center; gap: .6rem; }
.card ul { padding-left: 1.2rem; margin: 0; }
.card li { margin: .35rem 0; }
.icon { width: 28px; height: 28px; flex: none; }
.icon .s { stroke: var(--gold); }
.road-txt { color: var(--muted); font-style: italic; }

/* features */
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); }
.feat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1.25rem 1.25rem 1.1rem; }
.feat h3 { font-size: 1.1rem; margin-bottom: .35rem; }
.feat p { color: var(--muted); font-size: .97rem; margin: 0; }
.tag { display: inline-block; font: 600 .72rem/1 var(--body); letter-spacing: .08em; text-transform: uppercase; padding: .35rem .55rem; border-radius: 999px; margin-bottom: .7rem; }
.tag.now { background: color-mix(in srgb, var(--gold) 22%, transparent); color: var(--gold-text); }
.tag.road { background: transparent; color: var(--muted); border: 1px dashed var(--muted); }
.legend { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; color: var(--muted); font-size: .9rem; margin-bottom: 1.25rem; }
.legend .tag { margin: 0 .35rem 0 0; }

/* steps */
.steps { counter-reset: step; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; padding: 0; list-style: none; }
@media (min-width: 56rem) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.steps li { counter-increment: step; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 1.5rem; min-width: 0; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--btn-bg); color: var(--btn-ink); font: 600 1rem/1 var(--display); margin-bottom: .9rem; }
pre { background: var(--code-bg); color: var(--code-ink); padding: 1rem 1.1rem; border-radius: 12px; overflow-x: auto; line-height: 1.55; margin: .75rem 0 0; }
pre .c { color: var(--code-muted); }
.note { color: var(--muted); font-size: .9rem; margin-top: 1rem; }

/* faq */
.faq { max-width: 48rem; }
details { border-bottom: 1px solid var(--line); padding: 1rem 0; }
summary { cursor: pointer; font: 600 1.15rem/1.4 var(--display); list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--gold-text); font-family: var(--body); }
details[open] summary::after { content: "–"; }
details p { margin: .75rem 0 0; color: var(--muted); }

/* cta + footer */
.cta { text-align: center; }
.cta .lead { margin: 0 auto; }
.cta .btn-row { justify-content: center; }
footer { border-top: 1px solid var(--line); padding: 2.5rem 0 3rem; color: var(--muted); font-size: .92rem; }
footer .wrap { display: grid; gap: 1.5rem; }
@media (min-width: 48rem) { footer .wrap { grid-template-columns: 1.4fr 1fr 1fr; } }
footer ul { list-style: none; padding: 0; margin: 0; }
footer li { margin: .3rem 0; }
footer h2 { font: 600 .85rem/1.4 var(--body); text-transform: uppercase; letter-spacing: .1em; color: var(--ink); margin-bottom: .6rem; }

/* 404 */
.lost { padding: 6rem 0; text-align: center; }
.lost .lead { margin: 0 auto; }
.lost .btn-row { justify-content: center; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
