/* ============================================================
   HeroAI — Design System (UI-kit aligned, light)
   Foundation: #fafafa neutral field · white cards · #ebebef lines
   Brand: #4bb5e2 → #2ebdb5 gradient (90deg)
   Type: Inter (display + body, cv11/ss01/ss03) · JetBrains Mono (data)
   ============================================================ */

:root {
  /* Brand (UI kit) */
  --hero-blue: #4bb5e2;
  --hero-teal: #2ebdb5;
  --grad: linear-gradient(90deg, #4bb5e2 0%, #2ebdb5 100%);
  --grad-soft: linear-gradient(90deg, rgba(75, 181, 226, 0.1), rgba(46, 189, 181, 0.1));

  /* Neutral system (UI kit) */
  --bg: #fafafa;
  --card: #ffffff;
  --panel: #ffffff;
  --muted: #f4f4f5;
  --line: #ebebef;
  --line-strong: #dfdfe4;
  --text: #0a0a0a;
  --text-2: #52525b;
  --text-3: #71717a;
  --destructive: #e5484d;
  --warning: #f5a524;

  /* Tint palettes (UI kit) */
  --info-bg: #eaf6fb;
  --info-border: #bce2f2;
  --info-text: #1b6e91;
  --success-bg: #e6f7f4;
  --success-border: #b5e6df;
  --success-text: #1a6e68;
  --warning-bg: #fef4e6;
  --warning-border: #f5d9a8;
  --warning-text: #8c5a0e;
  --danger-bg: #fce9ea;
  --danger-border: #f5bfc2;
  --danger-text: #c13438;
  --violet-bg: #f0eefc;
  --violet-border: #d5cef5;
  --violet-text: #5b4bc4;

  /* Type */
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Courier New", monospace;

  /* Rhythm (kit radius: 0.5rem base) */
  --container: 1200px;
  --pad: clamp(20px, 4vw, 48px);
  --radius: 12px;
  --radius-lg: 16px;
  --radius-sm: 8px;

  --shadow-card: 0 1px 2px rgba(10, 10, 10, 0.04), 0 8px 24px -12px rgba(10, 40, 60, 0.1);
  --shadow-float: 0 24px 60px -24px rgba(10, 40, 60, 0.18), 0 2px 6px rgba(10, 10, 10, 0.04);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-feature-settings: "cv11", "ss01", "ss03";
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

::selection { background: rgba(75, 181, 226, 0.28); }

.mono {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--text-3);
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--hero-blue);
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 0 0 10px 0;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { left: 0; }

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

/* ---------- Reveal defaults (JS enhances; no-JS stays visible) ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(26px); }
.js.reduced-motion [data-reveal] { opacity: 1; transform: none; }

/* ============================ Buttons ============================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out),
    background-color 0.25s, border-color 0.25s, color 0.25s;
  will-change: transform;
}
.btn-primary {
  background: var(--grad);
  color: #ffffff;
  box-shadow: 0 8px 22px -8px rgba(62, 185, 204, 0.55);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -8px rgba(62, 185, 204, 0.65);
}
.btn-ghost {
  background: var(--card);
  color: var(--text);
  border-color: var(--line-strong);
}
.btn-ghost:hover { border-color: var(--hero-teal); color: var(--success-text); }
.btn-ghost .arrow { transition: transform 0.25s var(--ease-out); }
.btn-ghost:hover .arrow { transform: translateX(4px); }
.btn-sm { padding: 8px 15px; font-size: 0.85rem; border-radius: var(--radius-sm); }
.btn-full { width: 100%; justify-content: center; }

/* ============================ Nav ============================ */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background-color 0.4s, backdrop-filter 0.4s, border-color 0.4s, box-shadow 0.4s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(250, 250, 250, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
  box-shadow: 0 1px 2px rgba(10, 10, 10, 0.03);
}
.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 16px var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav.is-scrolled .nav-inner { padding-top: 12px; padding-bottom: 12px; }

.logo { text-decoration: none; }
/* Brand wordmark: light geometric sans + blue→teal sweep, matching the HeroAI logo */
.logo-word {
  font-family: "Poppins", var(--font-sans);
  font-weight: 300;
  font-size: 1.75rem;
  line-height: 1;
  letter-spacing: 0.005em;
  background: linear-gradient(90deg, #4bb5e2 0%, #4bb5e2 55%, #2ebdb5 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.logo-ai { font-weight: 300; }

.nav-cta { display: flex; align-items: center; gap: 14px; }

/* ============================ Hero ============================ */
.hero {
  position: relative;
  padding: clamp(140px, 18vh, 200px) 0 clamp(60px, 8vw, 110px);
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.35;
}
.hero-glow-1 { width: 560px; height: 420px; background: rgba(75, 181, 226, 0.45); top: -140px; left: -120px; }
.hero-glow-2 { width: 480px; height: 400px; background: rgba(46, 189, 181, 0.4); top: 5%; right: -160px; }

.hero-inner {
  position: relative;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad);
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
  gap: clamp(36px, 5vw, 72px);
  align-items: center;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--success-text);
  margin-bottom: 22px;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 26px;
  height: 1px;
  background: var(--grad);
  vertical-align: middle;
  margin-right: 12px;
}

.hero-title {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(2.7rem, 5.6vw, 4.6rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  margin-bottom: 26px;
}
.hero-title .line { display: block; }
.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  font-size: clamp(1.02rem, 1.4vw, 1.18rem);
  color: var(--text-2);
  max-width: 34em;
  margin-bottom: 34px;
}

.hero-ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 20px; }
.hero-support { font-size: 0.84rem; color: var(--text-3); max-width: 32em; }

/* ---------- Hero live feed ---------- */
.hero-demo { max-width: 460px; width: 100%; justify-self: end; }
.hero-feed-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.hero-feed-head .mono { font-size: 0.64rem; letter-spacing: 0.18em; }
.demo-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--success-text);
  white-space: nowrap;
}
.pulse {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--hero-teal);
  box-shadow: 0 0 0 0 rgba(46, 189, 181, 0.45);
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(46, 189, 181, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(46, 189, 181, 0); }
  100% { box-shadow: 0 0 0 0 rgba(46, 189, 181, 0); }
}

.hero-mail {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-float);
  overflow: hidden;
}
.mail-subject {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
}
.mail-subject-line {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mail-thread-meta { flex: none; font-size: 0.6rem; letter-spacing: 0.14em; }
.mail-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px 22px 22px;
}
.mail-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
}
.mail-card p {
  font-size: 0.93rem;
  line-height: 1.6;
  color: var(--text);
}
.mail-card-hero {
  background: linear-gradient(135deg, var(--info-bg), var(--success-bg));
  border-color: var(--success-border);
}
.mail-card-hero .mail-reply { min-height: 6.4em; }
.mail-row {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-bottom: 9px;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
}
.mail-from { color: var(--text-2); font-weight: 500; }
.mail-from-hero { color: var(--success-text); }
.mail-time { margin-left: auto; flex: none; }
.mail-sep { opacity: 0.6; }

/* Hero-at-work rail: sequential status steps over an animated scan line */
.mail-process {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  padding: 2px 2px 12px;
}
.process-step {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  color: var(--text-3);
  opacity: 0.4;
  transition: opacity 0.35s, color 0.35s;
}
.process-step i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--line-strong);
  transition: background-color 0.35s, box-shadow 0.35s;
}
.process-step.is-on { opacity: 1; color: var(--info-text); }
.process-step.is-on i {
  background: var(--hero-teal);
  box-shadow: 0 0 0 3px rgba(46, 189, 181, 0.18);
}
.process-scan {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent 0%, rgba(75, 181, 226, 0.75) 40%, rgba(46, 189, 181, 0.75) 60%, transparent 100%);
  background-size: 200% 100%;
  animation: scanSweep 1.6s linear infinite;
  opacity: 0.85;
}
@keyframes scanSweep {
  0% { background-position: 150% 0; }
  100% { background-position: -150% 0; }
}
.mail-caret {
  display: none;
  width: 2px;
  height: 1.05em;
  background: var(--hero-teal);
  vertical-align: -0.18em;
  margin-left: 2px;
  animation: caretBlink 0.9s steps(2) infinite;
}
@keyframes caretBlink { 50% { opacity: 0; } }
#mailPill { align-self: flex-start; }
.feed-pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.05em;
  line-height: 1.6;
  padding: 4px 12px;
  border-radius: 20px;
  max-width: 100%;
}
.pill-success { color: var(--success-text); background: var(--success-bg); border: 1px solid var(--success-border); }
.pill-warning { color: var(--warning-text); background: var(--warning-bg); border: 1px solid var(--warning-border); }
.pill-info { color: var(--info-text); background: var(--info-bg); border: 1px solid var(--info-border); }

/* ============================ Sections shared ============================ */
section { position: relative; }
/* Anchor jumps (e.g. "See Hero at work" → #product) land below the fixed nav */
section[id] { scroll-margin-top: 76px; }
.metrics, .product, .outcomes { padding: clamp(90px, 11vw, 150px) 0; }

.section-title {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 22px;
}
.section-sub {
  color: var(--text-2);
  font-size: 1.06rem;
  max-width: 40em;
  margin-bottom: 48px;
}

/* ============================ Metrics ============================ */
.metrics { border-top: 1px solid var(--line); background: var(--card); }
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 56px 0 64px;
  box-shadow: var(--shadow-card);
}
.metric {
  background: var(--card);
  padding: clamp(26px, 3vw, 42px) clamp(20px, 2.4vw, 34px);
  transition: background-color 0.3s;
}
.metric:hover { background: var(--bg); }
.metric-num {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: clamp(2.6rem, 4.4vw, 4rem);
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 14px;
  white-space: nowrap;
}
.count { display: inline-block; }
.metric-unit, .metric-tilde { font-size: 0.42em; font-weight: 500; }
.metric-tilde { font-size: 0.7em; }
.metric p { color: var(--text-2); font-size: 0.9rem; line-height: 1.5; }

/* Morph */
.morph {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(26px, 3.5vw, 44px);
}
.morph-labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
}
.morph-labels span:last-child { color: var(--success-text); letter-spacing: 0.16em; }
.morph-track {
  height: 52px;
  border-radius: var(--radius-sm);
  background: var(--muted);
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.morph-bar {
  position: absolute;
  inset: 6px auto 6px 6px;
  width: 96%;
  background: linear-gradient(90deg, #e5484d, #f5a524);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 16px;
  min-width: 130px;
}
.morph-bar.is-hero { background: var(--grad); }
.morph-value { color: #ffffff; font-weight: 600; font-size: 0.8rem; letter-spacing: 0.04em; white-space: nowrap; }
.morph-note { margin-top: 18px; color: var(--text-3); font-size: 0.85rem; max-width: 52em; }

/* ============================ Product / Scenarios ============================ */
.product { border-top: 1px solid var(--line); }
.scenario-explorer {
  display: grid;
  grid-template-columns: minmax(280px, 380px) 1fr;
  gap: clamp(20px, 3vw, 40px);
  align-items: start;
}
.scenario-tabs { display: flex; flex-direction: column; gap: 10px; }
.scenario-tab {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  cursor: pointer;
  color: var(--text);
  transition: border-color 0.25s, background-color 0.25s, box-shadow 0.25s;
}
.scenario-tab:hover { border-color: var(--line-strong); box-shadow: var(--shadow-card); }
.scenario-tab.is-active {
  border-color: var(--hero-teal);
  background: linear-gradient(135deg, var(--info-bg), var(--success-bg));
}
.scenario-tab-num { color: var(--text-3); padding-top: 2px; }
.scenario-tab.is-active .scenario-tab-num { color: var(--success-text); }
.scenario-tab-txt strong { display: block; font-size: 0.94rem; font-weight: 600; line-height: 1.35; }
.scenario-tab-txt em {
  display: block;
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-top: 5px;
}
.scenario-tab.is-active .scenario-tab-txt em { color: var(--success-text); }

.scenario-stage {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  min-height: 480px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.scenario-panel {
  padding: clamp(22px, 3vw, 40px);
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
.scenario-panel[hidden] { display: none; }

.panel-tag {
  justify-self: start;
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  padding: 6px 13px;
  border-radius: 20px;
}
.tag-success { color: var(--success-text); background: var(--success-bg); border: 1px solid var(--success-border); }
.tag-warning { color: var(--warning-text); background: var(--warning-bg); border: 1px solid var(--warning-border); }
.tag-info { color: var(--info-text); background: var(--info-bg); border: 1px solid var(--info-border); }

.convo { display: flex; flex-direction: column; gap: 16px; }
.bubble {
  border-radius: var(--radius);
  padding: 16px 20px;
  max-width: 92%;
  font-size: 0.92rem;
  line-height: 1.6;
}
.bubble-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 0.64rem;
}
.bubble-in {
  align-self: flex-start;
  background: var(--muted);
  border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
}
.bubble-hero {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--info-bg), var(--success-bg));
  border: 1px solid var(--success-border);
  border-bottom-right-radius: 4px;
}
.bubble-hero .bubble-meta { color: var(--success-text); }
.bubble-escalate {
  align-self: flex-end;
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  border-bottom-right-radius: 4px;
}
.bubble-escalate .bubble-meta { color: var(--warning-text); }
.bubble p { color: var(--text-2); }

.convo-label {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  padding: 7px 14px;
  border-radius: 24px;
  margin-top: 4px;
}
.label-answered { color: var(--success-text); background: var(--success-bg); border: 1px solid var(--success-border); }
.label-afterhours { color: var(--violet-text); background: var(--violet-bg); border: 1px solid var(--violet-border); }
.label-task { color: var(--info-text); background: var(--info-bg); border: 1px solid var(--info-border); }
.label-escalated { color: var(--warning-text); background: var(--warning-bg); border: 1px solid var(--warning-border); }

.scenario-insight {
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.scenario-insight h4 { color: var(--success-text); margin-bottom: 10px; font-weight: 500; }
.scenario-insight p { color: var(--text-2); font-size: 0.9rem; max-width: 56em; }

/* ============================ Testimonials ============================ */
.testimonials {
  padding: clamp(90px, 11vw, 150px) 0;
  border-top: 1px solid var(--line);
  background: var(--card);
}
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 54px;
}
.testimonial-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.testimonial-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-card); }
.testimonial-card blockquote {
  color: var(--text-2);
  font-size: 0.96rem;
  line-height: 1.65;
}
.testimonial-card blockquote::before {
  content: "\201C";
  display: block;
  font-family: var(--font-sans);
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 10px;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.testimonial-card figcaption {
  display: flex;
  align-items: center;
  gap: 13px;
}
.testimonial-avatar {
  /* Placeholder — swap the initial for an <img> when photos are ready */
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1rem;
  overflow: hidden;
}
.testimonial-avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-info { background: var(--info-bg); color: var(--info-text); border: 1px solid var(--info-border); }
.avatar-success { background: var(--success-bg); color: var(--success-text); border: 1px solid var(--success-border); }
.avatar-warning { background: var(--warning-bg); color: var(--warning-text); border: 1px solid var(--warning-border); }
.testimonial-card figcaption strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}
.testimonial-card figcaption div > span {
  display: block;
  font-size: 0.82rem;
  color: var(--text-3);
}

/* ============================ Training ============================ */
.training {
  padding: clamp(90px, 11vw, 150px) 0 clamp(40px, 6vw, 80px);
  border-top: 1px solid var(--line);
}
.training-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(30px, 5vw, 80px);
  margin-top: clamp(40px, 5vw, 70px);
  align-items: start;
}
.training-visual {
  position: sticky;
  top: 110px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(16px, 2vw, 28px);
  box-shadow: var(--shadow-card);
}
#knowledgeMap { width: 100%; height: auto; }
.map-chip rect { fill: var(--muted); stroke: var(--line); }
.map-chip circle { fill: var(--hero-teal); }
.map-chip text {
  fill: var(--text-2);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
}
.map-axis { stroke: var(--line-strong); }
.map-axis-label {
  fill: var(--text-3);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
}
.map-milestone circle { fill: #ffffff; stroke: var(--hero-blue); stroke-width: 1.5; }
.map-milestone text {
  fill: var(--text-3);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
}
#teamFlag line { stroke: var(--warning); stroke-dasharray: 3 4; }
#teamFlag circle { fill: #ffffff; stroke: var(--warning); stroke-width: 1.5; }
#teamFlag text {
  fill: var(--warning-text);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
}
.map-badge-rect { fill: var(--success-bg); stroke: var(--success-border); }
#endBadge text {
  fill: var(--success-text);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
}
.map-packet { fill: var(--hero-teal); opacity: 0; }
.map-packet-amber { fill: var(--warning); }
.training-visual-caption {
  text-align: center;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  margin-top: 10px;
  color: var(--success-text);
  letter-spacing: 0.18em;
  font-size: 0.66rem;
  min-height: 2em;
}

.training-steps { display: flex; flex-direction: column; }
.training-step {
  padding: clamp(36px, 6vh, 72px) 0;
  border-bottom: 1px solid var(--line);
  opacity: 0.35;
  transition: opacity 0.5s;
}
.training-step:last-child { border-bottom: 0; }
.training-step.is-active { opacity: 1; }
.training-step-num {
  display: inline-block;
  color: var(--success-text);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  margin-bottom: 14px;
}
.training-step h3 {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  letter-spacing: -0.03em;
  margin-bottom: 14px;
}
.training-step p { color: var(--text-2); max-width: 34em; }

/* ============================ Outcomes ============================ */
.outcomes { border-top: 1px solid var(--line); background: var(--card); }

.compare { margin: 52px 0 60px; }
.compare-toggle {
  display: inline-flex;
  gap: 4px;
  background: var(--muted);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 22px;
}
.compare-btn {
  border: 0;
  background: transparent;
  color: var(--text-2);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color 0.25s, color 0.25s, box-shadow 0.25s;
}
.compare-btn.is-active { background: var(--grad); color: #ffffff; box-shadow: 0 2px 8px -2px rgba(62, 185, 204, 0.5); }

.compare-stage {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg);
  overflow: hidden;
}
.compare-view { padding: clamp(20px, 3vw, 36px); display: none; }
.compare-view.is-active { display: block; }
.compare-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}
.compare-count {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  padding: 5px 12px;
  border-radius: 18px;
}
.compare-count.bad { color: var(--danger-text); background: var(--danger-bg); border: 1px solid var(--danger-border); }
.compare-count.good { color: var(--success-text); background: var(--success-bg); border: 1px solid var(--success-border); }

.compare-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.compare-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 18px;
  box-shadow: 0 1px 2px rgba(10, 10, 10, 0.03);
}
.ci-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; }
.ci-dot.bad { background: var(--destructive); }
.ci-dot.good { background: var(--hero-teal); }
.ci-dot.amber { background: var(--warning); }
.compare-list li > div { flex: 1; min-width: 0; }
.compare-list strong { display: block; font-size: 0.92rem; }
.compare-list em { display: block; font-style: normal; color: var(--text-3); font-size: 0.8rem; margin-top: 2px; }
.ci-tag { flex: none; font-size: 0.6rem; letter-spacing: 0.08em; padding: 4px 10px; border-radius: 14px; }
.ci-tag.bad { color: var(--danger-text); background: var(--danger-bg); }
.ci-tag.good { color: var(--success-text); background: var(--success-bg); }
.ci-tag.task { color: var(--info-text); background: var(--info-bg); }
.ci-tag.amber { color: var(--warning-text); background: var(--warning-bg); }
.compare-foot { margin-top: 18px; color: var(--text-3); font-size: 0.88rem; font-style: italic; }

.outcome-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}
.outcome-list li {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  color: var(--text-2);
  font-size: 0.92rem;
  line-height: 1.55;
  background: var(--card);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.outcome-list li:hover { border-color: var(--hero-teal); box-shadow: var(--shadow-card); }
.outcome-list strong {
  display: block;
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1.02rem;
  margin-bottom: 4px;
}

/* ============================ Analysis ============================ */
.analysis {
  padding: clamp(100px, 12vw, 160px) 0;
  border-top: 1px solid var(--line);
  background:
    radial-gradient(ellipse 60% 55% at 85% 20%, rgba(46, 189, 181, 0.07), transparent 70%),
    var(--bg);
}
.analysis-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 460px);
  gap: clamp(40px, 6vw, 90px);
  align-items: start;
}
.analysis-points { list-style: none; display: flex; flex-direction: column; gap: 16px; margin-bottom: 30px; }
.analysis-points li {
  color: var(--text-2);
  font-size: 0.95rem;
  padding-left: 26px;
  position: relative;
}
.analysis-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--grad);
  opacity: 0.9;
}
.analysis-points strong { color: var(--text); }
.analysis-note { color: var(--text-3); font-size: 0.64rem; letter-spacing: 0.14em; }

.analysis-form {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 3vw, 36px);
  box-shadow: var(--shadow-float);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.form-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: end; /* controls share a baseline even when one label wraps */
}
.form-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.form-field label {
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-2);
}
.optional { font-weight: 400; color: var(--text-3); font-size: 0.76rem; }
.form-field input,
.form-field select,
.form-field textarea {
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  transition: border-color 0.25s, box-shadow 0.25s;
  width: 100%;
  box-shadow: 0 1px 2px rgba(10, 10, 10, 0.03);
}
.form-field input,
.form-field select {
  height: 48px;
  padding: 0 14px;
}
.form-field textarea {
  padding: 12px 14px;
  min-height: 92px;
  resize: vertical;
}
.form-field select {
  appearance: none;
  padding-right: 34px;
  text-overflow: ellipsis;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%);
  background-position: calc(100% - 19px) 50%, calc(100% - 14px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
.form-field input::placeholder, .form-field textarea::placeholder { color: var(--text-3); }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none;
  border-color: var(--hero-blue);
  box-shadow: 0 0 0 3px rgba(75, 181, 226, 0.2);
}
.form-field.has-error input { border-color: var(--destructive); }
.form-error { display: none; color: var(--danger-text); font-size: 0.78rem; }
.form-field.has-error .form-error { display: block; }
.form-fine { color: var(--text-3); font-size: 0.78rem; text-align: center; }
.form-fine-left { text-align: left; line-height: 1.55; }

.form-success {
  position: absolute;
  inset: 0;
  background: var(--card);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
  gap: 14px;
}
.form-success[hidden] { display: none; }
.form-success-mark {
  width: 58px; height: 58px;
  border-radius: 50%;
  background: var(--grad);
  color: #ffffff;
  font-size: 1.6rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}
.form-success h3 { font-family: var(--font-sans); font-weight: 700; letter-spacing: -0.02em; font-size: 1.5rem; }
.form-success p { color: var(--text-2); font-size: 0.92rem; max-width: 30em; }

/* ============================ Final CTA ============================ */
.final {
  padding: clamp(110px, 14vw, 190px) 0;
  text-align: center;
  border-top: 1px solid var(--line);
  overflow: hidden;
  background: var(--card);
}
.final-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 70% at 50% 100%, rgba(75, 181, 226, 0.1), transparent 65%);
  pointer-events: none;
}
.final-title {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(2.1rem, 4.6vw, 3.9rem);
  line-height: 1.1;
  letter-spacing: -0.035em;
  margin-bottom: 22px;
}
.final-sub { color: var(--text-2); font-size: 1.08rem; max-width: 40em; margin: 0 auto 40px; }
.final-ctas { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; }

/* ============================ Footer ============================ */
.footer {
  border-top: 1px solid var(--line);
  padding: clamp(50px, 7vw, 80px) 0 34px;
  background: var(--bg);
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: clamp(30px, 4vw, 60px);
  padding-bottom: 50px;
}
.footer-brand .logo-word { font-size: 1.5rem; }
.footer-brand p { color: var(--text-3); font-size: 0.88rem; max-width: 26em; margin-top: 14px; }
.footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-col h4 { font-weight: 500; font-size: 0.66rem; letter-spacing: 0.18em; margin-bottom: 6px; }
.footer-col a {
  color: var(--text-2);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
  width: fit-content;
}
.footer-col a:hover { color: var(--info-text); }
.footer-base {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  color: var(--text-3);
  font-size: 0.82rem;
}
.footer-base .mono { font-size: 0.62rem; }

/* ============================ Legal & info pages ============================ */
.legal-page, .contact-page {
  padding: clamp(140px, 18vh, 200px) 0 clamp(80px, 10vw, 140px);
}
.legal-page h1, .contact-page h1 {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.06;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}
.legal-page p.legal-updated {
  display: block;
  margin-bottom: 28px;
  padding: 0;
  background: none;
  border: 0;
  color: var(--text-3);
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  font-weight: 400;
}
.legal-body { max-width: 46em; }
.legal-page p,
.contact-page p {
  color: var(--text-2);
  font-size: 0.98rem;
  margin-bottom: 16px;
  line-height: 1.72;
}
.legal-page h2 {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  letter-spacing: -0.02em;
  margin: 52px 0 16px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  color: var(--text);
}
.legal-page h2:first-of-type { border-top: 0; padding-top: 0; margin-top: 40px; }
.legal-page h3 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
  margin: 30px 0 12px;
  color: var(--text);
}
.legal-list { list-style: none; margin: 0 0 20px; display: flex; flex-direction: column; gap: 9px; }
.legal-list li {
  position: relative;
  padding-left: 22px;
  color: var(--text-2);
  font-size: 0.95rem;
  line-height: 1.6;
}
.legal-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--grad);
}
.legal-defs { margin: 0 0 20px; display: flex; flex-direction: column; gap: 14px; }
.legal-defs dt {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 3px;
}
.legal-defs dd { margin: 0; color: var(--text-2); font-size: 0.95rem; line-height: 1.6; }
.legal-callout {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--hero-teal);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
  margin: 0 0 20px;
}
.legal-callout p:last-child { margin-bottom: 0; }
.legal-page a, .contact-page a:not(.btn):not(.logo) { color: var(--info-text); }
.legal-contact {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 26px;
  margin-top: 12px;
}
.legal-contact p { margin-bottom: 4px; }
.legal-contact strong { color: var(--text); }

/* ---------- Contact page: single centered column ---------- */
.contact-page { padding-bottom: clamp(70px, 9vw, 120px); }
.contact-narrow { max-width: 560px; margin: 0 auto; }
.contact-head { text-align: center; margin-bottom: 40px; }
.contact-head .eyebrow { margin-bottom: 18px; }
.contact-page h1 { font-size: clamp(1.9rem, 3.4vw, 2.55rem); }
.contact-head p {
  color: var(--text-2);
  font-size: 1rem;
  margin: 0 auto;
  max-width: 30em;
}
.contact-alt {
  margin-top: 26px;
  text-align: center;
  color: var(--text-3);
  font-size: 0.88rem;
}
.contact-alt a { color: var(--info-text); font-weight: 500; text-decoration: none; }
.contact-alt a:hover { text-decoration: underline; }

/* ============================ Responsive ============================ */
@media (max-width: 1060px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-copy { max-width: 640px; }
  .hero-demo { justify-self: start; }
  .scenario-explorer { grid-template-columns: 1fr; }
  .scenario-tabs {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
  }
  .scenario-tab { min-width: 240px; }
  .training-layout { grid-template-columns: 1fr; }
  .training-visual { position: relative; top: 0; max-width: 560px; margin: 0 auto; }
  .training-step { opacity: 1; }
  .analysis-layout { grid-template-columns: 1fr; }
  .analysis-form { max-width: 560px; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .metric-grid { grid-template-columns: 1fr; }
  .testimonial-grid { grid-template-columns: 1fr; }
  .mail-card-hero .mail-reply { min-height: 8em; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .desktop-br { display: none; }
  .bubble { max-width: 100%; }

  /* Compare rows: stack title / detail / tag instead of squeezing them
     into one flex line, which crushed the text column to a few chars. */
  .compare-list li {
    display: grid;
    grid-template-columns: 8px minmax(0, 1fr);
    align-items: start;
    column-gap: 12px;
    row-gap: 9px;
    padding: 15px 16px;
  }
  .ci-dot { margin-top: 6px; }
  .compare-list li > div { grid-column: 2; }
  .compare-list strong { font-size: 0.9rem; line-height: 1.4; }
  .compare-list em { font-size: 0.82rem; margin-top: 4px; }
  .ci-tag { grid-column: 2; justify-self: start; margin-left: 0; }

  .compare-head { gap: 8px; }
  .compare-head .mono { font-size: 0.66rem; }
  .compare-count { font-size: 0.64rem; letter-spacing: 0.04em; padding: 5px 11px; }
  .compare-toggle { display: flex; width: 100%; }
  .compare-btn { flex: 1; padding: 10px 12px; font-size: 0.86rem; }
}

/* ============================ Reduced motion ============================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
