/* ============================================================
   STYLE.CSS — AI Agent ROI Calculator (aiagentroi.io)
   Design System: Clean White + Teal/Blue Accents
   ============================================================ */

/* ---------- DESIGN TOKENS ---------- */
:root, [data-theme="light"] {
  /* Fonts */
  --font-body: 'General Sans', 'Helvetica Neue', sans-serif;
  --font-display: 'Cabinet Grotesk', 'Arial Black', sans-serif;

  /* 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.5rem);

  /* Spacing */
  --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;

  /* Light Surfaces — clean white + light gray alternating */
  --color-bg:             #ffffff;
  --color-surface:        #f8f9fa;
  --color-surface-2:      #ffffff;
  --color-surface-offset: #f1f5f9;
  --color-surface-offset-2: #e2e8f0;
  --color-surface-dynamic: #e2e8f0;
  --color-divider:        #e2e8f0;
  --color-border:         #cbd5e1;

  /* Text */
  --color-text:           #0f172a;
  --color-text-muted:     #64748b;
  --color-text-faint:     #94a3b8;
  --color-text-inverse:   #ffffff;

  /* Teal Primary */
  --color-primary:        #01696f;
  --color-primary-hover:  #0c4e54;
  --color-primary-active: #0f3638;
  --color-primary-highlight: #ccfbf1;

  /* Electric Blue Secondary */
  --color-secondary:      #2563eb;
  --color-secondary-hover:#1d4ed8;

  /* Success Green */
  --color-success:        #16a34a;
  --color-success-hover:  #15803d;
  --color-success-highlight: #dcfce7;

  /* Warning (Amber) */
  --color-warning:        #d97706;
  --color-warning-highlight: #fef3c7;

  /* Error */
  --color-error:          #dc2626;

  /* Dark strip (ticker, footer) */
  --color-dark:           #0f172a;
  --color-dark-surface:   #1e293b;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.12);

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;
}

/* ---------- DARK MODE ---------- */
[data-theme="dark"] {
  --color-bg:             #0f172a;
  --color-surface:        #1e293b;
  --color-surface-2:      #1e293b;
  --color-surface-offset: #1e293b;
  --color-surface-offset-2: #334155;
  --color-surface-dynamic: #334155;
  --color-divider:        #334155;
  --color-border:         #475569;
  --color-text:           #f1f5f9;
  --color-text-muted:     #94a3b8;
  --color-text-faint:     #64748b;
  --color-text-inverse:   #0f172a;
  --color-primary:        #2dd4bf;
  --color-primary-hover:  #14b8a6;
  --color-primary-active: #0d9488;
  --color-primary-highlight: #1e3a3a;
  --color-secondary:      #60a5fa;
  --color-secondary-hover:#3b82f6;
  --color-success:        #4ade80;
  --color-success-hover:  #22c55e;
  --color-success-highlight: #1a3a2a;
  --color-warning:        #fbbf24;
  --color-warning-highlight: #3a3520;
  --color-error:          #f87171;
  --color-dark:           #020617;
  --color-dark-surface:   #0f172a;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.6);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg:             #0f172a;
    --color-surface:        #1e293b;
    --color-surface-2:      #1e293b;
    --color-surface-offset: #1e293b;
    --color-surface-offset-2: #334155;
    --color-surface-dynamic: #334155;
    --color-divider:        #334155;
    --color-border:         #475569;
    --color-text:           #f1f5f9;
    --color-text-muted:     #94a3b8;
    --color-text-faint:     #64748b;
    --color-text-inverse:   #0f172a;
    --color-primary:        #2dd4bf;
    --color-primary-hover:  #14b8a6;
    --color-primary-active: #0d9488;
    --color-primary-highlight: #1e3a3a;
    --color-secondary:      #60a5fa;
    --color-secondary-hover:#3b82f6;
    --color-success:        #4ade80;
    --color-success-hover:  #22c55e;
    --color-success-highlight: #1a3a2a;
    --color-warning:        #fbbf24;
    --color-warning-highlight: #3a3520;
    --color-error:          #f87171;
    --color-dark:           #020617;
    --color-dark-surface:   #0f172a;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.6);
  }
}

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

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  margin: 0;
}

/* ---------- LAYOUT UTILITIES ---------- */
.container {
  width: 100%;
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-10);
  max-width: var(--content-narrow);
  margin-inline: auto;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 800;
  margin-bottom: var(--space-3);
  color: var(--color-text);
}

.section-header p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  max-width: 52ch;
  margin-inline: auto;
}

/* ---------- HEADER ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--color-bg) 85%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-divider);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--content-wide);
  margin-inline: auto;
  padding: var(--space-3) var(--space-4);
  gap: var(--space-4);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  color: var(--color-text);
  flex-shrink: 0;
}

.logo svg {
  width: 32px;
  height: 32px;
  color: var(--color-primary);
}

.logo__text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-sm);
  letter-spacing: -0.02em;
}

.header__nav {
  display: flex;
  gap: var(--space-6);
}

.header__nav a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
  transition: color var(--transition-interactive);
}

.header__nav a:hover {
  color: var(--color-primary);
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  transition: background var(--transition-interactive), color var(--transition-interactive);
}

.theme-toggle:hover {
  background: var(--color-surface-offset);
  color: var(--color-text);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
}

/* Mobile nav */
@media (max-width: 768px) {
  .header__nav {
    display: none;
  }
}

/* ---------- HERO ---------- */
.hero {
  padding: clamp(var(--space-12), 8vw, var(--space-24)) var(--space-4);
  text-align: center;
  background: linear-gradient(
    180deg,
    #ffffff 0%,
    #f0fdfa 40%,
    #ecfeff 60%,
    #f0f9ff 80%,
    #ffffff 100%
  );
}

[data-theme="dark"] .hero {
  background: linear-gradient(
    180deg,
    var(--color-bg) 0%,
    color-mix(in oklab, var(--color-primary-highlight) 30%, var(--color-bg)) 50%,
    var(--color-bg) 100%
  );
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .hero {
    background: linear-gradient(
      180deg,
      var(--color-bg) 0%,
      color-mix(in oklab, var(--color-primary-highlight) 30%, var(--color-bg)) 50%,
      var(--color-bg) 100%
    );
  }
}

.hero__inner {
  max-width: var(--content-default);
  margin-inline: auto;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-4);
  background: var(--color-surface-offset);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
  font-weight: 500;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-success);
  animation: pulse 2s infinite;
  flex-shrink: 0;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero h1 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: var(--space-4);
  color: var(--color-text);
}

.hero__sub {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 56ch;
  margin-inline: auto;
  margin-bottom: var(--space-8);
}

.hero__ctas {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--space-10);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  border: none;
  cursor: pointer;
  transition: background var(--transition-interactive), border-color var(--transition-interactive), color var(--transition-interactive);
}

.btn--primary {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}

.btn--primary:hover {
  background: var(--color-primary-hover);
}

.btn--ghost {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text);
}

.btn--ghost:hover {
  background: var(--color-surface-offset);
  border-color: var(--color-primary);
}

.btn--sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-xs);
  border-radius: var(--radius-sm);
}

/* Hero stats — card style */
.hero__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  max-width: 640px;
  margin-inline: auto;
  padding-top: var(--space-8);
}

.stat {
  text-align: center;
  background: var(--color-surface-2);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-4);
  box-shadow: var(--shadow-sm);
}

.stat__number {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: -0.02em;
}

.stat__label {
  display: block;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

@media (max-width: 480px) {
  .hero__stats {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }
}

/* ---------- TICKER ---------- */
.ticker {
  background: var(--color-dark);
  overflow: hidden;
  padding: var(--space-3) 0;
  border: none;
}

.ticker__track {
  display: flex;
  width: max-content;
  animation: ticker-scroll 40s linear infinite;
}

@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.ticker__content {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding-right: var(--space-4);
  flex-shrink: 0;
}

.ticker__item {
  font-size: var(--text-xs);
  color: #94a3b8;
  white-space: nowrap;
}

.ticker__item strong {
  color: #ffffff;
  font-weight: 600;
}

.ticker__sep {
  color: #475569;
  font-size: var(--text-xs);
}

/* Pause ticker on hover */
.ticker:hover .ticker__track {
  animation-play-state: paused;
}

/* ---------- AD SLOTS ---------- */
.ad-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border: 2px dashed var(--color-divider);
  background: var(--color-surface-offset, var(--color-surface));
  border-radius: var(--radius-md);
  margin: var(--space-6) auto;
  max-width: var(--content-wide);
  min-height: 90px;
  position: relative;
  overflow: hidden;
}

.ad-slot::after {
  content: 'ADVERTISEMENT';
  display: block;
  font-size: 0.625rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  margin-top: var(--space-1);
  opacity: 0.6;
}

.ad-slot--leaderboard {
  width: 100%;
  max-width: 728px;
  min-height: 90px;
}

.ad-slot--rectangle {
  width: 100%;
  max-width: 336px;
  min-height: 280px;
}

/* Half-page (300x600) for calculator sidebar */
.ad-slot--halfpage {
  width: 100%;
  max-width: 300px;
  min-height: 600px;
}

/* Inline ad slots — floated/centered within content */
.ad-slot--inline {
  margin: var(--space-8) auto;
}

/* In-FAQ ad slots — slightly narrower margin */
.ad-slot--faq {
  margin: var(--space-4) auto var(--space-6);
}

/* Calculator sidebar ad — 3rd column on desktop */
.calc__sidebar-ad {
  display: none; /* hidden on mobile */
}

@media (min-width: 1440px) {
  .calculator {
    grid-template-columns: 1fr 1fr 300px;
  }
  .calc__sidebar-ad {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: var(--space-4);
  }
  .calc__sidebar-ad .ad-slot {
    margin: 0;
    position: sticky;
    top: calc(var(--header-h, 64px) + var(--space-4));
  }
}

/* Share results bar */
.share-results {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin: var(--space-8) 0 var(--space-6);
  padding: var(--space-4) var(--space-6);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.share-results__label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-2);
  white-space: nowrap;
}

.share-results__buttons {
  display: flex;
  gap: var(--space-3);
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}

.share-btn:hover {
  transform: translateY(-1px);
}

.share-btn--x {
  background: #0f1419;
  color: #fff;
}

.share-btn--x:hover {
  background: #1a2633;
}

.share-btn--linkedin {
  background: #0A66C2;
  color: #fff;
}

.share-btn--linkedin:hover {
  background: #004182;
}

@media (max-width: 600px) {
  .share-results {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
  }
}

/* ---------- STICKY ANCHOR AD ---------- */
.anchor-ad {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface-2);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
  padding: var(--space-2) var(--space-4);
  transition: transform 0.3s ease;
}

.anchor-ad.hidden {
  transform: translateY(100%);
  pointer-events: none;
}

.anchor-ad__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 728px;
  width: 100%;
  min-height: 50px;
}

.anchor-ad__inner .ad-placeholder {
  width: 100%;
  text-align: center;
}

.anchor-ad__close {
  position: absolute;
  top: -12px;
  right: 12px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  color: var(--color-text-2);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: background 0.2s;
}

.anchor-ad__close:hover {
  background: var(--color-surface-offset);
}

/* Mobile: smaller anchor ad */
@media (max-width: 768px) {
  .anchor-ad__inner {
    max-width: 320px;
    min-height: 50px;
  }
}

/* Cookie banner z-index handled in its own section below */

/* ---------- BREADCRUMB (SEO) ---------- */
.breadcrumb {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.breadcrumb__list {
  list-style: none;
  display: flex;
  gap: var(--space-1);
  padding: 0;
  margin: 0;
  font-size: var(--text-xs);
}
.breadcrumb__item + .breadcrumb__item::before {
  content: "/";
  margin-right: var(--space-1);
  color: var(--color-text-3);
}
.breadcrumb__item a {
  color: var(--color-text-2);
  text-decoration: none;
}
.breadcrumb__item a:hover {
  text-decoration: underline;
}

/* ---------- CALCULATOR ---------- */
.calculator-section {
  padding: clamp(var(--space-12), 6vw, var(--space-24)) var(--space-4);
  background: var(--color-surface);
}

.calculator {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  box-shadow: var(--shadow-lg);
}

.calc__inputs {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.input-group label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
}

.input-group output {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-primary);
  font-variant-numeric: tabular-nums;
}

/* Range slider styling — filled track via linear-gradient */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: linear-gradient(to right, var(--color-primary) 0%, var(--color-primary) var(--range-fill, 50%), var(--color-surface-dynamic) var(--range-fill, 50%), var(--color-surface-dynamic) 100%);
  border-radius: var(--radius-full);
  outline: none;
  transition: background 0.1s;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-primary);
  cursor: pointer;
  border: 3px solid var(--color-surface-2);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-interactive);
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-primary);
  cursor: pointer;
  border: 3px solid var(--color-surface-2);
  box-shadow: var(--shadow-md);
}

input[type="range"]::-moz-range-progress {
  background: var(--color-primary);
  height: 6px;
  border-radius: var(--radius-full);
}

input[type="range"]:focus-visible::-webkit-slider-thumb {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

/* Select dropdown */
select {
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-2);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: border-color var(--transition-interactive);
}

select:hover {
  border-color: var(--color-primary);
}

/* Results panel */
.calc__results {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.result-card {
  background: var(--color-surface-offset);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--color-divider);
  transition: box-shadow var(--transition-interactive), transform var(--transition-interactive);
}

.result-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.result-card--hero {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, var(--color-primary) 0%, #0e7490 100%);
  color: var(--color-text-inverse);
  text-align: center;
  padding: var(--space-6) var(--space-5);
  border: none;
}

.result-card--hero:hover {
  box-shadow: var(--shadow-lg);
}

.result-card--hero .result-card__label {
  color: rgba(255, 255, 255, 0.8);
}

.result-card--hero .result-card__value {
  font-size: var(--text-xl);
  color: #ffffff;
}

.result-card--hero .result-card__note {
  display: block;
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.6);
  margin-top: var(--space-1);
}

.result-card__label {
  display: block;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-weight: 500;
  margin-bottom: var(--space-2);
}

.result-card__value {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 800;
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
}

/* Cost comparison bar */
.cost-bar {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.cost-bar__human,
.cost-bar__ai {
  position: relative;
}

.cost-bar__fill {
  display: block;
  height: 8px;
  border-radius: var(--radius-full);
  transition: width 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

.cost-bar__human .cost-bar__fill {
  background: var(--color-warning);
}

.cost-bar__ai .cost-bar__fill {
  background: var(--color-success);
}

.cost-bar__label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

.cost-bar__label span {
  font-weight: 600;
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
}

.calc__source {
  text-align: center;
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-top: var(--space-6);
}

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

.calc__source a:hover {
  color: var(--color-primary);
}

@media (max-width: 768px) {
  .calculator {
    grid-template-columns: 1fr;
    padding: var(--space-5);
  }
  .calc__results {
    grid-template-columns: 1fr;
  }
}

/* ---------- COMPARISON TABLE ---------- */
.comparison-section {
  padding: clamp(var(--space-12), 6vw, var(--space-24)) var(--space-4);
  background: var(--color-bg);
}

.comparison-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: var(--color-surface-2);
  margin-bottom: var(--space-10);
}

.comparison-table {
  font-size: var(--text-sm);
  min-width: 700px;
}

.comparison-table thead {
  background: var(--color-primary);
}

.comparison-table th {
  font-weight: 600;
  text-align: left;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #ffffff;
  white-space: nowrap;
}

.comparison-table td {
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--color-divider);
  white-space: nowrap;
}

.comparison-table tbody tr:hover {
  background: var(--color-surface-offset);
}

.comparison-table td.col-human {
  color: var(--color-warning);
  font-weight: 500;
}

.comparison-table td.col-ai {
  color: var(--color-primary);
  font-weight: 500;
}

.highlight-green {
  color: var(--color-success);
  font-weight: 600;
}

.highlight-amber {
  color: var(--color-warning);
  font-weight: 600;
}

/* Case studies grid */
.comparison-cases h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-6);
  text-align: center;
}

.case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-4);
}

.case-card {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  transition: box-shadow var(--transition-interactive), transform var(--transition-interactive);
}

.case-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.case-card__company {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}

.case-card__metric {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 800;
  color: var(--color-primary);
}

.case-card__detail {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.5;
}

.case-card__source {
  font-size: var(--text-xs);
  font-style: normal;
}

.case-card__source a {
  color: var(--color-text-faint);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.case-card__source a:hover {
  color: var(--color-primary);
}

/* ---------- BENCHMARKS ---------- */
.benchmarks-section {
  padding: clamp(var(--space-12), 6vw, var(--space-24)) var(--space-4);
  background: var(--color-surface);
}

.benchmarks-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: center;
  margin-bottom: var(--space-8);
}

.benchmark-tab {
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  background: var(--color-surface-offset);
  border: 1px solid var(--color-divider);
  cursor: pointer;
  transition: all var(--transition-interactive);
}

.benchmark-tab:hover {
  color: var(--color-text);
  border-color: var(--color-border);
}

.benchmark-tab.active {
  background: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-primary);
}

.benchmark-content {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  min-height: 200px;
  box-shadow: var(--shadow-md);
}

.benchmark-content h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-4);
  color: var(--color-text);
}

.benchmark-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.benchmark-metric {
  background: var(--color-surface-offset);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  text-align: center;
}

.benchmark-metric__value {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 800;
  color: var(--color-primary);
  font-variant-numeric: tabular-nums;
}

.benchmark-metric__label {
  display: block;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

.benchmark-insight {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
  border-left: 3px solid var(--color-primary);
  padding-left: var(--space-4);
}

.benchmarks__note {
  text-align: center;
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-top: var(--space-6);
  max-width: var(--content-default);
  margin-inline: auto;
}

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

.benchmarks__note a:hover {
  color: var(--color-primary);
}

@media (max-width: 640px) {
  .benchmark-content {
    padding: var(--space-5);
  }
  .benchmark-metrics {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---------- PRICING TABLE ---------- */
.pricing-section {
  padding: clamp(var(--space-12), 6vw, var(--space-24)) var(--space-4);
  background: var(--color-bg);
}

.pricing-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: var(--color-surface-2);
}

.pricing-table {
  font-size: var(--text-sm);
}

.pricing-table thead {
  background: var(--color-primary);
}

.pricing-table th {
  font-weight: 600;
  text-align: left;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #ffffff;
  white-space: nowrap;
}

.pricing-table td {
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--color-divider);
  white-space: nowrap;
}

.pricing-table tbody tr:hover {
  background: var(--color-surface-offset);
}

/* ---------- FAQ ---------- */
.faq-section {
  padding: clamp(var(--space-12), 6vw, var(--space-24)) var(--space-4);
  background: var(--color-surface);
}

.faq-list {
  max-width: var(--content-default);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.faq-item {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow var(--transition-interactive);
}

.faq-item:hover {
  box-shadow: var(--shadow-sm);
}

.faq-item summary {
  padding: var(--space-4) var(--space-5);
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--color-text);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  transition: background var(--transition-interactive);
}

.faq-item summary::-webkit-details-marker { display: none; }

/* Chevron icon instead of plus/minus */
.faq-item summary::after {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--color-primary);
  border-bottom: 2px solid var(--color-primary);
  transform: rotate(45deg);
  flex-shrink: 0;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  margin-right: var(--space-1);
}

.faq-item[open] summary::after {
  transform: rotate(-135deg);
}

.faq-item summary:hover {
  background: var(--color-surface-offset);
}

.faq-answer {
  padding: 0 var(--space-5) var(--space-5);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
  animation: faq-open 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes faq-open {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.faq-answer p {
  margin-bottom: var(--space-3);
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

.faq-answer ul {
  padding-left: var(--space-5);
  margin-bottom: var(--space-3);
}

.faq-answer li {
  margin-bottom: var(--space-1);
}

.faq-answer a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.faq-answer a:hover {
  color: var(--color-primary-hover);
}

.faq-answer strong {
  color: var(--color-text);
}

.faq-answer em {
  font-style: normal;
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

/* ---------- CHANGELOG ---------- */
.changelog-section {
  padding: clamp(var(--space-12), 6vw, var(--space-24)) var(--space-4);
  background: var(--color-bg);
}

.changelog {
  max-width: var(--content-default);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.changelog__entry {
  display: flex;
  gap: var(--space-5);
  padding: var(--space-4);
  background: var(--color-surface-2);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
}

.changelog__entry time {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-primary);
  white-space: nowrap;
  min-width: 140px;
  flex-shrink: 0;
}

.changelog__entry p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

@media (max-width: 640px) {
  .changelog__entry {
    flex-direction: column;
    gap: var(--space-2);
  }
  .changelog__entry time {
    min-width: auto;
  }
}

/* ---------- FOOTER ---------- */
.footer {
  padding: var(--space-12) var(--space-4) calc(var(--space-6) + 90px); /* extra bottom for sticky anchor ad */
  background: var(--color-dark);
  color: #e2e8f0;
  border-top: none;
}

.footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-8);
  max-width: var(--content-wide);
  margin-inline: auto;
  margin-bottom: var(--space-8);
}

.footer__logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-lg);
  color: #ffffff;
  display: block;
  margin-bottom: var(--space-2);
}

.footer__brand p {
  font-size: var(--text-sm);
  color: #94a3b8;
  max-width: 36ch;
}

.footer__links h3,
.footer__sources h3,
.footer__legal h3 {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin-bottom: var(--space-3);
}

.footer__links a,
.footer__sources a,
.footer__legal a {
  display: block;
  font-size: var(--text-sm);
  color: #94a3b8;
  text-decoration: none;
  padding: var(--space-1) 0;
  transition: color var(--transition-interactive);
}

.footer__links a:hover,
.footer__sources a:hover,
.footer__legal a:hover {
  color: #ffffff;
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-6);
  border-top: 1px solid #1e293b;
  gap: var(--space-4);
  flex-wrap: wrap;
  max-width: var(--content-wide);
  margin-inline: auto;
}

.footer__bottom p {
  font-size: var(--text-xs);
  color: #64748b;
}

.footer__bottom a {
  font-size: var(--text-xs);
  color: #64748b;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--transition-interactive);
}

.footer__bottom a:hover {
  color: #ffffff;
}

/* Footer bottom links — inline with pipe separators */
.footer__bottom-links {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.footer__bottom-links a {
  font-size: var(--text-xs);
  color: #64748b;
  text-decoration: none;
  transition: color var(--transition-interactive);
}

.footer__bottom-links a:hover {
  color: #ffffff;
}

.footer__bottom-links span.separator {
  color: #334155;
  font-size: var(--text-xs);
  user-select: none;
}

@media (max-width: 768px) {
  .footer__inner {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
  }
  .footer__bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

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

/* ---------- COOKIE CONSENT BANNER ---------- */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--color-dark);
  color: #e2e8f0;
  padding: var(--space-4) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
  border-top: 1px solid #1e293b;
}

.cookie-banner p {
  font-size: var(--text-sm);
  color: #94a3b8;
  margin: 0;
  flex: 1;
}

.cookie-banner p a {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-banner__actions {
  display: flex;
  gap: var(--space-2);
  flex-shrink: 0;
}

.cookie-banner .btn--sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-xs);
}

.cookie-banner .btn--primary {
  background: var(--color-primary);
  color: #ffffff;
}

.cookie-banner .btn--primary:hover {
  background: var(--color-primary-hover);
}

.cookie-banner .btn--ghost {
  border-color: #475569;
  color: #94a3b8;
}

.cookie-banner .btn--ghost:hover {
  background: #1e293b;
  border-color: #64748b;
  color: #ffffff;
}

.cookie-banner.hidden {
  display: none;
}

@media (max-width: 640px) {
  .cookie-banner {
    flex-direction: column;
    text-align: center;
    padding: var(--space-4);
  }
  .cookie-banner__actions {
    width: 100%;
    justify-content: center;
  }
}

/* ---------- LEGAL PAGES ---------- */
.legal-page {
  max-width: 768px;
  margin-inline: auto;
  padding: var(--space-12) var(--space-4) var(--space-24);
}

.legal-page h1 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: var(--space-2);
  letter-spacing: -0.02em;
}

.legal-page .legal-date {
  font-size: var(--text-sm);
  color: var(--color-text-faint);
  margin-bottom: var(--space-8);
  display: block;
}

.legal-page h2 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
}

.legal-page h3 {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
  margin-top: var(--space-6);
  margin-bottom: var(--space-2);
}

.legal-page p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.8;
  margin-bottom: var(--space-4);
}

.legal-page ul,
.legal-page ol {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.8;
  padding-left: var(--space-6);
  margin-bottom: var(--space-4);
}

.legal-page li {
  margin-bottom: var(--space-2);
}

.legal-page a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-page a:hover {
  color: var(--color-primary-hover);
}

.legal-page strong {
  color: var(--color-text);
  font-weight: 600;
}

.legal-page__back {
  margin-bottom: var(--space-6);
}

.legal-page__back a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-primary);
  text-decoration: none;
}

.legal-page__back a:hover {
  text-decoration: underline;
}

.legal-page__cross-links {
  margin-top: var(--space-12);
  padding-top: var(--space-8);
  border-top: 1px solid var(--color-divider);
}

.legal-page__cross-links h2 {
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-faint);
  margin-top: 0;
  margin-bottom: var(--space-3);
}

.legal-page__cross-links ul {
  list-style: none;
  padding-left: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-6);
}

.legal-page__cross-links li {
  margin-bottom: 0;
}

.legal-page__cross-links a {
  font-size: var(--text-sm);
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
}

.legal-page__cross-links a:hover {
  text-decoration: underline;
}

.legal-page .legal-updated {
  font-size: var(--text-sm);
  color: var(--color-text-faint);
  margin-bottom: var(--space-8);
}

/* ---------- CONTACT FORM ---------- */
.contact-form {
  max-width: var(--content-narrow);
  margin-inline: auto;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.form-group label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-2);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  transition: border-color var(--transition-interactive), box-shadow var(--transition-interactive);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(1, 105, 111, 0.12);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--color-text-faint);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

.contact-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}

.contact-card {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  transition: box-shadow var(--transition-interactive);
}

.contact-card:hover {
  box-shadow: var(--shadow-md);
}

.contact-card__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary-highlight);
  color: var(--color-primary);
  border-radius: var(--radius-md);
}

.contact-card__icon svg {
  width: 20px;
  height: 20px;
}

.contact-card__text h3 {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-1);
}

.contact-card__text p,
.contact-card__text a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.contact-card__text a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.contact-card__text a:hover {
  color: var(--color-primary);
}

/* ---------- SCROLL REVEAL ANIMATION ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .faq-answer {
    animation: none;
  }
}
