/* Cachehound waitlist. Tokens from design/brand/brand-guide.md. */
:root {
  --bg: #F7F4EE; --surface: #FFFFFF; --sunk: #EFEAE1; --line: #DDD6CA;
  --ink: #17140F; --muted: #625A4F; --fetch: #B93C0A; --on-fetch: #FFFFFF;
  --ready: #16733F; --fetching: #1D5FBF; --waiting: #8A5A00; --attention: #B42318;
  --sans: "Schibsted Grotesk", ui-sans-serif, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --ease: cubic-bezier(.2,.7,.2,1);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12110F; --surface: #1B1A17; --sunk: #0C0B0A; --line: #2E2B26;
    --ink: #EEE9E0; --muted: #A39B8E; --fetch: #FF7A45; --on-fetch: #12110F;
    --ready: #4CC27F; --fetching: #79A8F5; --waiting: #E5AE3E; --attention: #F2766B;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 17px/1.55 var(--sans); -webkit-font-smoothing: antialiased;
}
a { color: var(--fetch); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 12px; border-radius: 6px; z-index: 10; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--fetch); outline-offset: 3px; }

/* header */
.top {
  max-width: 1160px; margin: 0 auto; padding: 22px 28px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark { width: 34px; height: 34px; --a: var(--fetch); --b: var(--ink); --k: var(--bg); }
.wordmark { font-weight: 800; font-size: 22px; letter-spacing: -.025em; }
.wordmark span { color: var(--fetch); }
.top-cta {
  font-weight: 600; font-size: 15px; text-decoration: none; color: var(--ink);
  border: 1px solid var(--line); border-radius: 6px; padding: 8px 14px;
  transition: border-color 120ms var(--ease), background 120ms var(--ease);
}
.top-cta:hover { border-color: var(--ink); }

/* hero */
.hero {
  max-width: 1160px; margin: 0 auto; padding: 56px 28px 88px;
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 64px; align-items: center;
}
h1 {
  font-weight: 800; font-size: clamp(44px, 7.2vw, 86px); line-height: .98;
  letter-spacing: -.035em; margin: 0 0 26px;
}
.lede { font-size: clamp(18px, 1.6vw, 21px); color: var(--muted); max-width: 34ch; margin: 0 0 34px; }

.join { max-width: 520px; }
.join-row {
  display: flex; gap: 0; background: var(--surface); border: 1.5px solid var(--ink);
  border-radius: 10px; padding: 5px; transition: box-shadow 120ms var(--ease);
}
.join-row:focus-within { box-shadow: 0 0 0 4px color-mix(in srgb, var(--fetch) 22%, transparent); }
.join input {
  flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink);
  font: 500 17px var(--sans); padding: 12px 14px; outline: none;
}
.join input::placeholder { color: var(--muted); opacity: .8; }
.join button, .btn {
  border: 0; border-radius: 7px; background: var(--fetch); color: var(--on-fetch);
  font: 700 16px var(--sans); padding: 12px 20px; cursor: pointer; white-space: nowrap;
  text-decoration: none; display: inline-block;
  transition: transform 120ms var(--ease), filter 120ms var(--ease);
}
.join button:hover, .btn:hover { filter: brightness(1.08); }
.join button:active, .btn:active { transform: translateY(1px); }
.join button[disabled] { opacity: .7; cursor: progress; }
.join-note { font-size: 15px; color: var(--muted); margin: 14px 2px 0; min-height: 1.5em; }
.join-note strong { color: var(--ink); font-weight: 700; }
.join-note.ok { color: var(--ready); font-weight: 600; }
.join-note.err { color: var(--attention); font-weight: 600; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* the fetch: logo assembles out of order, like pieces arriving */
.fetch {
  margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 34px 34px 26px; display: grid; gap: 22px; justify-items: center; position: relative;
}
.fetch-mark { width: min(100%, 330px); height: auto; --a: var(--fetch); --b: var(--ink); --k: var(--surface); }
.fetch-mark rect { transform-box: fill-box; transform-origin: center; }
.js .fetch-mark rect.pc { opacity: 0; transform: scale(.4); }
.js .fetch-mark rect.pc.in { opacity: 1; transform: scale(1); transition: opacity 200ms var(--ease), transform 200ms var(--ease); }
.fetch-log { width: 100%; display: grid; gap: 10px; font: 500 14px var(--mono); font-variant-numeric: tabular-nums; }
.fetch-log .row { display: flex; justify-content: space-between; align-items: center; }
.fetch-log .k { color: var(--muted); }
.bar { height: 6px; background: var(--sunk); border-radius: 3px; overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; background: var(--fetching); transition: width 120ms linear; }
.bar.done span { background: var(--ready); }
.pill {
  display: inline-flex; align-items: center; gap: 7px; border-radius: 999px;
  padding: 3px 10px 3px 8px; font: 600 13px var(--sans); border: 1px solid currentColor;
}
.pill i { width: 12px; height: 12px; display: inline-block; background: currentColor;
  -webkit-mask: var(--icon) center/contain no-repeat; mask: var(--icon) center/contain no-repeat; }
.pill.waiting { color: var(--waiting);
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Crect x='1' y='1' width='10' height='2.4' rx='1'/%3E%3Crect x='1' y='4.8' width='10' height='2.4' rx='1' opacity='.4'/%3E%3Crect x='1' y='8.6' width='10' height='2.4' rx='1' opacity='.4'/%3E%3C/svg%3E"); }
.pill.fetching { color: var(--fetching);
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M6 1v7M3 5.5 6 8.5 9 5.5M1.5 11h9' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.pill.ready { color: var(--ready);
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M7 .5 1.8 7H5.6L4.8 11.5 10.2 5H6.4Z'/%3E%3C/svg%3E"); }
.pill.ready.pulse i { animation: pulse 200ms var(--ease); }
@keyframes pulse { 50% { transform: scale(1.15); } }
.again {
  position: absolute; top: 14px; right: 14px; border: 1px solid var(--line); background: transparent;
  color: var(--muted); font: 500 13px var(--sans); border-radius: 6px; padding: 5px 10px; cursor: pointer;
}
.again:hover { color: var(--ink); border-color: var(--ink); }

/* promises */
.promises {
  max-width: 1160px; margin: 0 auto; padding: 0 28px 96px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  border-top: 1px solid var(--line);
}
.promises article { padding: 34px 30px 0 0; }
.promises article + article { padding-left: 30px; border-left: 1px solid var(--line); }
.promises h2 { font-size: 21px; line-height: 1.25; letter-spacing: -.015em; margin: 0 0 10px; font-weight: 700; }
.num { display: block; font: 500 54px/1 var(--mono); color: var(--fetch); letter-spacing: -.04em; margin-bottom: 14px; }
.promises p { margin: 0; color: var(--muted); font-size: 16px; }

/* numbers table */
.numbers { max-width: 1160px; margin: 0 auto; padding: 0 28px 96px; }
.numbers-head { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: end; margin-bottom: 26px; }
.numbers h2, .last h2 { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.05; letter-spacing: -.03em; margin: 0; font-weight: 800; }
.numbers-head p { margin: 0; color: var(--muted); font-size: 16px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 640px; }
th, td { padding: 14px 18px; text-align: right; border-bottom: 1px solid var(--line); }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
thead th { font-weight: 700; font-size: 14px; background: var(--sunk); }
thead th em { font-style: normal; font: 500 13px var(--mono); color: var(--muted); margin-left: 4px; }
th[scope=row], thead th:first-child { text-align: left; font-weight: 500; }
td { font: 500 15px var(--mono); font-variant-numeric: tabular-nums; }
td.free { color: var(--ready); font-family: var(--sans); font-weight: 700; }
.fine { color: var(--muted); font-size: 14px; margin: 14px 2px 0; max-width: 72ch; }

/* closing */
.last { max-width: 1160px; margin: 0 auto 72px; padding: 64px 28px; text-align: center;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.last p { color: var(--muted); max-width: 52ch; margin: 18px auto 30px; }

.foot { max-width: 1160px; margin: 0 auto; padding: 0 28px 40px; display: flex; gap: 22px;
  font-size: 14px; color: var(--muted); }
.foot a { color: var(--muted); }

/* privacy page */
.doc { max-width: 680px; margin: 0 auto; padding: 32px 28px 80px; }
.doc h1 { font-size: clamp(36px, 5vw, 52px); }
.doc h2 { font-size: 20px; margin: 34px 0 8px; letter-spacing: -.01em; }
.doc p, .doc li { color: var(--muted); }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 44px; padding-top: 28px; padding-bottom: 64px; }
  .fetch { padding: 24px 22px 20px; }
  .fetch-mark { width: 180px; }
  .promises { grid-template-columns: 1fr; }
  .promises article, .promises article + article { padding: 28px 0; border-left: 0; }
  .promises article + article { border-top: 1px solid var(--line); }
  .numbers-head { grid-template-columns: 1fr; gap: 12px; }
}
@media (max-width: 520px) {
  .top { padding: 16px 20px; }
  .top-cta { display: none; }
  .hero, .promises, .numbers, .last, .foot { padding-left: 20px; padding-right: 20px; }
  .join-row { flex-direction: column; gap: 6px; }
  .join button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
