/* The marketing site (docs/12-marketing-site.md; mocks/v1/SiteD.png, SiteM.png).
   Colours, type, spacing and radii come from design/tokens.css. The two local
   values below exist because the tokens file has no white "paper" band and no
   device frame colour. */
:root {
  --paper: #FFFFFF;
  --device: #141413;
  --wrap: 1120px;
  --h1: 42px;
  --h2: 32px;
}
:root[data-theme="dark"] { --paper: #262624; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --paper: #262624; }
}
@media (min-width: 960px) {
  :root { --h1: 68px; --h2: 44px; --margin: 48px; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  overflow-x: hidden;
}
h1, h2, h3, p { margin: 0; }
h1 { font-size: var(--h1); line-height: 1.06; font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: var(--h2); line-height: 1.1; font-weight: 700; letter-spacing: -0.02em; }
h3 { font-size: var(--fs-h2); line-height: 1.3; font-weight: 700; }
a { color: var(--accent-text); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
img, svg { max-width: 100%; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip { position: absolute; left: var(--margin); top: -100px; z-index: 10; padding: var(--space-3) var(--space-4); background: var(--text); color: var(--bg); border-radius: var(--r-input); }
.skip:focus { top: var(--space-2); }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--margin)); margin: 0 auto; padding: 0 var(--margin); }
.stack { display: flex; flex-direction: column; gap: var(--gap); min-width: 0; }
.lead { color: var(--muted); font-size: var(--fs-body); line-height: 1.5; max-width: 560px; }
.small { font-size: var(--fs-min); line-height: 1.4; }
.muted { color: var(--muted); }
.accent { color: var(--accent-text); }

/* Pastels: the only colour, and only with meaning. */
.p-blue  { background: var(--p-blue); }
.p-green { background: var(--p-green); }
.p-peach { background: var(--p-peach); }
.p-lilac { background: var(--p-lilac); }
.paper { background: var(--paper); }

/* ── Buttons and links ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--h-button); padding: 0 var(--space-8);
  border: 0; border-radius: var(--r-button);
  background: var(--text); color: var(--bg);
  font: 600 var(--fs-button)/1.2 var(--font); text-decoration: none; text-align: center;
  cursor: pointer;
}
.btn-small { min-height: var(--tap-min); padding: 0 var(--space-5); font-size: var(--fs-small); white-space: nowrap; }
.btn-wide { align-self: flex-start; width: 100%; max-width: 360px; }
.link {
  display: inline-flex; align-items: center; min-height: var(--tap-min); align-self: flex-start;
  color: var(--accent-text); font-size: var(--fs-link); font-weight: 600; text-decoration: none;
}
.link:hover { text-decoration: underline; }

/* ── Header ────────────────────────────────────────────────────────── */
.site-header { position: relative; z-index: 2; }
.header-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); min-height: 64px; }
.brand { display: inline-flex; align-items: center; min-height: var(--tap-min); margin-right: auto; }
.brand img { display: block; height: 22px; width: auto; }
@media (min-width: 960px) { .brand img { height: 26px; } }
.brand .on-dark { display: none; }
:root[data-theme="dark"] .brand .on-light { display: none; }
:root[data-theme="dark"] .brand .on-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand .on-light { display: none; }
  :root:not([data-theme="light"]) .brand .on-dark { display: block; }
}
.nav { display: none; gap: var(--space-8); }
.nav a, .menu nav a {
  display: inline-flex; align-items: center; min-height: var(--tap-min);
  color: var(--text); font-size: var(--fs-link); text-decoration: none;
}
.nav a:hover { text-decoration: underline; }
.menu summary {
  display: inline-flex; align-items: center; min-height: var(--tap-min); padding: 0 var(--space-2);
  font-size: var(--fs-small); font-weight: 600; cursor: pointer; list-style: none;
}
.menu summary::-webkit-details-marker { display: none; }
.menu nav {
  position: absolute; left: var(--margin); right: var(--margin); top: 64px;
  display: flex; flex-direction: column; padding: var(--space-2) var(--space-6);
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-box);
}
@media (min-width: 960px) {
  .header-row { min-height: 80px; gap: var(--space-8); }
  .nav { display: flex; }
  .menu { display: none; }
}

/* ── Bands ─────────────────────────────────────────────────────────── */
.band { padding: 64px 0; }
.two { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-8); align-items: center; }
.narrow { max-width: 420px; width: 100%; }
@media (min-width: 960px) {
  .band { padding: 96px 0; }
  .two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; }
}
.box { border-radius: var(--r-box); padding: var(--space-6); display: flex; flex-direction: column; gap: var(--space-2); line-height: 1.5; }
.box h3 { font-size: 20px; }
.box-label { font-size: var(--fs-min); font-weight: 600; color: var(--muted); }

/* ── Hero ──────────────────────────────────────────────────────────── */
.hero { padding: var(--space-8) 0 var(--space-6); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-8); align-items: center; justify-items: center; }
.hero-text { display: flex; flex-direction: column; gap: 22px; align-items: center; text-align: center; min-width: 0; width: 100%; }
.pill-note { align-self: center; padding: 6px var(--space-4); border-radius: var(--space-4); font-size: var(--fs-min); font-weight: 600; line-height: 1.4; }
@media (min-width: 960px) {
  .hero { padding: 56px 0 var(--space-8); }
  .hero-grid { grid-template-columns: minmax(0, 1fr) auto; gap: 56px; justify-items: stretch; }
  .hero-text { align-items: flex-start; text-align: left; }
  .hero-text .pill-note { align-self: flex-start; }
}

/* The rotating word: all three share one grid cell, so the box is as big as
   the longest and wraps at large text sizes. */
.rot { display: grid; overflow: hidden; color: var(--accent-text); padding-bottom: 0.08em; }
.rot > span { grid-area: 1 / 1; animation: rot 9s infinite; }
.rot > span:nth-child(2) { animation-delay: -6s; }
.rot > span:nth-child(3) { animation-delay: -3s; }
@keyframes rot {
  0%, 30% { opacity: 1; transform: none; }
  34%, 96% { opacity: 0; transform: translateY(-100%); }
  97% { opacity: 0; transform: translateY(100%); }
  100% { opacity: 1; transform: none; }
}

/* ── Claim field ───────────────────────────────────────────────────── */
.claim { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: var(--space-2); }
.claim-field {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2);
  background: var(--paper); border: 2px solid var(--line); border-radius: 32px;
  padding: 6px 6px 6px 18px;
}
.claim-field:focus-within { border-color: var(--accent); }
.claim-prefix { color: var(--muted); font-size: var(--fs-body); white-space: nowrap; }
.claim-field input {
  flex: 1 1 0; min-width: 2.5em; min-height: var(--tap-min);
  border: 0; outline: none; background: transparent; color: var(--text);
  font: 600 var(--fs-body) var(--font); padding: 0;
}
.claim-field input::placeholder { color: var(--muted); font-weight: 400; }
.claim-button { flex: none; min-height: var(--h-chip); padding: 0 18px; max-width: 100%; border-radius: var(--r-chip); font-size: var(--fs-link); margin-left: auto; }
.claim-check { min-height: 1.4em; font-size: var(--fs-min); line-height: 1.4; color: var(--muted); text-align: left; padding: 0 var(--space-4); }
.claim-check.ok { color: var(--ok); font-weight: 600; }
.claim-check button {
  min-height: var(--tap-min); padding: 0 var(--space-1); border: 0; background: none;
  color: var(--accent-text); font: 600 var(--fs-min) var(--font); text-decoration: underline; cursor: pointer;
}

/* ── The demo phone ────────────────────────────────────────────────── */
.phone {
  margin: 0; width: 300px; max-width: 100%; flex: none;
  padding: 10px; border-radius: 44px; background: var(--device);
  box-shadow: 0 30px 60px rgba(20, 20, 19, 0.18);
}
.phone-screen {
  position: relative; min-height: 560px; border-radius: 36px; overflow: hidden;
  background: var(--p-blue); color: var(--text);
  display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-3) 10px var(--space-3);
}
.phone-avatar {
  align-self: center; margin-top: var(--space-6); width: var(--avatar-large); height: var(--avatar-large); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; background: var(--bg); color: var(--accent-text);
  font-size: 40px; font-weight: 700;
}
.phone-greeting {
  margin-top: 30px; padding: var(--space-3) 14px; border-radius: 18px;
  background: var(--bg); text-align: center; font-size: var(--fs-min); line-height: 1.4;
}
.phone-start { font-size: 20px; margin-top: var(--space-1); }
.phone-start i { font-family: Georgia, serif; }
.phone-chat { position: relative; margin-top: auto; display: flex; flex-direction: column; gap: var(--space-2); font-size: var(--fs-min); line-height: 1.45; }
.bubble { border-radius: 18px; padding: 10px 14px; background: var(--bg); }
.bubble-q { align-self: flex-end; max-width: 92%; }
.bubble-a { display: flex; flex-direction: column; gap: var(--space-2); }
.bubble-actions, .pane-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.mini { padding: 6px var(--space-3); border-radius: 14px; border: 1px solid var(--line); font-size: var(--fs-min); font-weight: 600; background: var(--bg); }
.mini-dark { background: var(--text); color: var(--bg); border-color: var(--text); }

.typing {
  display: inline-block; overflow: hidden; white-space: nowrap; vertical-align: bottom; max-width: 100%;
  border-right: 2px solid var(--accent); animation: type 7s steps(var(--n, 28)) infinite;
}
@keyframes type { 0% { width: 0; } 35%, 100% { width: calc(var(--n, 28) * 1ch + 2px); } }
.dots { display: flex; gap: var(--space-1); padding-left: 6px; min-height: 8px; }
.dots span { width: 8px; height: 8px; border-radius: 4px; background: var(--muted); opacity: 0; animation: dot 7s infinite; }
.dots span:nth-child(2) { animation-delay: 0.15s; }
.dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes dot { 0%, 34% { opacity: 0; } 36%, 46% { opacity: 1; } 48%, 100% { opacity: 0; } }
.bubble-a { animation: ans 7s infinite; }
@keyframes ans { 0%, 40% { opacity: 0; transform: translateY(8px); } 48%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@media (min-width: 960px) {
  .phone { width: 330px; }
  .phone-screen { min-height: 640px; }
}

/* ── Marquee ───────────────────────────────────────────────────────── */
.marquee {
  display: flex; width: max-content; padding: var(--space-2) 0 var(--space-6);
  animation: marq 40s linear infinite;
}
.marquee-track { display: flex; gap: var(--space-3); margin: 0; padding: 0 var(--space-3) 0 0; list-style: none; }
@keyframes marq { to { transform: translateX(-50%); } }
.pill {
  flex: none; display: flex; align-items: center; gap: 10px;
  padding: var(--space-2) 18px var(--space-2) var(--space-2); border-radius: 30px;
  font-size: var(--fs-small); font-weight: 600; white-space: nowrap;
}
.pill-initial { width: 32px; height: 32px; border-radius: 16px; background: var(--bg); display: flex; align-items: center; justify-content: center; font-size: var(--fs-min); }
body:has(.marquee) main { overflow-x: clip; }

/* ── Ask it anything ───────────────────────────────────────────────── */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.chips li { padding: 10px var(--space-4); border-radius: 22px; border: 2px solid var(--line); background: var(--bg); font-size: var(--fs-small); font-weight: 600; }
.fact { animation: fact 6s infinite; }
@keyframes fact { 0%, 30% { opacity: 0; transform: translateY(10px); } 38%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; } }

/* ── Why people switch ─────────────────────────────────────────────── */
.cards4 { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
.cards4 .box p { color: var(--muted); font-size: 17px; }
@media (min-width: 720px) { .cards4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .cards4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ── The flipping card ─────────────────────────────────────────────── */
.flip { perspective: 900px; width: 100%; max-width: 420px; justify-self: center; }
.flip-inner { display: grid; transform-style: preserve-3d; animation: flip 8s infinite; }
.flip-face {
  grid-area: 1 / 1; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border-radius: var(--r-box); padding: var(--space-6); min-height: 190px;
}
.flip-front { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; background: var(--paper); border: 1px solid var(--line); }
.flip-front .qr { flex: none; width: 144px; height: 144px; color: var(--text); }
.flip-name { display: flex; flex-direction: column; gap: 6px; font-size: var(--fs-body); }
.flip-name .muted { font-size: var(--fs-min); }
.flip-back { transform: rotateY(180deg); display: flex; flex-direction: column; justify-content: center; gap: 10px; background: var(--text); color: var(--bg); }
.flip-back b { font-size: var(--fs-h2); }
@keyframes flip { 0%, 40% { transform: none; } 50%, 90% { transform: rotateY(180deg); } 100% { transform: rotateY(360deg); } }

/* ── Plain answers, not dashboards ─────────────────────────────────── */
.tabs-demo { display: flex; flex-direction: column; gap: var(--space-4); width: 100%; max-width: 460px; justify-self: center; }
.tabs-bar { display: flex; flex-wrap: wrap; gap: var(--space-2); background: var(--surface); border-radius: var(--r-chip); padding: var(--space-1); align-self: flex-start; }
.tab { padding: 10px var(--space-4); border-radius: 20px; font-size: var(--fs-small); font-weight: 600; color: var(--muted); animation: tabon 12s infinite; }
.tab:nth-child(2) { animation-delay: 4s; }
.tab:nth-child(3) { animation-delay: 8s; }
.tab:first-child { background: var(--text); color: var(--bg); }
@keyframes tabon {
  0% { background: transparent; color: var(--muted); }
  3%, 30% { background: var(--text); color: var(--bg); }
  33%, 100% { background: transparent; color: var(--muted); }
}
.panes { display: grid; }
.pane { grid-area: 1 / 1; opacity: 0; animation: pane 12s infinite; }
.pane:first-child { opacity: 1; }
.pane:nth-child(2) { animation-delay: 4s; }
.pane:nth-child(3) { animation-delay: 8s; }
@keyframes pane { 0% { opacity: 0; } 3%, 30% { opacity: 1; } 33%, 100% { opacity: 0; } }
.number { font-size: var(--fs-number); font-weight: 700; color: var(--accent); line-height: 1.2; }
.number span { font-size: var(--fs-small); font-weight: 500; color: var(--text); }

/* ── Signature and stamp card ──────────────────────────────────────── */
.signature { display: flex; flex-wrap: wrap; gap: var(--space-4); align-items: center; padding: 22px; border: 1px solid var(--line); border-radius: var(--r-box); background: var(--paper); }
.avatar {
  flex: none; width: 64px; height: 64px; border-radius: 32px; background: var(--p-blue);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 26px; color: var(--accent-text);
}
.signature-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.signature-text svg { color: var(--accent); }
.ring { animation: ring 2.4s ease-in-out infinite; }
@keyframes ring { 0%, 100% { box-shadow: 0 0 0 0 rgba(42, 120, 214, 0.55); } 50% { box-shadow: 0 0 0 8px rgba(42, 120, 214, 0); } }
.draw { stroke-dasharray: 400; animation: draw 2.4s ease-out infinite alternate; }
@keyframes draw { from { stroke-dashoffset: 400; } to { stroke-dashoffset: 0; } }
.shine {
  align-self: flex-start; padding: var(--space-2) var(--space-4); border-radius: 18px;
  color: var(--paper); font-size: var(--fs-min); font-weight: 600;
  background: linear-gradient(100deg, var(--accent-fill) 40%, var(--accent) 50%, var(--accent-fill) 60%) var(--accent-fill);
  background-size: 220px 100%; animation: shine 2.6s linear infinite;
}
:root[data-theme="dark"] .shine { color: var(--text); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .shine { color: var(--text); } }
@keyframes shine { 0% { background-position: -160px 0; } 100% { background-position: 220px 0; } }
.stamp-card { gap: 14px; }
.stamp-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-2); }
.stamps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.stamp {
  aspect-ratio: 1; border-radius: 50%; background: var(--accent-fill); color: var(--paper);
  display: flex; align-items: center; justify-content: center; font-size: 20px;
  opacity: 0.15; animation: stamp 6s infinite;
}
@keyframes stamp { 0% { opacity: 0.15; transform: scale(1); } 8% { opacity: 1; transform: scale(1.25); } 12%, 90% { opacity: 1; transform: scale(1); } 100% { opacity: 0.15; } }

/* ── The receipt ───────────────────────────────────────────────────── */
.receipt {
  background: var(--paper); border: 2px dashed var(--line); border-radius: 18px; padding: 22px;
  font-family: ui-monospace, Menlo, monospace; font-size: var(--fs-min); line-height: 1.5;
  display: flex; flex-direction: column; gap: var(--space-2); width: 100%; max-width: 460px; justify-self: center;
}
.receipt p { display: flex; justify-content: space-between; gap: var(--space-3); }
.receipt-note { color: var(--muted); }
.receipt-sum { border-top: 2px dashed var(--line); margin-top: 6px; padding-top: 10px; }
.receipt-total { font-weight: 700; font-size: var(--fs-body); color: var(--accent-text); }

/* ── Pricing ───────────────────────────────────────────────────────── */
.plans { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
@media (min-width: 900px) { .plans { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.plan { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-6); border: 2px solid var(--line); border-radius: var(--r-box); background: var(--paper); }
.plan-pro { border: 4px solid var(--accent); padding: 22px; }
.plan h3 { display: flex; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; }
.plan-note { color: var(--muted); font-size: var(--fs-min); }
.ticks { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: var(--fs-small); line-height: 1.45; }
.ticks li::before { content: "✓ "; color: var(--ok); font-weight: 700; }
.big-ticks { font-size: var(--fs-body); gap: var(--space-3); }
.plain-list { margin: 0; padding-left: var(--space-6); display: flex; flex-direction: column; gap: var(--space-3); line-height: 1.5; }
.page-top { padding-top: var(--space-8); }

/* ── Questions ─────────────────────────────────────────────────────── */
.faq-wrap { max-width: calc(860px + 2 * var(--margin)); margin-left: 0; }
@media (min-width: 960px) { .faq-wrap { margin-left: auto; margin-right: auto; max-width: calc(var(--wrap) + 2 * var(--margin)); } }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: var(--space-4);
  min-height: var(--h-row); padding: var(--space-4) 0; font-weight: 700; cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: var(--fs-h2); color: var(--muted); font-weight: 400; }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding-bottom: var(--space-5); color: var(--muted); line-height: 1.5; max-width: 760px; }

/* ── Closing block ─────────────────────────────────────────────────── */
.closing-band { padding: 48px 0; }
.closing {
  background: var(--text); color: var(--bg); border-radius: 32px; padding: 36px var(--space-6);
  display: flex; flex-direction: column; gap: var(--space-5); align-items: center; text-align: center;
}
.closing .lead { color: inherit; opacity: 0.8; }
.closing .claim-field { background: var(--bg); border-color: var(--bg); }
.closing .claim-button { background: var(--text); color: var(--bg); }
.closing .claim-check { color: var(--bg); }
.closing .claim-check.ok { color: var(--bg); }
.closing .claim-check button { color: inherit; }
.pulse { animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.03); } }
@media (min-width: 960px) { .closing { padding: 56px; } }

/* ── Footer ────────────────────────────────────────────────────────── */
.site-footer { padding: var(--space-8) 0 48px; color: var(--muted); font-size: var(--fs-min); }
.footer-row { display: flex; flex-direction: column; gap: var(--space-3); }
.footer-row nav { display: flex; flex-wrap: wrap; gap: 0 var(--space-6); }
.footer-row a { display: inline-flex; align-items: center; min-height: var(--tap-min); color: var(--text); text-decoration: none; }
.footer-row a:hover { text-decoration: underline; }

/* ── Reduced motion: every animation stops on its first, complete frame. ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .rot > span:not(:first-child) { display: none; }
  .typing { width: auto; white-space: normal; border-right: 0; }
  .dots { display: none; }
  .bubble-a, .fact, .stamp { opacity: 1; transform: none; }
  .pane:not(:first-child) { display: none; }
  .tab:first-child { background: var(--text); color: var(--bg); }
  .marquee { width: auto; flex-wrap: wrap; justify-content: center; padding-left: var(--margin); padding-right: var(--margin); }
  .marquee-track { flex-wrap: wrap; justify-content: center; padding: 0; }
  .marquee-track.copy { display: none; }
  .pill { white-space: normal; }
}
