/* Split Signal design system — tokens and components. Source of truth: DESIGN.md.
   Every splitsignal.ai page links or copies this file unchanged. Page-specific CSS goes in the page. */

/* ---------- Tokens ---------- */
:root {
  color-scheme: light dark;
  /* light */
  --bg: #f3f1ea;
  --surface: #fbfaf6;
  --line: #d6d2c4;
  --ink: #111216;
  --muted: #555864;
  --a: #c43d0c;          /* channel A: signal orange */
  --b: #0a6f8c;          /* channel B: signal cyan */
  --glow: 0 0 0 transparent;

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

  --t-xs: .75rem;                              /* labels, mono */
  --t-sm: .875rem;
  --t-md: 1rem;                                /* body */
  --t-lg: clamp(1.125rem, 1rem + .5vw, 1.375rem);
  --t-xl: clamp(1.75rem, 1.2rem + 2.2vw, 2.75rem);
  --t-2xl: clamp(3rem, 1.4rem + 7.5vw, 8rem);  /* hero only */

  --s1: .25rem; --s2: .5rem; --s3: .75rem; --s4: 1rem; --s5: 1.5rem;
  --s6: 2rem; --s7: 3rem; --s8: 4.5rem; --s9: 7rem;

  --radius: 10px;
  --max: 76rem;
  --gutter: clamp(1rem, 4vw, 3rem);
  --ease: cubic-bezier(.2, .7, .2, 1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0c10; --surface: #12141b; --line: #262a36;
    --ink: #eceae3; --muted: #9a9ca8;
    --a: #ff6b3d; --b: #46d9ff;
    --glow: 0 0 24px color-mix(in srgb, var(--b) 35%, transparent);
  }
}
:root[data-theme="dark"] {
  --bg: #0b0c10; --surface: #12141b; --line: #262a36;
  --ink: #eceae3; --muted: #9a9ca8;
  --a: #ff6b3d; --b: #46d9ff;
  --glow: 0 0 24px color-mix(in srgb, var(--b) 35%, transparent);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 var(--t-md)/1.6 var(--font);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: clip;
}
h1, h2, h3, p, ul, ol, figure { margin: 0; padding: 0; }
h1, h2, h3 { font-weight: 700; letter-spacing: -.035em; line-height: 1.02; text-wrap: balance; }
h2 { font-size: var(--t-xl); }
h3 { font-size: var(--t-lg); letter-spacing: -.02em; line-height: 1.2; }
p { text-wrap: pretty; }
a { color: inherit; text-decoration-color: var(--a); text-decoration-thickness: 1px; text-underline-offset: .25em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--b); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--a); color: var(--bg); }

/* ---------- Layout ---------- */
.ss-wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.ss-section { padding-block: var(--s8); border-top: 1px solid var(--line); }
.ss-grid { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); }

/* ---------- Components ---------- */
/* Label: the machine voice. Mono, uppercase, small. */
.ss-label { font: 500 var(--t-xs)/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.ss-label--a { color: var(--a); }

/* Wordmark: two bars, one signal splitting. */
.ss-mark { display: inline-flex; align-items: center; gap: var(--s3); font: 600 var(--t-sm)/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; text-decoration: none; }
.ss-mark svg { width: 28px; height: 28px; flex: none; }

/* Status pill: a dot and a state. States: --on (operating), --build, --off. */
.ss-pill { display: inline-flex; align-items: center; gap: var(--s2); padding: var(--s1) var(--s3); border: 1px solid var(--line); border-radius: 999px; font: 500 var(--t-xs)/1.6 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.ss-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.ss-pill--on::before { background: var(--b); box-shadow: var(--glow); animation: ss-pulse 2.4s var(--ease) infinite; }
.ss-pill--build::before { background: var(--a); }

/* Card: a product or a note. Add --redacted for unreleased products, --live for released ones. */
.ss-card { position: relative; display: flex; flex-direction: column; gap: var(--s3); min-height: 12rem; padding: var(--s5); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; transition: border-color .3s var(--ease), transform .3s var(--ease); }
.ss-card p { color: var(--muted); }
.ss-card > :last-child { margin-top: auto; }
a.ss-card:hover { border-color: var(--a); transform: translateY(-2px); }
.ss-redact { display: inline-block; font: 600 var(--t-lg)/1.2 var(--mono); letter-spacing: .04em; color: var(--ink); overflow-wrap: anywhere; }
.ss-card .ss-pill { align-self: flex-start; }
.ss-card--redacted .ss-redact { background: var(--ink); color: color-mix(in srgb, var(--bg) 30%, var(--ink)); border-radius: 2px; padding-inline: .15em; user-select: none; }

/* Fact: a big number or word with a label under it. */
.ss-fact { display: flex; flex-direction: column; gap: var(--s2); padding-block: var(--s4); border-top: 1px solid var(--line); }
.ss-fact b { font-size: var(--t-xl); font-weight: 700; letter-spacing: -.03em; line-height: 1; }

/* Button-link */
.ss-btn { display: inline-flex; align-items: center; gap: var(--s2); min-height: 44px; padding: 0 var(--s5); border-radius: 999px; background: var(--ink); color: var(--bg); font: 600 var(--t-sm)/1 var(--font); text-decoration: none; transition: background .2s; }
.ss-btn:hover { background: var(--a); }

@keyframes ss-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
