/* KevoBooks marketing site
   One stylesheet, mobile first. Breakpoints: 640px and 960px.
   Colours, type and radii come from the KevoBooks Design System v2. */

/* ---------- Fonts (self-hosted, no third-party requests) ---------- */
@font-face {
  font-family: "Poppins";
  src: url("../fonts/poppins-700.woff") format("woff");
  font-weight: 600 700; font-style: normal; font-display: swap;
}
/* IBM Plex Sans is used if installed on the device; otherwise the system sans-serif.
   To self-host it, add the woff2 files to /fonts and a url() source below. */
@font-face {
  font-family: "IBM Plex Sans";
  src: local("IBM Plex Sans"), local("IBMPlexSans");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: local("IBM Plex Sans SemiBold"), local("IBMPlexSans-SemiBold");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/ibm-plex-mono-400.woff") format("woff");
  font-weight: 400 500; font-style: normal; font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --ground: #F4F7FC;
  --surface: #FFFFFF;
  --sunken: #E6EDF7;
  --line: #D5DFEC;
  --line-control: #8193AA;
  --ink: #0B1B33;
  --ink-muted: #4A5B70;
  --navy: #062C6B;
  --deep: #062C6B;
  --deep-muted: #9FC0EA;
  --line-on-deep: rgba(255, 255, 255, 0.16);
  --action: #0B63E5;
  --action-hover: #0753C4;
  --action-tint: #E6EFFD;
  --sky: #48B9FD;
  --success: #0E7350;  --success-tint: #E3F4EC;
  --warning: #A35207;  --warning-tint: #FDF1DC;
  --danger: #B83228;   --danger-tint: #FCE9E7;

  --font-display: "Poppins", "Montserrat", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --r-sm: 6px; --r-md: 10px; --r-lg: 16px;
  --gutter: 20px;
  --max: 1200px;
  --section: 96px;
  --header-h: 64px;
  --ease: cubic-bezier(0.2, 0, 0, 1);
}
@media (min-width: 640px) { :root { --gutter: 32px; } }
@media (min-width: 960px) { :root { --section: 128px; --header-h: 72px; } }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--surface); color: var(--ink);
  font-family: var(--font-body); font-size: 17px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; color: var(--ink); margin: 0; letter-spacing: -0.015em; }
h1 { font-size: clamp(36px, 4.4vw, 54px); line-height: 1.06; letter-spacing: -0.025em; }
h2 { font-size: clamp(28px, 3.6vw, 38px); line-height: 1.15; }
h3 { font-size: 18px; line-height: 1.35; font-weight: 700; letter-spacing: -0.005em; }
p { margin: 0; }
a { color: var(--action); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--action-hover); }
:focus-visible { outline: 2px solid var(--action); outline-offset: 3px; border-radius: 2px; }
.accent { color: var(--action); }
.num, td.amt { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); }
.sr-only { position: absolute; 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: 12px; top: -48px; background: var(--navy); color: #fff; padding: 10px 14px; border-radius: var(--r-sm); z-index: 100; }
.skip:focus { top: 12px; color: #fff; }

/* ---------- Grid ---------- */
.container { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 20px; }
@media (min-width: 960px) { .grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; } }
.grid > * { grid-column: 1 / -1; }
@media (min-width: 960px) {
  .c-1-4 { grid-column: 1 / span 4; }
  .c-1-5 { grid-column: 1 / span 5; }
  .c-1-6 { grid-column: 1 / span 6; }
  .c-1-7 { grid-column: 1 / span 7; }
  .c-1-8 { grid-column: 1 / span 8; }
  .c-5-12 { grid-column: 5 / -1; }
  .c-6-12 { grid-column: 6 / -1; }
  .c-7-12 { grid-column: 7 / -1; }
  .c-8-12 { grid-column: 8 / -1; }
  .c-4-12 { grid-column: 4 / -1; }
  .c-9-12 { grid-column: 9 / -1; }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: rgba(255, 255, 255, 0.97); border-bottom: 1px solid var(--line);
}
.site-header .container { height: 100%; display: flex; align-items: center; gap: 24px; }
.wordmark { display: inline-flex; align-items: center; flex: none; }
.wordmark img { height: 34px; width: auto; }
@media (min-width: 960px) { .wordmark img { height: 38px; } }
.nav { margin-left: auto; display: none; gap: 28px; }
.nav a { color: var(--ink); text-decoration: none; font-size: 15px; }
.nav a:hover { color: var(--action); }
@media (min-width: 960px) { .nav { display: flex; } }
.header-cta { margin-left: auto; }
@media (min-width: 960px) { .header-cta { margin-left: 8px; } }
.menu-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border: 1px solid var(--line-control); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); cursor: pointer;
}
.menu-btn svg { width: 18px; height: 18px; }
@media (min-width: 960px) { .menu-btn { display: none; } }
@media (max-width: 420px) { .header-cta .btn { padding: 0 12px; font-size: 14px; } }
.mobile-nav { border-top: 1px solid var(--line); background: var(--surface); }
.mobile-nav[hidden] { display: none; }
.mobile-nav a { display: block; padding: 14px var(--gutter); border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
@media (min-width: 960px) { .mobile-nav { display: none !important; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: var(--r-md); border: 1px solid transparent;
  font: 600 15px/1 var(--font-body); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color 150ms var(--ease), color 150ms var(--ease), border-color 150ms var(--ease);
}
.btn--primary { background: var(--action); color: #fff; }
.btn--primary:hover { background: var(--action-hover); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-control); }
.btn--ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn--sm { height: 38px; padding: 0 14px; font-size: 14px; }
.text-link { font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.text-link:hover { text-decoration: underline; }

/* ---------- Section frame ---------- */
.section { padding: var(--section) 0; border-top: 1px solid var(--line); }
.section--ground { background: var(--ground); }
.label {
  display: block; font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink-muted); margin-bottom: 20px;
}
.lede { font-size: 19px; line-height: 1.55; color: var(--ink-muted); max-width: 40ch; }
.body { color: var(--ink-muted); max-width: 58ch; }
.body + .body { margin-top: 14px; }
.section-head { margin-bottom: 48px; }
@media (min-width: 960px) { .section-head { margin-bottom: 64px; } }
.caption { font-size: 14px; color: var(--ink-muted); margin-top: 12px; }

/* ---------- Status chips ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px;
  border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap;
}
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip--ready { color: var(--success); background: var(--success-tint); }
.chip--waiting { color: var(--warning); background: var(--warning-tint); }
.chip--overdue { color: var(--danger); background: var(--danger-tint); }
.chip--decision { color: var(--action); background: var(--action-tint); }

/* ---------- Hero ---------- */
.hero { padding: 56px 0 var(--section); background: var(--ground); }
@media (min-width: 960px) { .hero { padding-top: 96px; } }
.hero .grid { row-gap: 56px; align-items: center; }
.hero .caption { margin-top: 20px; }
.hero h1 { max-width: 16ch; }
@media (min-width: 960px) { .hero h1 { font-size: clamp(40px, 3.5vw, 50px); max-width: none; } }
.hero .lede { margin-top: 24px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 28px; margin-top: 36px; }
.hero-meta-unused { margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--line); font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.06em; color: var(--ink-muted); }

/* Browser frame */
.browser { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.browser__bar { height: 30px; display: flex; align-items: center; gap: 6px; padding: 0 12px; border-bottom: 1px solid var(--line); background: var(--surface); }
.browser__bar span { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.browser__bar em { margin-left: 10px; font-style: normal; font-family: var(--font-mono); font-size: 11px; color: var(--ink-muted); }
.browser img { width: 100%; }

/* Phone frame */
.phone { width: 100%; max-width: 300px; background: #0B1B33; border-radius: 34px; padding: 9px; }
.phone__screen { border-radius: 26px; overflow: hidden; background: #EFEAE2; }

/* ---------- WhatsApp-style chat (illustrative) ---------- */
.wa { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 12.5px; line-height: 1.4; color: #111B21; }
.wa__head { display: flex; align-items: center; gap: 8px; padding: 22px 12px 9px; background: #FFFFFF; border-bottom: 1px solid #E3E1DC; }
.wa__avatar { width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 1px solid #E3E1DC; display: grid; place-items: center; overflow: hidden; }
.wa__avatar img { width: 20px; height: auto; }
.wa__name { font-weight: 600; font-size: 13px; }
.wa__sub { font-size: 11px; color: #54656F; }
.wa__body { padding: 10px 9px 12px; display: flex; flex-direction: column; gap: 6px; }
.wa__day { align-self: center; font-size: 10.5px; color: #54656F; background: #fff; border-radius: 6px; padding: 2px 8px; margin-bottom: 2px; }
.bubble { max-width: 86%; background: #fff; border-radius: 8px; padding: 6px 8px 4px; position: relative; }
.bubble--out { align-self: flex-end; background: #D9FDD3; }
.bubble time { display: block; text-align: right; font-size: 10px; color: #56656D; margin-top: 2px; }
.bubble .amt { font-variant-numeric: tabular-nums; font-weight: 600; }
.bubble ul { margin: 4px 0 0; padding: 0; list-style: none; }
.bubble li { display: flex; justify-content: space-between; gap: 10px; padding: 2px 0; }
.bubble li span:last-child { color: #54656F; }
.bubble li .ok { color: #0E7350; }
.wa__btns { display: grid; gap: 3px; max-width: 86%; margin-top: -3px; }
.wa__btn { background: #fff; border-radius: 8px; padding: 7px 8px; text-align: center; color: #027EB5; font-weight: 500; }
.wa__btn.is-picked { outline: 1.5px solid #027EB5; outline-offset: -1.5px; }
.file { display: flex; align-items: center; gap: 8px; background: rgba(0,0,0,0.05); border-radius: 6px; padding: 6px 8px; }
.file i { font-style: normal; font-size: 9px; font-weight: 700; color: #fff; background: #C5372C; border-radius: 3px; padding: 3px 4px; }

/* ---------- Problem table ---------- */
.problem .grid { row-gap: 48px; align-items: start; }
.ledger { width: 100%; border-collapse: collapse; font-size: 14.5px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.ledger caption { text-align: left; font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted); padding-bottom: 12px; }
.ledger th { text-align: left; font-weight: 600; font-size: 13px; color: var(--ink-muted); padding: 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ledger td { padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.ledger tr:last-child td { border-bottom: 0; }
.ledger td.amt, .ledger th.amt { text-align: right; }
.ledger .date, .ledger .type { font-family: var(--font-mono); font-size: 13.5px; color: var(--ink-muted); white-space: nowrap; }
.ledger .party { font-weight: 600; white-space: nowrap; }
.ledger .issue { color: var(--ink-muted); }
@media (max-width: 719px) {
  .ledger, .ledger tbody, .ledger tr, .ledger td { display: block; }
  .ledger { border: 0; background: transparent; }
  .ledger thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .ledger tr { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); margin-bottom: 10px; }
  .ledger td { padding: 0; border: 0; }
  .ledger caption:not(.sr-only) { display: block; width: 100%; }
  .ledger .date { grid-column: 1; grid-row: 1; }
  .ledger .type { grid-column: 2; grid-row: 1; text-align: right; }
  .ledger .party { grid-column: 1; grid-row: 2; }
  .ledger td.amt { grid-column: 2; grid-row: 2; font-weight: 600; }
  .ledger .issue { grid-column: 1; grid-row: 3; }
  .ledger .status { grid-column: 2; grid-row: 3; text-align: right; }
}

/* ---------- How it works ---------- */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; border-top: 1px solid var(--ink); }
.steps li { display: grid; grid-template-columns: 56px 1fr; gap: 6px 16px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.steps .n { font-family: var(--font-mono); font-size: 13px; color: var(--ink-muted); padding-top: 4px; grid-row: span 2; }
.steps h3 { font-size: 20px; }
.steps p { color: var(--ink-muted); max-width: 60ch; }
@media (min-width: 960px) {
  .steps li { grid-template-columns: 80px 240px 1fr; align-items: baseline; padding: 32px 0; }
  .steps .n { grid-row: auto; }
}

/* ---------- Product tour ---------- */
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--line); margin-bottom: 40px; overflow-x: auto; }
.tab {
  appearance: none; background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px;
  padding: 14px 4px; margin-right: 32px; font: 600 15px/1.2 var(--font-body); color: var(--ink-muted); cursor: pointer; white-space: nowrap;
}
.tab[aria-selected="true"] { color: var(--action); border-bottom-color: var(--action); }
.tab:hover { color: var(--ink); }
@media (max-width: 639px) { .tab-sub { display: none; } }
.tab .mono { font-weight: 400; margin-right: 8px; font-size: 12px; }
.panel .grid { row-gap: 32px; align-items: start; }
.panel[hidden] { display: none; }
.annot { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); counter-reset: a; }
.annot li { display: grid; grid-template-columns: 32px 1fr; gap: 12px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.annot li::before { counter-increment: a; content: counter(a); width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--ink); display: grid; place-items: center; font: 12px/1 var(--font-mono); color: var(--ink); }
.annot b { display: block; font-weight: 600; margin-bottom: 2px; }
.annot span { color: var(--ink-muted); font-size: 15px; }
.marked { position: relative; }
.marker {
  position: absolute; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: #fff;
  display: grid; place-items: center; font: 12px/1 var(--font-mono); transform: translate(-50%, -50%);
  box-shadow: 0 0 0 3px #fff;
}
.tour-phone { display: flex; justify-content: center; background: var(--sunken); border-radius: var(--r-lg); padding: 32px 20px; }

.tour-phone .phone { max-width: 320px; }

/* ---------- Control (4 columns, hairlines) ---------- */
.cols4 { display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--ink); }
.cols4 > div { padding: 28px 0; border-bottom: 1px solid var(--line); }
.cols4 h3 { margin-bottom: 10px; }
.cols4 p { color: var(--ink-muted); font-size: 16px; }
@media (min-width: 640px) {
  .cols4 { grid-template-columns: 1fr 1fr; }
  .cols4 > div { padding: 28px 24px 28px 0; }
  .cols4 > div:nth-child(even) { padding-left: 24px; border-left: 1px solid var(--line); }
}
@media (min-width: 960px) {
  .cols4 { grid-template-columns: repeat(4, 1fr); }
  .cols4 > div { border-bottom: 0; padding: 32px 24px 8px; border-left: 1px solid var(--line); }
  .cols4 > div:first-child { padding-left: 0; border-left: 0; }
}

/* ---------- Before / after ---------- */
.ba { display: grid; grid-template-columns: 1fr; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.ba > div { padding: 28px; }
.ba > div + div { border-top: 1px solid var(--line); }
@media (min-width: 640px) { .ba { grid-template-columns: 1fr 1fr; } .ba > div + div { border-top: 0; border-left: 1px solid var(--line); } }
.ba h3 { font-family: var(--font-mono); font-weight: 400; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 16px; }
.ba ul { margin: 0; padding: 0; list-style: none; }
.ba li { padding: 10px 0; border-top: 1px solid var(--line); }
.ba li:first-child { border-top: 0; padding-top: 0; }
.ba .after h3 { color: var(--action); }
.footnote { font-size: 14px; color: var(--ink-muted); margin-top: 16px; }

/* ---------- Two blocks (who / works with) ---------- */
.pair { display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--ink); }
.pair > div { padding: 28px 0; border-bottom: 1px solid var(--line); }
.pair h3 { margin-bottom: 8px; }
.pair p { color: var(--ink-muted); max-width: 46ch; }
@media (min-width: 640px) { .pair { grid-template-columns: 1fr 1fr; } .pair > div + div { padding-left: 24px; border-left: 1px solid var(--line); } .pair > div { padding-right: 24px; border-bottom: 0; } }

/* ---------- Data rows ---------- */
.rows { border-top: 1px solid var(--ink); margin: 0; }
.rows > div { display: grid; grid-template-columns: 1fr; gap: 6px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.rows dt { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted); }
.rows dd { margin: 0; max-width: 62ch; }
@media (min-width: 960px) { .rows > div { grid-template-columns: 4fr 8fr; gap: 24px; } }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--ink); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item h3 { font-family: var(--font-body); font-size: 17px; font-weight: 600; letter-spacing: 0; }
.faq-q {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 24px; text-align: left;
  background: none; border: 0; padding: 22px 0; font: inherit; color: var(--ink); cursor: pointer;
}
.faq-q:hover { color: var(--action); }
.faq-q .pm { flex: none; width: 14px; height: 14px; position: relative; }
.faq-q .pm::before, .faq-q .pm::after { content: ""; position: absolute; left: 0; top: 6px; width: 14px; height: 1.5px; background: currentColor; transition: transform 300ms var(--ease); }
.faq-q .pm::after { transform: rotate(90deg); }
.faq-q[aria-expanded="true"] .pm::after { transform: rotate(0deg); }
.faq-a { padding: 0 0 24px; color: var(--ink-muted); max-width: 64ch; }
.faq-a[hidden] { display: none; }

/* ---------- Contact (dark band) ---------- */
.contact { background: var(--deep); color: #fff; padding: var(--section) 0; }
.contact h2 { color: #fff; }
.contact .label { color: var(--deep-muted); }
.contact .grid { row-gap: 48px; align-items: start; }
.contact .body { color: #D6E3F5; margin-top: 16px; }
.email-big { display: inline-block; margin-top: 40px; font-family: var(--font-display); font-weight: 700; font-size: clamp(22px, 3vw, 32px); color: #fff; text-decoration: none; border-bottom: 1px solid var(--deep-muted); padding-bottom: 4px; word-break: break-all; }
.email-big:hover { color: #fff; border-bottom-color: #fff; }
.copy-row { margin-top: 20px; display: flex; align-items: center; gap: 14px; }
.btn--on-deep { background: transparent; color: #fff; border-color: var(--deep-muted); }
.btn--on-deep:hover { border-color: #fff; color: #fff; }
.contact :focus-visible { outline-color: #fff; }
.copy-status { font-size: 14px; color: var(--deep-muted); }

.form-card { background: var(--surface); color: var(--ink); border-radius: var(--r-lg); padding: 28px; }
@media (min-width: 640px) { .form-card { padding: 36px; } }
.form-card :focus-visible { outline-color: var(--action); }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 640px) { .form-grid { grid-template-columns: 1fr 1fr; } .form-grid .full { grid-column: 1 / -1; } }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.field .req { color: var(--ink-muted); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%; font: 16px/1.4 var(--font-body); color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-control); border-radius: var(--r-sm); padding: 11px 12px;
}
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.field textarea { min-height: 112px; resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--action); outline-offset: 0; border-color: var(--action); }
.field [aria-invalid="true"] { border-color: var(--danger); }
.field .err { color: var(--danger); font-size: 13.5px; margin-top: 6px; }
.field .err:empty { display: none; }
.form-foot { margin-top: 24px; display: grid; gap: 12px; }
.form-foot .btn { justify-self: start; }
.form-note { font-size: 14px; color: var(--ink-muted); }
.form-status { font-size: 14px; color: var(--ink); }
.form-status:empty { display: none; }

/* ---------- Footer ---------- */
.site-footer { background: var(--deep); color: #D6E3F5; border-top: 1px solid var(--line-on-deep); padding: 56px 0 40px; font-size: 15px; }
.site-footer a { color: #fff; }
.footer-brand img { height: 34px; width: auto; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; list-style: none; margin: 0; padding: 0; }
.footer-legal { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line-on-deep); font-size: 13.5px; color: var(--deep-muted); display: grid; gap: 8px; }

/* ---------- Legal pages ---------- */
.legal { padding: 64px 0 var(--section); }
.legal .container { max-width: calc(760px + 2 * var(--gutter)); }
.legal h1 { font-size: clamp(32px, 5vw, 44px); }
.legal .updated { margin-top: 12px; color: var(--ink-muted); font-size: 15px; }
.legal h2 { font-size: 20px; margin-top: 40px; margin-bottom: 8px; letter-spacing: -0.005em; }
.legal p { max-width: 68ch; color: var(--ink); }
.legal p + p { margin-top: 12px; }
.legal .entity { margin-top: 32px; padding: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 15px; color: var(--ink-muted); }
.back { display: inline-block; margin-top: 48px; }

/* ---------- 404 ---------- */
.notfound { padding: 120px 0; }
.notfound p { margin-top: 16px; color: var(--ink-muted); }

/* ---------- Motion: 300ms fade and slide-up only ---------- */
.js .reveal { opacity: 0; transform: translateY(12px); transition: opacity 300ms var(--ease), transform 300ms var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { transition: none !important; }
}

/* =====================================================================
   v2 layout additions
   ===================================================================== */

/* ---------- Hero stage ---------- */
.hero { padding-bottom: 96px; }
.hero .grid { align-items: center; }
.hero-copy .lede { max-width: 44ch; }
.hero-stage {
  position: relative; margin: 0; background: var(--deep); border-radius: var(--r-lg);
  padding: 40px 24px 0; display: flex; justify-content: center; overflow: hidden; min-height: 460px;
}
.hero-stage::before { /* sky document corner, echoing the logo */
  content: ""; position: absolute; top: 0; right: 0; width: 96px; height: 96px; background: var(--sky);
  clip-path: polygon(0 0, 100% 0, 100% 100%);
}
.hero-stage::after { /* hairline grid */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--line-on-deep) 1px, transparent 1px), linear-gradient(90deg, var(--line-on-deep) 1px, transparent 1px);
  background-size: 48px 48px; opacity: 0.35;
}
.hero-stage .phone { position: relative; z-index: 1; max-width: 268px; margin-bottom: -40px; box-shadow: 0 0 0 1px rgba(255,255,255,0.12); }
.hero-note {
  position: absolute; z-index: 2; left: 20px; bottom: 28px; margin: 0; display: flex; align-items: center; gap: 10px;
  color: #fff; font-size: 14px; background: var(--deep); border: 1px solid var(--deep-muted); border-radius: var(--r-sm); padding: 8px 12px;
}
.hero-note__line { width: 8px; height: 8px; border-radius: 50%; background: var(--sky); }
@media (min-width: 960px) {
  .hero-stage { padding: 56px 56px 0; min-height: 540px; justify-content: flex-end; }
  .hero-note { left: 28px; bottom: auto; top: 371px; }
  .hero-note::after { content: ""; position: absolute; left: 100%; top: 50%; width: 22px; height: 1px; background: var(--deep-muted); }
}
@media (max-width: 639px) { .hero-note { position: relative; left: auto; bottom: auto; margin: 16px 0 56px; } .hero-stage { flex-direction: column; align-items: center; } .hero-stage .phone { margin-bottom: 0; } }

/* ---------- Trust strip (deep band) ---------- */
.trust { background: var(--deep); color: #fff; }
.trust ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; }
.trust li { padding: 22px 16px 22px 0; font-size: 15px; font-weight: 600; border-top: 1px solid var(--line-on-deep); }
.trust li .mono { display: block; color: var(--sky); font-weight: 400; font-size: 12px; margin-bottom: 6px; }
.trust li:nth-child(-n+2) { border-top: 0; }
.trust li:nth-child(even) { padding-left: 16px; border-left: 1px solid var(--line-on-deep); }
@media (min-width: 960px) {
  .trust ul { grid-template-columns: repeat(4, 1fr); }
  .trust li { border-top: 0; padding: 28px 24px; border-left: 1px solid var(--line-on-deep); }
  .trust li:first-child { padding-left: 0; border-left: 0; }
  .trust li:nth-child(even) { padding-left: 24px; }
}

/* ---------- Problem: app-like panel ---------- */
.panel-ui { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.panel-ui__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 20px 20px 16px; border-bottom: 1px solid var(--line); border-top: 4px solid var(--navy); }
.panel-ui__eyebrow { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted); }
.panel-ui__title { font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--navy); margin-top: 4px; }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); margin: 0; border-bottom: 1px solid var(--line); background: var(--ground); }
.kpis > div { padding: 14px 20px; border-top: 1px solid var(--line); }
.kpis > div:nth-child(-n+2) { border-top: 0; }
.kpis > div:nth-child(even) { border-left: 1px solid var(--line); }
@media (min-width: 640px) { .kpis { grid-template-columns: repeat(4, 1fr); } .kpis > div { border-top: 0; border-left: 1px solid var(--line); } .kpis > div:first-child { border-left: 0; } }
.kpis dt { font-size: 12.5px; color: var(--ink-muted); }
.kpis dd { margin: 4px 0 0; font-family: var(--font-display); font-weight: 700; font-size: 22px; color: var(--navy); }
.kpis .kpi--warn { color: var(--warning); }
.kpis .kpi--danger { color: var(--danger); }
.panel-ui .ledger { border: 0; border-radius: 0; }
.gst-strip { display: flex; flex-wrap: wrap; gap: 8px 28px; padding: 12px 20px; background: #F59E0B; color: var(--ink); font-size: 14px; }
.gst-strip b { font-family: var(--font-mono); font-weight: 500; margin-right: 6px; }
@media (max-width: 719px) { .panel-ui .ledger { padding: 12px; display: block; } .panel-ui .ledger tr { background: var(--surface); } }

/* ---------- Actor chips ---------- */
.who { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font: 600 12.5px/1 var(--font-body); white-space: nowrap; }
.who--firm { background: var(--action-tint); color: var(--action); }
.who--client { background: var(--success-tint); color: var(--success); }
.who--kb { background: #DFF2FE; color: var(--navy); }
.legend { display: flex; flex-wrap: wrap; gap: 8px; align-self: end; justify-content: flex-start; margin-top: 24px; }
@media (min-width: 960px) { .legend { justify-content: flex-end; margin-top: 0; } }

/* ---------- Stepper ---------- */
.stepper { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 0; position: relative; }
.stepper li { position: relative; padding: 0 0 32px 56px; }
.stepper li::before { content: ""; position: absolute; left: 17px; top: 36px; bottom: 0; width: 2px; background: var(--line); }
.stepper li:last-child::before { display: none; }
.stepper__n { position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 50%; background: var(--action); color: #fff; display: grid; place-items: center; font: 500 14px/1 var(--font-mono); }
.stepper h3 { font-size: 20px; margin: 10px 0 6px; }
.stepper li .who { margin-top: 2px; }
.stepper p { color: var(--ink-muted); font-size: 16px; }
@media (min-width: 960px) {
  .stepper { grid-template-columns: repeat(5, 1fr); gap: 24px; }
  .stepper li { padding: 56px 0 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 64px 20px 24px; }
  .stepper li::before { left: calc(20px + 36px); right: -25px; top: 37px; bottom: auto; width: auto; height: 2px; }
  .stepper li:last-child::before { display: none; }
  .stepper__n { left: 20px; top: 20px; }
}
@media (max-width: 959px) { .stepper li .who { margin-top: 6px; } }
.how-visual { margin-top: 64px; row-gap: 32px; align-items: start; }
.annot--steps li::before { content: attr(data-n); counter-increment: none; background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- Deep section (Control) ---------- */
.section--deep { background: var(--deep); color: #fff; border-top: 0; }
.section--deep h2, .section--deep h3 { color: #fff; }
.section--deep .label { color: var(--deep-muted); }
.control-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 640px) { .control-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .control-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; } }
.ctrl { display: flex; flex-direction: column; border: 1px solid var(--line-on-deep); border-radius: var(--r-md); padding: 24px; border-top: 3px solid var(--sky); }
.ctrl h3 { font-size: 18px; margin-bottom: 10px; }
.ctrl > p { color: #D6E3F5; font-size: 15.5px; }
.ctrl__demo { margin-top: auto; padding-top: 24px; font-size: 13.5px; }
.ctrl__demo > * { background: rgba(255,255,255,0.06); border: 1px solid var(--line-on-deep); border-radius: var(--r-sm); padding: 10px 12px; }
.ctrl__demo > * + * { margin-top: 6px; }
.mini-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.mini-btn { background: var(--action); color: #fff; border-radius: 6px; padding: 5px 10px; font-weight: 600; font-size: 12.5px; }
.mini-log span, .ctrl__demo--split span { font-family: var(--font-mono); color: var(--sky); margin-right: 10px; font-size: 12px; }
.ctrl__demo--split span { display: block; margin: 0 0 2px; }
.mini-rule span { color: var(--sky); margin: 0 6px; }

/* ---------- Compare table (Aim) ---------- */
.compare { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 16px; }
.compare th, .compare td { text-align: left; padding: 18px 20px; vertical-align: top; border-bottom: 1px solid var(--line); }
.compare thead th { font: 400 13px/1.2 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted); border-bottom: 2px solid var(--ink); }
.compare thead th.after { color: #fff; background: var(--action); border-radius: var(--r-md) var(--r-md) 0 0; border-bottom-color: var(--action); }
.compare tbody th { font-weight: 600; width: 26%; color: var(--ink); }
.compare td { color: var(--ink-muted); }
.compare td.after { background: var(--action-tint); color: var(--navy); font-weight: 600; border-bottom-color: #C9DBF8; }
.compare tbody tr:last-child td.after { border-radius: 0 0 var(--r-md) var(--r-md); }
@media (max-width: 639px) {
  .compare thead { display: none; }
  .compare, .compare tbody, .compare tr, .compare th, .compare td { display: block; width: auto; }
  .compare tr { border: 1px solid var(--line); border-radius: var(--r-md); margin-bottom: 12px; overflow: hidden; }
  .compare tbody th { background: var(--ground); }
  .compare td::before { display: block; font: 400 12px/1.4 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 4px; color: var(--ink-muted); }
  .compare td:not(.after)::before { content: "Before"; }
  .compare td.after::before { content: "With KevoBooks"; color: var(--action); }
  .compare td.after { border-radius: 0 !important; border-bottom: 0; }
}

/* ---------- Spec pair (Who it's for) ---------- */
.spec-pair { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 640px) { .spec-pair { grid-template-columns: 1fr 1fr; gap: 20px; } }
.spec { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 24px; }
.spec h3 { margin-bottom: 12px; }
.spec h3 .who { font-size: 14px; height: 28px; padding: 0 12px; }
.spec > p { color: var(--ink-muted); font-size: 15.5px; margin-bottom: 16px; }
.spec dl { margin: 0; border-top: 1px solid var(--line); }
.spec dl > div { display: grid; grid-template-columns: 88px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.spec dl > div:last-child { border-bottom: 0; padding-bottom: 0; }
.spec dt { font: 400 12px/1.6 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted); }
.spec dd { margin: 0; font-weight: 600; color: var(--navy); }

/* ---------- Flows (Works with) ---------- */
.flows { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 640px) { .flows { grid-template-columns: 1fr 1fr; gap: 20px; } }
.flow { border: 1px solid var(--line); border-radius: var(--r-md); padding: 24px; background: var(--surface); }
.flow__title { font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--ink); margin-bottom: 18px; }
.flow__line { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.flow__line li { border: 1px solid var(--line-control); border-radius: var(--r-sm); padding: 10px 12px; font-weight: 600; font-size: 14.5px; background: var(--surface); position: relative; }
.flow__line li + li { margin-top: 22px; }
.flow__line li + li::before { content: ""; position: absolute; left: 50%; top: -23px; width: 1px; height: 22px; background: var(--ink); }
.flow__line .flow__via { border-style: dashed; font-weight: 400; color: var(--ink-muted); font-family: var(--font-mono); font-size: 12.5px; }
.flow__line .flow__kb { background: var(--navy); border-color: var(--navy); color: #fff; }
.flow__note { margin-top: 16px; font-size: 14.5px; color: var(--ink-muted); }

/* ---------- Tint band (Why) ---------- */
.section--tint { background: var(--action-tint); border-top: 0; }
.section--tint .label { color: var(--navy); }
.why-figure { margin-top: 32px; display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.why-figure .num { font-family: var(--font-display); font-weight: 700; font-size: clamp(56px, 8vw, 88px); line-height: 1; color: var(--action); }
.why-figure span:last-child { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--navy); }

/* ---------- Contact send panel ---------- */
.send-panel { margin-top: 24px; padding: 20px; border: 1px solid var(--line); border-left: 3px solid var(--action); border-radius: var(--r-md); background: var(--ground); }
.send-panel:focus { outline: none; }
.send-panel__title { font-weight: 600; margin-bottom: 14px; }
.send-panel__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.send-panel__preview { margin: 14px 0 0; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); font: 13px/1.5 var(--font-mono); white-space: pre-wrap; word-break: break-word; color: var(--ink); max-height: 220px; overflow: auto; }

/* =====================================================================
   v4: structure for data, why, FAQ, contact, footer
   ===================================================================== */
.head-aside { align-self: end; }
@media (min-width: 960px) { .head-aside .body { max-width: 52ch; } }

/* Policy grid (Data and privacy) */
.policy { margin: 0; display: grid; grid-template-columns: 1fr; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }
.policy > div { padding: 24px; border-top: 1px solid var(--line); }
.policy > div:first-child { border-top: 0; }
@media (min-width: 640px) {
  .policy { grid-template-columns: 1fr 1fr; }
  .policy > div:nth-child(2) { border-top: 0; }
  .policy > div:nth-child(even) { border-left: 1px solid var(--line); }
}
@media (min-width: 960px) {
  .policy { grid-template-columns: repeat(3, 1fr); }
  .policy > div { border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
  .policy > div:nth-child(-n+3) { border-top: 0; }
  .policy > div:nth-child(3n+1) { border-left: 0; }
}
.policy dt { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.policy dt .mono { font-size: 11.5px; color: var(--action); background: var(--action-tint); border-radius: 4px; padding: 2px 6px; font-weight: 500; }
.policy dd { margin: 0; color: var(--ink-muted); font-size: 15.5px; }
.policy > div:last-child { background: var(--ground); }

/* Why: tags + progress track */
.tags { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { border: 1px solid #BFD3F4; background: rgba(255,255,255,0.6); color: var(--navy); border-radius: 999px; padding: 4px 12px; font-size: 14px; }
.track { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 0; border-top: 1px solid #BFD3F4; }
.track li { position: relative; display: grid; grid-template-columns: 28px 64px 1fr; gap: 4px 12px; align-items: baseline; padding: 18px 0; border-bottom: 1px solid #BFD3F4; }
.track__dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--navy); background: transparent; align-self: center; }
.track .is-done .track__dot { background: var(--navy); }
.track .is-now .track__dot { background: var(--action); border-color: var(--action); box-shadow: 0 0 0 4px rgba(11,99,229,0.18); }
.track .mono { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--navy); }
.track b { font-weight: 600; color: var(--ink); }
.track li > span:last-child { grid-column: 3; color: var(--ink-muted); font-size: 15.5px; }
@media (min-width: 960px) {
  .track { grid-template-columns: repeat(3, 1fr); border-top: 0; gap: 16px; }
  .track li { grid-template-columns: 1fr; align-items: start; align-content: start; padding: 20px; background: rgba(255,255,255,0.7); border: 1px solid #BFD3F4; border-radius: var(--r-md); }
  .track li > span:last-child { grid-column: auto; }
  .track__dot { margin-bottom: 8px; }
  .track .is-now { background: #fff; border-color: var(--action); }
}

/* FAQ: numbering + ask card */
.faq[data-numbered] { counter-reset: q; }
.faq[data-numbered] .faq-q::before { counter-increment: q; content: counter(q, decimal-leading-zero); font: 400 12.5px/1 var(--font-mono); color: var(--action); flex: none; width: 32px; }
.faq-q { justify-content: flex-start; }
.faq-q .pm { margin-left: auto; }
.faq[data-numbered] .faq-a { padding-left: 32px; }
.ask-card { margin-top: 32px; padding: 20px; border: 1px solid var(--line); border-left: 3px solid var(--action); border-radius: var(--r-md); background: var(--surface); }
.ask-card .mono { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted); }
.ask-card p + p { margin: 4px 0 8px; }

/* Contact: what to include */
.include { list-style: none; margin: 28px 0 0; padding: 0; border-top: 1px solid var(--line-on-deep); }
.include li { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line-on-deep); color: #D6E3F5; font-size: 15.5px; }
.include .mono { color: var(--sky); font-size: 12px; padding-top: 3px; }

/* Footer columns */
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px 24px; }
.footer-brand { grid-column: 1 / -1; }
@media (min-width: 960px) { .footer-grid { grid-template-columns: 5fr 2fr 2fr 3fr; } .footer-brand { grid-column: auto; } }
.footer-brand p { margin-top: 12px; max-width: 34ch; }
.footer-status { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--deep-muted); }
.footer-status .dot { width: 8px; height: 8px; border-radius: 50%; background: #F59E0B; }
.footer-col .mono { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--deep-muted); margin-bottom: 12px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-col a { color: #fff; text-decoration: none; }
.footer-col a:hover { text-decoration: underline; }

/* =====================================================================
   v4: motion (all of it switched off by prefers-reduced-motion)
   ===================================================================== */
@media (prefers-reduced-motion: no-preference) {
  /* Hero chat plays once: messages arrive one by one, then the tap */
  .js [data-play] .wa__body > * { opacity: 0; transform: translateY(8px); }
  .js [data-play].is-playing .wa__body > * { animation: waIn 300ms var(--ease) forwards; }
  .js [data-play].is-playing .wa__body > :nth-child(1) { animation-delay: 200ms; }
  .js [data-play].is-playing .wa__body > :nth-child(2) { animation-delay: 700ms; }
  .js [data-play].is-playing .wa__body > :nth-child(3) { animation-delay: 1500ms; }
  .js [data-play].is-playing .wa__body > :nth-child(4) { animation-delay: 1900ms; }
  .js [data-play].is-playing .wa__body > :nth-child(5) { animation-delay: 3100ms; }
  .js [data-play].is-playing .wa__body > :nth-child(6) { animation-delay: 3900ms; }
  .js [data-play] .wa__btn.is-picked { outline-color: transparent; }
  .js [data-play].is-playing .wa__btn.is-picked { animation: tap 600ms var(--ease) 2700ms forwards; }
  .js [data-play] .hero-note { opacity: 0; }
  .js [data-play].is-playing .hero-note { animation: waIn 300ms var(--ease) 2900ms forwards; }
  .hero-note__line { animation: pulse 2.4s ease-out infinite; }

  /* Stepper: the connector draws in, numbers light up in order */
  .js .stepper li::before { transform-origin: left center; transform: scaleX(0); transition: transform 600ms var(--ease); }
  .js .stepper.is-in li::before { transform: scaleX(1); }
  .js .stepper li .stepper__n { background: var(--line-control); transition: background-color 300ms var(--ease); }
  .js .stepper.is-in li .stepper__n { background: var(--action); }
  .js .stepper.is-in li:nth-child(2)::before, .js .stepper.is-in li:nth-child(2) .stepper__n { transition-delay: 150ms; }
  .js .stepper.is-in li:nth-child(3)::before, .js .stepper.is-in li:nth-child(3) .stepper__n { transition-delay: 300ms; }
  .js .stepper.is-in li:nth-child(4)::before, .js .stepper.is-in li:nth-child(4) .stepper__n { transition-delay: 450ms; }
  .js .stepper.is-in li:nth-child(5) .stepper__n { transition-delay: 600ms; }
  @media (max-width: 959px) { .js .stepper li::before { transform-origin: top center; transform: scaleY(0); } .js .stepper.is-in li::before { transform: scaleY(1); } }

  /* Staggered reveal inside grids */
  .js .reveal.is-in .control-grid > *, .js .control-grid.reveal.is-in > *,
  .js .policy.reveal.is-in > *, .js .stepper.reveal.is-in > li { animation: waIn 300ms var(--ease) both; }
  .js .control-grid.reveal.is-in > :nth-child(2), .js .policy.reveal.is-in > :nth-child(2), .js .stepper.reveal.is-in > li:nth-child(2) { animation-delay: 80ms; }
  .js .control-grid.reveal.is-in > :nth-child(3), .js .policy.reveal.is-in > :nth-child(3), .js .stepper.reveal.is-in > li:nth-child(3) { animation-delay: 160ms; }
  .js .control-grid.reveal.is-in > :nth-child(4), .js .policy.reveal.is-in > :nth-child(4), .js .stepper.reveal.is-in > li:nth-child(4) { animation-delay: 240ms; }
  .js .policy.reveal.is-in > :nth-child(5), .js .stepper.reveal.is-in > li:nth-child(5) { animation-delay: 320ms; }
  .js .policy.reveal.is-in > :nth-child(6) { animation-delay: 400ms; }

  /* Data moving along the integration lines */
  .flow__line li + li::before { background: repeating-linear-gradient(to bottom, var(--ink) 0 4px, transparent 4px 8px); animation: flowDash 900ms linear infinite; }
  .is-now .track__dot { animation: pulseBlue 2.4s ease-out infinite; }
  .footer-status .dot { animation: pulse 2.4s ease-out infinite; }

  /* Problem table rows flagged one by one */
  .js .panel-ui .ledger tbody tr { opacity: 0; transform: translateX(-6px); }
  .js .reveal.is-in .panel-ui .ledger tbody tr { animation: rowIn 300ms var(--ease) forwards; }
  .js .reveal.is-in .panel-ui .ledger tbody tr:nth-child(2) { animation-delay: 150ms; }
  .js .reveal.is-in .panel-ui .ledger tbody tr:nth-child(3) { animation-delay: 300ms; }

  /* Buttons and cards: small, quick feedback */
  .btn--primary { transition: background-color 150ms var(--ease), transform 150ms var(--ease); }
  .btn--primary:hover { transform: translateY(-1px); }
  .ctrl, .spec, .flow, .stepper li { transition: border-color 200ms var(--ease), transform 200ms var(--ease); }
  .ctrl:hover { border-color: rgba(255,255,255,0.32); transform: translateY(-2px); }
  .spec:hover, .flow:hover, .stepper li:hover { border-color: var(--line-control); transform: translateY(-2px); }
  .mini-btn { transition: background-color 300ms var(--ease); }
  .is-approved .mini-btn { background: var(--success); }
}
@keyframes waIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes rowIn { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }
@keyframes tap { 0% { outline-color: transparent; background: #fff; } 40% { background: #E6F4FB; } 100% { outline-color: #027EB5; background: #fff; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(72,185,253,0.6); } 70% { box-shadow: 0 0 0 8px rgba(72,185,253,0); } 100% { box-shadow: 0 0 0 0 rgba(72,185,253,0); } }
@keyframes pulseBlue { 0% { box-shadow: 0 0 0 0 rgba(11,99,229,0.45); } 70% { box-shadow: 0 0 0 8px rgba(11,99,229,0); } 100% { box-shadow: 0 0 0 0 rgba(11,99,229,0); } }
@keyframes flowDash { from { background-position: 0 0; } to { background-position: 0 8px; } }
@media (max-width: 959px) {
  #why .c-7-12, #data .head-aside, #faq .faq, .section .grid > .c-5-12, .section .grid > .c-6-12 { margin-top: 32px; }
  .ask-card { margin-bottom: 8px; }
}

/* =====================================================================
   v5: calmer, product-first layout (reference: large light headlines,
   dark hero, product shown big, bento tiles with small UI fragments)
   ===================================================================== */
@font-face { font-family: "Poppins"; src: url("../fonts/poppins-400.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../fonts/poppins-500.woff") format("woff"); font-weight: 500; font-style: normal; font-display: swap; }

h1, h2 { font-weight: 500; letter-spacing: -0.025em; }
h2 { font-size: clamp(30px, 3.8vw, 44px); line-height: 1.12; }
h3 { font-weight: 600; }
.section-head h2 { max-width: 20ch; }

/* ---------- Hero ---------- */
.hero2 {
  position: relative; color: #fff; text-align: center; padding: 72px 0 0;
  background: linear-gradient(180deg, #041D49 0%, #062C6B 55%, #0A3A85 100%);
  overflow: hidden;
}
.hero2::before { /* hairline grid, fading out */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 64px 64px; -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 75%); mask-image: linear-gradient(180deg, #000 0%, transparent 75%);
}
.hero2__inner { position: relative; display: flex; flex-direction: column; align-items: center; }
@media (min-width: 960px) { .hero2 { padding-top: 104px; } }
.pill { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 28px; padding: 6px 14px; border: 1px solid rgba(255,255,255,0.22); border-radius: 999px; font-size: 13.5px; color: #D6E3F5; background: rgba(255,255,255,0.04); }
.pill__dot { width: 7px; height: 7px; border-radius: 50%; background: #F59E0B; }
.hero2 h1 { color: #fff; font-size: clamp(36px, 5vw, 62px); line-height: 1.08; max-width: 22ch; }
.hero2__soft { color: var(--sky); }
.br-lg { display: none; } @media (min-width: 960px) { .br-lg { display: inline; } }
.hero2__lede { margin-top: 24px; font-size: clamp(17px, 1.6vw, 20px); line-height: 1.55; color: #C9D8F0; max-width: 46ch; }
.hero2__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 36px; }
.btn--light { background: #fff; color: var(--navy); }
.btn--light:hover { background: #E6EFFD; color: var(--navy); }
.btn--outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,0.4); }
.btn--outline-light:hover { border-color: #fff; color: #fff; }
.hero2 :focus-visible { outline-color: #fff; }
.hero2__meta { margin-top: 28px; font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--deep-muted); }

.hero2__visual { position: relative; margin: 56px auto 0; max-width: 1040px; text-align: left; }
@media (min-width: 960px) { .hero2__visual { margin-top: 72px; } }
.browser--hero { border-color: rgba(255,255,255,0.18); border-bottom: 0; border-radius: 14px 14px 0 0; box-shadow: 0 -1px 0 rgba(255,255,255,0.08), 0 24px 80px rgba(2, 14, 38, 0.45); }
.browser--hero .browser__bar { background: #F4F7FC; }
.hero2__visual .phone { display: none; }
@media (min-width: 760px) {
  .hero2__visual .phone { display: block; position: absolute; right: -12px; bottom: 28px; max-width: 236px; box-shadow: 0 24px 60px rgba(2,14,38,0.35); z-index: 2; }
}
@media (min-width: 1200px) { .hero2__visual .phone { right: -56px; } }
.hero2__note { display: none; }
@media (min-width: 960px) {
  .hero2__note { display: flex; align-items: center; gap: 8px; position: absolute; z-index: 3; right: 196px; bottom: 196px; margin: 0;
    background: var(--deep); color: #fff; font-size: 13.5px; padding: 8px 12px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.25); }
  .hero2__note span { width: 8px; height: 8px; border-radius: 50%; background: var(--sky); }
}
@media (min-width: 1200px) { .hero2__note { right: 152px; } }
.hero2__cap { position: relative; text-align: left; color: var(--deep-muted); margin: 0; padding: 14px 0 18px; font-size: 13px; }
.hero2 + .trust2 { position: relative; }

/* ---------- Trust strip (light) ---------- */
.trust2 { background: var(--surface); border-bottom: 1px solid var(--line); }
.trust2 ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; }
.trust2 li { padding: 22px 12px 22px 0; font-size: 15px; color: var(--ink-muted); display: flex; gap: 10px; align-items: flex-start; }
.trust2 li::before { content: ""; flex: none; width: 16px; height: 16px; margin-top: 3px; border-radius: 50%; background: var(--success-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.2 2.2 4.8-4.8' fill='none' stroke='%230E7350' stroke-width='1.6'/%3E%3C/svg%3E") center/16px no-repeat; }
@media (min-width: 960px) { .trust2 ul { grid-template-columns: repeat(4, 1fr); } .trust2 li { padding: 28px 24px 28px 0; } }

/* ---------- Bento ---------- */
.bento { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 760px) { .bento { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .bento { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.tile { display: flex; flex-direction: column; background: var(--ground); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; min-height: 320px; }
.tile header { padding: 24px 24px 0; }
.tile h3 { font-family: var(--font-display); font-weight: 500; font-size: 19px; letter-spacing: -0.01em; color: var(--ink); }
.tile header p { margin-top: 6px; color: var(--ink-muted); font-size: 15px; max-width: 42ch; }
.tile__art { position: relative; flex: 1; display: flex; align-items: center; justify-content: center; padding: 28px 24px; }
@media (min-width: 760px) { .tile--wide { grid-column: 1 / -1; } }
@media (min-width: 960px) { .tile--wide { grid-column: span 2; grid-row: span 2; } }
.tile__art--shot { align-items: flex-end; padding: 24px 0 0 24px; overflow: hidden; }
.tile__art--shot img { width: 118%; max-width: none; border: 1px solid var(--line); border-right: 0; border-bottom: 0; border-radius: 12px 0 0 0; box-shadow: 0 12px 40px rgba(6,44,107,0.12); }
.tile--deep { background: var(--deep); border-color: var(--deep); }
.tile--deep h3 { color: #fff; } .tile--deep header p { color: #C9D8F0; }

/* UI fragments inside tiles */
.frag { width: 100%; max-width: 320px; margin: 0; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 28px rgba(6,44,107,0.08); font-size: 14px; list-style: none; }
.frag__title { font-weight: 600; color: var(--navy); margin-bottom: 8px; font-size: 13.5px; }
.frag__row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); }
.frag__title + .frag__row, .frag > .frag__row:first-child { border-top: 0; }
.frag__file { font-weight: 600; color: var(--ink); font-size: 13.5px; }
.frag__sub { margin-top: 4px; font-size: 13px; color: var(--ink-muted); }
.frag--float { position: relative; z-index: 2; transform: translateY(-10px); }
.frag--back { position: absolute; z-index: 1; max-width: 300px; opacity: 0.55; transform: translate(14px, 34px) scale(0.96); box-shadow: none; }
.frag--log li { display: flex; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); color: var(--ink); }
.frag--log li:first-child { border-top: 0; }
.frag--log .mono { color: var(--action); font-size: 12.5px; padding-top: 2px; }
.frag--rule { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.18); color: #fff; box-shadow: none; }
.frag__arrow { color: var(--sky); }
.frag--rule .chip--decision { margin-left: auto; background: rgba(72,185,253,0.16); color: #BFE6FF; }

/* ---------- Who grid (2 spec cards + works with) ---------- */
.who-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 760px) { .who-grid { grid-template-columns: 1fr 1fr; } .spec--flows { grid-column: 1 / -1; } }
@media (min-width: 1100px) { .who-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; } .spec--flows { grid-column: auto; } }
.spec { border-radius: 18px; }
.flows--compact { grid-template-columns: 1fr 1fr; gap: 12px; }
.flows--compact .flow { padding: 0; border: 0; background: none; }
.flows--compact .flow__title { font-size: 14px; margin-bottom: 10px; font-family: var(--font-body); font-weight: 600; }
.flows--compact .flow__line li { font-size: 13px; padding: 8px 10px; }
.flows--compact .flow__line li + li { margin-top: 16px; }
.flows--compact .flow__line li + li::before { top: -17px; height: 16px; }

/* Calmer stepper cards */
@media (min-width: 960px) { .stepper li { border-radius: 16px; } }

/* Motion for the new hero */
@media (prefers-reduced-motion: no-preference) {
  .js .hero2__visual.reveal { transform: translateY(24px); }
  .js .hero2__visual.reveal.is-in { transform: none; }
  .js [data-play] .hero2__note { opacity: 0; }
  .js [data-play].is-playing .hero2__note { animation: waIn 300ms var(--ease) 2900ms forwards; }
  .hero2__note span, .pill__dot { animation: pulse 2.4s ease-out infinite; }
  .tile { transition: border-color 200ms var(--ease), transform 200ms var(--ease); }
  .tile:hover { border-color: var(--line-control); transform: translateY(-2px); }
  .tile--deep:hover { border-color: var(--deep); }
  .tile:hover .frag--float { transform: translateY(-14px); transition: transform 300ms var(--ease); }
  .js .bento.reveal.is-in > * { animation: waIn 300ms var(--ease) both; }
  .js .bento.reveal.is-in > :nth-child(2) { animation-delay: 80ms; }
  .js .bento.reveal.is-in > :nth-child(3) { animation-delay: 160ms; }
  .js .bento.reveal.is-in > :nth-child(4) { animation-delay: 240ms; }
  .js .bento.reveal.is-in > :nth-child(5) { animation-delay: 320ms; }
}

.frag--float .frag__row { flex-wrap: wrap; }
.mini-row--light { display: flex; justify-content: space-between; align-items: center; gap: 10px; color: var(--ink); font-weight: 500; }
.stepper h3 { font-weight: 500; }
.section-head h2 { max-width: 24ch; }
@media (max-width: 639px) {
  .compare tbody th { width: auto; }
  .tile { min-height: 0; }
  .section-head .head-aside { margin-top: 20px; }
}
