/* The home page: Besti's shelf of binders, each one a part of the app (option C of the 2026-10-25 canvas).
   The colours are the app's (Besti/Theme.swift); the spines are a new binder's colours (Theme.binderColors). */
@font-face {
  font-family: "Newsreader";
  src: url("/fonts/Newsreader-Italic.ttf") format("truetype");
  font-style: italic;
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --edge: #AEB1B3;
  --sand: #DFE1E2;
  --wood: #C8AC82;
  --cubby: #6A4B33;
  --cubby-ink: #F4EDE3;
  --frame: #1B1F23;
}
@media (prefers-color-scheme: dark) {
  :root {
    --edge: #555B61;
    --sand: #2A3034;
    --wood: #8C7556;
    --cubby: #3F2E21;
    --cubby-ink: #E6DCCD;
    --frame: #2A3034;
  }
}

.home { font-size: 17px; }
.home main, .home .bar, .home .foot { max-width: 1120px; margin-left: auto; margin-right: auto; padding-left: 24px; padding-right: 24px; }

/* Titles in the app's own face: Archivo, heavy, 118% wide (AppFace.titleWidth). */
.home h1, .home h2, .brand, .receipt-brand { font-family: "Archivo", -apple-system, sans-serif; font-weight: 800; font-stretch: 118%; letter-spacing: -0.01em; }

.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; padding-top: 20px; padding-bottom: 20px; }
.brand { display: flex; align-items: center; gap: 8px; font-size: 24px; text-decoration: none; }
.brand svg { width: 34px; height: 34px; }
.bar nav { display: flex; align-items: center; gap: 8px 20px; flex-wrap: wrap; font-size: 15px; }
.bar nav a { text-decoration: none; color: var(--muted); }
.bar nav a:hover { color: var(--ink); }
.pill { display: inline-block; text-decoration: none; background: var(--ink); color: var(--bg) !important; font-weight: 600; padding: 9px 18px; border-radius: 999px; }
.pill.plain { background: var(--surface); color: var(--ink) !important; border: 1px solid var(--edge); }

/* The opening: the line, and the shelf of spines that are the page's own menu. */
.opening { padding: 40px 0 0; }
.opening h1 { margin: 0; max-width: 760px; font-size: clamp(38px, 6vw, 66px); line-height: 1.04; }
.lede { margin: 20px 0 0; max-width: 580px; font-size: 19px; color: var(--muted); }
.shelf { margin-top: 44px; display: flex; align-items: flex-end; gap: 8px; overflow-x: auto; padding: 0 4px; scrollbar-width: none; }
.familiar { flex: 0 0 auto; width: 120px; height: 120px; margin: 0 6px -4px 0; }
.spine {
  flex: 0 0 auto; width: 54px; height: var(--h); box-sizing: border-box; padding-top: 18px;
  display: flex; justify-content: center; background: var(--c); color: #1B1F23; text-decoration: none;
  border: 1px solid rgba(27, 31, 35, 0.25); border-radius: 9px 9px 3px 3px;
  font-weight: 700; font-size: 17px; transition: transform 0.15s ease;
}
.spine span, .spine { writing-mode: vertical-rl; }
.spine.light { color: #FFFFFF; }
.spine.plain { background: var(--surface); color: var(--ink); border-color: var(--edge); }
.spine:hover, .spine:focus-visible { transform: translateY(-10px); }
.plank { height: 16px; background: var(--wood); border-radius: 4px; }
@media (max-width: 560px) {
  .familiar { width: 72px; height: 72px; margin-right: 0; }
  .spine { width: 42px; height: calc(var(--h) * 0.8); font-size: 15px; padding-top: 14px; }
}
@media (prefers-reduced-motion: reduce) { .spine { transition: none; } .spine:hover, .spine:focus-visible { transform: none; } }

/* A part of the app: what it does, beside it standing on a shelf. */
.part { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 32px 48px; padding: 72px 0 0; }
.part.turned { flex-direction: row-reverse; }
.part .words { flex: 1 1 380px; min-width: 0; padding-bottom: 40px; }
.label { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.part h2 { margin: 10px 0 0; font-size: clamp(28px, 3.6vw, 36px); line-height: 1.1; }
.part p { margin: 14px 0 0; color: var(--muted); max-width: 560px; }
.phone { flex: 0 1 300px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; }
.phone img { display: block; width: 250px; max-width: 70vw; height: auto; border: 9px solid var(--frame); border-radius: 44px; background: var(--frame); }
.phone::after { content: ""; display: block; width: 100%; height: 12px; margin-top: -2px; background: var(--wood); border-radius: 4px; }

/* The rest, as the products' case on the Collection tab. */
.more { padding: 88px 0 0; }
.more h2 { margin: 0; font-size: clamp(28px, 3.6vw, 36px); }
.case { list-style: none; margin: 24px 0 0; padding: 12px; background: var(--wood); border-radius: 18px; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.case li { margin: 0; background: var(--cubby); color: var(--cubby-ink); border-radius: 8px; padding: 18px; min-height: 110px; box-sizing: border-box; font-size: 15px; line-height: 1.5; }
.case b { display: block; color: #FFFFFF; font-size: 17px; margin-bottom: 6px; }

.promise { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 24px; padding: 64px 0 0; }
.promise div { flex: 1 1 420px; min-width: 0; }
.promise h2 { margin: 0; font-size: clamp(24px, 3vw, 30px); line-height: 1.15; }
.promise p { margin: 10px 0 0; color: var(--muted); }

/* The waitlist, as a till receipt, like the app's Shopping list. A plain form: no script. */
.waitlist { display: flex; justify-content: center; padding: 72px 0 24px; }
.receipt {
  width: 100%; max-width: 400px; box-sizing: border-box; padding: 28px 26px 30px; background: var(--surface);
  box-shadow: 0 18px 40px rgba(27, 31, 35, 0.14);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), 95% 100%, 90% calc(100% - 10px), 85% 100%, 80% calc(100% - 10px), 75% 100%, 70% calc(100% - 10px), 65% 100%, 60% calc(100% - 10px), 55% 100%, 50% calc(100% - 10px), 45% 100%, 40% calc(100% - 10px), 35% 100%, 30% calc(100% - 10px), 25% 100%, 20% calc(100% - 10px), 15% 100%, 10% calc(100% - 10px), 5% 100%, 0 calc(100% - 10px));
}
.receipt-brand { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 22px; }
.receipt-brand svg { width: 30px; height: 30px; }
.receipt-small { display: block; margin-top: 10px; text-align: center; font-size: 12px; font-weight: 700; letter-spacing: 0.14em; color: var(--muted); }
label.receipt-small { text-align: left; margin-top: 0; }
.receipt hr { border: 0; border-top: 1px dashed var(--edge); margin: 16px 0; }
.receipt-line { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.receipt-line + .receipt-line { margin-top: 4px; }
.receipt-line.quiet { color: var(--muted); }
.receipt input[type="email"] {
  display: block; width: 100%; height: 46px; box-sizing: border-box; margin-top: 8px; padding: 0 16px;
  border: 1px solid var(--edge); border-radius: 999px; background: var(--bg); color: var(--ink); font: inherit; font-size: 16px;
}
.receipt button {
  display: block; width: 100%; height: 46px; margin-top: 12px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--ink); color: var(--bg); font: inherit; font-size: 16px; font-weight: 600;
}
.receipt input:focus-visible, .receipt button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.receipt-note { margin: 14px 0 0; font-size: 14px; line-height: 1.5; color: var(--muted); text-align: center; }
.receipt-thanks { margin: 12px 0 6px; text-align: center; font-family: "Newsreader", Georgia, serif; font-style: italic; font-size: 16px; color: var(--muted); }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.home .foot { margin-top: 64px; }
.home .foot a { color: inherit; }

/* The pages the waitlist sends a visitor back to (lib/waitlist.js on the server). */
.note { max-width: 520px; margin: 0 auto; padding: 64px 0 0; text-align: center; }
.note h1 { margin: 0; font-size: clamp(30px, 5vw, 40px); line-height: 1.1; }
.note p { margin: 14px 0 0; }
.note .pill { margin-top: 12px; }
.note .receipt { margin: 28px auto 0; text-align: left; }
.note-face { width: 110px; height: 110px; margin-bottom: 10px; }

/* Watch it work: a row of short clips for each kind of collector. Each clip has a play/pause button and a bar to skip
   through it (the script at the foot of index.html); without the script the browser's own controls show instead. */
.watch { padding: 96px 0 0; }
.watch > h2 { margin: 0; font-size: clamp(30px, 4.4vw, 46px); line-height: 1.06; max-width: 760px; }
.watch .lede { margin-top: 12px; font-size: 17px; }
.who { margin-top: 52px; }
.who h3 { margin: 0; font-family: "Archivo", -apple-system, sans-serif; font-weight: 800; font-stretch: 118%; font-size: 26px; line-height: 1.2; }
.who h3 span { font-family: "Archivo", -apple-system, sans-serif; font-weight: 400; font-stretch: 100%; font-size: 16px; color: var(--muted); margin-left: 10px; }
.clips { list-style: none; margin: 18px 0 0; padding: 4px 2px 12px; display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.clip { flex: 0 0 200px; width: 200px; margin: 0; scroll-snap-align: start; }
.screen { position: relative; }
.clip video { display: block; width: 100%; aspect-ratio: 432 / 938; height: auto; box-sizing: border-box; border: 7px solid var(--frame); border-radius: 34px; background: var(--frame); object-fit: cover; cursor: pointer; }
/* A round play mark over the still until the clip plays. */
.screen::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 50px; height: 50px; margin: -25px 0 0 -25px; border-radius: 50%; pointer-events: none;
  background: rgba(27, 31, 35, 0.72) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 6.5v11l9-5.5z' fill='white'/%3E%3C/svg%3E") center / 24px no-repeat;
  transition: opacity 0.2s ease;
}
.clip.on .screen::after, .clip:not(:has(.bar:not([hidden]))) .screen::after { opacity: 0; }
/* The bar: a round button (the app's 36 pt round buttons) and a capsule track filled with ink up to where the clip is. */
.bar { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.bar[hidden] { display: none; }
.pp { flex: 0 0 auto; width: 36px; height: 36px; padding: 0; border-radius: 50%; border: 1px solid var(--edge); background: var(--surface); color: var(--ink); cursor: pointer; display: grid; place-items: center; }
.pp svg { width: 18px; height: 18px; fill: currentColor; }
.pp .i-pause, .clip.on .pp .i-play { display: none; }
.clip.on .pp .i-pause { display: block; }
.pp:focus-visible, .bar input:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.bar input { --p: 0%; flex: 1 1 auto; min-width: 0; height: 36px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
.bar input::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(to right, var(--ink) var(--p), var(--line) var(--p)); }
.bar input::-moz-range-track { height: 6px; border-radius: 3px; background: linear-gradient(to right, var(--ink) var(--p), var(--line) var(--p)); }
.bar input::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -6px; border-radius: 50%; background: var(--ink); border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--edge); }
.bar input::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--ink); border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--edge); }
.clip b { display: block; margin-top: 8px; }
.clip span { display: block; font-size: 14px; line-height: 1.45; color: var(--muted); }
@media (max-width: 560px) { .clip { flex-basis: 176px; width: 176px; } .who h3 span { display: block; margin: 4px 0 0; } }
