/* Presentation page. Layout: narrative chapters on the left, one live phone pinned on the right. */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--paper);
  font-size: 1rem; line-height: var(--leading); letter-spacing: var(--tracking);
}
h1, h2, h3 { font-weight: 500; line-height: 1.25; margin: 0; text-wrap: balance; }
p { margin: 0; }
a { color: var(--cerulean); }
code { font-size: 0.9em; background: #DDE9D2; padding: 1px 6px; border-radius: 6px; }
:focus-visible { outline: 3px solid var(--bondi); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(1160px, 100% - 48px); margin-inline: auto; }

.ribbon { display: grid; grid-template-columns: repeat(10, 1fr); height: 8px; }
.ribbon span:nth-child(1){background:var(--lime)} .ribbon span:nth-child(2){background:var(--light-green)}
.ribbon span:nth-child(3){background:var(--willow)} .ribbon span:nth-child(4){background:var(--emerald)}
.ribbon span:nth-child(5){background:var(--ocean)} .ribbon span:nth-child(6){background:var(--teal)}
.ribbon span:nth-child(7){background:var(--bondi)} .ribbon span:nth-child(8){background:var(--cerulean)}
.ribbon span:nth-child(9){background:var(--baltic)} .ribbon span:nth-child(10){background:var(--yale)}

.nav {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 24px;
  padding: 12px max(24px, (100% - 1160px) / 2); background: rgba(232, 241, 221, .92); backdrop-filter: blur(8px);
  border-bottom: 1px solid #D5E3C9;
}
.brand { font-weight: 500; font-size: 1.125rem; color: var(--yale); text-decoration: none; margin-right: auto; }
.nav nav { display: flex; gap: 20px; }
.nav nav a { color: var(--ink-2); text-decoration: none; font-size: 0.9rem; }
.nav nav a:hover { color: var(--yale); }

.cta { display: inline-flex; align-items: center; padding: 12px 22px; border-radius: 999px; background: var(--yale); color: #fff; text-decoration: none; font-weight: 500; font-size: 0.95rem; }
.cta:hover { background: var(--baltic); }
.cta.ghost { background: transparent; color: var(--yale); border: 1.5px solid var(--yale); }
.cta.ghost:hover { background: #DCE8E9; }
.cta.small { padding: 8px 16px; font-size: 0.875rem; }

.kicker { font-size: 0.8rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: #217E82; }
.lede { font-size: 1.0625rem; color: var(--ink-2); max-width: 62ch; }
.section-title { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.2rem); margin: 6px 0 14px; }
.aside { font-size: 0.9rem; color: var(--ink-2); max-width: 70ch; }

.hero { padding: 72px 0 40px; display: grid; gap: 20px; }
.hero h1 { font-size: clamp(2.2rem, 1.4rem + 3vw, 3.6rem); letter-spacing: -0.005em; max-width: 16ch; color: var(--yale); }
.hero .lede { font-size: 1.15rem; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 28px 0 0; }
.facts div { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; }
.facts dt { font-size: 1.75rem; font-weight: 500; color: var(--yale); font-variant-numeric: tabular-nums; }
.facts dd { margin: 0; font-size: 0.875rem; color: var(--ink-2); }

.loop-wrap { padding: 32px 0 24px; display: grid; gap: 14px; }
.loop { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; counter-reset: s; }
.loop li { counter-increment: s; position: relative; padding: 18px 18px 18px 18px; background: var(--surface); border: 1px solid var(--line); display: grid; gap: 2px; }
.loop li:first-child { border-radius: 18px 0 0 18px; }
.loop li:last-child { border-radius: 0 18px 18px 0; }
.loop li + li { border-left: 0; }
.loop li::before { content: counter(s); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 0.8rem; font-weight: 500; margin-bottom: 8px; background: var(--lime); color: var(--yale); }
.loop li:nth-child(2)::before { background: var(--willow); }
.loop li:nth-child(3)::before { background: var(--ocean); color: #0B2A3A; }
.loop li:nth-child(4)::before { background: var(--bondi); color: #fff; }
.loop li:nth-child(5)::before { background: var(--yale); color: #fff; }
.loop b { font-weight: 500; }
.loop span { font-size: 0.84rem; color: var(--ink-2); }

.screens { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 56px; padding: 40px 0 40px; }
.chapter { min-height: 92vh; padding: 48px 0; display: grid; gap: 16px; align-content: center; border-top: 1px solid #D5E3C9; }
.chapter:first-child { border-top: 0; }
.chapter h2 { font-size: clamp(1.5rem, 1.15rem + 1.2vw, 2rem); }
.details { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 6px; }
.details > div { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; }
.details h3 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: .07em; color: var(--cerulean); margin-bottom: 6px; }
.details p { font-size: 0.92rem; }
.chapter.active .details > div { border-color: #C7DDB8; }
.try { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: 0.875rem; color: var(--ink-2); }
.try button { font: inherit; border: 1.5px solid var(--yale); color: var(--yale); background: transparent; border-radius: 999px; padding: 6px 14px; cursor: pointer; font-weight: 500; }
.try button:hover { background: #DCE8E9; }

.rules { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; font-size: 0.9rem; }
.rules caption { text-align: left; font-weight: 500; padding: 0 0 8px; }
.rules th, .rules td { text-align: left; padding: 10px 14px; border-bottom: 1px solid #EDF2E6; vertical-align: top; }
.rules tr:last-child td { border-bottom: 0; }
.rules th { font-size: 0.78rem; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); background: #F6FAF0; }
.rules td:first-child { color: #217E82; font-weight: 500; width: 80px; }
.rules .num { font-variant-numeric: tabular-nums; font-weight: 500; white-space: nowrap; }

.device { position: sticky; top: 64px; height: calc(100vh - 64px); display: grid; align-content: center; justify-items: center; gap: 12px; }
.device-inner { width: calc(417px * var(--s, 1)); height: calc(876px * var(--s, 1)); display: flex; justify-content: center; }
.device-inner .phone { transform: scale(var(--s, 1)); transform-origin: top center; }
.pager { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: nowrap; justify-content: center; gap: 4px; }
.pager button { font: inherit; font-size: 0.72rem; white-space: nowrap; border: 1px solid #CFE0C3; background: var(--surface); color: var(--ink-2); border-radius: 999px; padding: 3px 9px; cursor: pointer; }
.pager button[aria-current="true"] { background: var(--yale); border-color: var(--yale); color: #fff; }
.device-note { font-size: 0.75rem; color: var(--ink-2); margin: 0; }

.band { padding: 72px 0; }
#built, #trust, #design { padding: 72px 0; display: grid; gap: 18px; }
.band { position: relative; }

.arch { display: grid; grid-template-columns: 1fr auto 1.3fr auto 1.2fr; gap: 14px; align-items: center; margin: 12px 0; }
.node { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; display: grid; gap: 0; }
.node b { font-weight: 500; }
.node span { font-size: 0.84rem; color: var(--ink-2); }
.node.group { background: #EEF5E4; gap: 10px; padding: 14px; }
.node.inner { padding: 10px 12px; }
.node.key { border: 2px solid var(--bondi); background: #EAF4F7; }
.arrow { color: var(--ink-2); font-size: 1.4rem; }
.side { display: grid; gap: 10px; }

.table-wrap { overflow-x: auto; }
.stack-table { width: 100%; min-width: 720px; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; font-size: 0.9rem; }
.stack-table th, .stack-table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid #EDF2E6; vertical-align: top; }
.stack-table tr:last-child td { border-bottom: 0; }
.stack-table th { font-size: 0.78rem; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); background: #F6FAF0; }
.stack-table td:first-child { font-weight: 500; color: var(--yale); }

.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 20px 22px; display: grid; gap: 8px; align-content: start; }
.panel.muted { background: #F1F5EC; }
.panel h3 { font-size: 1.05rem; }
.panel p { font-size: 0.92rem; color: var(--ink-2); }
.ticks, .crosses { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 0.92rem; }
.ticks li, .crosses li { display: grid; grid-template-columns: 20px 1fr; gap: 10px; }
.ticks li::before { content: ""; width: 14px; height: 14px; margin-top: 6px; border-radius: 50%; background: var(--emerald); }
.crosses li::before { content: ""; width: 14px; height: 2px; margin-top: 12px; background: #9FB2BC; }
.tag { font-size: 0.75rem; font-weight: 500; text-transform: uppercase; letter-spacing: .07em; padding: 3px 10px; border-radius: 999px; justify-self: start; }
.tag.now { background: var(--lime); color: var(--yale); }
.tag.later { background: #D6EEF0; color: #1B6467; }
.tag.never { background: #F4E2DA; color: #8A3424; }

.out { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 8px; }
.out div { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; display: grid; gap: 4px; }
.out b { font-weight: 500; }
.out span { font-size: 0.88rem; color: var(--ink-2); }

.swatches { display: grid; grid-template-columns: repeat(10, 1fr); border-radius: 20px; overflow: hidden; border: 1px solid var(--line); }
.swatch { min-height: 132px; padding: 12px 10px; display: flex; flex-direction: column; justify-content: flex-end; gap: 0; font-size: 0.75rem; }
.swatch b { font-weight: 500; font-size: 0.8rem; }
.swatch code { background: none; padding: 0; font-size: 0.72rem; }
.specimen .spec-big { font-size: 3rem; font-weight: 500; color: var(--yale); line-height: 1.1; }
.specimen .spec-mid { font-size: 1.15rem; color: var(--ink); }
.process ol { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: 0.92rem; color: var(--ink-2); }
.process b { font-weight: 500; color: var(--ink); }

.foot { padding: 40px 0 56px; border-top: 1px solid #D5E3C9; display: grid; gap: 4px; font-size: 0.875rem; color: var(--ink-2); }
.foot b { font-weight: 500; color: var(--ink); }

@media (max-width: 1080px) {
  .screens { grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; }
  .screens .device { width: 320px; }
  .arch { grid-template-columns: 1fr; }
  .arrow { transform: rotate(90deg); justify-self: center; }
}
@media (max-width: 900px) {
  .nav nav { display: none; }
  .screens { grid-template-columns: 1fr; }
  .device { display: none; }
  .chapter { min-height: auto; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .loop { grid-template-columns: 1fr; }
  .loop li, .loop li:first-child, .loop li:last-child { border-radius: 0; border-left: 1px solid var(--line); }
  .loop li + li { border-top: 0; }
  .loop li:first-child { border-radius: 18px 18px 0 0; }
  .loop li:last-child { border-radius: 0 0 18px 18px; }
  .two, .three, .out, .details { grid-template-columns: 1fr; }
  .swatches { grid-template-columns: repeat(5, 1fr); }
}
@media (min-width: 901px) { .try a { display: none; } }
@media (max-width: 900px) { .try button { display: none; } }

.sub-title { font-size: 1.1rem; margin-top: 14px; }
.stack-table.cost { min-width: 620px; }
.stack-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stack-table.cost tr.total td { font-weight: 500; background: #EEF5E4; color: var(--ink); border-top: 1.5px solid #C7DDB8; }
.stack-table.cost tr.extra td { color: var(--ink-2); }
.stack-table.cost tr.extra td:first-child { color: var(--ink-2); }
.arch .group { grid-template-columns: 1fr 1fr; }
.arch .group > b { grid-column: 1 / -1; }
.arch .group .key { grid-column: 1 / -1; }

.pager { flex-wrap: wrap; max-width: 420px; }

/* ---------- hand-drawn layer ---------- */
.hero h1, .section-title, .chapter h2 { font-family: var(--hand); font-weight: 600; letter-spacing: 0; line-height: 1; }
.hero h1 { font-size: clamp(3rem, 2rem + 4vw, 5rem); max-width: 14ch; }
.section-title { font-size: clamp(2.2rem, 1.6rem + 2vw, 3rem); }
.chapter h2 { font-size: clamp(2rem, 1.5rem + 1.6vw, 2.7rem); }
.facts div, .details > div, .panel, .out div, .loop, .node, .swatches, .table-wrap, .table-card {
  border: 2px solid var(--ink) !important; border-radius: var(--wob) !important; box-shadow: var(--pen);
}
.loop li { border: 0 !important; border-right: 2px dashed #9FB2BC !important; border-radius: 0 !important; }
.loop li:last-child { border-right: 0 !important; }
.loop { overflow: hidden; background: var(--surface); }
.cta, .music, .try button { border: 2px solid var(--ink); box-shadow: var(--pen); }
.cta:active, .music:active, .try button:active { transform: translate(2px, 3px); box-shadow: none; }

.showcase {
  position: relative; display: flex; justify-content: center; align-items: flex-end; gap: 28px;
  margin-top: 28px; padding: 48px 24px 40px; border: 2px solid var(--ink); border-radius: 40px 52px 36px 56px / 52px 36px 56px 40px;
  box-shadow: var(--pen); overflow: hidden;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 400' preserveAspectRatio='none'%3E%3Cpath d='M-20 120C120 20 220 260 380 140S640 20 700 140 560 330 430 290 200 360 160 420' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' opacity='.85'/%3E%3Cpath d='M620 -20c-40 80 60 120 20 200s-120 20-80 120' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' opacity='.7'/%3E%3C/svg%3E") center / 100% 100% no-repeat,
    linear-gradient(135deg, #E4F4C9 0%, #CDEBDD 45%, #C9E4EE 100%);
}
.show-phone { --k: .5; width: calc(417px * var(--k)); height: calc(876px * var(--k)); flex: none; }
.show-phone .phone { transform: scale(var(--k)); transform-origin: top left; }
.show-phone.mid { --k: .56; margin-bottom: 18px; }
@media (max-width: 900px) { .show-phone.side { display: none; } .showcase { padding: 28px 12px; } }

.stack-table.gdpr td:first-child { white-space: nowrap; }
.stack-table.gdpr td:first-child span { font-size: 0.75rem; font-weight: 400; color: var(--ink-2); }

/* tables: the drawn border lives on the wrapper so corners clip cleanly */
.table-wrap, .table-card { background: var(--surface); overflow-x: auto; }
.table-card { overflow: hidden; }
.rules, .stack-table { border: 0 !important; border-radius: 0 !important; box-shadow: none !important; background: transparent; }
.table-title { font-size: 1rem; font-weight: 500; margin: 6px 0 -4px; }

/* screen switcher under the phone: one compact drawn pill */
.pager { display: inline-flex; flex-wrap: nowrap; gap: 2px; max-width: none; padding: 4px; background: var(--surface);
  border: 2px solid var(--ink); border-radius: 999px; box-shadow: var(--pen); }
.pager button { border: 0; background: transparent; color: var(--ink-2); font-size: 0.72rem; padding: 5px 7px; border-radius: 999px; white-space: nowrap; }
.pager button:hover { color: var(--ink); background: #EEF5E4; }
.pager button[aria-current="true"] { background: var(--yale); color: #fff; }
.device-note { font-size: 0.75rem; }

#next { display: grid; gap: 18px; }
.ideas { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 14px; }
.ideas li { display: grid; grid-template-columns: 56px 1fr; gap: 18px; background: var(--surface); border: 2px solid var(--ink); border-radius: var(--wob); box-shadow: var(--pen); padding: 18px 22px; }
.idea-n { width: 52px; height: 52px; border-radius: 50%; border: 2px solid var(--ink); display: grid; place-items: center; font-family: var(--hand); font-size: 1.9rem; font-weight: 600; background: var(--lime); color: var(--yale); }
.ideas li:nth-child(2) .idea-n { background: var(--light-green); } .ideas li:nth-child(3) .idea-n { background: var(--emerald); }
.ideas li:nth-child(4) .idea-n { background: #A8D5E2; } .ideas li:nth-child(5) .idea-n { background: var(--ocean); }
.ideas h3 { font-size: 1.15rem; margin-bottom: 4px; }
.ideas p { font-size: 0.95rem; color: var(--ink-2); max-width: 75ch; }
.ideas .idea-meta { margin-top: 8px; font-size: 0.85rem; padding: 8px 12px; background: #F1F8E6; border-radius: 12px; }
.ideas .idea-meta b { font-weight: 500; color: var(--ink); }
.about { padding: 72px 0 24px; }
.about-card { display: grid; grid-template-columns: 220px 1fr; gap: 32px; align-items: center; padding: 32px; border: 2px solid var(--ink); border-radius: 40px 52px 36px 56px / 52px 36px 56px 40px; box-shadow: var(--pen);
  background: linear-gradient(135deg, #E4F4C9 0%, #CDEBDD 55%, #C9E4EE 100%); }
.about-card .lede { color: var(--ink); }
.about-card .ticks { margin-top: 14px; }
.about-card .ticks b { font-weight: 500; }
.about-art svg { width: 100%; height: auto; display: block; }
@media (max-width: 900px) { .about-card { grid-template-columns: 1fr; } .about-art { max-width: 160px; } .ideas li { grid-template-columns: 1fr; } }

.about-card .hero-actions { margin-top: 24px; }
.ideas .from { font-size: 0.75rem; font-weight: 500; text-transform: uppercase; letter-spacing: .08em; color: #217E82; margin-bottom: 2px; }

/* hero: text left, Loom walkthrough right */
.hero-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: 48px; align-items: center; }
.hero-text { display: grid; gap: 20px; }
.hero-video { margin: 0; display: grid; gap: 10px; transform: rotate(1deg); }
.video-frame { position: relative; aspect-ratio: 16 / 10; border: 2px solid var(--ink); border-radius: var(--wob); box-shadow: 4px 5px 0 var(--ink); overflow: hidden; background: var(--yale); }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.hero-video figcaption { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 0 6px; }
.hero-video figcaption .hand { font-family: var(--hand); font-size: 1.6rem; font-weight: 600; color: var(--yale); }
.hero-video figcaption a { font-size: 0.85rem; }
@media (max-width: 1000px) { .hero-top { grid-template-columns: 1fr; gap: 28px; } .hero-video { transform: none; max-width: 640px; } }
