/* Owed — "fun style": flat pastels, one butter-yellow accent, extended caps labels,
   ink outlines and flat yellow offset shadows. No gradients, no soft shadows. */
:root {
  --yellow: #fae873;
  --sage: #94a69b;
  --periwinkle: #93a8cf;
  --powder: #c8d5e8;
  --peach: #f0cdb2;
  --kraft: #c4a288;
  --pistachio: #c8d5aa;
  --tomato: #d4464a;
  --oat: #eeebe4;
  --ink: #111111;
  --moss: #4a564f;
  --white: #ffffff;
  --display: "Syncopate", "Michroma", "Arial Black", sans-serif;
  --text: "Inter", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--oat);
  color: var(--ink);
  font-family: var(--text);
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img, svg { display: block; max-width: 100%; }

/* Type */
.display {
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.label {
  font-family: var(--display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
h1, h2, h3 { font-weight: 400; margin: 0; line-height: 1.05; letter-spacing: -0.02em; }
h1 { font-size: clamp(40px, 6vw, 72px); }
h2 { font-size: clamp(32px, 5vw, 56px); }
h3 { font-size: 22px; font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; }
p { margin: 0; }
.lede { font-size: clamp(18px, 2vw, 22px); max-width: 34em; }
.hl { background: var(--yellow); padding: 0 0.15em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.on-yellow .hl { background: var(--white); }

/* Layout */
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }
section { padding: clamp(64px, 10vw, 128px) 0; position: relative; overflow: hidden; }
.bg-yellow { background: var(--yellow); }
.bg-powder { background: var(--powder); }
.bg-tomato { background: var(--tomato); color: var(--yellow); }
.bg-pistachio { background: var(--pistachio); }
.bg-peach { background: var(--peach); }
.bg-oat { background: var(--oat); }
.bg-periwinkle { background: var(--periwinkle); }
.section-top { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; margin-bottom: 40px; flex-wrap: wrap; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: var(--yellow);
  border-bottom: 1.5px solid var(--ink);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.wordmark { font-family: var(--display); font-weight: 700; letter-spacing: 0.2em; font-size: 20px; text-decoration: none; }
.nav { display: flex; gap: 24px; align-items: center; }
.nav a { text-decoration: none; font-weight: 500; font-size: 15px; }
.nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 640px) { .nav .hide-sm { display: none; } }

/* Buttons and cards: ink outline + flat yellow offset */
.btn {
  display: inline-block;
  background: var(--ink); color: var(--yellow);
  font-family: var(--display); font-weight: 700; font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase;
  padding: 18px 26px; text-decoration: none;
  border: 1.5px solid var(--ink);
  box-shadow: 6px 6px 0 var(--white);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--white); }
.btn:active { transform: translate(4px, 4px); box-shadow: 2px 2px 0 var(--white); }
.btn.small { padding: 12px 16px; font-size: 11px; box-shadow: 4px 4px 0 var(--white); }
.card {
  background: var(--white);
  border: 1.5px solid var(--ink);
  box-shadow: 8px 8px 0 var(--yellow);
  padding: 28px;
}
.bg-yellow .card { box-shadow: 8px 8px 0 var(--ink); }
.bg-tomato .card { color: var(--ink); }

/* Hero */
.hero { padding-top: clamp(48px, 7vw, 96px); }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.hero h1 .brand { font-family: var(--display); font-weight: 700; letter-spacing: 0.06em; font-size: 0.82em; }
.hero .lede { margin: 28px 0 36px; }
.hero-note { margin-top: 18px; font-size: 14px; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } }

/* Phone with speech-bubble texts */
.phone {
  width: min(360px, 100%); margin: 0 auto;
  background: var(--white);
  border: 1.5px solid var(--ink);
  border-radius: 40px;
  box-shadow: 12px 12px 0 var(--ink);
  padding: 22px 18px 28px;
  position: relative;
}
.phone-top { display: flex; flex-direction: column; align-items: center; gap: 6px; padding-bottom: 14px; border-bottom: 1.5px solid var(--oat); margin-bottom: 16px; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--yellow); border: 1.5px solid var(--ink); display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 18px; letter-spacing: 0; }
.bubble { position: relative; width: fit-content; max-width: 86%; padding: 12px 15px; border: 1.5px solid var(--ink); border-radius: 22px; font-size: 15px; line-height: 1.35; margin: 0 0 10px; }
.bubble.them { background: var(--oat); border-bottom-left-radius: 6px; }
.bubble.me { background: var(--yellow); margin-left: auto; border-bottom-right-radius: 6px; }
.bubble-time { text-align: center; font-size: 11px; color: var(--moss); margin: 6px 0 12px; }

/* Doodles */
.sparkle { position: absolute; pointer-events: none; }
.sparkle path { fill: var(--yellow); stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; }
.bg-yellow .sparkle path { fill: var(--white); }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; counter-reset: step; }
.step { text-align: center; padding: 8px; }
.step-num {
  width: 56px; height: 56px; margin: 0 auto 20px;
  border: 1.5px solid var(--ink); border-radius: 50%;
  background: var(--white);
  display: grid; place-items: center;
  font-family: var(--display); font-weight: 700; font-size: 16px;
}
.step-art { height: 120px; margin: 0 auto 20px; }
.step p { font-size: 16px; margin-top: 10px; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

/* Grids of cards */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
@media (max-width: 980px) { .grid-4 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .grid-4, .grid-2 { grid-template-columns: 1fr; } }
.card h3 { margin-bottom: 10px; }
.card p { font-size: 16px; }
.card .label { display: block; margin-bottom: 14px; }

/* Starburst badge */
.burst-row { display: grid; grid-template-columns: 300px 1fr; gap: 48px; align-items: center; }
.burst { width: 280px; height: 280px; position: relative; transform: rotate(-10deg); margin: 0 auto; }
.burst svg { width: 100%; height: 100%; }
.burst-text { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; transform: rotate(10deg); padding: 60px; }
.burst-text .display { font-size: 18px; line-height: 1.3; }
@media (max-width: 860px) { .burst-row { grid-template-columns: 1fr; } }

/* Tomato section */
.bg-tomato h2 .brand { font-family: var(--display); font-weight: 700; letter-spacing: 0.06em; font-size: 0.8em; }
.promise-grid { margin-top: 48px; }

/* FAQ */
.faq { display: grid; gap: 18px; max-width: 880px; }
details.card { padding: 0; box-shadow: 6px 6px 0 var(--yellow); }
details summary {
  list-style: none; cursor: pointer;
  padding: 22px 64px 22px 24px; font-size: 20px; font-weight: 500; position: relative;
}
details summary::-webkit-details-marker { display: none; }
details summary::after {
  content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; border: 1.5px solid var(--ink); border-radius: 50%;
  display: grid; place-items: center; font-size: 20px; line-height: 1; background: var(--yellow);
}
details[open] summary::after { content: "–"; }
details .answer { padding: 0 24px 24px; font-size: 16px; max-width: 46em; }
details .answer p + p { margin-top: 10px; }

/* CTA */
.cta { text-align: center; }
.cta h2 { max-width: 14em; margin: 0 auto 20px; }
.cta .lede { margin: 0 auto 36px; }

/* Footer: ink rule + wordmark + page-number style */
.site-footer { background: var(--oat); padding: 28px 0 40px; }
.footer-rule { border-top: 1.5px solid var(--ink); padding-top: 22px; display: flex; gap: 24px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.footer-links { display: flex; gap: 22px; font-size: 15px; flex-wrap: wrap; }
.fine { font-size: 13px; color: var(--moss); margin-top: 18px; max-width: 60em; }

/* Privacy page */
.doc { max-width: 760px; }
.doc h1 { font-size: clamp(36px, 6vw, 64px); margin-bottom: 18px; }
.doc h2 { font-size: clamp(24px, 3vw, 30px); margin: 56px 0 16px; padding-top: 18px; border-top: 1.5px solid var(--ink); }
.doc p, .doc li { font-size: 17px; }
.doc p + p { margin-top: 14px; }
.doc ul { padding-left: 22px; margin: 12px 0; }
.doc li { margin: 6px 0; }
.doc .summary { margin: 36px 0 0; }
.doc .summary ul { list-style: none; padding: 0; }
.doc .summary li { padding-left: 34px; position: relative; margin: 10px 0; }
.doc .summary li::before {
  content: "✓"; position: absolute; left: 0; top: 1px;
  width: 22px; height: 22px; border: 1.5px solid var(--ink); border-radius: 50%;
  display: grid; place-items: center; font-size: 12px; background: var(--yellow);
}
.doc code { font-family: ui-monospace, Menlo, monospace; font-size: 0.92em; background: var(--white); border: 1px solid var(--ink); padding: 0 5px; }
.toc { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.toc a { font-size: 14px; text-decoration: none; border: 1.5px solid var(--ink); background: var(--white); padding: 6px 12px; }
.toc a:hover { background: var(--yellow); }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* Interactive phone demo (demo.js). Without JS the static conversation shows. */
.phone-body { scroll-behavior: smooth; }
.js .phone-body { height: 380px; overflow-y: auto; padding-right: 2px; }
.js .phone-body::-webkit-scrollbar { width: 0; }
.bubble.pop { animation: pop 0.28s ease-out both; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(0.96); } to { opacity: 1; transform: none; } }
.bubble.typing { display: flex; gap: 5px; padding: 15px 16px; }
.bubble.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink); opacity: 0.35; animation: blink 1s infinite; }
.bubble.typing i:nth-child(2) { animation-delay: 0.15s; }
.bubble.typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes blink { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 0.9; } }
.phone-replies { border-top: 1.5px solid var(--oat); margin-top: 12px; padding-top: 12px; min-height: 76px; }
.phone-hint { display: block; text-align: center; font-size: 11px; color: var(--moss); margin-bottom: 8px; }
.chips { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.chip {
  font: 600 15px/1 var(--text); color: var(--ink); cursor: pointer;
  background: var(--yellow); border: 1.5px solid var(--ink); border-radius: 999px;
  padding: 10px 16px; box-shadow: 3px 3px 0 var(--ink);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.chip:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.chip:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.chip.ghost { background: var(--white); }

/* Confetti (demo.js), inside the phone */
.confetti { position: absolute; top: 40%; left: 50%; width: 9px; height: 13px; border: 1.5px solid var(--ink); pointer-events: none; z-index: 2; animation: confetti 1.1s cubic-bezier(.2,.7,.4,1) forwards; }
@keyframes confetti {
  0% { transform: translate(0, 0) rotate(0); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)); opacity: 0; }
}

/* What Owed keeps */
.keeps-grid { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: clamp(28px, 4vw, 56px); align-items: start; }
@media (max-width: 900px) { .keeps-grid { grid-template-columns: 1fr; } }
.email { padding: 0; }
.email-head { padding: 20px 24px; border-bottom: 1.5px solid var(--ink); font-size: 15px; }
.email-head p + p { margin-top: 4px; }
.email-k { display: inline-block; width: 80px; font-family: var(--display); font-weight: 700; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--moss); }
.email-body { padding: 22px 24px 26px; font-size: 16px; }
.email-body p + p { margin-top: 12px; }
.email .drop, .email .kept-quote, .email .kept-meta, .email-head p { transition: opacity 0.5s ease, filter 0.5s ease, background-color 0.5s ease; }
.email.reveal .drop { opacity: 0.18; filter: blur(2px); }
.email.reveal .email-head p { opacity: 0.35; }
.email.reveal .kept-meta { opacity: 1; background: var(--yellow); outline: 1.5px solid var(--ink); padding: 0 3px; }
.email.reveal .email-head p:has(.kept-meta) { opacity: 1; }
.email.reveal .kept-quote { background: var(--yellow); outline: 1.5px solid var(--ink); box-decoration-break: clone; -webkit-box-decoration-break: clone; padding: 1px 3px; }
.keeps-side .btn { width: 100%; text-align: center; cursor: pointer; }
.keeps-panel { margin-top: 28px; }
.keeps-list { margin: 0; padding-left: 20px; font-size: 16px; }
.keeps-list li + li { margin-top: 8px; }
.keeps-never { margin-top: 16px; font-size: 15px; padding-top: 14px; border-top: 1.5px dashed var(--ink); }
.keeps-note { margin-top: 28px; font-size: 14px; color: var(--moss); }
#keeps-count { font-variant-numeric: tabular-nums; }

/* Small touches: O sticker, scroll reveal */
.sticker {
  width: 84px; height: 84px; margin: 0 auto 26px; transform: rotate(-12deg);
  background: var(--white); border: 1.5px solid var(--ink); border-radius: 50%;
  box-shadow: 6px 6px 0 var(--ink); display: grid; place-items: center;
  font-family: var(--display); font-weight: 700; font-size: 36px;
  transition: transform 0.3s cubic-bezier(.3,1.6,.5,1);
}
.sticker:hover { transform: rotate(8deg) scale(1.08); }
.js .rise { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .rise.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .bubble.pop, .confetti, .bubble.typing i { animation: none !important; }
  .js .rise { opacity: 1; transform: none; }
}

/* Homepage teaser for case finding */
.next-case { display: block; margin-top: 56px; text-decoration: none; max-width: 860px; background: var(--white); transition: transform 0.12s ease, box-shadow 0.12s ease; }
.next-case:hover { transform: translate(-2px, -2px); box-shadow: 10px 10px 0 var(--yellow); }
.next-case h3 { font-size: clamp(22px, 2.6vw, 28px); }
.next-case-go { display: inline-block; margin-top: 16px; font-family: var(--display); font-weight: 700; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; border-bottom: 2px solid var(--ink); }


/* ===== How it works page (short, scroll-driven) ===== */
.nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 4px; }
.hiw-top h1 { margin-top: 18px; max-width: 15em; font-size: clamp(36px, 5.4vw, 64px); }
.hiw-steps { list-style: none; margin: 48px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.hiw-steps li { display: grid; grid-template-columns: 48px 1fr; column-gap: 14px; align-items: center; background: var(--white); border: 1.5px solid var(--ink); box-shadow: 6px 6px 0 var(--yellow); padding: 16px 18px; }
.hiw-steps .step-num { grid-row: span 2; margin: 0; width: 48px; height: 48px; font-size: 15px; background: var(--yellow); }
.hiw-steps b { font-size: 18px; }
.hiw-steps li > span:last-child { font-size: 15px; color: var(--moss); }
@media (max-width: 820px) { .hiw-steps { grid-template-columns: 1fr; } }

.badge-test { display: inline-block; margin-left: 10px; font-size: 10px; letter-spacing: 0.14em; background: var(--white); border: 1.5px solid var(--ink); padding: 3px 7px; transform: rotate(-2deg); vertical-align: 1px; }

/* Scroll diagram: the section is tall; the stage sticks while the drawing plays */
.scrolly { padding: 0; overflow: visible; }
.js .scrolly { height: 320vh; }
.scrolly-stage { position: relative; padding: clamp(56px, 8vw, 96px) 0; }
.js .scrolly-stage { position: sticky; top: 64px; height: calc(100vh - 64px); display: flex; align-items: center; padding: 24px 0; overflow: hidden; }
.scrolly-inner { width: 100%; }
.scrolly-head { text-align: center; margin-bottom: clamp(20px, 4vh, 44px); }
.scrolly-caption { font-size: clamp(26px, 3.6vw, 44px); line-height: 1.08; letter-spacing: -0.02em; margin-top: 12px; min-height: 1.3em; display: flex; align-items: center; justify-content: center; }
.scrolly-caption span { transition: opacity 0.25s ease; }
.scrolly-caption span.swap { opacity: 0; }

.net { position: relative; max-width: 900px; margin: 0 auto; }
.net-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.net-lines path { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; }
.net-lines circle { fill: var(--tomato); stroke: var(--ink); stroke-width: 1.5; }
.net-phones { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(14px, 4vw, 56px); position: relative; }
.net-phone { display: flex; flex-direction: column; align-items: center; gap: 10px; transition: opacity 0.4s ease, transform 0.4s ease; }
.np-screen { width: min(170px, 100%); aspect-ratio: 9 / 11; background: var(--white); border: 1.5px solid var(--ink); border-radius: 26px; box-shadow: 6px 6px 0 var(--ink); padding: 26px 10px 10px; position: relative; }
.np-screen::before { content: ""; position: absolute; top: 9px; left: 50%; width: 34%; height: 6px; transform: translateX(-50%); background: var(--oat); border: 1px solid var(--ink); border-radius: 6px; }
.np-note { display: grid; grid-template-columns: 26px 1fr; gap: 8px; align-items: start; background: var(--oat); border: 1.5px solid var(--ink); border-radius: 12px; padding: 8px; font-size: 12px; line-height: 1.3; transition: opacity 0.35s ease, transform 0.35s cubic-bezier(.3,1.5,.5,1), background-color 0.35s ease; }
.np-note b { display: block; font-size: 12px; }
.np-note small { font-size: 11px; }
.np-app { width: 26px; height: 26px; border-radius: 7px; background: var(--yellow); border: 1.5px solid var(--ink); display: grid; place-items: center; font-size: 13px; }
.np-who { font-family: var(--display); font-weight: 700; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; }
.net-phone.match .np-note { background: var(--yellow); }

.net-case { position: relative; margin: clamp(48px, 9vh, 96px) auto 0; width: min(440px, 100%); text-align: center; background: var(--white); border: 1.5px solid var(--ink); box-shadow: 8px 8px 0 var(--tomato); padding: 18px 20px; transition: opacity 0.4s ease, transform 0.45s cubic-bezier(.3,1.5,.5,1); }
.net-case .label { display: block; font-size: 10px; margin-bottom: 6px; color: var(--tomato); }
.net-case b { display: block; font-size: clamp(17px, 2vw, 21px); }
.net-case-sub { display: block; font-size: 14px; color: var(--moss); margin-top: 4px; }
.net-firm { display: inline-block; margin-top: 12px; font-weight: 600; font-size: 15px; background: var(--yellow); border: 1.5px solid var(--ink); padding: 6px 10px; transition: opacity 0.4s ease, transform 0.4s ease; }

/* Hidden states the scroll reveals (JS only; without JS everything shows) */
.js .net-phone.off { opacity: 0; transform: translateY(18px); }
.js .np-note.off { opacity: 0; transform: translateY(-10px) scale(0.92); }
.js .net-case.off { opacity: 0; transform: scale(0.9); }
.js .net-firm.off { opacity: 0; transform: translateY(6px); }

@media (max-width: 640px) {
  .np-screen { border-radius: 16px; padding: 18px 5px 6px; box-shadow: 4px 4px 0 var(--ink); }
  .np-screen::before { top: 6px; height: 4px; }
  .np-note { grid-template-columns: 1fr; padding: 5px; border-radius: 8px; }
  .np-app { width: 18px; height: 18px; font-size: 10px; border-radius: 5px; }
  .np-note b { font-size: 10px; }
  .np-note small { font-size: 9px; }
  .net-case { padding: 14px; }
}
@media (max-height: 640px) { .js .scrolly-stage { top: 64px; } .np-screen { aspect-ratio: 9 / 10; } }

.hiw-fine { padding: 0 0 clamp(56px, 8vw, 96px); }
.hiw-fine p { max-width: 40em; margin: 0 auto; text-align: center; font-size: 16px; color: var(--moss); }
.cta h2 { margin-top: 0; }
.np-lines { margin-top: 10px; display: grid; gap: 7px; }
.np-lines i { display: block; height: 7px; border-radius: 4px; background: var(--oat); }
.np-lines i:nth-child(2) { width: 80%; } .np-lines i:nth-child(3) { width: 90%; } .np-lines i:nth-child(4) { width: 65%; }
@media (max-width: 640px) { .scrolly-caption { min-height: 2.3em; } .np-lines { gap: 5px; margin-top: 7px; } .np-lines i { height: 5px; } }
