/* WriteRiff website, Version A: "Antique meets modern".
   Warm paper, ink and brass from the writing tradition; crisp purple, clean sans and device frames from today. */

/* ---------- fonts (self-hosted, SIL Open Font License; see IMAGE-CREDITS.md) ---------- */
@font-face { font-family: "Fraunces"; src: url("../assets/fonts/fraunces-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("../assets/fonts/fraunces-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("../assets/fonts/fraunces-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../assets/fonts/inter-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../assets/fonts/inter-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  --paper: #f6f0e4;
  --paper-2: #efe5d2;
  --card: #fcf9f3;
  --ink: #1f1b17;
  --ink-2: #4a4038;
  --ink-3: #6b5f53;
  --line: #ddd0ba;
  --brass: #84561c;
  --purple: #5b21d1;
  --purple-2: #6d22e8;
  --purple-soft: #ece4fb;
  /* Logo-style blue-to-purple accent, kept subtle. Text on/with these stays above WCAG AA. */
  --accent-grad: linear-gradient(120deg, #3b4fe0 0%, #5b21d1 52%, #7a2ee8 100%);
  --accent-grad-soft: linear-gradient(120deg, #4a3fde 0%, #5b21d1 55%, #6e2ae4 100%);
  --night: #1d1914;
  --night-2: #2a241d;
  --on-night: #f4ecdd;
  --on-night-2: #cdbfa8;
  --lilac: #c4adff;
  --ok: #2b6a39;
  --bad: #a3261b;
  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, "Courier New", monospace;
  --wrap: 1180px;
  --gutter: 32px;
  --radius: 14px;
  --shadow-1: 0 1px 2px rgba(48, 34, 16, .06), 0 6px 18px rgba(48, 34, 16, .07);
  --shadow-2: 0 2px 4px rgba(48, 34, 16, .06), 0 18px 44px rgba(48, 34, 16, .14);
  --intro-bg: #f6f0e4;
  --paper-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .25 0 0 0 0 .12 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* === PAGE BACKGROUND ===
   Every page-background style lives in this one block so it can be swapped easily.
   - body: the main cream paper (colour + grain)
   - .band-paper: the slightly darker paper bands between sections
   - .band-night: the dark ink bands (text colours for them stay in the "sections" block)
   If the paper colour changes, also check .collage .photo:nth-child(2) border (uses --paper / --paper-2)
   and --intro-bg / theme-color, which match the paper. */
body { background-color: var(--paper); background-image: var(--paper-grain); }
.band-paper { background-color: var(--paper-2); background-image: var(--paper-grain); }
.band-night { background: var(--night); }
/* === END PAGE BACKGROUND === */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0; color: var(--ink);
  font: 400 17px/1.65 var(--sans); text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--purple); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--purple-2); }
:focus-visible { outline: 3px solid var(--purple-2); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.12; letter-spacing: -.01em; margin: 0 0 .5em; color: var(--ink); }
h1 { font-size: clamp(2.5rem, 5.2vw, 4.4rem); }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.9rem); }
h3 { font-size: 1.32rem; }
p { margin: 0 0 1em; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 300; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; font-weight: 600; text-decoration: none; transition: transform .2s; }
.skip:focus { top: 12px; color: #fff; }

/* Eyebrow labels: typewriter-style mono with a ruled line */
.eyebrow { display: inline-flex; align-items: center; gap: 12px; font: 600 .78rem/1.2 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--brass); margin: 0 0 18px; }
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.lede { font-size: 1.18rem; color: var(--ink-2); max-width: 36em; }
.muted { color: var(--ink-3); }
em.serif, .serif-i { font-family: var(--serif); font-style: italic; font-weight: 400; }

/* ---------- typewriter-key buttons ---------- */
.key {
  --k-bg: var(--ink); --k-fg: #fbf6ec; --k-edge: #000;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 26px; border: 0; border-radius: 12px; cursor: pointer;
  font: 600 1rem/1 var(--sans); letter-spacing: .01em; text-decoration: none;
  color: var(--k-fg); background: var(--k-bg);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .14), inset 0 -3px 0 rgba(0, 0, 0, .28), 0 4px 0 var(--k-edge), 0 8px 18px rgba(31, 27, 23, .22);
  transform: translateY(0); transition: transform .14s ease, box-shadow .14s ease, background-color .2s;
}
.key:hover { color: var(--k-fg); transform: translateY(-2px); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .18), inset 0 -3px 0 rgba(0, 0, 0, .28), 0 6px 0 var(--k-edge), 0 12px 22px rgba(31, 27, 23, .24); }
.key:active { transform: translateY(3px); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .12), inset 0 -1px 0 rgba(0, 0, 0, .28), 0 1px 0 var(--k-edge), 0 3px 8px rgba(31, 27, 23, .2); }
/* Primary "Join the beta" button: a soft blue-to-purple gradient like the logo, no hard edge under the face.
   Hover: a slight grow, a soft glow, and a lighter gradient layer that fades in (opacity only).
   The look is set by the --jb-* variables; buttons.html shows the variations (.jb-a ... .jb-d). Site = .jb-a values. */
.key-primary {
  --jb-face: linear-gradient(120deg, #4a3fde 0%, #5b21d1 55%, #6e2ae4 100%);
  --jb-light: linear-gradient(120deg, #5d55ea 0%, #6c37dc 55%, #8443ee 100%);
  --jb-inset: 0 0 0 transparent;
  --jb-shadow: 0 2px 4px rgba(59, 30, 150, .16), 0 8px 20px rgba(80, 40, 200, .22);
  --jb-glow: 0 4px 10px rgba(59, 30, 150, .16), 0 12px 30px rgba(108, 60, 235, .38);
  isolation: isolate; color: #fff; background: var(--jb-face);
  box-shadow: var(--jb-inset), var(--jb-shadow);
  transition: transform .18s ease, box-shadow .25s ease;
}
.key-primary::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: var(--jb-light); opacity: 0; transition: opacity .25s ease;
}
.key-primary:hover, .key-primary:focus-visible { color: #fff; transform: scale(1.035); box-shadow: var(--jb-inset), var(--jb-glow); }
.key-primary:hover::before, .key-primary:focus-visible::before, .key-primary.is-hover::before { opacity: 1; }
.key-primary.is-hover { transform: scale(1.035); box-shadow: var(--jb-inset), var(--jb-glow); } /* sampler: frozen hover preview */
.key-primary:active { transform: scale(.985); box-shadow: var(--jb-inset), var(--jb-shadow); }
.key-primary:focus-visible { outline: 3px solid #3b4fe0; outline-offset: 3px; }
/* sampler variations (buttons.html only) */
.jb-b { --jb-inset: inset 0 1px 0 rgba(255, 255, 255, .22); --jb-face: linear-gradient(rgba(255, 255, 255, .10), rgba(255, 255, 255, 0) 55%), linear-gradient(120deg, #4a3fde 0%, #5b21d1 55%, #6e2ae4 100%); }
.jb-c { --jb-face: linear-gradient(120deg, #3b4fe0 0%, #5b21d1 52%, #7a2ee8 100%); --jb-light: linear-gradient(120deg, #5466ee 0%, #6d37e2 52%, #8f4cf2 100%); }
.jb-d { --jb-face: #5b21d1; --jb-light: #6c35e0; }
.key-ghost { --k-bg: var(--card); --k-fg: var(--ink); --k-edge: #c9b99d; box-shadow: inset 0 0 0 1.5px #cdbd9f, 0 4px 0 var(--k-edge), 0 8px 16px rgba(31, 27, 23, .10); }
.key-ghost:hover { box-shadow: inset 0 0 0 1.5px #bba987, 0 6px 0 var(--k-edge), 0 12px 20px rgba(31, 27, 23, .12); }
.key-ghost:active { box-shadow: inset 0 0 0 1.5px #bba987, 0 1px 0 var(--k-edge); }
.key-sm { min-height: 42px; padding: 0 18px; font-size: .95rem; border-radius: 10px; }
.key .arrow { transition: transform .2s ease; }
.key:hover .arrow { transform: translateX(3px); }
.actions { display: flex; flex-wrap: wrap; gap: 16px 18px; align-items: center; margin-top: 30px; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(252, 249, 243, .92); border-bottom: 1px solid rgba(221, 208, 186, .8); }
@supports (backdrop-filter: blur(8px)) { .site-header { background: rgba(252, 249, 243, .82); backdrop-filter: saturate(1.4) blur(10px); } }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark { position: relative; display: block; height: 38px; width: 38px; overflow: hidden; }
.brand-mark-anim { position: absolute; left: 0; top: 0; }
.brand-word { font: 600 1.42rem/1 var(--serif); letter-spacing: -.01em; color: var(--ink); }
.brand-word .r { color: var(--purple); }
.site-nav { display: flex; align-items: center; gap: 30px; }
.site-nav a:not(.key) { position: relative; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .98rem; padding: 6px 0; }
.site-nav a:not(.key)::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--accent-grad); transform: scaleX(0); transform-origin: left; transition: transform .25s ease; }
.site-nav a:not(.key):hover::after, .site-nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav-toggle { display: none; }

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); font: 600 .95rem/1 var(--sans); cursor: pointer; }
  .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .25s ease, opacity .2s; }
  .nav-toggle-bars { position: relative; }
  .nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
  .nav-toggle-bars::before { top: -6px; }
  .nav-toggle-bars::after { top: 6px; }
  .nav-open .nav-toggle-bars { background: transparent; }
  .nav-open .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
  .nav-open .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }
  .site-nav { position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 20px; background: var(--card); border-bottom: 1px solid var(--line); box-shadow: 0 18px 30px rgba(31, 27, 23, .12);
    opacity: 0; transform: translateY(-8px); visibility: hidden; transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s; }
  .nav-open .site-nav { opacity: 1; transform: none; visibility: visible; transition: opacity .2s ease, transform .2s ease; }
  .site-nav a:not(.key) { padding: 14px 4px; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .site-nav a:not(.key)::after { display: none; }
  .site-nav .key { margin-top: 16px; }
  .no-js .site-nav { position: static; opacity: 1; visibility: visible; transform: none; }
}

/* ---------- sections ---------- */
main { display: block; }
.section { padding: 110px 0; position: relative; }
.section-tight { padding: 80px 0; }
.section-head { max-width: 720px; margin-bottom: 54px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }
.section-head p:not(.eyebrow) { color: var(--ink-2); font-size: 1.1rem; }
.rule { border: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--line) 15%, var(--line) 85%, transparent); margin: 0; }
.band-night { color: var(--on-night); } /* background: see PAGE BACKGROUND block at the top */
.band-night h2, .band-night h3 { color: var(--on-night); }
.band-night .eyebrow { color: #d9a45c; }
.band-night p { color: var(--on-night-2); }
.band-night a { color: var(--lilac); }
.screen p, .band-night .screen .ui-h { color: var(--ink); }
.band-night .split p, .band-night .ticks li { color: var(--on-night-2); }

/* ---------- hero ---------- */
.hero { padding: 72px 0 96px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.02fr 1fr; gap: 64px; align-items: center; }
.hero h1 { margin-bottom: 26px; max-width: 11.5em; }
.hero .lede { margin-bottom: 0; }
.hero-note { margin-top: 22px; font-size: .92rem; color: var(--ink-3); display: flex; align-items: center; gap: 10px; }
.hero-note::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-grad); box-shadow: 0 0 0 4px var(--purple-soft); flex: none; }
.page-hero { padding: 80px 0 64px; }
.page-hero h1 { max-width: 12em; }
.page-hero .lede { margin-bottom: 0; }

/* Typed headline: the real text is read by screen readers; the visible copy types itself once, then the caret blinks. */
.typed { position: relative; }
.typed-vis .w { white-space: nowrap; }
.js .typed-vis:not(.is-armed) { opacity: 0; animation: typed-fallback 0s linear 2.5s forwards; } /* safety: show text if the script never runs */
@keyframes typed-fallback { to { opacity: 1; } }
.js .typed-vis.is-armed .ch { opacity: 0; }
.js .typed-vis.is-armed .ch.on { opacity: 1; }
.caret { position: absolute; left: 0; top: 0; width: 4px; border-radius: 2px; background: linear-gradient(#5b4ae6, #6d2ae6); opacity: 0; pointer-events: none; will-change: transform; }
.caret.show { opacity: 1; }
.caret.blink { animation: caret-blink 1.05s steps(1, end) 2; }
.caret.gone { opacity: 0; transition: opacity .45s ease; }
@keyframes caret-blink { 0%, 55% { opacity: 1; } 56%, 100% { opacity: 0; } }
.typed .accent { color: var(--purple); } /* solid fallback */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .typed .accent { background: var(--accent-grad-soft); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
}
.typed .ital { font-style: italic; font-weight: 400; }

/* Hero visual: an antique photo with a modern laptop and phone laid over it */
.hero-visual { position: relative; padding: 0 0 150px 0; }
.hero-photo { width: 94%; margin-left: auto; transform: rotate(1.2deg); }
.hero-visual .laptop { position: absolute; left: -4%; bottom: 0; width: 62%; }
.hero-visual .phone { position: absolute; right: 4%; bottom: -16px; width: 17%; }
.stamp { position: absolute; top: -18px; left: 4%; z-index: 3; display: grid; place-items: center; width: 108px; height: 108px; border-radius: 50%; border: 2px dashed rgba(91, 33, 209, .55); color: var(--purple); background: rgba(252, 249, 243, .9); transform: rotate(-12deg); text-align: center; font: 600 .7rem/1.25 var(--mono); letter-spacing: .12em; text-transform: uppercase; box-shadow: var(--shadow-1); }
.stamp b { display: block; font: 600 1.05rem/1.1 var(--serif); letter-spacing: 0; text-transform: none; font-style: italic; }

/* ---------- photos: start in sepia, bloom into colour when revealed ---------- */
.photo { position: relative; margin: 0; border-radius: 6px; overflow: hidden; background: #d8c7a8; box-shadow: var(--shadow-2); }
.photo picture { display: contents; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo .sepia { position: absolute; inset: 0; filter: sepia(.9) saturate(.75) contrast(.95) brightness(1.02); opacity: 1; transition: opacity 1.8s ease .35s; }
.photo.framed { padding: 10px; background: #fffdf8; border-radius: 4px; }
.photo.framed img, .photo.framed .sepia { border-radius: 2px; }
.photo.framed .sepia { inset: 10px; width: calc(100% - 20px); height: calc(100% - 20px); }
.is-in .photo .sepia, .photo.is-in .sepia { opacity: 0; }
.photo figcaption { position: absolute; left: 12px; bottom: 12px; font: 600 .72rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: #fff; background: rgba(31, 27, 23, .62); padding: 7px 10px; border-radius: 4px; }
.photo.framed figcaption { left: 22px; bottom: 22px; }

/* ---------- device mockups (illustrative only, not real app screens) ---------- */
.laptop { filter: drop-shadow(0 22px 30px rgba(31, 27, 23, .25)); }
.laptop-lid { position: relative; padding: 3.2% 3.2% 4%; background: linear-gradient(#2c2830, #1b181e); border-radius: 14px 14px 4px 4px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.laptop-lid::before { content: ""; position: absolute; top: 1.3%; left: 50%; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: #3d3842; }
.laptop-base { position: relative; height: 0; padding-bottom: 3.2%; margin: 0 -7%; background: linear-gradient(#d9d5dc, #a9a4ae); border-radius: 0 0 14px 14px / 0 0 60% 60%; }
.laptop-base::before { content: ""; position: absolute; left: 50%; top: 0; width: 16%; height: 38%; transform: translateX(-50%); background: #8f8a95; border-radius: 0 0 8px 8px; }
.screen { position: relative; overflow: hidden; background: #fffdf9; border-radius: 3px; aspect-ratio: 16 / 10; }
.phone { padding: clamp(4px, .55vw, 8px); background: linear-gradient(145deg, #2e2a33, #18151b); border-radius: 18% / 8.5%; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), 0 22px 36px rgba(31, 27, 23, .3); }
.phone .screen { aspect-ratio: 9 / 19; border-radius: 13% / 6%; }
.tablet { padding: clamp(6px, .8vw, 12px); background: linear-gradient(145deg, #2e2a33, #18151b); border-radius: 7%; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), 0 22px 36px rgba(31, 27, 23, .26); }
.tablet .screen { aspect-ratio: 3 / 4; border-radius: 3%; }

/* Screen UI shapes */
.ui { position: absolute; inset: 0; display: flex; flex-direction: column; font-family: var(--sans); color: var(--ink); }
.ui-top { display: flex; align-items: center; gap: 5px; padding: 3.2% 4%; border-bottom: 1px solid #ece4d6; background: #fbf7ef; }
.ui-dot { width: 6px; height: 6px; border-radius: 50%; background: #d9cfbf; }
.ui-dot.p { background: var(--purple-2); }
.ui-tab { margin-left: 8px; height: 6px; width: 18%; border-radius: 3px; background: #e6dccb; }
.ui-body { flex: 1; display: flex; min-height: 0; }
.ui-side { width: 24%; padding: 4% 3%; background: #f5efe4; border-right: 1px solid #ece4d6; display: flex; flex-direction: column; gap: 7%; }
.ui-side i { display: block; height: 5px; border-radius: 3px; background: #ddd1bd; }
.ui-side i.on { background: var(--accent-grad); width: 80%; }
.ui-page { flex: 1; padding: 5% 9% 0; overflow: hidden; }
.ui-h { font: 600 clamp(8px, 1.15vw, 15px)/1.2 var(--serif); margin: 0 0 4%; color: var(--ink); white-space: nowrap; }
.ui-chap { font: 600 clamp(6px, .62vw, 9px)/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--brass); margin-bottom: 3%; }
.ui-l { display: block; height: 4px; border-radius: 2px; background: #e3dacb; margin: 0 0 3.2%; width: var(--w, 100%); }
.ui-l.hl { background: linear-gradient(90deg, #e3dacb 0 30%, #d8c8f7 30% 70%, #e3dacb 70%); }
.ui-l.dk { background: #cbbfac; }
.ui-gap { height: 3%; }
.ui-note { position: absolute; right: 4%; top: 52%; width: 26%; padding: 3%; border-radius: 6px; background: #fff; box-shadow: 0 6px 16px rgba(31, 27, 23, .14); border-left: 3px solid var(--purple-2); }
.ui-note i { display: block; height: 3px; border-radius: 2px; background: #e3dacb; margin: 6% 0; }
.ui-note b { display: block; font: 600 clamp(6px, .6vw, 9px)/1 var(--sans); color: var(--purple); }
.ui-reader { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 14% 11% 8%; background: #fbf5e8; }
.ui-reader .ui-h { text-align: center; font-size: clamp(7px, 1vw, 13px); margin-bottom: 8%; }
.ui-reader .drop { float: left; font: 600 2.2em/0.8 var(--serif); color: var(--purple); margin: 2px 4px 0 0; }
.ui-reader .ui-l { height: 3px; margin-bottom: 5.5%; }
.ui-reader .pg { margin-top: auto; text-align: center; font: 400 clamp(6px, .55vw, 8px)/1 var(--mono); color: var(--ink-3); }
.ui-progress { height: 3px; background: #eadfcd; border-radius: 2px; margin-top: 6%; }
.ui-progress span { display: block; width: 46%; height: 100%; border-radius: 2px; background: var(--accent-grad); }

/* ---------- feature cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card { position: relative; padding: 30px 28px 28px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1); transition: transform .3s cubic-bezier(.2, .7, .2, 1), box-shadow .3s ease; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }
.card h3 { margin: 18px 0 8px; }
.card p { margin: 0; color: var(--ink-2); font-size: .98rem; }
.card .more { display: inline-block; margin-top: 14px; font-weight: 600; font-size: .95rem; text-decoration: none; }
/* round typewriter key cap used as an icon */
.keycap { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: radial-gradient(circle at 50% 38%, #3a3440, #17141a 70%); color: #f6efe0; font: 600 1.25rem/1 var(--serif); box-shadow: inset 0 0 0 3px #b9b2a6, inset 0 0 0 5px #2a2530, 0 4px 0 #0c0a0d, 0 8px 14px rgba(31, 27, 23, .25); transition: transform .2s ease; }
.keycap svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.card:hover .keycap { transform: translateY(2px); }
.keycap.p { background: radial-gradient(circle at 50% 30%, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 55%), linear-gradient(135deg, #4a44e2 0%, #5b21d1 55%, #7a2ee8 100%); box-shadow: inset 0 0 0 3px #d9c9ff, inset 0 0 0 5px #4c19b4, 0 4px 0 #2d0d7a, 0 8px 14px rgba(91, 33, 209, .3); }

/* ---------- split rows ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; }
.split.flip > :first-child { order: 2; }
.split-media { position: relative; }
.split p { color: var(--ink-2); }
.ticks { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 32px; color: var(--ink-2); }
.ticks li::before { content: ""; position: absolute; left: 0; top: .38em; width: 18px; height: 18px; border-radius: 50%; background: var(--purple-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.4l2.6 2.5L13 6.5' fill='none' stroke='%235b21d1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat; }
.band-night .ticks li { color: var(--on-night-2); }
.band-night .ticks li::before { background-color: rgba(196, 173, 255, .16); }

.split-media > .photo { aspect-ratio: 4 / 5; }
.split-media > .photo[data-wide], #ai .split-media > .photo { aspect-ratio: 4 / 3; }
.collage { position: relative; padding-bottom: 18%; }
.collage > .photo:first-child { aspect-ratio: 3 / 2; }
.collage > .photo:nth-child(2) { aspect-ratio: 3 / 4; }
.collage .photo:first-child { width: 72%; }
.collage .photo:nth-child(2) { position: absolute; right: 0; bottom: 0; width: 46%; border: 8px solid var(--paper); }
.band-paper .collage .photo:nth-child(2) { border-color: var(--paper-2); }

/* ---------- quote ---------- */
.quote { font: 400 italic clamp(1.6rem, 3vw, 2.4rem)/1.3 var(--serif); margin: 0; color: var(--on-night); max-width: 22em; }
/* Decorative gold fountain-pen nib above the line (replaced the opening quote mark, 2026-11-20: it isn't a quotation). */
.quote-nib { display: block; width: auto; height: 1.5em; margin: 0 0 18px 4px; fill: #d9a45c; overflow: visible; transform: rotate(28deg); transform-origin: 50% 50%; }
.devices { position: relative; display: grid; grid-template-columns: 1fr; align-items: end; padding: 0 4% 0 0; }
.devices .laptop { width: 86%; }
.devices .tablet { position: absolute; right: 2%; bottom: 0; width: 28%; }
.devices .phone { position: absolute; right: 26%; bottom: -10px; width: 15%; }

/* ---------- AI stages ribbon ---------- */
.stages { list-style: none; margin: 40px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; counter-reset: st; }
.stages li { counter-increment: st; display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px 10px 10px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; font-weight: 600; font-size: .95rem; transition: transform .25s ease, border-color .25s; }
.stages li::before { content: counter(st); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fbf6ec; font: 600 .8rem/1 var(--mono); }
.stages li:hover { transform: translateY(-2px); border-color: #c5b392; }
.stages li:last-child::before { background: var(--accent-grad); }
.note-card { margin-top: 34px; padding: 22px 24px; border-left: 3px solid var(--purple); border-image: linear-gradient(#3b4fe0, #5b21d1 50%, #7a2ee8) 1; background: var(--purple-soft); border-radius: 0 10px 10px 0; color: #2c1a55; }
.note-card p { margin: 0; color: #2c1a55; }

/* ---------- forms ---------- */
.form-card { position: relative; padding: 38px 36px 32px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-2); }
.form-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; border-radius: 18px 18px 0 0; background: repeating-linear-gradient(90deg, var(--purple) 0 22px, #d9a45c 22px 30px, var(--ink) 30px 52px, #d9a45c 52px 60px); opacity: .9; }
.form-card h2, .form-card h3 { margin-top: 4px; }
.form { display: grid; gap: 18px; }
.form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field label, .field .label { display: block; margin-bottom: 7px; font-weight: 600; font-size: .95rem; color: var(--ink); }
.opt { font-weight: 400; color: var(--ink-3); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 50px; padding: 12px 14px; border: 1.5px solid #cfc0a6; border-radius: 10px; background: #fffefb; color: var(--ink);
  font: 400 1rem/1.4 var(--sans); transition: border-color .2s, box-shadow .2s; -webkit-appearance: none; appearance: none;
}
.field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%234a4038' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 12px; padding-right: 40px; }
.field textarea { min-height: 160px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #8a7c6c; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #b7a684; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--purple-2); box-shadow: 0 0 0 4px rgba(109, 34, 232, .18); }
.check { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; font-size: .95rem; color: var(--ink-2); }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--purple); cursor: pointer; }
.check label { cursor: pointer; }
[aria-invalid="true"] { border-color: var(--bad) !important; box-shadow: 0 0 0 4px rgba(163, 38, 27, .14) !important; }
.check input[aria-invalid="true"] { outline: 2px solid var(--bad); outline-offset: 2px; }
.form .key { justify-self: start; min-width: 200px; }
.form-status { margin: 0; min-height: 1.5em; font-size: .97rem; font-weight: 600; color: var(--ink-2); }
.form-status:empty { min-height: 0; }
.is-sending .form-status { color: var(--ink-3); }
.is-sending [type="submit"] { opacity: .7; cursor: progress; transform: translateY(2px); }
.is-done .form-status { color: var(--ok); padding: 12px 14px; background: #e6f1e3; border-radius: 10px; }
.is-error .form-status { color: var(--bad); padding: 12px 14px; background: #f7e6e1; border-radius: 10px; }
.form-note { margin: 0; font-size: .88rem; color: var(--ink-3); }

/* ---------- beta CTA block ---------- */
.cta-grid { display: grid; grid-template-columns: .95fr 1.05fr; gap: 64px; align-items: center; }
.cta-photo { position: relative; }
.cta-photo .photo { aspect-ratio: 4 / 5; }
.cta-photo .tag { position: absolute; right: -14px; bottom: 34px; padding: 16px 18px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-2); font: 400 italic 1.1rem/1.3 var(--serif); max-width: 220px; transform: rotate(-2deg); }
.perks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.perk { padding: 28px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.perk .num { font: 600 .8rem/1 var(--mono); letter-spacing: .14em; color: var(--brass); }
.perk h3 { margin: 12px 0 8px; }
.perk p { margin: 0; color: var(--ink-2); }

/* ---------- features page ---------- */
.feature { padding: 96px 0; }
.feature + .feature { border-top: 1px solid var(--line); }
.feature .split { gap: 80px; }
.feature h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); }
.feature .keycap { margin-bottom: 22px; }
.toc { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; }
.toc a { display: inline-block; padding: 9px 15px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); text-decoration: none; font-weight: 600; font-size: .92rem; transition: transform .2s ease, border-color .2s; }
.toc a:hover { transform: translateY(-2px); border-color: var(--purple-2); color: var(--purple); }

/* mock boards for features */
.board { position: relative; padding: 28px; background: #efe4cf; border-radius: 16px; box-shadow: inset 0 0 0 1px #e0d2b8, var(--shadow-2); }
.board-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.board-col h4 { margin: 0 0 10px; font: 600 .72rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--brass); }
.index-card { position: relative; margin-bottom: 12px; padding: 12px 12px 14px; background: #fffdf7; border-radius: 4px; box-shadow: 0 2px 0 #e2d6c0, 0 6px 12px rgba(31, 27, 23, .08); }
.index-card b { display: block; font: 600 .86rem/1.3 var(--serif); padding-bottom: 8px; margin-bottom: 10px; border-bottom: 1px solid #efc4c4; }
.index-card i { display: block; height: 4px; border-radius: 2px; background: #e5dccd; margin-top: 7px; }
.index-card.p { box-shadow: 0 2px 0 #d1c0f3, 0 6px 12px rgba(91, 33, 209, .12); }
.index-card.p::before { content: ""; position: absolute; top: -6px; left: 50%; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--accent-grad); box-shadow: 0 2px 3px rgba(0, 0, 0, .25); }
.vault { position: relative; height: 340px; }
.vault .index-card { position: absolute; width: 52%; padding: 18px 18px 22px; }
.vault .index-card b { font-size: 1rem; }
.vault .c1 { left: 0; top: 4%; transform: rotate(-5deg); }
.vault .c2 { left: 46%; top: 0; transform: rotate(3deg); }
.vault .c3 { left: 3%; top: 52%; transform: rotate(2deg); }
.vault .c4 { left: 47%; top: 47%; transform: rotate(-3deg); }
.vault .chip { display: inline-block; margin-top: 12px; padding: 3px 8px; border-radius: 999px; background: var(--purple-soft); color: var(--purple); font: 600 .7rem/1.3 var(--sans); }
.critique { position: relative; padding: 30px 30px 30px; background: #fffdf8; border-radius: 6px; box-shadow: var(--shadow-2); }
.critique .ms .ui-l { height: 6px; margin-bottom: 14px; }
.critique .ms { width: 62%; }
.critique .bubble { position: absolute; right: 18px; width: 34%; padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-1); font-size: .8rem; line-height: 1.4; color: var(--ink-2); }
.critique .bubble b { display: block; font-size: .76rem; color: var(--purple); margin-bottom: 4px; }
.critique .b1 { top: 26px; }
.critique .b2 { top: 152px; }
.audio { padding: 30px; background: var(--night); border-radius: 18px; color: var(--on-night); box-shadow: var(--shadow-2); }
.audio .cover { display: flex; gap: 18px; align-items: center; margin-bottom: 26px; }
.audio .book { width: 74px; aspect-ratio: 2 / 3; border-radius: 3px 6px 6px 3px; background: linear-gradient(90deg, #3c1590 0 8%, #5b21d1 8%); box-shadow: 0 8px 16px rgba(0, 0, 0, .35); position: relative; }
.audio .book::after { content: ""; position: absolute; left: 22%; right: 16%; top: 30%; height: 2px; background: #d9a45c; box-shadow: 0 8px 0 rgba(217, 164, 92, .6); }
.audio .t { font: 600 1.15rem/1.2 var(--serif); }
.audio .s { font-size: .85rem; color: var(--on-night-2); }
.wave { display: flex; align-items: center; gap: 3px; height: 54px; }
.wave i { flex: 1; border-radius: 2px; background: #5a4f43; height: var(--h, 40%); }
.wave i.on { background: var(--lilac); }
.audio .ctrl { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; font: 400 .8rem/1 var(--mono); color: var(--on-night-2); }
.audio .play { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--on-night); color: var(--night); }
.audio .play svg { width: 18px; height: 18px; fill: currentColor; margin-left: 3px; }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 48px; align-items: start; }
.aside-card { padding: 28px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.aside-card h2 { font-size: 1.4rem; }
.aside-card p { color: var(--ink-2); }
.aside-stack { display: grid; gap: 22px; }
.aside-stack .photo { aspect-ratio: 16 / 9; }

/* ---------- privacy ---------- */
.prose { max-width: 720px; margin: 0 auto; padding: 72px var(--gutter) 110px; }
.prose-sheet { padding: 56px 60px; background: var(--card); border: 1px solid var(--line); border-radius: 6px; box-shadow: var(--shadow-1); }
.prose h1 { font-size: clamp(2.2rem, 4vw, 3rem); margin-bottom: .2em; }
.prose h2 { font-size: 1.5rem; margin: 2em 0 .5em; padding-top: 1.2em; border-top: 1px solid var(--line); }
.prose h3 { font-size: 1.12rem; margin: 1.4em 0 .4em; font-family: var(--sans); }
.prose p, .prose li { color: var(--ink-2); }
.prose ul { padding-left: 1.3em; }
.prose li { margin: .4em 0; }
.prose li::marker { color: var(--purple); }
.privacy-meta { font: 600 .82rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--brass); margin-bottom: 2em !important; }

/* ---------- 404 ---------- */
.nf { padding: 90px 0 120px; text-align: center; }
.nf-sheet { position: relative; max-width: 560px; margin: 0 auto 40px; padding: 56px 40px 48px; background: #fffdf8; border-radius: 4px; box-shadow: var(--shadow-2); background-image: repeating-linear-gradient(transparent 0 31px, #e9e1d2 31px 32px); }
.nf-sheet .code { font: 600 .82rem/1 var(--mono); letter-spacing: .3em; color: var(--brass); margin-bottom: 22px; }
.nf h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
.nf .actions { justify-content: center; }

/* ---------- footer ---------- */
.site-footer { background: var(--night); color: var(--on-night-2); padding: 70px 0 34px; font-size: .95rem; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; padding-bottom: 40px; border-bottom: 1px solid #3a3229; }
.footer-brand { max-width: 340px; }
.footer-brand .word { font: 600 1.6rem/1 var(--serif); color: var(--on-night); margin-bottom: 12px; display: block; }
.footer-brand .word .r { color: var(--lilac); }
.footer-brand p { margin: 0; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 14px 30px; align-items: flex-start; }
.footer-nav a { color: var(--on-night); text-decoration: none; font-weight: 600; }
.footer-nav a:hover { color: var(--lilac); text-decoration: underline; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 26px; font-size: .88rem; }
.footer-bottom a { color: var(--on-night-2); }
.footer-bottom a:hover { color: var(--lilac); }

/* ---------- "not locked in" line by Folio ---------- */
.io-note { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; color: var(--ink-3); }
.io-note svg { flex: none; width: 18px; height: 18px; margin-top: .2em; stroke: #5b21d1; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card .io { display: block; margin-top: 8px; font-size: .9rem; color: var(--ink-3); }

/* ---------- button sampler (buttons.html, private) ---------- */
.sampler { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 22px; }
.sample { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; padding: 28px 24px 24px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.sample h2 { font-size: 1.2rem; margin: 0; }
.sample p { margin: 0; font-size: .95rem; color: var(--ink-2); }
.sample .btns { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; min-height: 64px; }
.sample.used { border-color: #8f74e0; box-shadow: 0 0 0 3px rgba(91, 33, 209, .12); }
.used-tag { display: inline-block; padding: 4px 10px; border-radius: 999px; background: var(--accent-grad); color: #fff; font: 600 .74rem/1.3 var(--sans); letter-spacing: .04em; }
.sample-row { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; margin-top: 18px; }

/* ---------- scroll reveals ---------- */
[data-reveal] { transition: opacity .9s ease, transform .9s cubic-bezier(.2, .7, .2, 1); }
.js [data-reveal]:not(.is-in) { opacity: 0; transform: translateY(22px); }
.js [data-reveal="fade"]:not(.is-in) { transform: none; }
.hero-photo[data-reveal] { transition: opacity 1s ease, transform 1.1s cubic-bezier(.2, .7, .2, 1); }
.js .hero-photo[data-reveal]:not(.is-in) { transform: rotate(1.2deg) translateY(22px); }
.js .hero-visual .laptop[data-reveal]:not(.is-in) { transform: translateY(34px); }
.js .hero-visual .phone[data-reveal]:not(.is-in) { transform: translateY(46px); }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .hero-grid { gap: 40px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .split, .feature .split { gap: 48px; }
}
@media (max-width: 900px) {
  :root { --gutter: 24px; }
  .section { padding: 84px 0; }
  .hero { padding: 48px 0 72px; }
  .hero-grid, .split, .feature .split, .cta-grid, .contact-grid { grid-template-columns: 1fr; }
  .split.flip > :first-child { order: 0; }
  .hero-visual { max-width: 620px; margin: 10px auto 0; width: 100%; }
  .perks { grid-template-columns: 1fr; }
  .cta-photo { max-width: 460px; }
  .cta-photo .photo { aspect-ratio: 16 / 11; }
  .feature { padding: 72px 0; }
}
@media (max-width: 600px) {
  :root { --gutter: 16px; }
  body { font-size: 16px; }
  .header-inner { height: 64px; }
  .brand-mark { height: 32px; }
  .brand-word { font-size: 1.28rem; }
  h1 { font-size: clamp(2.2rem, 10vw, 2.8rem); }
  .section { padding: 68px 0; }
  .section-head { margin-bottom: 36px; }
  .lede { font-size: 1.06rem; }
  .cards { grid-template-columns: 1fr; gap: 16px; }
  .card { display: grid; grid-template-columns: 46px 1fr; column-gap: 16px; padding: 20px 18px; }
  .card .keycap { width: 44px; height: 44px; grid-row: span 2; }
  .card .keycap svg { width: 20px; height: 20px; }
  .card h3 { margin: 2px 0 6px; font-size: 1.18rem; }
  .split-media > .photo { aspect-ratio: 4 / 3; }
  .hero-visual .laptop { left: 0; width: 64%; }
  .hero-visual .phone { right: 2%; width: 19%; }
  .hero-visual { padding-bottom: 120px; }
  .hero-photo img { aspect-ratio: 1400 / 933; }
  .stamp { width: 84px; height: 84px; font-size: .58rem; top: -14px; left: 0; }
  .stamp b { font-size: .86rem; }
  .form-card { padding: 30px 20px 24px; }
  .form .row2 { grid-template-columns: 1fr; }
  .form .key { width: 100%; }
  .actions .key { flex: 1 1 100%; }
  .cta-photo .tag { right: 8px; bottom: 16px; font-size: .95rem; }
  .board { padding: 16px; }
  .board-cols { gap: 8px; }
  .index-card b { font-size: .74rem; }
  .vault { height: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 6px 4px; }
  .vault .index-card { position: relative; left: auto; top: auto; width: auto; margin: 0; padding: 14px 12px 16px; }
  .vault .index-card b { font-size: .86rem; }
  .vault .c1 { transform: rotate(-2deg); }
  .vault .c2 { transform: rotate(2deg); }
  .vault .c3 { transform: rotate(1deg); }
  .vault .c4 { transform: rotate(-1.5deg); }
  .critique { padding: 20px; }
  .critique .bubble { width: 40%; font-size: .72rem; padding: 10px; }
  .prose { padding: 40px 16px 80px; }
  .prose-sheet { padding: 32px 20px; }
  .nf-sheet { padding: 44px 20px 36px; }
  .footer-top { flex-direction: column; }
  .collage .photo:nth-child(2) { border-width: 5px; }
}

/* ---------- reduced motion: nothing moves, fades at most ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
  .js [data-reveal]:not(.is-in), .js .hero-photo[data-reveal]:not(.is-in), .js .hero-visual .laptop[data-reveal]:not(.is-in), .js .hero-visual .phone[data-reveal]:not(.is-in) { opacity: 1; transform: none; }
  .hero-photo { transform: none; }
  .key:hover, .card:hover, .stages li:hover, .toc a:hover { transform: none; }
  .key-primary:hover, .key-primary:focus-visible, .key-primary:active, .key:hover .arrow { transform: none; } /* no grow: the lighter layer still fades in */
  .photo .sepia { opacity: 0; }
  .caret { display: none; }
  .js .typed-vis:not(.is-armed) { opacity: 1; }
}
html.reduced .caret { display: none; }

/* =====================================================================
   BACKGROUND OPTION A4: "Fine paper all over"
   A light, real paper-fibre grain (from a photo scan) over the whole
   page, laid on a gentle warm colour gradient: a soft glow of lighter
   cream at the top left, deepening slowly to warm tan toward the
   bottom right. No stains or patches, just the feel of good paper.
   Paste at the END of css/site.css.
   Needs: assets/img/paper-fibre.webp
   ===================================================================== */
body {
  background-color: #f8f2e6;
  background-image:
    url(../assets/img/paper-fibre.webp),
    radial-gradient(ellipse 80% 1100px at 15% 0, rgba(255, 252, 245, .85), rgba(255, 252, 245, 0) 100%),
    linear-gradient(170deg, #fbf6ec 0%, #f8f1e4 35%, #f4eada 70%, #f0e3cc 100%);
  background-size: 1400px 1400px, auto, auto;
  background-repeat: repeat, no-repeat, no-repeat;
  background-blend-mode: multiply, normal, normal;
}
/* tan bands become a see-through tint, so the same grain runs through them */
.band-paper { background-color: rgba(200, 170, 120, .16); background-image: none; }
.band-paper .collage .photo:nth-child(2) { border-color: #ede2cd; }

/* =====================================================================
   VERSION A5 (2026-11-20): Scott's pick A4 + A3's corner wash, and a rebuilt Join the beta button.
   ===================================================================== */
/* Background: A4 at full strength, with A3's top-corner parchment wash baked into ONE transparent image at 50% (A6; A5 used 30%)
   (assets/img/parchment-corner-50.webp, made by site/_tools/bg-texture-builder/bake_a5_corner.py) as the top layer
   of the same background stack. It scrolls with the page. */
body {
  background-color: #f8f2e6;
  background-image:
    var(--parchment-corner, url(../assets/img/parchment-corner-50.webp)),
    url(../assets/img/paper-fibre.webp),
    radial-gradient(ellipse 80% 1100px at 15% 0, rgba(255, 252, 245, .85), rgba(255, 252, 245, 0) 100%),
    linear-gradient(170deg, #fbf6ec 0%, #f8f1e4 35%, #f4eada 70%, #f0e3cc 100%);
  background-size: min(1400px, 100%) auto, 1400px 1400px, auto, auto;
  background-position: right top, 0 0, 0 0, 0 0;
  background-repeat: no-repeat, repeat, no-repeat, no-repeat;
  background-blend-mode: normal, multiply, normal, normal;
}
@media (max-width: 700px) {
  body {
    /* The rightmost 875 of 1400 pixels filled the viewport at 160% width. */
    --parchment-corner: url(../assets/img/parchment-corner-50-phone-875w.webp);
    background-size: 100% auto, 1000px 1000px, auto, auto;
  }
}

/* Join the beta: built like "See the features" (a fine stroke on the face + a solid key base under it + a soft
   drop shadow), in the button's own purple. The base is a clearly deeper shade, so it reads as the key's shadow.
   Keeps the subtle gradient face; hover = slight grow, soft glow, a little lighter (lighter layer sits inside the stroke). */
.key-primary {
  --jb-stroke: #3a149c;          /* fine outline, a deeper purple than the face */
  --jb-base: #24086a;            /* the key base under the button: deep shade of the same purple */
  --jb-inset: inset 0 0 0 1.5px var(--jb-stroke);
  --jb-shadow: 0 4px 0 var(--jb-base), 0 8px 16px rgba(36, 8, 106, .22);
  --jb-glow: 0 4px 0 var(--jb-base), 0 10px 18px rgba(36, 8, 106, .22), 0 12px 30px rgba(108, 60, 235, .36);
}
.key-primary::before { inset: 1.5px; }
.key-primary:active { transform: translateY(2px) scale(.99); box-shadow: var(--jb-inset), 0 2px 0 var(--jb-base), 0 3px 8px rgba(36, 8, 106, .2); }
/* A6: text on every purple button is bright white (the dark band's link colour was turning it grey). */
a.key-primary, a.key-primary:hover, a.key-primary:focus-visible, button.key-primary,
.band-night a.key-primary, .band-night a.key-primary:hover, .key-primary .arrow { color: #fff; }
/* A6: not-locked-in line in italics */
.io-note em, .card .io em { font-style: italic; }
/* A6: marketing opt-in and the 18+ note under the beta form */
.form .check.optin label { color: var(--ink-3); }
.form-note.age { margin-top: 4px; }
/* A6: longer book title in the device mockups wraps onto two balanced lines instead of running off the screen */
.laptop .ui-h, .tablet .ui-h { white-space: normal; text-wrap: balance; font-size: clamp(8px, 1.05vw, 14px); }

/* =====================================================================
   A6: legal pages (privacy, terms, delete-account) in the site layout. The words come unchanged from the app repo;
   site/_tools/wrap_legal.py wraps them and renames their layout classes to legal-*.
   ===================================================================== */
.legal-page { padding: 0 var(--gutter); }
.legal-layout { max-width: 1080px; margin: 0 auto; padding: 56px 0 88px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; }
.legal-layout.single { max-width: 720px; }
@media (min-width: 980px) { .legal-layout:not(.single) { grid-template-columns: 240px minmax(0, 720px); justify-content: center; gap: 56px; } }
.legal-page .legal-hero h1 { font-size: clamp(2.3rem, 5vw, 3.4rem); margin: 0 0 10px; }
.legal-page .legal-updated { color: var(--ink-3); font-size: .95rem; margin: 0; }
.legal-page .legal-summary { margin: 28px 0 8px; padding: 22px 24px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.legal-page .legal-summary + .legal-summary { margin-top: 12px; }
.legal-page .legal-draft { margin: 20px 0 0; padding: 12px 16px; border-radius: 12px; background: #fff3d6; color: #6b4a00; font-size: .95rem; }
.legal-page aside.legal-toc { order: 2; }
@media (min-width: 980px) { .legal-page aside.legal-toc { order: 0; position: sticky; top: 104px; align-self: start; max-height: calc(100vh - 130px); overflow: auto; } }
.legal-page .legal-toc-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
@media (min-width: 980px) { .legal-page .legal-toc-card { background: transparent; border: 0; padding: 0; } }
.legal-page .legal-toc h2 { font: 600 .75rem/1.4 var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--brass); margin: 0 0 10px; }
.legal-page .legal-toc ol { list-style: none; margin: 0; padding: 0; font-size: .9rem; line-height: 1.45; }
.legal-page .legal-toc a { display: block; padding: 6px 0; color: var(--ink-2); text-decoration: none; }
.legal-page .legal-toc a:hover { color: var(--purple); }
.legal-page article, .legal-page .legal-main { color: var(--ink-2); font-size: 1.02rem; line-height: 1.65; }
.legal-page article h2, .legal-delete-account h2 { font-size: 1.6rem; line-height: 1.2; margin: 52px 0 12px; scroll-margin-top: 96px; }
.legal-page article h3 { font-size: 1.2rem; margin: 30px 0 8px; scroll-margin-top: 96px; }
.legal-page article p, .legal-delete-account p { margin: 0 0 16px; }
.legal-page article ul, .legal-page .legal-main ol, .legal-page .legal-main ul { margin: 0 0 18px; padding-left: 22px; }
.legal-page article li, .legal-page .legal-main li { margin: 0 0 9px; }
.legal-page article li::marker { color: var(--ink-3); }
.legal-page strong { color: var(--ink); font-weight: 600; }
.legal-page .legal-main a { color: var(--purple); }
.legal-delete-account h1 { font-size: clamp(2.1rem, 4.6vw, 3rem); margin-bottom: 10px; }
.legal-delete-account h2:first-of-type { margin-top: 36px; }
.legal-page .legal-lead, .legal-page .legal-small { color: var(--ink-3); }
.legal-page .legal-small { font-size: .9rem; }
.legal-page .legal-box { border: 1px solid var(--line); background: var(--card); border-radius: var(--radius); padding: 18px 22px; margin: 22px 0; box-shadow: var(--shadow-1); }
@media (max-width: 600px) { .legal-page { padding: 0 16px; } .legal-layout { padding: 36px 0 64px; } .legal-page article h2 { font-size: 1.4rem; margin-top: 44px; } .legal-page .legal-summary { padding: 18px; } }
@media print { .site-header, .site-footer, .legal-page aside.legal-toc { display: none; } .legal-layout { display: block; padding: 0; } }
/* A6: unsubscribe page */
.unsub-page .wrap { max-width: 760px; }
.unsub-page .form-card { margin: 32px 0 26px; }
.unsub-note { color: var(--ink-3); font-size: .95rem; margin: 0 0 12px; }
@media (max-width: 600px) { .unsub-page .form-card { padding: 30px 20px 24px; } }

/* A6: typed headlines with a gradient accent paint the gradient on each letter (site.js sets each letter's size and
   offset), so hidden letters stay hidden while typing and the finished line looks like one smooth gradient. */
.typed.per-letter .accent { background: none; -webkit-text-fill-color: currentColor; color: var(--purple); }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .typed.per-letter .accent .ch { background-image: var(--accent-grad-soft); background-repeat: no-repeat; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
}
/* A6 (2026-11-20): no sideways drag on phones.
   1. A laptop mockup that fills its column (Features > Folio) is narrowed so its wider base (margin 0 -7%) still fits:
      laptop 100/114 of the column, base = the full column.
   2. Guard: clip anything that still pokes out sideways. overflow-x: clip (not hidden) creates no scroll container,
      so the sticky header keeps working; browsers without clip fall back to body { overflow-x: hidden } above. */
.split > div > .laptop { width: 87.7%; margin-left: auto; margin-right: auto; }
@supports (overflow-x: clip) {
  html, body { overflow-x: clip; }
}
/* A6: contact page aside: question, Join the beta button, small note */
.aside-card .aside-cta-q { margin: 0 0 12px; }
.aside-card .aside-cta-note { margin: 10px 0 0; font-size: .88rem; color: var(--ink-3); }
