/* Bonti — mid-century modern. Warm paper, walnut, mustard, teal and tomato,
   the icon's navy for ink; Fraunces for the voice, Jost (Futura's cousin)
   for everything else. Fewer words, mixed case. Night colours follow the
   device's dark mode. November 28, 2026. */

:root {
  color-scheme: light;
  --paper: #F6EFE1;
  --paper-2: #EDE2CB;
  --cream: #FBF6EC;
  --ink: #1D2340;
  --soft: #4F5570;
  --faint: #6F7288;
  --line: rgba(29, 35, 64, .14);
  --mustard: #E2A630;
  --tomato: #D5573A;
  --teal: #2B7C77;
  --walnut: #7B4A2A;
  --walnut-2: #59341C;
  --link: #A4401F;
  --serif: Fraunces, 'Iowan Old Style', Georgia, serif;
  --sans: Jost, Futura, 'Century Gothic', 'Avenir Next', sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #141830; --paper-2: #1C2142; --cream: #EFE6D3;
    --ink: #F4ECDC; --soft: #C6C0B2; --faint: #A39FA6; --line: rgba(244, 236, 220, .14);
    --mustard: #E8B13E; --tomato: #E26A4C; --teal: #3E9A94; --walnut: #8E5733; --walnut-2: #6B3F22; --link: #F0A27F;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #141830; --paper-2: #1C2142; --cream: #EFE6D3;
  --ink: #F4ECDC; --soft: #C6C0B2; --faint: #A39FA6; --line: rgba(244, 236, 220, .14);
  --mustard: #E8B13E; --tomato: #E26A4C; --teal: #3E9A94; --walnut: #8E5733; --walnut-2: #6B3F22; --link: #F0A27F;
}

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 19px; line-height: 1.55; -webkit-font-smoothing: antialiased;
}
/* A little paper grain. */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: .22; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.3 0 0 0 0 0.25 0 0 0 0 0.2 0 0 0 .45 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body::before { mix-blend-mode: screen; opacity: .08; } }
:root[data-theme="dark"] body::before { mix-blend-mode: screen; opacity: .08; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .floor { opacity: .35; } }
:root[data-theme="dark"] .floor { opacity: .35; }

img { max-width: 100%; display: block; }
a { color: var(--link); text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--mustard); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 560; font-variation-settings: "SOFT" 100, "WONK" 0; letter-spacing: -0.015em; text-wrap: balance; }
.wrap { max-width: 1180px; margin: 0 auto; padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); }

/* Fills and strokes for the drawings, so night mode recolours them. */
.f-mustard { fill: var(--mustard); } .f-tomato { fill: var(--tomato); } .f-teal { fill: var(--teal); }
.f-walnut { fill: var(--walnut); } .f-walnut-2 { fill: var(--walnut-2); } .f-cream { fill: var(--cream); }
.f-ink { fill: var(--ink); } .f-paper { fill: var(--paper); }
.floor { fill: #000; opacity: .12; }
.s-tomato { stroke: var(--tomato); } .s-teal { stroke: var(--teal); } .s-ink { stroke: var(--ink); } .s-walnut-2 { stroke: var(--walnut-2); }

/* ── Masthead and colophon ─────────────────────────────────────── */
.masthead { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 28px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font-family: var(--serif); font-weight: 600; font-size: 28px; font-variation-settings: "SOFT" 100; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.masthead nav { display: flex; gap: 28px; }
.masthead nav a, .colophon nav a { color: var(--soft); text-decoration: none; font-weight: 500; }
.masthead nav a:hover, .colophon nav a:hover, .masthead nav a[aria-current=page] { color: var(--ink); }
.masthead nav a[aria-current=page] { text-decoration: underline; text-decoration-color: var(--mustard); text-decoration-thickness: 3px; text-underline-offset: 8px; }
.colophon { border-top: 1px solid var(--line); padding-block: 36px 48px; color: var(--faint); font-size: 15px; }
.colophon nav { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-bottom: 14px; font-size: 17px; }
.colophon nav span { color: var(--soft); }
.colophon p { margin: 0; max-width: 70ch; }

/* ── Home ──────────────────────────────────────────────────────── */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: center; gap: 24px 56px; padding-block: 24px 88px; }
.hero h1 { margin: 0; font-size: clamp(48px, 6.6vw, 92px); line-height: 1.02; font-weight: 540; }
.hero h1 em { font-style: italic; color: var(--tomato); font-variation-settings: "SOFT" 100, "WONK" 1; }
.lede { margin: 24px 0 0; font-size: clamp(20px, 2vw, 24px); line-height: 1.45; color: var(--soft); max-width: 26ch; }
.soon { display: inline-flex; align-items: center; gap: 12px; margin: 36px 0 0; padding: 10px 22px 10px 10px; border-radius: 999px; background: var(--ink); color: var(--paper); font-weight: 500; font-size: 17px; }
.soon img { width: 28px; height: 28px; border-radius: 7px; }
.tv { width: 100%; height: auto; overflow: visible; }
.tv .face { animation: bob 5s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.tv .burst { animation: turn 40s linear infinite; transform-box: fill-box; transform-origin: center; }
@keyframes bob { 50% { transform: translateY(-5px) rotate(-1.5deg); } }
@keyframes turn { to { transform: rotate(360deg); } }

.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 56px; padding-block: 72px 96px; border-top: 1px solid var(--line); }
.feature svg { width: 56px; height: 56px; margin-bottom: 18px; }
.feature h2 { margin: 0 0 6px; font-size: 32px; line-height: 1.1; }
.feature p { margin: 0; color: var(--soft); max-width: 24ch; }

.needs { background: var(--paper-2); padding-block: 88px; text-align: center; }
.needs h2 { margin: 0 0 48px; font-size: clamp(36px, 4.4vw, 52px); line-height: 1.05; }
.chain { list-style: none; display: flex; justify-content: center; align-items: flex-start; gap: 0; margin: 0 auto; padding: 0; max-width: 820px; }
.chain li { position: relative; flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 14px; font-weight: 500; font-size: 20px; white-space: nowrap; }
.chain li + li::before { content: ""; position: absolute; top: 36px; right: calc(50% + 56px); width: calc(100% - 112px); border-top: 3px dotted var(--walnut); }
.chain svg, .chain img { width: 72px; height: 72px; }
.chain img { border-radius: 17px; }
.links { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px 32px; margin: 44px 0 0; font-weight: 500; }

.notes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 56px; padding-block: 88px 96px; }
.note { border-left: 6px solid var(--teal); padding-left: 22px; }
.note:last-child { border-left-color: var(--tomato); }
.note h2 { margin: 0 0 4px; font-size: 30px; line-height: 1.1; }
.note p { margin: 0; color: var(--soft); }

/* ── Nothing's on (404) ────────────────────────────────────────── */
.lost { text-align: center; padding-block: 40px 104px; }
.lost .tv-small { width: min(260px, 60vw); margin: 0 auto 24px; display: block; }
.lost h1 { margin: 0 0 8px; font-size: clamp(44px, 6vw, 72px); line-height: 1.05; }
.lost p { margin: 0; color: var(--soft); }

/* ── Inside pages: help, privacy, open source ──────────────────── */
.page-head { padding-block: 32px 40px; }
.page-head .wrap { max-width: 808px; }
.page-head h1 { margin: 0; font-size: clamp(44px, 6vw, 72px); line-height: 1.04; }
.page-head .intro { margin: 18px 0 0; font-size: 22px; line-height: 1.45; color: var(--soft); max-width: 40ch; }
.page-head .meta { margin: 16px 0 0; font-size: 15px; color: var(--faint); }
.prose { max-width: 808px; margin: 0 auto; padding: 8px max(24px, env(safe-area-inset-right, 0px)) 96px max(24px, env(safe-area-inset-left, 0px)); }
.prose h2 { margin: 56px 0 14px; font-size: 34px; line-height: 1.1; }
.prose h3 { margin: 28px 0 6px; font-size: 22px; line-height: 1.25; }
.prose p, .prose li { color: var(--soft); }
.prose p { margin: 0 0 16px; }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 24px; }
.prose li { margin: 0 0 10px; }
.prose li::marker { color: var(--tomato); }
.prose strong { color: var(--ink); font-weight: 500; }
.prose kbd { font-family: var(--sans); font-size: 16px; font-weight: 500; background: var(--cream); color: #1D2340; border: 1px solid var(--line); border-bottom-width: 3px; border-radius: 6px; padding: 0 7px; }
.prose mark { background: color-mix(in srgb, var(--mustard) 35%, transparent); color: var(--ink); padding: 1px 5px; border-radius: 4px; }
.prose table { border-collapse: collapse; width: 100%; font-size: 16px; margin: 8px 0 18px; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.prose th { color: var(--faint); font-weight: 500; font-size: 14px; letter-spacing: .04em; }
.prose td:first-child { color: var(--ink); font-weight: 500; white-space: nowrap; }
.table-scroll { overflow-x: auto; }
.prose code, .prose pre { font-family: ui-monospace, Menlo, monospace; font-size: 13px; }
.prose pre { background: var(--paper-2); border-radius: 10px; padding: 14px 16px; color: var(--soft); white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 16px; }
.prose dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 20px; margin: 0 0 16px; font-size: 16px; }
.prose dt { color: var(--faint); }
.prose dd { margin: 0; overflow-wrap: anywhere; }
.cards3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 16px; }
.cards3 > div { background: var(--paper-2); border-radius: 14px; padding: 18px 20px 20px; min-width: 0; }
.cards3 h3 { margin: 0 0 6px; }
.cards3 p { margin: 0; font-size: 16px; }
.fix { border-top: 1px solid var(--line); padding: 20px 0; }
.fix:last-of-type { border-bottom: 1px solid var(--line); }
.fix p { margin: 0; }
.fix .say { margin: 0 0 6px; font-family: var(--serif); font-size: 20px; font-style: italic; color: var(--ink); font-variation-settings: "SOFT" 100; }
.film { border-top: 1px solid var(--line); padding: 14px 0; }
.film:last-of-type { border-bottom: 1px solid var(--line); }
.film p { margin: 0; font-size: 16px; }
.support { margin-top: 64px; background: var(--paper-2); border-radius: 18px; padding: 28px 26px 12px; }
.support h2 { margin-top: 0; }

/* ── Small screens and motion ──────────────────────────────────── */
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; padding-top: 8px; }
  .hero .tv { order: -1; max-width: 440px; margin: 0 auto; }
  .features { grid-template-columns: 1fr; gap: 36px; padding-block: 56px 72px; }
  .notes { grid-template-columns: 1fr; padding-block: 64px 72px; }
  .needs { padding-block: 64px; }
}
@media (max-width: 520px) {
  .masthead { padding-block: 20px; }
  .masthead nav { gap: 20px; }
  .chain li { font-size: 15px; }
  .chain svg, .chain img { width: 56px; height: 56px; }
  .chain li + li::before { top: 28px; right: calc(50% + 44px); width: calc(100% - 88px); }
}
@media (prefers-reduced-motion: reduce) {
  .tv .face, .tv .burst { animation: none; }
}
