/* ============================================================
   AGENTIVA — Design Tokens
   Concept: AI customer-response agents for LatAm SMEs.
   Palette: WhatsApp-inspired deep green + black (trust, chat, automation)
   Type: General Sans (display) + Satoshi (body) — Fontshare
   ============================================================ */

:root {
  /* Fluid type scale */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.25rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 4.5rem);
  --text-hero: clamp(2.75rem, 1rem + 5.5vw, 5.75rem);

  /* 4px spacing system */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  --radius-sm: 0.375rem;
  --radius-md: 0.625rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;

  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --content-narrow: 640px;
  --content-default: 980px;
  --content-wide: 1220px;
  --content-full: 100%;

  --font-display: 'General Sans', 'Satoshi', 'Helvetica Neue', sans-serif;
  --font-body: 'Satoshi', 'General Sans', 'Helvetica Neue', sans-serif;

  /* Fixed WhatsApp-style chrome (header, footer, chat demo) — same in light & dark theme */
  --color-chrome-bg: #0e2f22;
  --color-chrome-surface: rgba(255, 255, 255, 0.1);
  --color-chrome-surface-active: rgba(255, 255, 255, 0.16);
  --color-chrome-border: rgba(255, 255, 255, 0.14);
  --color-chrome-text: #f2fbf5;
  --color-chrome-text-muted: #a9d3bb;
}

/* ---------- LIGHT MODE (default) ---------- */
:root,
[data-theme='light'] {
  --color-bg: #f6faf7;
  --color-surface: #ffffff;
  --color-surface-2: #fbfefc;
  --color-surface-offset: #eaf5ee;
  --color-surface-offset-2: #dcefe1;
  --color-surface-dynamic: #cfe8d6;
  --color-divider: #dcefe1;
  --color-border: #d3e9da;

  --color-text: #0d1f16;
  --color-text-muted: #4c5c53;
  --color-text-faint: #8a9a90;
  --color-text-inverse: #f6faf7;

  --color-primary: #0b3d2e;
  --color-primary-hover: #0f4a38;
  --color-primary-active: #145a44;
  --color-primary-highlight: #d7ece1;

  --color-accent: #25d366;
  --color-accent-hover: #1fbd59;
  --color-accent-active: #17a34c;
  --color-accent-highlight: #e2f9e7;

  --color-warning: #b5650a;
  --color-warning-highlight: #f3e2cc;
  --color-error: #c22e3a;
  --color-error-highlight: #f4d7da;
  --color-success: #1f8a4c;
  --color-success-highlight: #d3ecdd;

  --shadow-sm: 0 1px 2px oklch(0.2 0.06 150 / 0.06);
  --shadow-md: 0 4px 14px oklch(0.2 0.06 150 / 0.08);
  --shadow-lg: 0 16px 40px oklch(0.2 0.06 150 / 0.14);
}

/* ---------- DARK MODE ---------- */
[data-theme='dark'] {
  --color-bg: #05100b;
  --color-surface: #0c1712;
  --color-surface-2: #0f1c15;
  --color-surface-offset: #13251c;
  --color-surface-offset-2: #1a3025;
  --color-surface-dynamic: #204234;
  --color-divider: #1c3327;
  --color-border: #24402e40;

  --color-text: #eaf6ee;
  --color-text-muted: #9fb3a7;
  --color-text-faint: #5f7568;
  --color-text-inverse: #0c1712;

  --color-primary: #1fae82;
  --color-primary-hover: #23c793;
  --color-primary-active: #2ee0a8;
  --color-primary-highlight: #123324;

  --color-accent: #2be374;
  --color-accent-hover: #4eea8d;
  --color-accent-active: #6ff2a3;
  --color-accent-highlight: #123322;

  --color-warning: #e2a355;
  --color-warning-highlight: #3a2f1c;
  --color-error: #ea6f79;
  --color-error-highlight: #3a2026;
  --color-success: #58c586;
  --color-success-highlight: #1c3527;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.35);
  --shadow-md: 0 6px 20px oklch(0 0 0 / 0.45);
  --shadow-lg: 0 20px 50px oklch(0 0 0 / 0.55);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #05100b;
    --color-surface: #0c1712;
    --color-surface-2: #0f1c15;
    --color-surface-offset: #13251c;
    --color-surface-offset-2: #1a3025;
    --color-surface-dynamic: #204234;
    --color-divider: #1c3327;
    --color-border: #24402e40;
    --color-text: #eaf6ee;
    --color-text-muted: #9fb3a7;
    --color-text-faint: #5f7568;
    --color-text-inverse: #0c1712;
    --color-primary: #1fae82;
    --color-primary-hover: #23c793;
    --color-primary-active: #2ee0a8;
    --color-primary-highlight: #123324;
    --color-accent: #2be374;
    --color-accent-hover: #4eea8d;
    --color-accent-active: #6ff2a3;
    --color-accent-highlight: #123322;
    --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.35);
    --shadow-md: 0 6px 20px oklch(0 0 0 / 0.45);
    --shadow-lg: 0 20px 50px oklch(0 0 0 / 0.55);
  }
}

/* ============================================================
   Layout primitives
   ============================================================ */

.container {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-5);
}
.container--default {
  max-width: var(--content-default);
}
.container--narrow {
  max-width: var(--content-narrow);
}

main {
  overflow-x: hidden;
}

section {
  position: relative;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent-active);
}
[data-theme='dark'] .eyebrow {
  color: var(--color-accent);
}
.eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--color-accent);
  flex-shrink: 0;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  letter-spacing: -0.01em;
}

h2.section-title {
  font-size: var(--text-xl);
  font-weight: 700;
  margin-top: var(--space-3);
  max-width: 22ch;
}

.section-kicker {
  margin-bottom: var(--space-10);
}

p.section-lede {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  margin-top: var(--space-4);
  max-width: 56ch;
}

/* ============================================================
   Buttons
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-sm);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  white-space: nowrap;
  min-height: 44px;
  border: 1px solid transparent;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: var(--color-primary-hover);
  box-shadow: var(--shadow-md);
}
.btn-primary:active {
  background: var(--color-primary-active);
}

.btn-whatsapp {
  background: var(--color-accent);
  color: #04241f;
}
.btn-whatsapp:hover {
  background: var(--color-accent-hover);
}
.btn-whatsapp:active {
  background: var(--color-accent-active);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text);
  border-color: oklch(from var(--color-text) l c h / 0.16);
}
.btn-ghost:hover {
  background: var(--color-surface-offset);
  border-color: oklch(from var(--color-text) l c h / 0.24);
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
}

.btn-block {
  width: 100%;
}

/* ============================================================
   Header / Nav
   ============================================================ */

.header {
  --color-bg: var(--color-chrome-bg);
  --color-surface: var(--color-chrome-surface);
  --color-surface-offset: var(--color-chrome-surface);
  --color-text: var(--color-chrome-text);
  --color-text-muted: var(--color-chrome-text-muted);
  --color-border: var(--color-chrome-border);
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-chrome-bg);
  border-bottom: 1px solid var(--color-chrome-border);
  transition:
    transform 0.3s var(--ease-out),
    box-shadow 0.3s var(--ease-out);
}
.header--hidden {
  transform: translateY(-100%);
}
.header--scrolled {
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-lg);
  color: var(--color-text);
  text-decoration: none;
  flex-shrink: 0;
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
}
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--color-primary);
  color: #fff;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
}
.skip-link:focus {
  left: var(--space-4);
  top: var(--space-4);
}
.brand-mark {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  object-fit: contain;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}
.nav-links a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
}
.nav-links a:hover {
  color: var(--color-text);
}

.nav-signin-link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
}
.nav-signin-link:hover {
  color: var(--color-text);
}
.nav-user {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text);
}
.nav-user-name {
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-decoration: none;
  color: inherit;
}
.nav-logout {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.nav-logout:hover {
  color: var(--color-text);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
}
.theme-toggle:hover {
  background: var(--color-surface-offset);
  color: var(--color-text);
}
.theme-toggle svg {
  width: 18px;
  height: 18px;
}
.theme-toggle .icon-moon {
  display: none;
}
[data-theme='dark'] .theme-toggle .icon-sun {
  display: none;
}
[data-theme='dark'] .theme-toggle .icon-moon {
  display: block;
}

.nav-toggle {
  display: none;
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  align-items: center;
  justify-content: center;
  color: var(--color-text);
  flex-shrink: 0;
}
.nav-toggle span {
  position: absolute;
  left: 10px;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.25s var(--ease-out), opacity 0.25s var(--ease-out);
}
.nav-toggle span:nth-child(1) { top: 14px; }
.nav-toggle span:nth-child(2) { top: 19px; }
.nav-toggle span:nth-child(3) { top: 24px; }
.nav-toggle.is-open span:nth-child(1) {
  top: 19px;
  transform: rotate(45deg);
}
.nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.is-open span:nth-child(3) {
  top: 19px;
  transform: rotate(-45deg);
}

@media (max-width: 860px) {
  .nav-links {
    display: none;
  }
  .nav-toggle {
    display: inline-flex;
  }
  .header-actions #cta-nav {
    display: none;
  }
  .header-actions #nav-signin {
    display: none;
  }
}

.theme-toggle-drawer {
  display: none;
}
@media (max-width: 480px) {
  .header-actions .theme-toggle {
    display: none;
  }
}

/* Mobile drawer */
.mobile-drawer {
  position: fixed;
  inset: 76px 0 0 0;
  z-index: 90;
  background: var(--color-bg);
  padding: var(--space-6) var(--space-5) var(--space-10);
  transform: translateY(-8px);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.25s var(--ease-out),
    transform 0.25s var(--ease-out),
    visibility 0.25s;
  overflow-y: auto;
}
.mobile-drawer.is-open {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}
.mobile-drawer nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.mobile-drawer nav a {
  padding: var(--space-4) var(--space-2);
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
  border-bottom: 1px solid var(--color-divider);
}
.mobile-drawer .btn {
  margin-top: var(--space-6);
}
.theme-toggle-drawer {
  width: auto;
  height: auto;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-2);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
}
@media (max-width: 480px) {
  .theme-toggle-drawer {
    display: inline-flex;
    align-items: center;
    margin-top: var(--space-4);
  }
}

/* ============================================================
   Hero
   ============================================================ */

.hero {
  position: relative;
  padding-top: clamp(var(--space-8), 6vw, var(--space-12));
  padding-bottom: clamp(var(--space-12), 8vw, var(--space-20));
  background: var(--color-bg);
  overflow: hidden;
}
[data-theme='dark'] .hero {
  background: #05100b;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  opacity: 0;
}
[data-theme='light'] .hero-bg img {
  opacity: 0.55;
  filter: invert(1) grayscale(1) brightness(1.1);
}
[data-theme='dark'] .hero-bg img {
  opacity: 0.4;
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    var(--color-bg) 0%,
    oklch(from var(--color-bg) l c h / 0.85) 55%,
    var(--color-bg) 100%
  );
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: var(--space-16);
  align-items: center;
}

.hero-copy .eyebrow {
  margin-bottom: var(--space-5);
}

.hero-copy h1 {
  font-size: clamp(2.15rem, 1.45rem + 2.4vw, 3.15rem);
  font-weight: 700;
  line-height: 1.12;
  max-width: 19ch;
}

.hero-copy .hero-sub {
  margin-top: var(--space-6);
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 46ch;
  font-weight: 400;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  margin-top: var(--space-8);
  flex-wrap: wrap;
}

.hero-trust {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-8);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}
.hero-trust svg {
  width: 15px;
  height: 15px;
  color: var(--color-accent-active);
  flex-shrink: 0;
}
[data-theme='dark'] .hero-trust svg {
  color: var(--color-accent);
}

.link-inline {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
  padding: var(--space-3) var(--space-2);
}
.link-inline svg {
  width: 16px;
  height: 16px;
  transition: transform var(--transition-interactive);
}
.link-inline:hover svg {
  transform: translateX(3px);
}

/* ---------- Phone mock ---------- */
.phone-frame {
  position: relative;
  margin-inline: auto;
  width: min(320px, 100%);
  border-radius: 34px;
  padding: 10px;
  background: linear-gradient(160deg, #12201a, #050b08);
  box-shadow: var(--shadow-lg);
  border: 1px solid oklch(from #ffffff l c h / 0.06);
}
[data-theme='light'] .phone-frame {
  background: linear-gradient(160deg, #16281f, #070f0b);
}
.phone-screen {
  border-radius: 26px;
  overflow: hidden;
  background: var(--color-surface);
  display: flex;
  flex-direction: column;
  height: 560px;
}
.phone-topbar {
  background: var(--color-chrome-bg);
  color: var(--color-chrome-text);
  padding: var(--space-4) var(--space-4) var(--space-3);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.phone-topbar .avatar {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  background: #f2fbf5;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  padding: 5px;
}
.phone-topbar .avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.phone-topbar-name {
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 1.2;
}
.phone-topbar-status {
  font-size: 11px;
  opacity: 0.85;
  display: flex;
  align-items: center;
  gap: 5px;
}
.phone-topbar-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: #25d366;
}

.phone-body {
  flex: 1;
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  overflow: hidden auto;
  background-image: url('assets/chat-pattern-light.svg');
  background-repeat: repeat;
  background-size: 200px 200px;
  position: relative;
}
[data-theme='dark'] .phone-body {
  background-image: url('assets/chat-pattern-dark.svg');
}

.chat-bubble {
  max-width: 82%;
  padding: 10px 13px;
  border-radius: var(--radius-md);
  font-size: var(--text-xs);
  line-height: 1.45;
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.4s var(--ease-out),
    transform 0.4s var(--ease-out);
}
.chat-bubble.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.chat-bubble.from-user {
  align-self: flex-end;
  background: var(--color-surface-offset-2);
  color: var(--color-text);
  border-bottom-right-radius: var(--radius-sm);
}
[data-theme='dark'] .chat-bubble.from-user {
  background: #1e3a2c;
}
.chat-bubble.from-agent {
  align-self: flex-start;
  background: var(--color-accent);
  color: #04241f;
  border-bottom-left-radius: var(--radius-sm);
}
.chat-bubble.from-agent .chat-tag {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.6;
  margin-bottom: 3px;
}
.chat-typing {
  align-self: flex-start;
  display: flex;
  gap: 4px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--color-accent);
  opacity: 0;
  transition: opacity 0.3s var(--ease-out);
}
.chat-typing.is-visible {
  opacity: 1;
}
.chat-typing span {
  width: 5px;
  height: 5px;
  border-radius: var(--radius-full);
  background: #04241f;
  animation: typing-dot 1s infinite ease-in-out;
}
.chat-typing span:nth-child(2) {
  animation-delay: 0.15s;
}
.chat-typing span:nth-child(3) {
  animation-delay: 0.3s;
}
@keyframes typing-dot {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.5;
  }
  30% {
    transform: translateY(-3px);
    opacity: 1;
  }
}

.phone-notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 18px;
  background: #050b08;
  border-radius: 0 0 14px 14px;
  z-index: 2;
}

/* ============================================================
   Partner logos
   ============================================================ */

.partners {
  border-top: 1px solid var(--color-divider);
  border-bottom: 1px solid var(--color-divider);
  padding-block: var(--space-8);
  background: var(--color-surface);
  overflow: hidden;
}
.partners-track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: partners-scroll 40s linear infinite;
}
.partners-track:hover {
  animation-play-state: paused;
}
.partners-track img {
  height: 28px;
  width: auto;
  max-width: 130px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
  margin-right: var(--space-12);
  filter: brightness(0) saturate(100%);
  opacity: 0.85;
}
[data-theme='dark'] .partners-track img {
  filter: brightness(0) saturate(100%) invert(1);
}
.partner-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
  margin-right: var(--space-12);
}
.partner-item img {
  margin-right: 0;
}
.partner-name {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-text-faint);
  white-space: nowrap;
}
@keyframes partners-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* ============================================================
   Stakes section
   ============================================================ */

.stakes {
  padding-block: clamp(var(--space-16), 9vw, var(--space-24));
  background: var(--color-surface);
}

.stakes-headline {
  font-size: var(--text-2xl);
  font-weight: 700;
  max-width: 24ch;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: var(--space-12);
  background: var(--color-divider);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-divider);
}
.stat-card {
  background: var(--color-surface);
  padding: var(--space-8) var(--space-6);
}
.stat-card:first-child {
  padding-left: var(--space-8);
}
.stat-number {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
}
[data-theme='dark'] .stat-number {
  color: var(--color-accent);
}
.stat-card p {
  margin-top: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.stat-source {
  display: block;
  margin-top: var(--space-3);
  font-size: 11px;
  color: var(--color-text-faint);
}
.stat-source a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--color-border);
}

.stakes-closer {
  margin-top: var(--space-10);
  font-size: var(--text-lg);
  font-weight: 600;
  font-family: var(--font-display);
  border-left: none;
  padding-left: 0;
  max-width: 42ch;
}

@media (max-width: 768px) {
  .stat-row {
    grid-template-columns: 1fr;
  }
  .stat-card:first-child {
    padding-left: var(--space-6);
  }
}

/* ============================================================
   Before / After (Value prop)
   ============================================================ */

.transform {
  padding-block: clamp(var(--space-16), 9vw, var(--space-24));
  background: var(--color-bg);
}

.transform-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
  margin-top: var(--space-12);
  align-items: stretch;
}

.transform-card {
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  border: 1px solid var(--color-border);
}
.transform-card.is-before {
  background: var(--color-surface-offset);
}
.transform-card.is-after {
  background: linear-gradient(155deg, #14523d, #050f0a);
  color: #eafcf1;
  position: relative;
  overflow: hidden;
  transform: translateY(calc(-1 * var(--space-4)));
}
[data-theme='dark'] .transform-card.is-after {
  background: linear-gradient(155deg, #145c44, #030906);
}

.transform-card h3 {
  font-size: var(--text-lg);
  font-weight: 700;
}
.transform-card.is-before h3 {
  color: var(--color-text);
}
.transform-card.is-after h3 {
  color: #fff;
}

.transform-list {
  margin-top: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.transform-list li {
  display: flex;
  gap: var(--space-3);
  font-size: var(--text-sm);
  line-height: 1.55;
}
.transform-card.is-before li {
  color: var(--color-text-muted);
}
.transform-card.is-after li {
  color: #cdeedb;
}
.transform-list svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
}
.transform-card.is-before svg {
  color: var(--color-text-faint);
}
.transform-card.is-after svg {
  color: var(--color-accent);
}

@media (max-width: 860px) {
  .transform-grid {
    grid-template-columns: 1fr;
  }
  .transform-card.is-after {
    transform: none;
  }
}

/* ============================================================
   Guide / About section
   ============================================================ */

.guide {
  padding-block: clamp(var(--space-16), 9vw, var(--space-24));
  background: var(--color-surface);
}

.guide-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  gap: var(--space-16);
  align-items: start;
}

.guide-copy h2 {
  font-size: var(--text-xl);
  font-weight: 700;
  margin-top: var(--space-3);
  max-width: 22ch;
}
.guide-copy p {
  margin-top: var(--space-5);
  color: var(--color-text-muted);
  font-size: var(--text-base);
  max-width: 52ch;
}

.guide-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: var(--space-2);
}
.guide-item {
  display: flex;
  gap: var(--space-4);
  padding-block: var(--space-5);
  border-bottom: 1px solid var(--color-divider);
}
.guide-item:first-child {
  border-top: 1px solid var(--color-divider);
}
.guide-item svg {
  width: 20px;
  height: 20px;
  color: var(--color-primary);
  flex-shrink: 0;
  margin-top: 2px;
}
[data-theme='dark'] .guide-item svg {
  color: var(--color-accent);
}
.guide-item-text h4 {
  font-size: var(--text-sm);
  font-weight: 700;
  font-family: var(--font-body);
}
.guide-item-text p {
  margin-top: var(--space-1);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  max-width: 44ch;
}

/* ============================================================
   Plan / How it works
   ============================================================ */

.plan {
  padding-block: clamp(var(--space-16), 9vw, var(--space-24));
  background: var(--color-bg);
}

.plan-steps {
  margin-top: var(--space-14);
  position: relative;
}

.plan-step {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: var(--space-6);
  padding-bottom: var(--space-12);
  position: relative;
}
.plan-step:last-child {
  padding-bottom: 0;
}

.plan-node {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.plan-node-circle {
  width: 52px;
  height: 52px;
  margin-top: 34px;
  border-radius: var(--radius-full);
  background: var(--color-surface);
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-base);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  z-index: 1;
}
[data-theme='dark'] .plan-node-circle {
  border-color: var(--color-accent);
  color: var(--color-accent);
}
.plan-node-line {
  flex: 1;
  width: 2px;
  background: var(--color-border);
  margin-top: var(--space-2);
}
.plan-step:last-child .plan-node-line {
  display: none;
}

.plan-content {
  padding-top: var(--space-2);
}
.plan-content .plan-time {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-faint);
}
.plan-content h3 {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-top: var(--space-2);
}
.plan-content p {
  margin-top: var(--space-2);
  color: var(--color-text-muted);
  font-size: var(--text-base);
  max-width: 54ch;
}

/* ============================================================
   Case studies (customer video testimonials)
   ============================================================ */

.cases {
  padding-block: clamp(var(--space-16), 9vw, var(--space-24));
  background: var(--color-surface);
}

.cases-sub {
  margin-top: var(--space-3);
  color: var(--color-text-muted);
  font-size: var(--text-base);
  max-width: 48ch;
}

.cases-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
  margin-top: var(--space-12);
}

.case-card {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.case-video {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(155deg, #14523d, #050f0a);
  border: 0;
  padding: 0;
  cursor: pointer;
}
.case-video[data-embed=''] {
  cursor: not-allowed;
}
.case-video-poster-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.case-video-poster-icon svg {
  width: 30%;
  height: 30%;
  max-width: 88px;
  max-height: 88px;
  color: rgba(234, 252, 241, 0.14);
}
.case-video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--color-accent);
  color: #06150f;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px oklch(0.2 0.06 150 / 0.35);
  transition: transform var(--transition-interactive);
}
.case-video-play svg {
  width: 22px;
  height: 22px;
  margin-left: 3px;
}
.case-video:hover .case-video-play {
  transform: translate(-50%, -50%) scale(1.08);
}
.case-video[data-embed=''] .case-video-play {
  opacity: 0.55;
}
.case-video[data-embed=''] .case-video:hover .case-video-play {
  transform: translate(-50%, -50%);
}
.case-video-badge {
  position: absolute;
  left: var(--space-4);
  bottom: var(--space-4);
  background: rgba(3, 9, 6, 0.6);
  color: #eafcf1;
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-full);
}
.case-video:not([data-embed='']) .case-video-badge {
  display: none;
}

.case-body {
  padding: var(--space-6) var(--space-6) var(--space-8);
}
.case-person {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.case-avatar {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px dashed var(--color-border);
  background: var(--color-surface-offset);
  color: var(--color-text-faint);
  display: flex;
  align-items: center;
  justify-content: center;
}
.case-avatar svg {
  width: 20px;
  height: 20px;
}
.case-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--color-text);
}
.case-role {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.case-quote {
  font-size: var(--text-base);
  color: var(--color-text);
  line-height: 1.5;
}
.case-result {
  margin-top: var(--space-5);
}
.case-result-badge {
  display: inline-block;
  background: var(--color-accent-highlight);
  color: var(--color-primary);
  font-weight: 600;
  font-size: var(--text-sm);
  padding: 6px 14px;
  border-radius: var(--radius-full);
}
[data-theme='dark'] .case-result-badge {
  color: var(--color-accent);
}

@media (max-width: 768px) {
  .cases-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Video modal (lightbox) ---------- */
.video-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
}
.video-modal[hidden] {
  display: none;
}
.video-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 9, 6, 0.8);
}
.video-modal-panel {
  position: relative;
  width: min(920px, 100%);
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.video-modal-frame {
  width: 100%;
  height: 100%;
}
.video-modal-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.video-modal-close {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.video-modal-close svg {
  width: 18px;
  height: 18px;
}
body.modal-open {
  overflow: hidden;
}

/* ---------- Auth modal (client login) ---------- */
.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
}
.auth-modal[hidden] {
  display: none;
}
.auth-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 9, 6, 0.8);
}
.auth-modal-panel {
  position: relative;
  width: min(420px, 100%);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-8) var(--space-8) var(--space-6);
}
.auth-modal-close {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
}
.auth-modal-close:hover {
  background: var(--color-surface-offset);
  color: var(--color-text);
}
.auth-modal-close svg {
  width: 18px;
  height: 18px;
}
.auth-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--color-accent);
  flex-shrink: 0;
}
.auth-eyebrow {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-3);
}
.auth-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}
.auth-sub {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.auth-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.auth-field label {
  font-size: var(--text-xs);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.auth-field input {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text);
  width: 100%;
}
.auth-field input::placeholder {
  color: var(--color-text-faint);
}
.field-pass-wrap {
  position: relative;
}
.field-pass-wrap input {
  padding-right: 42px;
}
.pass-toggle {
  position: absolute;
  top: 50%;
  right: 4px;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--color-text-faint);
}
.pass-toggle:hover {
  background: var(--color-surface-offset);
  color: var(--color-text-muted);
}
.pass-toggle svg {
  width: 17px;
  height: 17px;
}
.pass-toggle .icon-eye-off {
  display: none;
}
.pass-toggle.is-visible .icon-eye {
  display: none;
}
.pass-toggle.is-visible .icon-eye-off {
  display: block;
}
.auth-error {
  font-size: var(--text-xs);
  color: var(--color-error);
  min-height: 16px;
  margin: 0;
}
.auth-submit {
  margin-top: var(--space-1);
}

/* ============================================================
   FAQ
   ============================================================ */

.faq {
  padding-block: clamp(var(--space-16), 9vw, var(--space-24));
  background: var(--color-bg);
}

.faq-list {
  margin-top: var(--space-10);
  max-width: var(--content-default);
}

.faq-item {
  border-bottom: 1px solid var(--color-divider);
}
.faq-item:first-child {
  border-top: 1px solid var(--color-divider);
}
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: var(--space-6);
  text-align: left;
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
}
.faq-question svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--color-text-faint);
  transition: transform var(--transition-interactive);
}
.faq-item[data-open='true'] .faq-question svg {
  transform: rotate(180deg);
  color: var(--color-primary);
}
[data-theme='dark'] .faq-item[data-open='true'] .faq-question svg {
  color: var(--color-accent);
}
.faq-answer {
  height: 0;
  overflow: hidden;
  transition: height 0.3s var(--ease-out);
}
.faq-answer-inner {
  padding-bottom: var(--space-6);
  color: var(--color-text-muted);
  font-size: var(--text-base);
  max-width: 66ch;
}

/* ============================================================
   Final CTA band
   ============================================================ */

.final-cta {
  padding-block: clamp(var(--space-16), 10vw, var(--space-24));
  background: linear-gradient(150deg, #123d2c, #081712 60%, #030906);
  color: #eafcf1;
  text-align: left;
  position: relative;
  overflow: hidden;
}

.final-cta-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: var(--space-10);
  align-items: center;
  position: relative;
  z-index: 1;
}

.final-cta h2 {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: #fff;
  max-width: 20ch;
}
.final-cta p {
  margin-top: var(--space-5);
  color: #bfe6cf;
  font-size: var(--text-base);
  max-width: 50ch;
}
.final-cta .eyebrow {
  color: var(--color-accent);
}
.final-cta-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  align-items: center;
}
.final-cta-sub {
  font-size: var(--text-sm);
  color: rgba(234, 252, 241, 0.68);
  text-align: center;
}
@media (max-width: 860px) {
  .final-cta-grid {
    grid-template-columns: 1fr;
  }
  .final-cta-actions {
    align-items: stretch;
  }
}

/* ============================================================
   Footer
   ============================================================ */

.footer {
  --color-bg: var(--color-chrome-bg);
  --color-text: var(--color-chrome-text);
  --color-text-muted: var(--color-chrome-text-muted);
  --color-text-faint: var(--color-chrome-text-muted);
  --color-divider: var(--color-chrome-border);
  padding-block: var(--space-16) var(--space-8);
  background: var(--color-chrome-bg);
  border-top: 1px solid var(--color-chrome-border);
}

.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr;
  gap: var(--space-10);
}

.footer-col-stacked {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.footer-brand {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-base);
  color: var(--color-text);
  text-decoration: none;
}
.footer-brand img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  display: block;
}
.footer-tagline {
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  max-width: 32ch;
}

.footer-col h5 {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-faint);
  margin-bottom: var(--space-4);
}
.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.footer-col a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
}
.footer-col a:hover {
  color: var(--color-text);
}

.footer-bottom {
  margin-top: var(--space-16);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-divider);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

@media (max-width: 860px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8) var(--space-6);
  }
  .footer-brand-block {
    grid-column: 1 / -1;
  }
}

/* ============================================================
   Scroll reveal + responsive hero/guide collapse
   ============================================================ */

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.6s var(--ease-out),
    transform 0.6s var(--ease-out);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: var(--space-10);
    text-align: left;
  }
  .hero-copy h1 {
    max-width: 100%;
  }
  .hero-copy .hero-sub {
    max-width: 100%;
  }
  .phone-frame {
    margin-top: var(--space-4);
  }
  .guide-grid {
    grid-template-columns: 1fr;
    gap: var(--space-10);
  }
}

@media (max-width: 560px) {
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-actions .btn {
    width: 100%;
  }
  .phone-screen {
    height: 480px;
  }
}

/* Keep the partner-logos strip scrolling even when the OS/browser has
   "reduce motion" on — base.css's global reduced-motion rule otherwise
   freezes every animation on the page, including this one. */
@media (prefers-reduced-motion: reduce) {
  .partners-track {
    animation-duration: 40s !important;
    animation-iteration-count: infinite !important;
  }
}
