/* Tribograph teaser. Fonts are self-hosted: the page makes no request to
   anyone but tribograph.com. Bitcount for the wordmark, pills and figures
   (as in the app); Newsreader for display; the system sans for reading. */

@font-face { font-family: "Bitcount"; src: url(/fonts/BitcountInk-Mono.ttf) format("truetype");
  font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url(/fonts/newsreader-latin-300-normal.woff2) format("woff2");
  font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url(/fonts/newsreader-latin-300-italic.woff2) format("woff2");
  font-weight: 300; font-style: italic; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url(/fonts/newsreader-latin-400-normal.woff2) format("woff2");
  font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url(/fonts/newsreader-latin-400-italic.woff2) format("woff2");
  font-weight: 400; font-style: italic; font-display: swap; }

:root {
  /* the app's part colours */
  --battery: #d6f25f;
  --storage: #a593f2;
  --memory:  #ffc382;
  --thermal: #4fb894;
  --os:      #f3f1ec;

  --bg: #0e0d0b;
  --bg-2: #151411;
  --ink: #f3f1ec;
  --ink-2: rgba(243, 241, 236, 0.66);
  --ink-3: rgba(243, 241, 236, 0.42);
  --line: rgba(243, 241, 236, 0.09);
  --line-2: rgba(243, 241, 236, 0.16);
  --accent: var(--battery);

  --display: "Newsreader", "Iowan Old Style", Georgia, serif;
  --pixel: "Bitcount", ui-monospace, Menlo, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;

  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { font-synthesis: none; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
p { margin: 0; }
::selection { background: var(--accent); color: #121212; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.muted { color: var(--ink-3); }
.fine { font-size: 13px; color: var(--ink-3); }
.fine a { color: var(--ink-2); }

/* ---------- bar ---------- */
.bar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--gutter);
  background: rgba(14, 13, 11, 0.72);
  backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent; transition: border-color .3s;
}
.bar.scrolled { border-bottom-color: var(--line); }
.wordmark {
  display: inline-flex; align-items: center; gap: 10px;
  font: 500 19px/1 var(--pixel); letter-spacing: 0.06em; text-decoration: none; color: var(--ink);
}

.mark { width: 20px; height: 20px; flex: none; }

/* ---------- buttons, pills ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 20px; border: 0; border-radius: 10px;
  background: var(--accent); color: #121212;
  font: 600 15px/1 var(--pixel); letter-spacing: 0.04em; text-transform: uppercase;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,0.14);
  transition: transform .15s, filter .15s;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn-small { height: 34px; padding: 0 14px; font-size: 12.5px; border-radius: 8px; }

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 99px;
  background: rgba(243,241,236,0.03);
  font: 500 12px/1 var(--pixel); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2);
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 0 rgba(214,242,95,.5); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(214,242,95,.45); } 70%, 100% { box-shadow: 0 0 0 8px rgba(214,242,95,0); } }

.eyebrow {
  font: 500 12.5px/1 var(--pixel); letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 28px;
}

mark {
  color: var(--accent); background: rgba(214,242,95,0.07);
  border: 1px solid rgba(214,242,95,0.16); border-radius: 0.16em;
  padding: 0.02em 0.16em 0; margin: 0 0.02em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}

/* ---------- hero ---------- */
.hero { position: relative; padding: clamp(56px, 11vh, 120px) 0 clamp(40px, 8vh, 80px); overflow: hidden; }
.hero-inner { position: relative; text-align: center; display: flex; flex-direction: column; align-items: center; }
h1 {
  margin: 28px 0 0; max-width: 15ch;
  font: 300 clamp(42px, 7.4vw, 84px)/1.02 var(--display); letter-spacing: -0.02em;
  text-wrap: balance;
}
.lede { margin-top: 24px; max-width: 34em; font-size: clamp(16px, 1.6vw, 18.5px); color: var(--ink-2); text-wrap: pretty; }

.signup { position: relative; margin-top: 36px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; width: 100%; max-width: 460px; }
.signup input[type=email] {
  flex: 1 1 220px; min-width: 0; height: 46px; padding: 0 14px;
  border: 1px solid var(--line-2); border-radius: 10px; background: rgba(243,241,236,0.04);
  color: var(--ink); font: 15px var(--sans);
}
.signup input[type=email]::placeholder { color: var(--ink-3); }
.signup .btn { flex: 0 0 auto; }
.status { flex-basis: 100%; min-height: 1.4em; font-size: 14px; color: var(--ink-2); text-align: center; }
.status.ok { color: var(--accent); }
.status.err { color: #ff8a7a; }
.signup.done input, .signup.done .btn, .signup.done .extras { display: none; }
.signup.done .status { font-size: 16px; }
.hero .fine { margin-top: 4px; }

/* the chart recorder */
.recorder { position: relative; margin-top: clamp(48px, 9vh, 88px); }
.recorder > * { max-width: 100%; }
.recorder-head, .recorder-legend {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font: 500 11.5px/1 var(--pixel); letter-spacing: 0.1em; color: var(--ink-3);
}
.recorder-head { padding: 0 2px 10px; }
.rec { display: inline-flex; align-items: center; gap: 6px; color: #ff6b57; }
.rec i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: blink 1.6s steps(2, start) infinite; }
@keyframes blink { to { visibility: hidden; } }
.recorder svg {
  display: block; width: 100%; height: clamp(180px, 26vw, 300px);
  border: 1px solid var(--line-2); border-radius: 14px; background: var(--bg-2);
}
.trace { fill: none; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.trace-battery { stroke: var(--battery); stroke-width: 2; filter: drop-shadow(0 0 6px rgba(214,242,95,.35)); }
.trace-storage { stroke: var(--storage); stroke-width: 1.25; opacity: .8; }
.plot { position: relative; }
.pen { position: absolute; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%;
  background: var(--battery); box-shadow: 0 0 0 4px rgba(214,242,95,.15), 0 0 16px rgba(214,242,95,.6); opacity: 0; }
.pen.on { opacity: 1; }
.recorder-legend { padding: 12px 2px 0; font-family: var(--sans); font-size: 12.5px; letter-spacing: 0; }
.recorder-legend span { display: inline-flex; align-items: center; gap: 8px; }
.recorder-legend .muted { margin-left: auto; }
.swatch { width: 14px; height: 2px; border-radius: 2px; }
.swatch.battery { background: var(--battery); }
.swatch.storage { background: var(--storage); }

/* ---------- sections ---------- */
section + section { border-top: 1px solid var(--line); }
.word, .why, .glimpse, .tease, .join { padding: clamp(72px, 12vh, 140px) 0; }

.display {
  margin: 0; max-width: 20ch;
  font: 300 clamp(34px, 5vw, 58px)/1.06 var(--display); letter-spacing: -0.015em; text-wrap: balance;
}
.display-sm { margin: 0 0 36px; font: 300 clamp(28px, 3.6vw, 42px)/1.1 var(--display); letter-spacing: -0.01em; text-wrap: balance; }
.display-sm em { font-style: italic; color: var(--accent); }
.body-lg { margin-top: 24px; max-width: 36em; font-size: clamp(16px, 1.5vw, 18px); color: var(--ink-2); text-wrap: pretty; }

/* the word */
.entry { max-width: 820px; }
.headword { margin: 0; font: 300 clamp(30px, 10.6vw, 150px)/0.95 var(--pixel); letter-spacing: 0; white-space: nowrap; }
.headword b { font-weight: inherit; }
.pron { margin-top: 18px; font: 400 18px var(--display); color: var(--ink-3); }
.pron em { margin-left: 6px; }
.def { margin-top: 22px; font: 300 clamp(22px, 2.6vw, 30px)/1.35 var(--display); color: var(--ink); text-wrap: pretty; }
.def em, .timeline em { font-style: italic; }

.timeline {
  list-style: none; margin: clamp(56px, 9vh, 96px) 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  border-top: 1px solid var(--line-2);
}
.timeline li { position: relative; padding: 28px 28px 0 0; color: var(--ink-2); }
.timeline li + li { padding-left: 28px; border-left: 1px solid var(--line); }
.timeline li::before {
  content: ""; position: absolute; top: -4px; left: 0; width: 7px; height: 7px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--ink-3);
}
.timeline li + li::before { left: -4px; }
.timeline li:last-child::before { background: var(--accent); border-color: var(--accent); }
.when { margin-bottom: 12px; font: 500 12.5px/1 var(--pixel); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); }
.timeline li:last-child .when { color: var(--accent); }

/* why */
.cards { margin-top: clamp(48px, 8vh, 80px); display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.card {
  padding: 26px 24px 28px; border: 1px solid var(--line); border-radius: 16px;
  background: linear-gradient(180deg, rgba(243,241,236,0.035), rgba(243,241,236,0.01));
  color: var(--ink-2); font-size: 15px;
}
.card-fig { font: 600 clamp(44px, 5vw, 60px)/1 var(--pixel); color: var(--c); letter-spacing: -0.01em; }
.card-label { margin: 8px 0 18px; font: 500 12px/1 var(--pixel); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); }
sup a { color: var(--ink-3); text-decoration: none; font-size: 11px; margin-left: 2px; }

/* part colours as text and as dots */
.c-battery { color: var(--battery); } .c-storage { color: var(--storage); }
.c-memory { color: var(--memory); } .c-thermal { color: var(--thermal); } .c-os { color: var(--os); }
.d { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; vertical-align: 0; flex: none; }
.c-battery-bg { background: var(--battery); } .c-storage-bg { background: var(--storage); }
.c-memory-bg { background: var(--memory); } .c-thermal-bg { background: var(--thermal); }
.c-os-bg { background: var(--os); }

/* the band */
.band { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--bg-2); padding: 22px 0; }
.band-track { display: flex; width: max-content; animation: band 60s linear infinite; }
.band p { display: flex; align-items: center; gap: 28px; padding-right: 28px; white-space: nowrap;
  font: 600 clamp(22px, 2.6vw, 32px)/1 var(--pixel); letter-spacing: 0.02em; text-transform: uppercase; }
.band i { font-style: normal; font-size: 0.6em; color: var(--ink-3); }
@keyframes band { to { transform: translateX(-50%); } }
.band:hover .band-track { animation-play-state: paused; }
section + .band, .band + section { border-top: 0; }

/* glimpse: the app's overview, as it draws it (app/theme.py, app/ui.py) */
.glimpse .display { max-width: 22ch; }
.ov { margin-top: clamp(48px, 8vh, 80px); display: flex; flex-direction: column; gap: 14px; }
.ov-summary { display: flex; align-items: center; gap: 14px; padding: 0 0 14px; border-bottom: 1px solid var(--line); }
.ov-summary span { font-size: 12px; color: var(--ink-3); flex: none; }
.ov-summary b { font-size: 16px; font-weight: 600; }
.bento { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: minmax(184px, auto); }
.wg { display: flex; flex-direction: column; padding: 16px 18px 18px; border-radius: 16px; color: #121212; min-width: 0; }
.wg.battery { background: var(--battery); } .wg.storage { background: var(--storage); }
.wg.memory { background: var(--memory); } .wg.thermal { background: var(--thermal); }
.wg.system { background: var(--os); }
.wg.runway { background: #1c1c1c; color: var(--ink); --ring: var(--os); }
.wg-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.wg-pill { align-self: flex-start; font: 500 11px/1 var(--pixel); letter-spacing: 0.06em; text-transform: uppercase;
  padding: 6px 10px; border-radius: 99px; background: rgba(0,0,0,0.1); white-space: nowrap; }
.wg.runway .wg-pill { background: rgba(255,255,255,0.12); }
.wg-fig { margin-top: auto; padding-top: 12px; display: flex; align-items: flex-end; gap: 6px; }
.fig { font: 700 clamp(46px, 5.2vw, 62px)/0.82 var(--pixel); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wg-unit { font: 600 15px/1 var(--pixel); padding-bottom: 4px; white-space: nowrap; }
.wg-line { margin-top: 8px; font-size: 12.5px; line-height: 1.35; opacity: .72; }
.wg-line.dim { opacity: .5; margin-top: 2px; }
.rw-body { display: flex; align-items: center; gap: 16px; margin-top: auto; padding-top: 10px; }
.rw-ring { position: relative; flex: none; width: 96px; height: 96px; }
.rw-ring svg { display: block; width: 100%; height: 100%; }
.rw-ring .seg { fill: rgba(255,255,255,0.1); transition: fill .3s; }
.rw-ring .seg.on { fill: var(--ring); }
.rw-mid { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 40px; }
.rw-text { min-width: 0; }
.rw-unit { font: 600 18px/1 var(--pixel); letter-spacing: 0.04em; }
.ov-checks { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-radius: 16px; background: #1c1c1c; color: var(--ink-2); font-size: 13px; }
.ov-checks .fig { font-size: 22px; color: var(--ink); }
.ov-checks .d { margin-right: 0; }
.ov-checks b { margin-left: auto; font: 600 12px/1 var(--pixel); letter-spacing: 0.06em; color: var(--ink); }
.glimpse-note { margin-top: 14px; }

/* not a cleaner */
.tease-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(40px, 7vw, 96px); align-items: start; }
.display-sm { margin: 0; font: 300 clamp(30px, 4vw, 48px)/1.08 var(--display); letter-spacing: -0.01em; text-wrap: balance; }
.px { font-family: var(--pixel); font-weight: 600; font-size: 0.86em; letter-spacing: 0.01em; color: var(--accent); font-style: normal; }
.principles { margin: 0; }
.principles > div { padding: 22px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 15em 1fr; gap: 20px; }
.principles > div:last-child { border-bottom: 1px solid var(--line); }
.principles dt { display: flex; align-items: center; font: 500 12.5px/1.5 var(--pixel); letter-spacing: 0.08em; color: var(--ink); padding-top: 1px; }
.principles dd { margin: 0; color: var(--ink-2); }

/* the headword types itself */
.headword .ch { opacity: 0; }
.headword .ch.on { opacity: 1; }
.headword .caret { display: inline-block; width: 0.42em; height: 0.78em; margin-left: 0.08em; vertical-align: -0.04em;
  background: var(--accent); animation: blink 1.05s steps(2, start) infinite; }

/* join */
.join { position: relative; overflow: hidden; }
.join::before {
  content: ""; position: absolute; left: 50%; top: 0; width: 900px; height: 500px; transform: translate(-50%, -40%);
  background: radial-gradient(closest-side, rgba(214,242,95,0.08), transparent); pointer-events: none;
}
.join-inner { position: relative; text-align: center; display: flex; flex-direction: column; align-items: center; }
.join .display { max-width: 18ch; }
.join .eyebrow { margin-bottom: 28px; }
.signup-full { max-width: 520px; flex-direction: column; align-items: stretch; margin-top: 40px; }
.signup-full .row { display: flex; flex-wrap: wrap; gap: 8px; }
.extras { margin: 6px 0 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 12px; text-align: left; }
.select { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink-2); font-size: 14.5px; }
.select select {
  appearance: none; -webkit-appearance: none; border: 0; background: transparent; color: var(--ink);
  font: 14.5px var(--sans); text-align: right; cursor: pointer; padding-right: 18px;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
  background-position: right 6px center, right 1px center; background-size: 5px 5px; background-repeat: no-repeat;
}
.select select option { background: var(--bg-2); }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 0 2px; color: var(--ink-2); font-size: 14.5px; cursor: pointer; }
.check input { appearance: none; -webkit-appearance: none; flex: 0 0 18px; width: 18px; height: 18px; margin: 2px 0 0;
  border: 1px solid var(--line-2); border-radius: 5px; background: transparent; cursor: pointer; display: grid; place-content: center; }
.check input:checked { background: var(--accent); border-color: var(--accent); }
.check input:checked::after { content: ""; width: 9px; height: 5px; border: 2px solid #121212; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.signup-full .status { text-align: left; }
.signup-full.done .status { text-align: center; }
.signup-full .fine { text-align: left; }
.signup-full.done .fine { display: none; }

/* footer */
.foot { border-top: 1px solid var(--line); padding: 48px 0 40px; font-size: 14px; }
.foot-inner { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.foot .wordmark { display: flex; margin-bottom: 10px; font-size: 16px; }
.foot nav { display: flex; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.foot nav a, .foot .muted a { color: var(--ink-2); text-decoration: none; }
.foot nav a:hover, .foot .muted a:hover { color: var(--ink); }
.sources { margin-top: 32px; font-size: 12px; color: var(--ink-3); }
.sources p { max-width: 60em; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .band-track { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .dot, .rec i { animation: none; }
}

/* ---------- small screens ---------- */
@media (max-width: 860px) {
  .timeline, .cards { grid-template-columns: 1fr; }
  .timeline { border-top: 0; border-left: 1px solid var(--line-2); padding-left: 0; }
  .timeline li, .timeline li + li { padding: 0 0 32px 24px; border-left: 0; }
  .timeline li::before, .timeline li + li::before { top: 4px; left: -4px; }
  .tease-grid { grid-template-columns: 1fr; }
  .principles > div { grid-template-columns: 1fr; gap: 8px; }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wg.runway { grid-column: span 2; }
}
@media (max-width: 520px) {
  .bar .btn-small { padding: 0 11px; }
  .signup .btn { flex: 1 1 100%; }
  .recorder-legend .muted { margin-left: 0; }
  .select { flex-direction: column; align-items: flex-start; gap: 4px; }
  .select select { text-align: left; padding-left: 0; }
}

/* privacy */
.legal { max-width: 720px; padding-top: clamp(56px, 10vh, 110px); padding-bottom: 96px; color: var(--ink-2); }
.legal .display { color: var(--ink); margin-bottom: 40px; }
.legal h2 { margin: 40px 0 10px; font: 500 12.5px/1 var(--pixel); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); }
.legal p + p { margin-top: 12px; }
.legal .fine { margin-top: 48px; }
