/* style.css — the craitr constellation · who · what · why · when · how · where
   Tokens are the apex craitr.no's, exactly. ONE accent: --neon, the red of the mouse.
   Fonts: Google Fonts only — JetBrains Mono · Fraunces (the apex's faces). */

:root {
  --ink:   #ffffff;
  --paper: #000000;
  --dim:   #7a7a73;              /* was the apex's #666660 (3.6:1 on black); 4.9:1 now — AA for the 10–12 px dim text */
  --rule:  #1a1a1a;
  --field-bg: #050505;
  --field-hover-bg: #0e0e0e;
  --ticker-text: rgba(255, 255, 255, 0.26);
  --ticker-hover: rgba(0, 0, 0, 0.4);
  --neon:  #ff1f2e;
  --mono:  'JetBrains Mono', ui-monospace, Menlo, monospace;
  --serif: 'Fraunces', Georgia, serif;
  color-scheme: dark;
}
/* LIGHT THEME — the apex's inversion, same tokens */
:root.light {
  --ink:   #0e0d0b;
  --paper: #f5f1e8;
  --dim:   #6f6a5a;              /* was #8a8472 (3.3:1 on the cream); 4.8:1 now */
  --neon:  #d8101f;              /* the red, deepened one notch on cream so 14 px neon text reads 4.6:1 (was 3.4:1); dark keeps #ff1f2e */
  --rule:  #e2dcc9;
  --field-bg: #faf6e8;
  --field-hover-bg: #ebe6d2;
  --ticker-text: rgba(0, 0, 0, 0.34);
  --ticker-hover: rgba(245, 241, 232, 0.55);
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { background: var(--paper); color: var(--ink); }
body {
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  padding: 18px 16px 7em;               /* 16 px gutters on the phone */
  transition: background 0.25s ease, color 0.25s ease;
}
@media (min-width: 800px) { body { padding: 24px 6vw 8em; } }

/* the ground — a full-page canvas behind everything */
#halftone { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.top, main, footer { position: relative; z-index: 1; }

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--dim);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color 0.12s ease, text-decoration-color 0.12s ease;
}
a:hover { color: var(--neon); text-decoration-color: var(--neon); }
:focus-visible { outline: 2px solid var(--neon); outline-offset: 3px; }
::selection { background: var(--neon); color: #ffffff; }

.skip { position: absolute; left: 16px; top: -4em; z-index: 60; font-size: 11px; background: var(--paper); border: 1px solid var(--rule); padding: 0.3em 0.6em; }
.skip:focus { top: 12px; }

/* top line — sits on a paper chip so the halftone never runs under 10 px text (measured 2.5:1 before) */
.top { display: inline-flex; align-items: center; gap: 0.8em; min-height: 28px; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); background: var(--paper); padding: 0.2em 0.6em; margin: -0.2em 0 0 -0.6em; border-radius: 3px; }
.top .home { color: var(--dim); text-decoration: none; }
.top .home:hover { color: var(--neon); }
.top .crumb { display: none; }
@media (min-width: 600px) { .top .crumb { display: inline; } }

/* corner controls: theme (L) · halftone on/off */
.controls { position: fixed; top: 12px; right: 12px; z-index: 40; display: flex; gap: 6px; }
.controls button {
  background: var(--paper); color: var(--dim);
  border: 1px solid var(--rule); border-radius: 3px;
  padding: 4px 8px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
  cursor: pointer; opacity: 1;            /* was .75 — the label measured 2.45:1 */
  transition: opacity 0.2s ease, color 0.12s ease, border-color 0.12s ease;
}
.controls button:hover, .controls button:focus-visible { opacity: 1; color: var(--ink); border-color: var(--dim); }
.controls button[aria-pressed="true"] { color: var(--ink); }

/* the column */
main.col { width: 100%; max-width: 64em; margin: 0 auto; padding-top: 9vh; }
h1.q {
  font-family: var(--mono); font-weight: 700;
  font-size: clamp(48px, 16vw, 240px);
  line-height: 0.95; letter-spacing: -0.03em;
  color: var(--neon);
  margin-left: -0.04em;                 /* optical: hang the first letter on the column edge */
  overflow-wrap: anywhere;
}
.answer {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-variation-settings: "SOFT" 60, "WONK" 1;
  font-size: clamp(20px, 2.4vw, 30px); line-height: 1.3;
  margin-top: 0.6em; max-width: 30em;
}
.body { margin-top: 3em; }
section { border-top: 1px solid var(--rule); padding-top: 1.1em; margin-top: 2.6em; }
.body > section:first-child { margin-top: 0; }
h2 { font-family: var(--mono); font-weight: 400; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); margin-bottom: 1em; }
h3 { font-family: var(--mono); font-weight: 700; font-size: 14px; }
p { max-width: 46em; }
p + p { margin-top: 0.9em; }
.lead { font-size: 15px; }
.note { color: var(--dim); font-size: 12px; margin-top: 1.1em; }
.note a { color: var(--dim); }
.note a:hover { color: var(--neon); }
em { font-family: var(--serif); font-style: italic; font-size: 1.06em; }
.x { color: var(--neon); font-weight: 700; }

/* definition rows — members · agents · practices */
.rows > div { display: grid; grid-template-columns: 1fr; gap: 0.1em 1.2em; padding: 0.55em 0; border-bottom: 1px dashed var(--rule); }
.rows dt { color: var(--dim); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; padding-top: 0.25em; }
.rows dd { max-width: 46em; }
@media (min-width: 600px) { .rows > div { grid-template-columns: 9em 1fr; } }
.rows.agents dt { color: var(--ink); font-size: 14px; font-weight: 700; letter-spacing: 0; text-transform: none; padding-top: 0; }

/* the ten seats */
.seats { list-style: none; display: flex; flex-wrap: wrap; gap: 0.3em 0.8em; margin: 0.6em 0 1.2em; }
.seats li { color: var(--neon); font-weight: 700; font-size: 30px; line-height: 1; }

/* things made (what) */
.made { list-style: none; }
.made li { display: grid; grid-template-columns: 1fr; gap: 0 1.2em; padding: 0.5em 0; border-bottom: 1px dashed var(--rule); }
.made .t { font-weight: 700; }
.made .d, .made .w { color: var(--dim); font-size: 12px; }
@media (min-width: 700px) { .made li { grid-template-columns: 9em 1fr 16em; } .made .d { color: var(--ink); font-size: 13px; } }
.made li.era, .line li.era { display: block; border: 0; padding: 1.3em 0 0.3em; font-weight: 700; font-size: clamp(22px, 3vw, 34px); line-height: 1; color: var(--ink); }

/* the line (when) — a red rule */
.line { list-style: none; border-left: 2px solid var(--neon); margin: 0.6em 0 0 0.4em; padding-left: 1.4em; }
.line li { position: relative; padding: 0.5em 0; border-bottom: 1px dashed var(--rule); }
.line li::before { content: ''; position: absolute; left: calc(-1.4em - 6px); top: 1.05em; width: 6px; height: 6px; background: var(--paper); border: 2px solid var(--neon); }
.line li.era::before { width: 10px; height: 10px; left: calc(-1.4em - 8px); top: 1.35em; background: var(--neon); }
.line time { display: block; color: var(--dim); font-size: 12px; }
.line .t { font-weight: 700; }
.line .w { display: block; color: var(--dim); font-size: 12px; }
@media (min-width: 700px) {
  .line li { display: grid; grid-template-columns: 9em 1fr 16em; gap: 0 1.2em; }
  .line li.era { display: block; }
  .line time { color: var(--ink); font-size: 13px; }
}

/* next up (when) */
.next { list-style: none; }
.next li { display: grid; grid-template-columns: 1.3em 1fr; gap: 0.5em; padding: 0.5em 0; border-bottom: 1px dashed var(--rule); }
.next li::before { content: '×'; color: var(--neon); font-weight: 700; font-size: 1.25em; line-height: 1.2; }
.next time { display: block; font-weight: 700; }
.next li > span { max-width: 46em; }

/* the reasons (why) */
.reasons { list-style: none; counter-reset: r; }
.reasons li { padding: 1.1em 0; border-bottom: 1px dashed var(--rule); max-width: 46em; }
.reasons h3 { margin-bottom: 0.35em; }
.reasons h3::before { content: counter(r, decimal-leading-zero); counter-increment: r; color: var(--neon); font-weight: 400; margin-right: 0.8em; }
.reasons blockquote { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 17px; line-height: 1.45; margin: 0.5em 0 0.7em; padding-left: 1em; border-left: 2px solid var(--neon); max-width: 40em; }
.reasons blockquote cite { display: block; font-family: var(--mono); font-style: normal; font-size: 11px; color: var(--dim); margin-top: 0.5em; letter-spacing: 0.04em; }

/* the principles (how) */
.principles { list-style: none; counter-reset: p; }
.principles li { display: grid; grid-template-columns: 1fr; gap: 0.15em 1.4em; padding: 0.8em 0; border-bottom: 1px dashed var(--rule); }
.principles .k { font-weight: 700; }
.principles .k::before { content: counter(p, decimal-leading-zero); counter-increment: p; color: var(--neon); font-weight: 400; margin-right: 0.8em; }
.principles li > span:last-child { max-width: 46em; }
@media (min-width: 700px) { .principles li { grid-template-columns: 19em 1fr; } }

/* the doors (what · how) */
.doors { list-style: none; }
.doors li { display: grid; grid-template-columns: 1fr; gap: 0 1.2em; padding: 0.5em 0; border-bottom: 1px dashed var(--rule); }
.doors li > a { font-weight: 700; text-decoration: none; }
.doors li > a:hover { text-decoration: underline; }
.doors li > span { max-width: 46em; }
.doors .horizon { display: inline-block; margin-left: 0.5em; color: var(--dim); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; border: 1px solid var(--rule); padding: 0 0.4em; }
@media (min-width: 600px) { .doors li { grid-template-columns: 15em 1fr; } }

/* the places (where) */
.places { list-style: none; }
.places > li { padding: 1em 0; border-bottom: 1px dashed var(--rule); }
.places h3 { font-size: clamp(18px, 2vw, 22px); margin-bottom: 0.4em; }
.places h3 small { color: var(--dim); font-weight: 400; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; margin-left: 0.6em; }
.places ul { list-style: none; }
.places ul li { position: relative; padding: 0.25em 0 0.25em 1.3em; max-width: 46em; }
.places ul li::before { content: '×'; position: absolute; left: 0; top: 0.2em; color: var(--neon); font-weight: 700; }
.places .v { font-weight: 700; }

/* the constellation (footer) — six × marks, each a link */
footer { width: 100%; max-width: 64em; margin: 4em auto 0; border-top: 1px solid var(--rule); padding-top: 1.4em; }
.constellation ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5em 1.6em; font-size: 15px; }
.constellation a { text-decoration: none; }
.constellation a:hover .w, .constellation a:focus-visible .w { color: var(--neon); }
.constellation .x { font-size: 1.3em; margin-right: 0.3em; }
.constellation .here .w { color: var(--neon); }
.colophon { color: var(--dim); font-size: 11px; line-height: 1.7; margin-top: 1.6em; max-width: none; }
.colophon a { color: var(--dim); }
.colophon a:hover { color: var(--neon); }

/* the apex ticker — single bottom belt, continuous linear flow, hover to slow */
.ticker { position: fixed; left: 0; right: 0; bottom: 0; height: 3em; overflow: hidden; display: flex; align-items: center; background: transparent; z-index: 25; transition: background 0.25s ease; }
.ticker:hover { background: var(--ticker-hover); }
.ticker .ticker-track { display: inline-flex; flex-shrink: 0; white-space: nowrap; animation: tickerScroll 40s linear infinite; will-change: transform; }
@keyframes tickerScroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.ticker-content { display: inline-flex; align-items: center; gap: 0.55em; padding-right: 0.55em; font-size: clamp(14px, 1.4vw, 20px); line-height: 1; color: var(--ticker-text); font-weight: 400; }
.ticker-content > span { display: inline-block; }
.ticker-meteor { display: inline-block; color: currentColor; }

@media (prefers-reduced-motion: reduce) {
  .ticker .ticker-track { animation: none; }
  body, a, .controls button, .ticker { transition: none; }
  html { scroll-behavior: auto; }
}
@media print { #halftone, .ticker, .controls, .skip { display: none; } body { padding: 0; } }
