/* Landing page. Colors come from the theme tokens in site.css. */

:root {
  --gutter: clamp(22px, 4.2vw, 56px);
  --page: min(1240px, calc(100% - 2 * var(--gutter)));
  --section-space: clamp(76px, 7vw, 96px);
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { max-width: 100%; overflow-x: clip; }
body { min-width: 320px; line-height: 1.5; }
button, a { font: inherit; -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
main { overflow: visible; }
section { scroll-margin-top: 86px; }

h1, h2, h3 { color: var(--text); }

h2 {
  margin: 0;
  font-size: clamp(40px, 4.2vw, 52px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -.035em;
  text-wrap: balance;
}

.section {
  position: relative;
  width: var(--page);
  margin: auto;
  padding-block: var(--section-space);
}

.section-label {
  margin: 0 0 13px;
  color: var(--accent-text);
  font-size: 15px;
  font-weight: 700;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 1fr);
  column-gap: clamp(40px, 5.5vw, 70px);
  align-items: end;
  margin-bottom: clamp(36px, 4vw, 50px);
}

.section-heading > * { min-width: 0; }
.section-heading h2 { max-width: 16ch; }

.section-heading > p {
  max-width: 560px;
  margin: 0;
  justify-self: end;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  width: var(--page);
  min-height: 650px;
  margin: auto;
  padding-block: clamp(64px, 7vw, 86px);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: clamp(44px, 5.5vw, 76px);
  align-items: center;
}

.hero > * { min-width: 0; }

.hero-note {
  margin: 0 0 12px;
  color: var(--accent-text);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
}

.hero h1 {
  margin: 0;
  font-size: clamp(48px, 4.2vw, 58px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -.04em;
  text-wrap: balance;
}

.hero-copy > p:not(.hero-note) {
  max-width: 650px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 23px;
  line-height: 1.5;
}

.hero-copy strong {
  color: var(--accent-soft);
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 26px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.hero-proof li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.proof-mark {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--accent);
  font-size: 10px;
}

/* Hero dashboard preview */
.hero-visual {
  position: relative;
  min-height: 540px;
  display: grid;
  place-items: center;
  isolation: isolate;
}

.hero-dashboard {
  position: relative;
  width: min(100%, 580px);
  padding: 20px;
  isolation: isolate;
}

.dashboard-grid,
.demo-grid-wrap::before {
  background-image:
    repeating-linear-gradient(0deg, var(--grid-line) 0, var(--grid-line) 1px, transparent 1px, transparent 32px),
    repeating-linear-gradient(90deg, var(--grid-line) 0, var(--grid-line) 1px, transparent 1px, transparent 32px);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 40%, rgba(0, 0, 0, .7) 63%, transparent 94%);
  mask-image: radial-gradient(ellipse at center, #000 40%, rgba(0, 0, 0, .7) 63%, transparent 94%);
}

.dashboard-grid {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.dashboard-line {
  position: absolute;
  z-index: -1;
  pointer-events: none;
  border: 0 solid var(--accent-line);
  opacity: .7;
}

.dashboard-line.one { width: 35%; height: 22%; top: 7%; right: 1%; border-width: 1px 1px 0 0; }
.dashboard-line.two { width: 30%; height: 26%; left: 1%; bottom: 4%; border-width: 0 0 1px 1px; }

.dashboard-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
  animation: dashboard-float 7s ease-in-out infinite;
}

.dashboard-top {
  min-height: 58px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.dashboard-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.rail-icon {
  display: grid;
  place-items: center;
  background: var(--gradient);
  color: #fff;
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18);
}

/* The logo mark on a dark tile, in both themes, like the app icon. */
.dashboard-mark,
.ai-mark {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .1);
  background: linear-gradient(145deg, #0b1316, #030607);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}

.dashboard-mark img,
.ai-mark img {
  display: block;
  width: 80%;
  height: 80%;
}

.dashboard-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
}

.dashboard-brand b { font-size: 13px; }
.dashboard-brand span { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; font-weight: 600; }

.dashboard-status {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.dashboard-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent);
  animation: status-breathe 2.8s ease-in-out infinite;
}

.dashboard-body { padding: 22px; }

.dashboard-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.dashboard-heading span { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .03em; }
.dashboard-heading h3 { margin: 4px 0 0; font-size: 25px; letter-spacing: -.03em; }

.dashboard-period {
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(132px, .75fr);
  gap: 14px;
}

.risk-panel,
.stat-panel {
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-2);
}

.risk-panel { padding: 5px 14px; }

.risk-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.risk-item:last-child { border-bottom: 0; }
.risk-item b { display: block; font-size: 12px; }
.risk-item span:not(.risk-badge) { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.35; }

.risk-badge,
.risk-level {
  padding: 5px 7px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .06em;
}

.risk-badge.high, .risk-level.high { background: var(--risk-high-bg); color: var(--risk-high-text); }
.risk-badge.medium, .risk-level.medium { background: var(--risk-medium-bg); color: var(--risk-medium-text); }
.risk-badge.clear, .risk-level.clear { background: var(--risk-clear-bg); color: var(--risk-clear-text); }

.stats-column { display: grid; gap: 10px; }
.stat-panel { padding: 15px; }
.stat-panel span { display: block; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .03em; }
.stat-panel strong { display: block; margin-top: 7px; font-size: 22px; letter-spacing: -.03em; }
.stat-panel small { display: block; margin-top: 5px; color: var(--muted); font-size: 9px; line-height: 1.35; }
.stat-panel.risks strong { color: var(--risk-high-text); }

.dashboard-next {
  margin-top: 14px;
  padding: 13px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--accent-line);
  border-radius: 11px;
  background: var(--tint);
}

.dashboard-next b { display: block; font-size: 11px; }
.dashboard-next span { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }

.dashboard-next svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-caption { margin: 11px 3px 0; color: var(--muted); font-size: 9px; text-align: right; }

@keyframes dashboard-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

@keyframes status-breathe {
  0%, 100% { opacity: .7; }
  50% { opacity: 1; }
}

/* ---------- Live demo ---------- */
.showcase-wrap {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--bg-2);
  border-block: 1px solid var(--line);
}

.showcase {
  position: relative;
  z-index: 1;
  width: var(--page);
  margin: auto;
  padding-block: var(--section-space);
}

.showcase-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 36px;
}

.showcase-head > * { min-width: 0; }
.showcase-head h2 { max-width: 24ch; }

.showcase-head p {
  max-width: 470px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.demo-segments {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
}

.demo-segment {
  min-height: 50px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
  transition: color .3s ease, background-color .3s ease, border-color .3s ease, transform .3s var(--ease);
}

.demo-segment:hover {
  background: var(--surface-3);
  color: var(--text);
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.demo-segment[aria-selected="true"] {
  background: var(--tint-strong);
  color: var(--text);
  border-color: var(--accent-line);
  box-shadow: var(--shadow-small);
}

.demo-segment[aria-selected="true"]::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent);
  vertical-align: 1px;
}

.demo-grid-wrap {
  position: relative;
  isolation: isolate;
  margin-top: 18px;
  padding: 18px;
}

.demo-grid-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.demo-stage {
  display: grid;
  min-height: 560px;
}

.demo-panel {
  grid-area: 1 / 1;
  display: grid;
  grid-template-columns: minmax(220px, .72fr) minmax(0, 1.28fr);
  gap: clamp(30px, 5vw, 70px);
  align-items: center;
  padding: clamp(30px, 5vw, 64px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(18px);
  transition: opacity .42s ease, visibility .42s ease, transform .52s var(--ease);
}

.demo-panel > * { min-width: 0; }
.demo-panel.active { opacity: 1; visibility: visible; pointer-events: auto; transform: none; }
.demo-panel[hidden] { display: none; }

.demo-context .count { color: var(--accent-text); font-size: 13px; font-weight: 800; letter-spacing: .02em; }

.demo-context h3 {
  margin: 15px 0 14px;
  font-size: clamp(30px, 3.4vw, 46px);
  line-height: 1.04;
  letter-spacing: -.035em;
}

.demo-context p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.65; }

.demo-context ul {
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 9px;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.demo-context li { display: flex; gap: 9px; align-items: flex-start; }

.demo-context li::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-top: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--accent-2);
}

#demo-risk { grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: clamp(28px, 3vw, 44px); }
#demo-risk .demo-copy-bound { width: min(100%, 22rem); }
#demo-risk .demo-context h3 { font-size: clamp(30px, 2.75vw, 36px); }
#demo-risk .demo-context h3 span { white-space: nowrap; }

#demo-accounting { grid-template-columns: minmax(390px, .92fr) minmax(0, 1.08fr); gap: clamp(28px, 3vw, 44px); }
#demo-accounting .demo-context h3 { font-size: clamp(31px, 2.9vw, 38px); text-wrap: balance; }

#demo-launch { grid-template-columns: minmax(440px, .95fr) minmax(0, 1.05fr); gap: clamp(28px, 3vw, 44px); }
#demo-launch .demo-context h3 { max-width: 24ch; font-size: clamp(24px, 2.9vw, 38px); text-wrap: balance; }
#demo-launch .demo-context p { max-width: 24rem; }

.demo-chat {
  width: 100%;
  max-width: 650px;
  justify-self: end;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--bg-2);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.demo-chat-head {
  min-height: 50px;
  padding: 0 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.demo-chat-head b { font-size: 14px; }
.demo-chat-head span { color: var(--muted); font-size: 11px; font-weight: 700; }

.demo-thread {
  min-height: 420px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 13px;
}

.demo-bubble {
  max-width: 91%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.55;
  transition: opacity .35s ease, transform .4s var(--ease);
}

.demo-bubble.user {
  align-self: flex-end;
  border-radius: 16px 16px 5px 16px;
  border-color: var(--accent-line);
  background: var(--tint);
  font-size: 14px;
}

.demo-bubble.ai {
  align-self: flex-start;
  width: 100%;
  max-width: 100%;
  border-radius: 16px 16px 16px 5px;
  background: var(--surface);
}

.demo-bubble.pending { opacity: 0; transform: translateY(9px); }

.ai-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--accent-soft);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .02em;
}

.ai-mark {
  width: 24px;
  height: 24px;
  border-radius: 7px;
}

.typed-intro { min-height: 20px; margin: 0 0 12px; color: var(--text); }

.typing-indicator {
  align-self: flex-start;
  min-height: 43px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 15px 15px 15px 5px;
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.typing-indicator[hidden] { display: none; }

.typing-indicator i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-2);
  animation: typing-dot 1.1s infinite ease-in-out;
}

.typing-indicator i:nth-child(2) { animation-delay: .14s; }
.typing-indicator i:nth-child(3) { animation-delay: .28s; }
.typing-indicator span { margin-left: 6px; }

@keyframes typing-dot {
  0%, 65%, 100% { transform: translateY(0); opacity: .35; }
  35% { transform: translateY(-3px); opacity: 1; }
}

.answer-stack { display: grid; gap: 8px; }
.answer-block { transition: opacity .36s ease, transform .4s var(--ease); }
.answer-block.pending { opacity: 0; transform: translateY(7px); }

.risk-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
}

.risk-row b { display: block; font-size: 12px; }
.risk-row p { margin: 3px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.risk-level { align-self: start; padding: 4px 7px; letter-spacing: .05em; }

.next-step {
  padding: 10px 11px;
  border: 1px solid var(--accent-line);
  border-radius: 10px;
  background: var(--tint);
  color: var(--text);
  font-size: 11px;
  line-height: 1.5;
}

.next-step b { display: block; margin-bottom: 2px; color: var(--accent-soft); font-size: 11px; }

.summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }

.summary-row {
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
}

.summary-row span { display: block; color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.summary-row strong { display: block; margin-top: 4px; font-size: 18px; }
.summary-row.tax strong { color: var(--accent-text); }
.summary-grid .next-step { grid-column: 1 / -1; }

.formation-list { display: grid; gap: 7px; }

.formation-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
}

.formation-row > span:first-child {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--risk-clear-bg);
  color: var(--accent-text);
  font-size: 10px;
  font-weight: 800;
}

.formation-row b { display: block; font-size: 11px; }
.formation-row small { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; }
.formation-state { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .03em; }
.formation-state.done { color: var(--accent-text); }

.demo-footnote {
  padding: 10px 17px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

/* ---------- Services ---------- */
.services-block {
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
}

.service-list { border-top: 1px solid var(--line-strong); }

.service-row {
  display: grid;
  grid-template-columns: 90px minmax(220px, .75fr) minmax(0, 1.25fr);
  gap: 36px;
  padding: 42px 0;
  align-items: start;
  border-bottom: 1px solid var(--line-strong);
  transition: transform .4s var(--ease), background-color .35s ease;
}

.service-row:hover { transform: translateX(7px); background: var(--tint); }
.service-row > span { color: var(--accent-text); font-size: 14px; font-weight: 800; }
.service-row h3 { margin: 0; font-size: 30px; font-weight: 700; letter-spacing: -.03em; }
.service-row p { margin: 0; color: var(--muted); font-size: 17px; line-height: 1.7; }

.service-row ul,
.topic-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.service-row ul {
  grid-column: 3;
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
}

.service-row li,
.topic-list span {
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

/* ---------- Platform ---------- */
.platform {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  column-gap: clamp(40px, 5.5vw, 70px);
  align-items: center;
}

.platform > * { min-width: 0; }
.platform-copy h2 { font-size: clamp(38px, 3.4vw, 44px); }
.platform-copy p { color: var(--muted); font-size: 18px; line-height: 1.7; }

.platform-rail {
  position: relative;
  min-height: 480px;
  padding: clamp(26px, 3vw, 36px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-small);
}

.platform-rail::before {
  content: "";
  position: absolute;
  left: calc(clamp(26px, 3vw, 36px) + 21px);
  top: 75px;
  bottom: 75px;
  width: 1px;
  background: var(--line-strong);
}

.rail-item {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 18px 0;
}

.rail-icon {
  z-index: 1;
  width: 44px;
  height: 44px;
  border-radius: 50%;
}

.rail-item h3 { margin: 0; font-size: 19px; }
.rail-item p { margin: 4px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }

.platform-summary {
  margin: 22px 0 0 62px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-2);
}

.platform-summary b { display: block; }
.platform-summary span { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; }

/* ---------- Pricing ---------- */
.pricing {
  background: var(--bg-2);
  border-block: 1px solid var(--line);
}

.pricing-controls { display: flex; justify-content: center; margin: -8px 0 34px; }

.billing-toggle {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: min(100%, 340px);
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
}

.billing-toggle::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 5px;
  bottom: 5px;
  left: 5px;
  width: calc(50% - 5px);
  border-radius: 999px;
  background: var(--surface-3);
  box-shadow: var(--shadow-small);
  transition: transform .36s var(--ease);
}

.billing-toggle.yearly::before { transform: translateX(100%); }

.billing-option {
  min-height: 48px;
  padding: 6px 16px;
  display: grid;
  place-items: center;
  gap: 1px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.05;
  transition: color .3s ease;
}

.billing-option[aria-pressed="true"] { color: var(--text); }
.billing-option small { display: block; color: var(--accent-text); font-size: 10px; font-weight: 700; }

.pricing-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-items: stretch;
}

.price-card {
  position: relative;
  isolation: isolate;
  padding: clamp(26px, 2.4vw, 34px);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-small);
  cursor: pointer;
  transition: transform .38s var(--ease), box-shadow .38s var(--ease), border-color .3s ease, opacity .34s ease, filter .34s ease;
}

.price-card > *:not(.plan-select-hit):not(.selected-badge) { position: relative; z-index: 1; }

.price-card.featured {
  background: var(--tint-strong), var(--surface);
  border-color: var(--accent-line);
  box-shadow: var(--shadow);
  transform: translateY(-10px);
}

.price-card:not(.featured):hover { transform: translateY(-7px); border-color: var(--line-strong); }
.price-card.featured:hover { transform: translateY(-16px); }

/* Selection ring drawn around the chosen card. */
.price-card::before {
  content: "";
  position: absolute;
  z-index: 3;
  inset: -1px;
  padding: 1px;
  border-radius: 19px;
  background: conic-gradient(from -90deg, var(--accent) var(--selection-angle, 0deg), transparent 0);
  opacity: 0;
  pointer-events: none;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.price-card.is-selected::before { opacity: 1; animation: pricing-border-draw .42s var(--ease) forwards; }
.price-card.is-selected { transform: translateY(-9px); border-color: var(--accent); }
.price-card.featured.is-selected { transform: translateY(-18px); }
.pricing-grid.has-selection .price-card:not(.is-selected) { opacity: .58; filter: saturate(.72); }
.pricing-grid.has-selection .price-card.featured:not(.is-selected) { transform: translateY(-10px) scale(.985); }

.plan-select-hit {
  position: absolute;
  inset: 0;
  z-index: 5;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: transparent;
  cursor: pointer;
}

.plan-select-hit:focus-visible { outline: 0; }
.price-card:has(.plan-select-hit:focus-visible) { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 4px; }

.selected-badge {
  position: absolute;
  z-index: 6;
  top: 15px;
  right: 15px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-small);
  font-size: 11px;
  font-weight: 700;
  opacity: 0;
  transform: translateY(-8px) scale(.72);
  pointer-events: none;
}

.selected-badge::before {
  content: "✓";
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
  font-size: 10px;
}

.price-card.is-selected .selected-badge { opacity: 1; transform: none; animation: selected-pop .4s cubic-bezier(.2, 1.55, .45, 1); }

.plan { margin: 0; color: var(--accent-text); font-size: 15px; font-weight: 800; }

.price { display: flex; align-items: flex-end; gap: 6px; margin: 24px 0 6px; }
.price strong { color: var(--text); font-size: 54px; line-height: 1; letter-spacing: -.04em; }
.price span { margin-bottom: 6px; color: var(--muted); font-size: 14px; }

.price-value {
  display: inline-block;
  min-width: 2ch;
  font-variant-numeric: tabular-nums;
  transform-origin: 50% 75%;
}

.pricing.billing-changing .price-value { animation: price-morph .38s var(--ease); }
.price-cadence { white-space: nowrap; }

.plan-copy { min-height: 52px; margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; }

.price-list {
  flex: 1;
  margin: 26px 0 30px;
  padding: 24px 0 0;
  display: grid;
  align-content: start;
  gap: 12px;
  border-top: 1px solid var(--line);
  list-style: none;
  color: var(--muted);
  font-size: 14px;
}

.price-list li::before { content: "✓"; margin-right: 9px; color: var(--accent); font-weight: 800; }
.price-card .button { width: 100%; pointer-events: none; }

.pricing-summary {
  position: fixed;
  z-index: 40;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom));
  width: min(690px, calc(100% - 32px));
  min-height: 74px;
  padding: 12px 13px 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border: 1px solid var(--accent-line);
  border-radius: 22px;
  background: color-mix(in srgb, var(--surface) 95%, transparent);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, calc(100% + 34px));
  transition: opacity .3s ease, visibility .3s ease, transform .4s var(--ease);
}

.pricing-summary.visible { opacity: 1; visibility: visible; pointer-events: auto; transform: translate(-50%, 0); }
.pricing-summary-copy { min-width: 0; }
.pricing-summary-copy span { display: block; margin-bottom: 3px; color: var(--muted); font-size: 11px; font-weight: 700; }
.pricing-summary-copy strong { display: block; font-size: 18px; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.pricing-summary .button { min-width: 134px; min-height: 46px; padding-inline: 21px; font-size: 15px; flex: 0 0 auto; }
.pricing-summary.summary-changing .pricing-summary-copy strong { animation: summary-swap .32s var(--ease); }

@property --selection-angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes pricing-border-draw { from { --selection-angle: 0deg; } to { --selection-angle: 360deg; } }
@keyframes selected-pop { 0% { opacity: 0; transform: translateY(-8px) scale(.72); } 70% { opacity: 1; transform: translateY(1px) scale(1.06); } 100% { opacity: 1; transform: none; } }
@keyframes price-morph { 0%, 100% { opacity: 1; transform: none; } 45% { opacity: .22; transform: translateY(-7px) scale(.94); } 46% { opacity: .22; transform: translateY(7px) scale(.94); } }
@keyframes summary-swap { 0%, 100% { opacity: 1; transform: none; } 45% { opacity: 0; transform: translateY(-5px); } 46% { opacity: 0; transform: translateY(5px); } }

/* ---------- How it works ---------- */
.how-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: clamp(44px, 6.25vw, 80px);
}

.how-grid > * { min-width: 0; }
.how-copy { position: sticky; top: 100px; align-self: start; }
.how-copy h2 { max-width: 18ch; }
.how-copy p { color: var(--muted); font-size: 18px; line-height: 1.7; }

.steps { border-top: 1px solid var(--line-strong); }

.step {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 20px;
  padding: 30px 0;
  border-bottom: 1px solid var(--line-strong);
}

.step-num {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--accent-text);
  font-size: 13px;
  font-weight: 800;
}

.step h3 { margin: 2px 0 8px; font-size: 23px; }
.step p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.65; }

/* ---------- Conversation ---------- */
.dialogue {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--bg-2);
  border-block: 1px solid var(--line);
}

.dialogue-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: clamp(40px, 5.5vw, 70px);
  align-items: center;
}

.dialogue-grid > * { min-width: 0; }
.dialogue-copy-bound { width: min(100%, 25rem); }
.dialogue-copy p { color: var(--muted); font-size: 18px; line-height: 1.7; }
.topic-list { margin-top: 24px; }

.chat {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.chat-head,
.chat-note { background: var(--surface-2); }

.chat-head {
  padding: 17px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.chat-head span { color: var(--muted); font-size: 12px; }
.chat-body { padding: 22px; display: grid; gap: 14px; }

.bubble {
  max-width: 86%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.55;
}

.bubble.user {
  justify-self: end;
  border-color: var(--accent-line);
  border-radius: 15px 15px 4px 15px;
  background: var(--tint);
}

.bubble.ai {
  justify-self: start;
  border-radius: 15px 15px 15px 4px;
  background: var(--surface-2);
}

.bubble b { display: block; margin-bottom: 6px; color: var(--accent-soft); font-size: 12px; }

.chat-note {
  padding: 11px 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

/* ---------- Coverage ---------- */
.coverage {
  position: relative;
  width: var(--page);
  margin: 0 auto;
  padding-block: var(--section-space);
}

.coverage-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-block: 1px solid var(--line-strong);
}

.coverage-item { padding: 34px; border-right: 1px solid var(--line-strong); }
.coverage-item:last-child { border-right: 0; }

.coverage-item strong {
  display: block;
  font-size: clamp(42px, 5vw, 66px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.04em;
  font-variant-numeric: tabular-nums;
}

.coverage-item p { margin: 18px 0 0; color: var(--muted); font-size: 17px; line-height: 1.5; }

/* ---------- FAQ ---------- */
.faq {
  background: var(--bg-2);
  border-top: 1px solid var(--line);
}

.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  column-gap: clamp(40px, 5.5vw, 70px);
}

.faq-grid > * { min-width: 0; }
.faq-grid h2 { white-space: nowrap; }
.faq-list { display: grid; gap: 10px; }

.faq-button {
  width: 100%;
  padding: 18px 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px;
  gap: 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  font-size: 17px;
  font-weight: 600;
  transition: transform .28s var(--ease), background-color .28s ease, border-color .28s ease;
}

.faq-button:hover { transform: translateY(-1px); background: var(--surface-3); border-color: var(--line-strong); }
.faq-button:active { transform: translateY(0); }

.faq-icon {
  color: var(--accent-text);
  text-align: center;
  transition: transform .45s var(--ease);
}

.faq-button[aria-expanded="true"] .faq-icon { transform: rotate(45deg); }

.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transform: translateY(-6px);
  transition: grid-template-rows .48s var(--ease), opacity .35s ease, transform .48s var(--ease);
}

.faq-answer > div { overflow: hidden; }
.faq-button[aria-expanded="true"] + .faq-answer { grid-template-rows: 1fr; opacity: 1; transform: none; }
.faq-answer p { margin: 0; padding: 10px 22px 18px; color: var(--muted); font-size: 16px; line-height: 1.7; }

/* ---------- Final CTA and CPA bridge ---------- */
.final-wrap {
  position: relative;
  width: var(--page);
  margin: 0 auto;
  padding: var(--section-space) 0 28px;
}

.final {
  position: relative;
  overflow: hidden;
  padding: clamp(52px, 5.5vw, 68px) clamp(28px, 7vw, 88px);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: center;
  border: 1px solid var(--accent-line);
  border-radius: 22px;
  background: var(--tint-strong), var(--surface);
  box-shadow: var(--shadow);
}

.final::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  right: -95px;
  top: -120px;
  border: 50px solid color-mix(in srgb, var(--accent) 12%, transparent);
  border-radius: 50%;
}

.final h2 { position: relative; z-index: 1; font-size: clamp(38px, 3.8vw, 48px); }
.final p { position: relative; z-index: 1; margin: 16px 0 0; color: var(--muted); font-size: 18px; }
.final-action { position: relative; z-index: 1; text-align: center; }
.final-action small { display: block; margin-top: 10px; color: var(--muted); font-size: 13px; }

.cpa-entry {
  width: var(--page);
  margin: 0 auto;
  padding: 0 0 28px;
}

.cpa-entry-link {
  min-height: 68px;
  padding: 14px 18px 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  border: 1px solid var(--accent-line);
  border-radius: 18px;
  background: var(--tint);
  color: var(--text);
  text-decoration: none;
  transition: border-color .3s ease, background .3s ease, transform .35s var(--ease);
}

.cpa-entry-link:hover { transform: translateY(-2px); border-color: var(--accent); background: var(--tint-strong); }
.cpa-entry-question { font-size: 17px; font-weight: 700; }

.cpa-entry-action {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--btn-primary-border);
  border-radius: 999px;
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

/* ---------- Motion ---------- */
.motion-ready .hero-copy > * { opacity: 0; transform: translateY(22px); }
.motion-ready.hero-visible .hero-copy > * { opacity: 1; transform: none; transition: opacity .7s var(--ease), transform .7s var(--ease); }
.motion-ready.hero-visible .hero-copy > *:nth-child(2) { transition-delay: .08s; }
.motion-ready.hero-visible .hero-copy > *:nth-child(3) { transition-delay: .16s; }
.motion-ready.hero-visible .hero-copy > *:nth-child(4) { transition-delay: .24s; }
.motion-ready.hero-visible .hero-copy > *:nth-child(5) { transition-delay: .32s; }
.motion-ready .hero-visual { opacity: 0; transform: translateY(24px) scale(.98); }
.motion-ready.hero-visible .hero-visual { opacity: 1; transform: none; transition: opacity .85s .2s var(--ease), transform .85s .2s var(--ease); }

.motion-ready .reveal { transition: opacity .66s var(--ease), transform .66s var(--ease); transition-delay: calc(var(--reveal-order, 0) * 75ms); }
.motion-ready .reveal.is-entering { opacity: 0; transform: translateY(22px); }
.motion-ready .reveal.is-entering.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-block: 72px;
    row-gap: 48px;
    text-align: center;
  }
  .hero-copy > p:not(.hero-note) { margin-inline: auto; }
  .hero-actions,
  .hero-proof { justify-content: center; }
  .hero-visual { width: 100%; max-width: 620px; margin: auto; }
  .hero-dashboard { margin: auto; width: min(100%, 590px); text-align: left; }

  .section-heading,
  .platform,
  .how-grid,
  .dialogue-grid,
  .faq-grid { grid-template-columns: 1fr; row-gap: 40px; }
  .section-heading > p { justify-self: start; }

  .showcase-head { display: grid; grid-template-columns: 1fr; gap: 18px; align-items: start; }
  .demo-stage { min-height: 780px; }
  .demo-panel,
  #demo-risk,
  #demo-accounting,
  #demo-launch { grid-template-columns: 1fr; gap: 26px; padding: 36px; }
  #demo-accounting .demo-context h3,
  #demo-launch .demo-context h3 { font-size: 32px; }
  .demo-context { max-width: 680px; }
  .demo-chat { justify-self: stretch; max-width: none; }

  .service-row { grid-template-columns: 65px minmax(0, 1fr); }
  .service-row p,
  .service-row ul { grid-column: 2; }

  .pricing-grid { grid-template-columns: 1fr; width: 100%; max-width: 680px; margin-inline: auto; }
  .price-card.featured { transform: none; }
  .price-card.is-selected,
  .price-card.featured.is-selected { transform: translateY(-7px); }
  .pricing-grid.has-selection .price-card.featured:not(.is-selected) { transform: scale(.985); }
  .plan-copy { min-height: 0; }

  .how-copy { position: static; }

  .coverage-grid { grid-template-columns: 1fr; }
  .coverage-item { border-right: 0; border-bottom: 1px solid var(--line-strong); }
  .coverage-item:last-child { border-bottom: 0; }

  .final { grid-template-columns: 1fr; text-align: center; }
  .final-action { justify-self: center; width: min(100%, 360px); }
}

@media (max-width: 620px) {
  :root {
    --gutter: clamp(18px, 5vw, 24px);
    --section-space: clamp(62px, 14vw, 76px);
  }

  h2 { font-size: clamp(30px, 8.8vw, 34px); line-height: 1.06; }

  .hero { padding-block: 50px 60px; row-gap: 32px; }
  .hero-note { margin-bottom: 10px; font-size: 12px; }
  .hero h1 { font-size: clamp(30px, 8.6vw, 34px); line-height: 1.08; }
  .hero-copy > p:not(.hero-note) { margin-top: 16px; font-size: 18.4px; }
  .hero-actions { display: grid; width: 100%; gap: 10px; margin-top: 26px; }
  .hero-actions .button,
  .platform-copy > .button,
  .final-action .button { width: 100%; }
  .hero-proof { flex-direction: column; align-items: center; gap: 10px; }
  .hero-visual { min-height: 0; }
  .hero-dashboard { padding: 21px 0 14px; }
  .dashboard-grid { inset: -10px; }
  .dashboard-line { display: none; }
  .dashboard-card { border-radius: 15px; }
  .dashboard-top { padding-inline: 14px; }
  .dashboard-body { padding: 15px; }
  .dashboard-heading { align-items: flex-start; }
  .dashboard-heading h3 { font-size: 21px; }
  .dashboard-layout { grid-template-columns: 1fr; }
  .stats-column { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-panel { padding: 12px; }
  .stat-panel strong { font-size: 18px; }
  .dashboard-next { padding: 11px 12px; }
  .dashboard-caption { text-align: left; }

  .section-heading { row-gap: 24px; margin-bottom: 32px; }
  .showcase-head { margin-bottom: 28px; }
  .demo-segments { grid-template-columns: 1fr; padding: 5px; border-radius: 22px; }
  .demo-segment { min-height: 46px; padding-inline: 13px; text-align: left; }
  .demo-grid-wrap { margin-top: 13px; padding: 10px; }
  .demo-panel,
  #demo-risk,
  #demo-accounting,
  #demo-launch { padding: 24px 14px 28px; gap: 22px; align-content: start; }
  .demo-context h3,
  #demo-risk .demo-context h3,
  #demo-accounting .demo-context h3,
  #demo-launch .demo-context h3 { font-size: 26px; }
  #demo-risk .demo-context h3 span { white-space: normal; }
  .demo-context p { font-size: 15px; }
  .demo-context ul { margin-top: 17px; }
  .demo-chat { border-radius: 16px; }
  .demo-thread { min-height: 430px; padding: 13px; gap: 11px; }
  .demo-bubble { max-width: 96%; padding: 12px; }
  .summary-row strong { font-size: 16px; }
  .risk-row { gap: 8px; padding: 9px; }
  .formation-row { grid-template-columns: 24px minmax(0, 1fr); }
  .formation-state { grid-column: 2; justify-self: start; }

  .service-row { grid-template-columns: 1fr; gap: 12px; padding: 26px 0; }
  .service-row p,
  .service-row ul { grid-column: 1; }
  .service-row h3 { font-size: 25px; }

  .platform { row-gap: 32px; }
  .platform-copy h2,
  .final h2 { font-size: clamp(27px, 7.7vw, 30px); line-height: 1.08; }
  .platform-rail { width: 100%; min-height: 0; padding: 22px 18px; }
  .platform-rail::before { left: 39px; }
  .rail-item { grid-template-columns: 42px minmax(0, 1fr); gap: 14px; }
  .rail-icon { width: 42px; height: 42px; }
  .platform-summary { margin-left: 0; }

  .pricing-controls { margin: -2px 0 26px; }
  .billing-toggle { width: 100%; }
  .price-card { padding: 24px; }
  .price strong { font-size: 46px; }
  .selected-badge { top: 13px; right: 13px; }
  .pricing-summary { bottom: max(10px, env(safe-area-inset-bottom)); width: calc(100% - 20px); min-height: 68px; padding: 10px 10px 10px 15px; border-radius: 18px; gap: 12px; }
  .pricing-summary-copy strong { font-size: 15px; }
  .pricing-summary .button { min-width: 112px; min-height: 44px; padding-inline: 17px; font-size: 14px; }

  .how-grid,
  .dialogue-grid,
  .faq-grid { row-gap: 34px; }
  .step { grid-template-columns: 42px minmax(0, 1fr); gap: 14px; padding-block: 26px; }
  .how-copy h2,
  .dialogue-copy h2,
  .faq-grid h2 { max-width: 100%; }
  .faq-grid h2 { white-space: normal; }
  .chat-body { padding: 16px; }
  .bubble { max-width: 94%; overflow-wrap: anywhere; }

  .coverage-item { padding: 27px 0; }

  .final-wrap { padding-bottom: 24px; }
  .final { padding: 46px 20px; gap: 30px; }
  .final-action { width: 100%; }

  .cpa-entry { padding-bottom: 22px; }
  .cpa-entry-link { min-height: 0; padding: 18px; align-items: flex-start; flex-direction: column; gap: 13px; }
  .cpa-entry-action { width: 100%; white-space: normal; text-align: center; }
}

@media (max-width: 380px) {
  .dashboard-brand span,
  .dashboard-caption { display: none; }
  .dashboard-body { padding: 12px; }
  .risk-panel { padding-inline: 11px; }
  .dashboard-next { align-items: flex-start; }
  .demo-panel,
  #demo-risk,
  #demo-accounting,
  #demo-launch { padding-inline: 11px; }
  .demo-thread { padding: 11px; }
  .summary-row { padding: 9px; }
  .summary-row strong { font-size: 14px; }
  .price-card { padding: 22px; }
  .faq-button { grid-template-columns: minmax(0, 1fr) 22px; gap: 14px; }
  .pricing-summary-copy span { display: none; }
  .pricing-summary .button { min-width: 100px; padding-inline: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .motion-ready .hero-copy > *,
  .motion-ready .hero-visual,
  .motion-ready .reveal { opacity: 1 !important; transform: none !important; }
}
