/* ============================================================
   Sumgate Signal — landing styles
   Tokens transcribed from the DealScope design system.
   ============================================================ */

:root {
  /* Surfaces */
  --bg: #f8f9fb;
  --surface: #ffffff;
  --surface-dark: #1a2035;

  /* Text */
  --text: #1a2035;
  --text-muted: #5a6478;
  --text-faint: #8a91a5;
  --text-fainter: #c3c8d6;
  --text-on-dark: #a9b0c4;

  /* Lines */
  --border: #e6e9f0;
  --border-strong: #d6dae6;

  /* Accent */
  --accent: #4f6ef7;
  --accent-hover: #3d5be8;
  --accent-ink: #3752c8;
  --accent-soft: #8296f9;
  --accent-wash: #edf1fe;
  --accent-quiet: #f1f2f6;

  /* Semantic */
  --danger: #dc3545;
  --danger-bg: #fcebed;
  --danger-line: #f3c9ce;
  --warn: #d97c0e;
  --warn-bg: #fbf1e3;
  --warn-line: #f0d9b4;
  --success: #1aa364;
  --success-bg: #e7f6ef;
  --success-line: #bfe5d1;
  --rose: #e1707b;

  /* Radii */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 12px;
  --r-xl: 14px;
  --r-2xl: 16px;
  --r-pill: 999px;

  /* Elevation */
  --shadow-sm: 0 1px 2px rgba(26, 32, 53, 0.06);
  --shadow-md: 0 4px 14px rgba(26, 32, 53, 0.1);
  --shadow-lg: 0 10px 28px rgba(26, 32, 53, 0.1);
  --shadow-xl: 0 16px 40px rgba(26, 32, 53, 0.12);
  --shadow-accent: 0 16px 40px rgba(79, 110, 247, 0.14);

  /* Motion */
  --ease: 180ms ease;

  --shell: 1120px;
  --mono: ui-monospace, Menlo, Monaco, "Cascadia Mono", monospace;
}

/* ---------- Reset / base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica,
    Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent-ink);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

img {
  max-width: 100%;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.shell {
  max-width: var(--shell);
  margin: 0 auto;
}

.section {
  padding: clamp(64px, 8vw, 104px) 24px;
}

.section--panel {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.rule {
  height: 1px;
  background: var(--border);
}

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

/* Two columns squeeze the product mocks below their 520px design width,
   which clips their content. Stack instead. */
@media (max-width: 940px) {
  .split {
    grid-template-columns: 1fr;
  }
}

/* Pipeline Review puts its copy on the right — but only while side by side.
   Stacked, the copy still leads. */
@media (min-width: 941px) {
  .split__copy--last {
    order: 2;
  }
}

.split__copy {
  display: grid;
  gap: 20px;
  align-content: center;
}

.eyebrow {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-ink);
}

.h2 {
  font-size: clamp(30px, 3.4vw, 40px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.lede {
  font-size: 17px;
  line-height: 1.65;
  color: var(--text-muted);
  text-wrap: pretty;
}

/* ---------- Reveal on scroll ---------- */

[data-reveal] {
  transition: opacity 0.7s ease, transform 0.7s ease;
}

[data-reveal="out"] {
  opacity: 0;
  transform: translateY(18px);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  [data-reveal="out"] {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-weight: 600;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--ease), transform var(--ease),
    box-shadow var(--ease), color var(--ease);
}

.btn--primary {
  background: var(--accent);
  color: #fff;
}

.btn--primary:hover {
  background: var(--accent-hover);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(79, 110, 247, 0.3);
}

.btn--ghost {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text);
}

.btn--ghost:hover {
  color: var(--text);
  box-shadow: var(--shadow-md);
}

.btn--sm {
  padding: 10px 18px;
  font-size: 14.5px;
}

.btn--md {
  padding: 12px 20px;
  font-size: 15px;
}

.btn--lg {
  padding: 15px 28px;
  font-size: 17px;
  box-shadow: var(--shadow-sm);
}

.btn--xl {
  padding: 16px 32px;
  font-size: 17px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

/* The side padding sits outside the shell here, as it does in every other
   section — otherwise it eats into max-width and the wordmark lands 24px
   right of the hero heading. */
.site-header {
  padding: 0 24px;
}

.site-header__inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 14px 0;
  display: flex;
  align-items: center;
  gap: 28px;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.wordmark:hover {
  color: var(--text);
}

.wordmark span {
  font-weight: 500;
  color: var(--text-muted);
}

.site-nav {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  align-items: center;
  margin-left: auto;
}

.site-nav a {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--ease);
}

.site-nav a:hover {
  color: var(--text);
}

@media (max-width: 900px) {
  .site-nav {
    display: none;
  }

  .site-header__inner {
    justify-content: space-between;
  }
}

/* ---------- Hero ---------- */

.hero {
  padding: clamp(56px, 7vw, 96px) 24px 0;
}

.hero__copy {
  display: grid;
  gap: 24px;
  align-content: center;
}

.hero h1 {
  font-size: clamp(38px, 4.8vw, 58px);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.hero__sub {
  font-size: 19px;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 540px;
  text-wrap: pretty;
}

.hero__actions {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
}

.hero__note {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-faint);
}

/* ---------- Mock: shared ---------- */

.mock {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xl);
  max-width: 520px;
  width: 100%;
  justify-self: center;
}

.mock__body {
  display: grid;
  gap: 12px;
  padding: 16px;
  background: var(--bg);
}

.mock-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 16px;
  display: grid;
  gap: 14px;
}

.mock__fade {
  position: absolute;
  inset: auto 0 0 0;
  height: 56px;
  background: linear-gradient(180deg, rgba(248, 249, 251, 0), var(--bg));
  pointer-events: none;
}

.chat-bubble {
  justify-self: end;
  max-width: 100%;
  background: var(--accent);
  color: #fff;
  padding: 10px 14px;
  border-radius: 12px 12px 4px 12px;
  font: 12.5px var(--mono);
  /* A long unbroken URL must wrap rather than spill out of the card. */
  overflow-wrap: anywhere;
}

.chat-meta {
  font: 11.5px var(--mono);
  color: var(--text-faint);
}

/* Deal header */

.deal-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}

.deal-head__id {
  display: grid;
  gap: 5px;
  flex: 1;
  min-width: 150px;
}

.deal-head__name {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.deal-head__name b {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.deal-head__sub {
  font-size: 12.5px;
  color: var(--text-faint);
}

.deal-head__money {
  display: grid;
  gap: 2px;
  justify-items: end;
}

.deal-head__amount {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.deal-head__close {
  font-size: 11.5px;
  color: var(--text-faint);
}

.tag {
  padding: 3px 9px;
  border-radius: var(--r-sm);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  background: var(--accent-wash);
  color: var(--accent-ink);
}

/* Stat tiles */

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.stat {
  border-radius: var(--r-lg);
  padding: 12px 6px;
  display: grid;
  gap: 3px;
  justify-items: center;
  border: 1px solid var(--border);
  background: var(--accent-quiet);
}

.stat__value {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-muted);
}

.stat__label {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-faint);
}

.stat--danger {
  background: var(--danger-bg);
  border-color: var(--danger-line);
}

.stat--danger .stat__value,
.stat--danger .stat__label {
  color: var(--danger);
}

.stat--warn {
  background: var(--warn-bg);
  border-color: var(--warn-line);
}

.stat--warn .stat__value,
.stat--warn .stat__label {
  color: var(--warn);
}

/* Stage timeline */

.stages {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}

.stage {
  display: grid;
  gap: 5px;
  justify-items: center;
  text-align: center;
}

.stage__bar {
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: var(--accent-soft);
}

.stage__name {
  font-size: 10px;
  color: var(--text-muted);
}

.stage__date {
  font-size: 9.5px;
  color: var(--text-faint);
}

.stage--current .stage__bar {
  background: var(--accent);
}

.stage--current .stage__name,
.stage--current .stage__date {
  font-weight: 600;
  color: var(--accent-ink);
}

.stage--future .stage__bar {
  background: var(--border);
}

.stage--future .stage__name {
  color: var(--text-faint);
}

.stage--future .stage__date {
  color: var(--text-fainter);
}

/* Signals */

.signals-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.signals-head b {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.pill {
  padding: 3px 8px;
  border-radius: var(--r-sm);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  border: 1px solid transparent;
}

.pill--danger {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: var(--danger-line);
}

.pill--warn {
  background: var(--warn-bg);
  color: var(--warn);
  border-color: var(--warn-line);
}

.pill--success {
  background: var(--success-bg);
  color: var(--success);
  border-color: var(--success-line);
}

.signal-list {
  display: grid;
  gap: 8px;
}

.signal {
  display: flex;
  gap: 9px;
  border-radius: var(--r-md);
  padding: 11px 13px;
  font-size: 13px;
  line-height: 1.5;
  border: 1px solid transparent;
}

.signal::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
  margin-top: 5px;
}

.signal--danger {
  background: var(--danger-bg);
  border-color: var(--danger-line);
}

.signal--danger::before {
  background: var(--danger);
}

.signal--warn {
  background: var(--warn-bg);
  border-color: var(--warn-line);
}

.signal--warn::before {
  background: var(--warn);
}

.signal--success {
  background: var(--success-bg);
  border-color: var(--success-line);
}

.signal--success::before {
  background: var(--success);
}

/* ---------- Problem cards ---------- */

.problem__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.problem-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 26px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 20px;
  align-items: start;
  align-content: start;
}

.problem-card__num {
  grid-row: span 2;
  font-size: 48px;
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--rose);
}

.problem-card h3 {
  font-size: 20px;
  font-weight: 600;
}

.problem-card p {
  grid-column: 2;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-muted);
}

/* ---------- BANT panel ---------- */

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  box-shadow: 0 16px 40px rgba(26, 32, 53, 0.1);
  padding: 20px;
  display: grid;
  gap: 18px;
  max-width: 520px;
  width: 100%;
  justify-self: center;
}

.bant-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.bant-head__label {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.bant-head__score {
  margin-left: auto;
  font-size: 19px;
  font-weight: 700;
  color: var(--warn);
}

.bant-head__max {
  font-size: 15px;
  color: var(--text-faint);
}

.bant {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.bant-tile {
  border-radius: var(--r-lg);
  padding: 14px 8px;
  display: grid;
  gap: 7px;
  justify-items: center;
  border: 1px solid transparent;
}

.bant-tile__letter {
  font-size: 20px;
  font-weight: 700;
}

.bant-tile__name {
  font-size: 13px;
  font-weight: 500;
}

.bant-tile__meter {
  display: flex;
  gap: 4px;
}

.bant-tile__meter i {
  width: 16px;
  height: 5px;
  border-radius: 3px;
  background: rgba(26, 32, 53, 0.12);
}

.bant-tile--warn {
  background: var(--warn-bg);
  border-color: var(--warn-line);
  color: var(--warn);
}

.bant-tile--warn .bant-tile__meter i.on {
  background: var(--warn);
}

.bant-tile--danger {
  background: var(--danger-bg);
  border-color: var(--danger-line);
  color: var(--danger);
}

.bant-tile--danger .bant-tile__meter i.on {
  background: var(--danger);
}

.bant-tile--success {
  background: var(--success-bg);
  border-color: var(--success-line);
  color: var(--success);
}

.bant-tile--success .bant-tile__meter i.on {
  background: var(--success);
}

/* Current status timeline */

.status-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.status-head b {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.status-head span {
  margin-left: auto;
  font-size: 13px;
  color: var(--text-faint);
}

.status-block {
  display: grid;
  gap: 12px;
}

.status-block__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-faint);
}

.timeline {
  display: grid;
  gap: 12px;
  padding-left: 2px;
  border-left: 1px solid var(--border);
}

.event {
  display: grid;
  gap: 3px;
  padding-left: 14px;
  position: relative;
}

.event::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 3px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  background: var(--surface);
}

.event--danger::before {
  border-color: var(--danger);
}

.event--warn::before {
  border-color: var(--warn);
}

.event--success::before {
  border-color: var(--success);
}

.event__head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.event__date {
  font-size: 13px;
  color: var(--text-faint);
}

.event__icon {
  font-size: 11px;
  color: var(--text-faint);
}

.event__who {
  font-size: 14px;
  font-weight: 600;
}

.event__state {
  margin-left: auto;
  padding: 3px 9px;
  border-radius: var(--r-sm);
  font-size: 12px;
  font-weight: 600;
}

.event__state--danger {
  background: var(--danger-bg);
  color: var(--danger);
}

.event__state--warn {
  background: var(--warn-bg);
  color: var(--warn);
}

.event__state--success {
  background: var(--success-bg);
  color: var(--success);
}

.event p {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-muted);
}

/* ---------- Digest mock ---------- */

.digest {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: 0 16px 40px rgba(26, 32, 53, 0.1);
  padding: 18px;
  display: grid;
  gap: 10px;
  max-width: 500px;
  width: 100%;
  justify-self: center;
}

.digest__title {
  font-size: 15px;
  font-weight: 700;
  padding-bottom: 6px;
}

.digest-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 12px 14px;
  flex-wrap: wrap;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  flex: none;
}

.dot--danger {
  border-color: var(--danger);
}

.dot--warn {
  border-color: var(--warn);
}

.dot--success {
  border-color: var(--success);
}

.digest-row__name {
  font-size: 14px;
  font-weight: 600;
}

.digest-row__amount {
  font: 12px var(--mono);
  color: var(--text-faint);
}

.digest-row__state {
  margin-left: auto;
  padding: 3px 9px;
  border-radius: var(--r-sm);
  font-size: 12px;
  font-weight: 600;
}

.digest-row__state--danger {
  background: var(--danger-bg);
  color: var(--danger);
}

.digest-row__state--warn {
  background: var(--warn-bg);
  color: var(--warn);
}

.digest-row__state--success {
  background: var(--success-bg);
  color: var(--success);
}

.digest-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 14px;
  display: grid;
  gap: 10px;
}

.digest-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.digest-notes {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 11px 13px;
  display: grid;
  gap: 7px;
}

.digest-note {
  display: flex;
  gap: 9px;
  font-size: 13px;
  line-height: 1.5;
}

.digest-note .dot {
  margin-top: 4px;
}

/* ---------- How it works ---------- */

.stack {
  display: grid;
  gap: 40px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 26px;
  display: grid;
  gap: 10px;
  align-content: start;
}

.step__num {
  font: 700 26px var(--mono);
  color: var(--accent);
}

.step h3 {
  font-size: 20px;
  font-weight: 600;
}

.step p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-muted);
}

/* Comparison */

.compare {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  align-items: stretch;
}

.compare-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 24px;
  display: grid;
  gap: 12px;
  align-content: start;
}

.compare-card h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
}

.compare-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--text-muted);
}

.compare-card--ours {
  border: 2px solid var(--accent);
  box-shadow: var(--shadow-accent);
}

.compare-card--ours h4 {
  font-weight: 700;
  color: var(--accent-ink);
}

.compare-card--ours ul {
  color: var(--text);
}

.compare-card--ours li:last-child {
  font-weight: 600;
}

/* ---------- Pricing ---------- */

.pricing__note {
  font-size: 17px;
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 640px;
  text-wrap: pretty;
  margin-top: -20px;
}

.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 20px;
  align-items: stretch;
}

.plan {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 28px;
  display: grid;
  gap: 18px;
  grid-template-rows: auto auto 1fr auto;
  transition: transform var(--ease), box-shadow var(--ease);
}

.plan:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.plan h3 {
  font-size: 17px;
  font-weight: 600;
}

.plan__price {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.plan__amount {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.plan__period {
  font-size: 15px;
  color: var(--text-faint);
}

.plan ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
  font-size: 14.5px;
  color: var(--text-muted);
}

.plan li::before {
  content: "✓";
  color: var(--success);
  font-weight: 600;
  margin-right: 8px;
}

.plan--featured {
  background: var(--surface);
  border: 2px solid var(--accent);
  box-shadow: var(--shadow-accent);
}

.plan--featured:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 46px rgba(79, 110, 247, 0.2);
}

.plan__badge {
  position: absolute;
  top: -13px;
  left: 24px;
  padding: 4px 12px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--r-pill);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pricing__footnote {
  text-align: center;
  font-size: 15px;
  color: var(--text-muted);
}

/* ---------- FAQ ---------- */

.faq__shell {
  max-width: 760px;
  margin: 0 auto;
  display: grid;
  gap: 36px;
}

.faq__list {
  display: grid;
  gap: 10px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
  transition: border-color var(--ease);
}

.faq-item[data-open="true"] {
  border-color: var(--border-strong);
}

.faq-item__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 18px 22px;
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
  font-size: 16.5px;
  font-weight: 600;
  color: var(--text);
}

.faq-item__sign {
  color: var(--text-faint);
  font-size: 20px;
  line-height: 1;
  flex: none;
  transition: transform var(--ease);
}

.faq-item[data-open="true"] .faq-item__sign {
  transform: rotate(45deg);
}

.faq-item__a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 240ms cubic-bezier(0.22, 1, 0.36, 1);
}

.faq-item[data-open="true"] .faq-item__a {
  grid-template-rows: 1fr;
}

.faq-item__a > div {
  overflow: hidden;
}

.faq-item__a p {
  padding: 0 22px 20px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 640px;
}

/* ---------- Final CTA ---------- */

.cta {
  background: var(--surface-dark);
  padding: clamp(72px, 9vw, 120px) 24px;
}

.cta__shell {
  max-width: 760px;
  margin: 0 auto;
  display: grid;
  gap: 22px;
  justify-items: center;
  text-align: center;
}

.cta h2 {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: #fff;
}

.cta p {
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-on-dark);
}

.cta .btn--primary:hover {
  box-shadow: 0 10px 28px rgba(79, 110, 247, 0.4);
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: clamp(44px, 5vw, 64px) 24px 28px;
}

.site-footer__shell {
  max-width: var(--shell);
  margin: 0 auto;
  display: grid;
  gap: clamp(32px, 5vw, 48px);
}

.site-footer__cols {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
}

.site-footer__brand {
  display: grid;
  gap: 12px;
  align-content: start;
  flex: 1 1 240px;
  max-width: 300px;
}

.site-footer__brand b {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.site-footer__brand b span {
  font-weight: 500;
  color: var(--text-muted);
}

.site-footer__brand p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
}

.site-footer__col {
  display: grid;
  gap: 12px;
  align-content: start;
  flex: 1 1 140px;
}

.site-footer__col strong {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text);
}

.site-footer__col a,
.site-footer__col button {
  font-family: inherit;
  font-size: 14px;
  color: var(--text-muted);
  transition: color var(--ease);
}

.site-footer__col button {
  justify-self: start;
  padding: 0;
  background: none;
  border: 0;
  text-align: left;
  cursor: pointer;
}

.site-footer__col a:hover,
.site-footer__col button:hover {
  color: var(--text);
}

.site-footer__legal {
  display: grid;
  gap: 6px;
}

.site-footer__legal span {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-faint);
}

.site-footer__legal a {
  color: var(--text-muted);
}

/* ---------- Lead modal ---------- */

.modal {
  width: min(460px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 0;
  border-radius: var(--r-2xl);
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 24px 64px rgba(26, 32, 53, 0.28);
  overflow: auto;
  overscroll-behavior: contain;
}

.modal::backdrop {
  background: rgba(26, 32, 53, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.modal[open] {
  animation: modal-in 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.modal[open]::backdrop {
  animation: backdrop-in 220ms ease;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
}

@keyframes backdrop-in {
  from {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .modal[open],
  .modal[open]::backdrop {
    animation: none;
  }
}

.modal__body {
  position: relative;
  padding: 32px;
}

.modal__close {
  position: absolute;
  top: 18px;
  right: 18px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 50%;
  color: var(--text-faint);
  cursor: pointer;
  transition: background var(--ease), color var(--ease);
}

.modal__close:hover {
  background: var(--accent-quiet);
  color: var(--text);
}

.modal__title {
  margin-right: 40px;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.modal__lede {
  margin-top: 8px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text-muted);
}

/* ---------- Lead form ---------- */

.lead-form {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

/* display:grid outranks the hidden attribute — say it explicitly. */
.lead-form[hidden] {
  display: none;
}

.field {
  display: grid;
  gap: 7px;
}

.field__label {
  font-size: 14px;
  font-weight: 600;
}

.field__input,
.phone {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  transition: border-color var(--ease), box-shadow var(--ease);
}

.field__input {
  padding: 12px 14px;
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
}

.field__input::placeholder,
.phone__number::placeholder {
  color: var(--text-fainter);
}

.field__input:focus,
.phone:focus-within {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79, 110, 247, 0.16);
}

/* Phone: one bordered box, two controls, a divider between them. */
.phone {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: stretch;
  overflow: hidden;
}

.phone__code {
  padding: 12px 10px 12px 14px;
  background: none;
  border: 0;
  border-right: 1px solid var(--border);
  border-radius: 0;
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
  cursor: pointer;
}

.phone__code:focus {
  outline: none;
}

.phone__number {
  min-width: 0;
  padding: 12px 14px;
  background: none;
  border: 0;
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
}

.phone__number:focus {
  outline: none;
}

/* Invalid state wins over the resting border. */
.field__input[aria-invalid="true"],
.phone:has([aria-invalid="true"]) {
  border-color: var(--danger);
}

.field__input[aria-invalid="true"]:focus,
.phone:has([aria-invalid="true"]):focus-within {
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.16);
}

.field__error {
  font-size: 13px;
  line-height: 1.45;
  color: var(--danger);
}

.consent {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-muted);
  cursor: pointer;
}

.consent__box {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--accent);
  cursor: pointer;
  flex: none;
}

.consent__link {
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.consent__link:hover {
  color: var(--accent-ink);
}

.consent:has([aria-invalid="true"]) .consent__box {
  outline: 2px solid var(--danger);
  outline-offset: 2px;
}

.lead-form__submit {
  width: 100%;
  margin-top: 2px;
  padding: 14px 20px;
  font-size: 15.5px;
}

.lead-form__submit[disabled] {
  opacity: 0.6;
  cursor: progress;
}

.lead-form__submit[disabled]:hover {
  transform: none;
  box-shadow: none;
  background: var(--accent);
}

.lead-form__failure {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--danger);
  text-align: center;
}

/* ---------- Success state ---------- */

.lead-form__done {
  display: grid;
  gap: 10px;
  justify-items: center;
  padding: 20px 0 4px;
  text-align: center;
}

.lead-form__done[hidden] {
  display: none;
}

.lead-form__check {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 6px;
  background: var(--success-bg);
  border: 1px solid var(--success-line);
  border-radius: 50%;
  color: var(--success);
}

.lead-form__done h3 {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.lead-form__done p {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text-muted);
}

.lead-form__done .btn {
  margin-top: 10px;
}

@media (max-width: 420px) {
  .modal__body {
    padding: 24px 20px;
  }

  .modal__title {
    font-size: 23px;
  }
}

/* ---------- Narrow screens ---------- */

@media (max-width: 560px) {
  .stages {
    grid-template-columns: repeat(4, 1fr);
    row-gap: 12px;
  }

  .bant {
    grid-template-columns: repeat(2, 1fr);
  }

  .event__state,
  .digest-row__state {
    margin-left: 0;
  }

  .problem-card {
    grid-template-columns: 1fr;
  }

  .problem-card__num {
    grid-row: auto;
  }

  .problem-card p {
    grid-column: 1;
  }
}
