/* KO6DOT — design system in sites/ko6dot/DESIGN.md ("Observatory", after Refero's Ventriloc).
   A lab report on warm paper: whisper-weight headings, monospaced data, one orange ember. */

@font-face {
  font-family: "Familjen Grotesk";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/familjen-grotesk-latin-400.woff2") format("woff2");
}
@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/public-sans-latin-400.woff2") format("woff2");
}
@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/public-sans-latin-600.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/ibm-plex-mono-latin-400.woff2") format("woff2");
}

:root {
  color-scheme: light dark;

  --bg: #ffffff;
  --ink: #202020;
  --text: #4d4d4d;
  --muted: #6b6b6b;
  --surface: #efefef;
  --paper: #ebe6dd;
  --paper-muted: #5c564c;
  --paper-rule: #c9c1b3;
  --hairline: #e3e3e3;
  --ember: #ff682c;
  --mark: #ffd6c4;
  --plate: #202020;

  --font-display: "Familjen Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Public Sans", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --radius: 20px;
  --radius-feature: 20px 0 20px 20px;
  --wrap: 1200px;
  --gutter: 32px;
  --section: 96px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141312;
    --ink: #f2efe9;
    --text: #c9c4bb;
    --muted: #a39d93;
    --surface: #22201e;
    --paper: #2b2824;
    --paper-muted: #b3ab9e;
    --paper-rule: #4a453e;
    --hairline: #3a3632;
    --ember: #ff7a45;
    --mark: rgba(255, 104, 44, 0.32);
    --plate: #0a0a0a;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
}

img { display: block; max-width: 100%; height: auto; }

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

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.mono { font-family: var(--font-mono); }

.skip-link {
  position: absolute;
  left: 16px;
  top: -64px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: 200px;
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
}
.skip-link:focus { top: 16px; }

/* ---- header ------------------------------------------------------------ */

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
  padding-bottom: 20px;
}

.wordmark {
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}
.wordmark span { color: var(--ember); }

.nav-pill {
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 6px;
  list-style: none;
  border-radius: 200px;
  background: var(--surface);
  font-size: 15px;
  font-weight: 600;
}
.nav-pill a {
  display: block;
  padding: 8px 16px;
  border-radius: 200px;
  text-decoration: none;
}
.nav-pill a:hover { background: var(--bg); }

/* ---- type -------------------------------------------------------------- */

h1, h2, h3 { margin: 0; color: var(--ink); font-weight: 400; }

.display {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

.kicker {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
}

.mark {
  background: linear-gradient(transparent 62%, var(--mark) 62%);
}

/* ---- hero -------------------------------------------------------------- */

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 48px;
  align-items: end;
  padding-top: 80px;
  padding-bottom: 64px;
}
.hero-copy { display: flex; flex-direction: column; gap: 24px; }
.hero h1 { font-size: clamp(42px, 5.6vw, 66px); line-height: 0.95; }
.hero-lede { margin: 0; max-width: 46ch; font-size: 19px; }

.logo-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  border-radius: var(--radius-feature);
  background: var(--paper);
}
.logo-panel img { width: 100%; max-width: 420px; border-radius: 8px; }

/* ---- numbered sections ------------------------------------------------- */

.section { padding-top: var(--section); padding-bottom: var(--section); }
.section--flush-top { padding-top: 0; }

.section-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 32px;
  align-items: baseline;
  margin-bottom: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--ink);
}
.section-head h2 { font-size: 32px; }

/* ---- tune in ----------------------------------------------------------- */

.readouts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 16px;
  margin: 0;
}
.readout {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px;
  border-radius: var(--radius);
  background: var(--surface);
}
.readout dt { font-size: 14px; font-weight: 600; color: var(--text); }
.readout dd { margin: 0; }
.readout .value {
  font-family: var(--font-mono);
  font-size: 44px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.readout .value--text { font-size: 28px; line-height: 1.15; letter-spacing: 0; }
.readout .unit { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }

.ids {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 40px;
  margin: 16px 0 0;
  padding: 20px 28px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--ink);
}
.ids div { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.ids dt { color: var(--muted); }
.ids dd { margin: 0; }

/* ---- station ----------------------------------------------------------- */

.band-paper { background: var(--paper); }
.band-surface { background: var(--surface); }

.station {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 48px;
}
.station-intro { display: flex; flex-direction: column; gap: 16px; }
.station-intro .kicker { color: var(--paper-muted); }
.station-intro h2 { font-size: 44px; line-height: 1.02; }

.facts { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--ink); }
.facts li {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--paper-rule);
  color: var(--ink);
}
.facts .num { font-family: var(--font-mono); font-size: 13px; color: var(--paper-muted); padding-top: 3px; }
.tag {
  display: inline-block;
  margin-right: 8px;
  padding: 1px 10px;
  border: 1px solid var(--ember);
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 12px;
}

/* ---- coverage ---------------------------------------------------------- */

.coverage { display: grid; gap: 32px; margin: 0; align-items: start; }
@media (min-width: 900px) {
  .coverage { grid-template-columns: 2fr 1fr; }
}
.coverage img { width: 100%; aspect-ratio: 880 / 675; border-radius: var(--radius-feature); }
.coverage figcaption { display: flex; flex-direction: column; gap: 16px; }
.coverage figcaption p { margin: 0; color: var(--ink); }
.coverage dl { margin: 0; display: flex; flex-direction: column; gap: 6px; font-family: var(--font-mono); font-size: 13px; }
.coverage dl div { display: flex; gap: 8px; }
.coverage dt { color: var(--muted); }
.coverage dd { margin: 0; }

/* ---- tools ------------------------------------------------------------- */

.tools {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 16px;
}
.tool {
  display: flex;
  gap: 24px;
  align-items: center;
  padding: 28px;
  border-radius: var(--radius);
  background: var(--surface);
  text-decoration: none;
}
.tool:hover { outline: 1px solid var(--ink); }
.tool-logo { flex: none; }
.tool-logo--asl { width: 120px; padding: 8px; border-radius: 8px; background: var(--plate); }
.tool-logo--allscan { width: 80px; }
.tool-text { display: flex; flex-direction: column; gap: 4px; }
.tool-name { font-family: var(--font-display); font-size: 26px; color: var(--ink); }
.tool-desc { color: var(--text); }
.tool-text .tag { align-self: flex-start; margin: 6px 0 0; }

/* ---- links ------------------------------------------------------------- */

.link-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 16px;
}
.link-group { padding: 28px; border-radius: var(--radius); background: var(--bg); }
.link-group h3 { margin-bottom: 16px; font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.link-group ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }

/* ---- footer ------------------------------------------------------------ */

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 40px;
  justify-content: space-between;
  padding-top: 40px;
  padding-bottom: 40px;
  font-size: 14px;
}
.site-footer p { margin: 0; }

/* ---- 404 --------------------------------------------------------------- */

.notfound {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-top: 120px;
  padding-bottom: 160px;
}
.notfound h1 { font-size: clamp(48px, 8vw, 96px); line-height: 0.95; }
.notfound p { margin: 0; max-width: 46ch; font-size: 19px; }

/* ---- small screens ----------------------------------------------------- */

@media (max-width: 600px) {
  :root { --gutter: 16px; --section: 64px; }
  .hero { padding-top: 48px; gap: 32px; }
  .logo-panel { padding: 24px; }
  .readouts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .readout { padding: 18px; gap: 8px; }
  .readout .value { font-size: 28px; }
  .readout .value--text { font-size: 20px; }
  .station-intro h2 { font-size: 34px; }
  .tool { padding: 22px; gap: 16px; }
  .tool-logo--asl { width: 96px; }
  .tool-logo--allscan { width: 64px; }
  .nav-pill { flex-wrap: wrap; border-radius: 24px; font-size: 14px; }
  .nav-pill a { padding: 8px 12px; }
}
