/* ============================================================
   TAVEN v2.0 — Route A: Precision
   "Bloomberg meets Stripe for healthcare"
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Instrument+Sans:wght@400;500;600;700&family=Inter:wght@400;500&family=DM+Mono:wght@400;500&display=swap');

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

:root {
  /* Brand */
  --depth: #08112A;
  --signal: #00DFC8;
  --signal-dim: #00B5A3;
  --signal-text: #007A70;
  --clarity: #16C784;
  --clarity-text: #0D7A4A;
  --cloud: #F7F9FC;
  --ink: #374151;
  --muted: #94A3B8;

  /* Semantic */
  --success: #16C784; --success-bg: #ECFDF5; --success-text: #0D7A4A;
  --warning: #F59E0B; --warning-bg: #FFFBEB; --warning-text: #92400E;
  --error: #EF4444; --error-bg: #FEF2F2; --error-text: #991B1B;
  --info: #3B82F6; --info-bg: #EFF6FF; --info-text: #1E40AF;

  /* Light mode */
  --bg-page: #F7F9FC;
  --bg-surface: #FFFFFF;
  --bg-alt: #F0F4F8;
  --text-primary: #08112A;
  --text-secondary: #374151;
  --text-tertiary: #6B7280;
  --border: #E2E8F0;
  --focus-ring: #00DFC8;

  /* Fonts */
  --font-display: 'Instrument Sans', 'Neue Haas Grotesk', Arial, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-data: 'DM Mono', 'JetBrains Mono', monospace;

  /* Space (4px base) */
  --space-1:4px; --space-2:8px; --space-3:12px; --space-4:16px;
  --space-5:20px; --space-6:24px; --space-8:32px; --space-10:40px;
  --space-12:48px; --space-16:64px; --space-20:80px; --space-24:96px;

  /* Radius */
  --radius-sm:6px; --radius-md:8px; --radius-lg:12px; --radius-xl:16px; --radius-full:9999px;

  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(8,17,42,0.08);
  --shadow-md: 0 4px 12px rgba(8,17,42,0.10), 0 2px 4px rgba(8,17,42,0.06);
  --shadow-lg: 0 12px 32px rgba(8,17,42,0.12), 0 4px 8px rgba(8,17,42,0.08);
  --shadow-card: 0 4px 12px rgba(8,17,42,0.10);
  --shadow-card-hover: 0 8px 24px rgba(8,17,42,0.15);
  --shadow-cta: 0 4px 16px rgba(0,223,200,0.28);
  --shadow-glow: 0 0 20px rgba(0,223,200,0.20);

  /* Motion */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 150ms;
  --duration-normal: 200ms;

  --container: 1200px;
}

html { font-size: 16px; scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { font-family: var(--font-body); color: var(--text-secondary); background: var(--bg-page); line-height: 1.56; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--space-6); }
a { color: var(--signal-text); text-decoration: none; transition: color var(--duration-fast) var(--ease); }
a:hover { color: var(--signal-dim); }
img { max-width: 100%; display: block; }

/* Typography */
h1,h2,h3,h4,h5 { font-family: var(--font-display); color: var(--text-primary); line-height: 1.15; }
h1 { font-size: 52px; font-weight: 700; letter-spacing: -0.03em; }
h2 { font-size: 38px; font-weight: 600; letter-spacing: -0.02em; }
h3 { font-size: 28px; font-weight: 600; letter-spacing: -0.01em; }
h4 { font-size: 22px; font-weight: 600; }
h5 { font-size: 18px; font-weight: 500; }
.mono, .data { font-family: var(--font-data); font-weight: 500; font-variant-numeric: tabular-nums; }
.caption { font-size: 12px; line-height: 18px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; }

/* ── NAV ── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: 64px; background: rgba(255,255,255,0.92);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--duration-normal) var(--ease);
}
.nav.scrolled { box-shadow: var(--shadow-sm); }
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; max-width: var(--container); margin: 0 auto; padding: 0 var(--space-6);
}

/* Logo wordmark — "Taven" with teal dot in 'a' */
.nav-brand { display: inline-flex; align-items: center; user-select: none; }
.nav-brand:hover { color: var(--text-primary); }
.nav-wordmark {
  font-family: var(--font-display); font-weight: 700; font-size: 26px;
  letter-spacing: -0.03em; color: var(--text-primary);
}
.nav-a { position: relative; }
.nav-a::after {
  content: ''; position: absolute; width: 5px; height: 5px;
  background: var(--signal); border-radius: 50%;
  top: 50%; left: 50%; transform: translate(-50%, -15%);
}

.nav-links { display: flex; align-items: center; gap: 32px; list-style: none; }
.nav-links a {
  font-family: var(--font-body); font-size: 14px; font-weight: 500;
  color: var(--text-secondary); transition: color var(--duration-fast);
}
.nav-links a:hover { color: var(--text-primary); text-decoration: underline; }
.nav-links a.active { color: var(--text-primary); font-weight: 600; }

.nav-right { display: flex; align-items: center; gap: 16px; }
.nav-mobile-btn {
  display: none; background: none; border: none; cursor: pointer;
  padding: 8px; color: var(--text-primary);
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-weight: 600; font-size: 16px;
  border: none; border-radius: var(--radius-md); cursor: pointer;
  transition: all var(--duration-fast) var(--ease); text-decoration: none;
}
.btn-primary {
  padding: 12px 24px; background: var(--depth); color: var(--cloud);
}
.btn-primary:hover { background: #162847; transform: translateY(-1px); box-shadow: var(--shadow-md); color: var(--cloud); }
.btn-secondary {
  padding: 12px 24px; background: transparent; color: var(--text-primary);
  border: 1.5px solid var(--depth);
}
.btn-secondary:hover { background: rgba(8,17,42,0.06); color: var(--text-primary); }
.btn-ghost {
  padding: 8px 16px; font-size: 14px; background: transparent;
  color: var(--signal-text);
}
.btn-ghost:hover { text-decoration: underline; }
.btn-signal {
  padding: 12px 24px; background: var(--signal); color: var(--depth);
  box-shadow: var(--shadow-cta);
}
.btn-signal:hover { background: #00F5DC; color: var(--depth); }
.btn-sm { padding: 8px 16px; font-size: 14px; }
.btn-lg { padding: 16px 32px; font-size: 18px; }

/* ── CARDS ── */
.card {
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-card);
  padding: var(--space-6); transition: all var(--duration-normal) var(--ease);
}
.card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-2px); }

/* ── BADGES ── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--font-body); font-size: 12px; font-weight: 500;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 3px 10px; border-radius: var(--radius-full);
}
.badge-signal { background: var(--signal); color: var(--depth); }
.badge-success { background: #DCFCE7; color: #14532D; }
.badge-savings { background: var(--clarity); color: #fff; font-family: var(--font-data); }

/* ── INPUTS ── */
input, select, textarea {
  font-family: var(--font-body); font-size: 16px; color: var(--text-primary);
  background: var(--bg-alt); border: 1.5px solid var(--border);
  border-radius: var(--radius-md); padding: 12px 16px;
  transition: all var(--duration-fast) var(--ease); width: 100%; height: 44px;
}
input:focus, select:focus {
  outline: none; border-color: var(--focus-ring);
  box-shadow: 0 0 0 3px rgba(0,223,200,0.15);
}
input::placeholder { color: var(--text-tertiary); }

/* ── ALERTS ── */
.alert {
  padding: 12px 16px; border-radius: var(--radius-md);
  border-left: 3px solid; display: flex; align-items: flex-start; gap: 12px; font-size: 14px;
}
.alert-success { background: var(--success-bg); border-color: var(--success); color: var(--success-text); }
.alert-warning { background: var(--warning-bg); border-color: var(--warning); color: var(--warning-text); }
.alert-error { background: var(--error-bg); border-color: var(--error); color: var(--error-text); }
.alert-info { background: var(--info-bg); border-color: var(--info); color: var(--info-text); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding: 140px 0 80px; background: var(--bg-page); position: relative;
}
.hero-inner {
  display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center;
}
.hero-text h1 {
  font-size: 56px; line-height: 64px; letter-spacing: -0.04em; margin-bottom: 16px;
}
.hero-text .tagline {
  font-size: 18px; line-height: 28px; color: var(--text-tertiary);
  margin-bottom: 32px; max-width: 480px;
}
.hero-actions { display: flex; gap: 16px; align-items: center; margin-bottom: 32px; }

/* Search bar */
.hero-search-wrap { position: relative; max-width: 520px; }
.hero-search-input {
  width: 100%; padding: 14px 100px 14px 44px; font-size: 16px;
  background: #fff; border: 1.5px solid var(--border); border-radius: var(--radius-md);
  height: 48px;
}
.hero-search-input:focus {
  border-color: var(--signal); box-shadow: 0 0 0 3px rgba(0,223,200,0.15);
}
.hero-search-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--muted); pointer-events: none;
}
.hero-search-btn {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  padding: 6px 16px; background: var(--depth); color: var(--cloud);
  border: none; border-radius: 6px; font-family: var(--font-display);
  font-weight: 600; font-size: 14px; cursor: pointer; height: 36px;
}
.hero-search-btn:hover { background: #162847; }
#hero-suggestions {
  display: none; position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg); max-height: 400px; overflow-y: auto; z-index: 50;
}
.suggestion-group {
  padding: 8px 16px; font-size: 11px; color: var(--text-tertiary);
  text-transform: uppercase; font-weight: 600; letter-spacing: 0.05em;
  border-bottom: 1px solid var(--bg-alt);
}
.suggestion-item {
  padding: 10px 16px; cursor: pointer; display: flex; align-items: center;
  gap: 10px; border-bottom: 1px solid var(--bg-alt); transition: background var(--duration-fast);
}
.suggestion-item:hover { background: var(--bg-page); }
.suggestion-name { font-weight: 600; color: var(--text-primary); font-size: 14px; }
.suggestion-meta { font-size: 12px; color: var(--text-tertiary); margin-top: 1px; }
.hero-hint { font-size: 13px; color: var(--text-tertiary); margin-top: 8px; }

/* Cost bracket in hero */
.cost-bracket {
  display: flex; align-items: center; gap: 4px;
  padding: 12px 16px; background: var(--depth); border-radius: var(--radius-md);
  margin-top: 16px; max-width: 520px;
}
.cost-bracket .br { color: var(--signal); font-family: var(--font-data); font-size: 20px; font-weight: 500; }
.cost-bracket .spread {
  flex: 1; height: 3px; border-radius: 2px; margin: 0 4px;
  background: linear-gradient(90deg, var(--signal), var(--signal-dim));
}
.cost-bracket .amount { font-family: var(--font-data); font-size: 14px; color: var(--cloud); font-weight: 500; }

/* Hero comparison card */
.hero-card {
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-xl); box-shadow: 0 20px 60px rgba(8,17,42,0.08);
  overflow: hidden;
}
.hero-card-header {
  padding: 16px 24px; background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.hero-card-header h3 {
  font-family: var(--font-body); font-size: 12px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-tertiary);
}
.hero-card-body { padding: 0 24px; }
.comparison-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0; border-bottom: 1px solid var(--bg-alt);
}
.comparison-row:last-child { border-bottom: none; }
.comparison-row.best {
  border-left: 3px solid var(--signal); padding-left: 14px; margin-left: -14px;
  background: rgba(0,223,200,0.04); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.provider-name { font-family: var(--font-display); font-weight: 600; color: var(--text-primary); font-size: 15px; }
.provider-meta { font-size: 13px; color: var(--text-tertiary); margin-top: 2px; }
.price { font-family: var(--font-data); font-size: 18px; font-weight: 500; color: var(--text-primary); }
.price.best { color: var(--clarity-text); }
.savings-label { font-size: 12px; font-weight: 500; color: var(--clarity-text); text-align: right; margin-top: 2px; }

/* ── TRUST BAR ── */
.trust-bar { padding: 16px 0; background: var(--bg-surface); border-bottom: 1px solid var(--border); }
.trust-bar-inner {
  display: flex; align-items: center; justify-content: center;
  gap: 40px; flex-wrap: wrap; max-width: var(--container); margin: 0 auto; padding: 0 var(--space-6);
}
.trust-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 500; color: var(--text-tertiary);
}
.trust-item svg { color: var(--signal-text); flex-shrink: 0; width: 18px; height: 18px; }

/* ── SECTIONS ── */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-surface); }
.section-header { text-align: center; max-width: 600px; margin: 0 auto 56px; }
.section-label {
  font-family: var(--font-body); font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--signal-text); margin-bottom: 12px;
}
.section-header h2 { margin-bottom: 16px; }
.section-header p { font-size: 18px; line-height: 28px; color: var(--text-tertiary); }

/* Feature grid */
.feature-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: var(--space-6); }
.feature-card {
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px;
  transition: all var(--duration-normal) var(--ease);
}
.feature-card:hover { border-color: var(--signal); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.feature-icon {
  width: 44px; height: 44px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; margin-bottom: 20px;
}
.feature-icon.teal { background: rgba(0,223,200,0.08); color: var(--signal-text); }
.feature-icon.blue { background: var(--info-bg); color: var(--info-text); }
.feature-icon.green { background: var(--success-bg); color: var(--success-text); }
.feature-card h4 { font-size: 17px; margin-bottom: 6px; }
.feature-card p { font-size: 15px; color: var(--text-tertiary); line-height: 1.6; }

/* Split layout */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; }
.split.reverse { direction: rtl; } .split.reverse > * { direction: ltr; }
.split-text h2 { margin-bottom: 16px; }
.split-text p { font-size: 17px; color: var(--text-tertiary); line-height: 1.7; margin-bottom: 24px; }
.checklist { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.checklist li { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; color: var(--text-secondary); }
.checklist li svg { color: var(--signal); margin-top: 3px; flex-shrink: 0; }

/* Product preview cards */
.product-card {
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-xl); overflow: hidden; box-shadow: var(--shadow-lg);
}
.product-card-bar {
  padding: 12px 18px; background: var(--bg-alt); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 6px;
}
.product-card-bar .dot { width: 10px; height: 10px; border-radius: 50%; }
.product-card-bar .dot.r { background: #fecaca; } .product-card-bar .dot.y { background: #fde68a; } .product-card-bar .dot.g { background: #bbf7d0; }
.product-card-body { padding: 20px; }

/* Stats row */
.stats-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 24px; }
.stat-number { font-family: var(--font-data); font-size: 48px; font-weight: 500; letter-spacing: -0.02em; color: var(--text-primary); text-align: center; }
.stat-label { font-size: 14px; color: var(--text-tertiary); text-align: center; margin-top: 4px; }

/* ── CTA SECTION ── */
.cta-section { padding: 96px 0; background: var(--depth); text-align: center; }
.cta-section h2 { color: var(--cloud); margin-bottom: 16px; }
.cta-section p { font-size: 18px; color: var(--muted); margin-bottom: 32px; max-width: 480px; margin-left: auto; margin-right: auto; }

/* ── FOOTER ── */
.footer { padding: 56px 0 36px; background: #050c1e; color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 40px; }
.footer-brand {
  font-family: var(--font-display); font-size: 18px; font-weight: 700;
  color: var(--cloud); letter-spacing: -0.03em; text-transform: uppercase; margin-bottom: 12px;
}
.footer-desc { font-size: 14px; line-height: 1.6; color: #64748b; max-width: 280px; }
.footer h4 {
  font-family: var(--font-body); font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em; color: #cbd5e1; margin-bottom: 14px;
}
.footer ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer ul a { font-size: 14px; color: #64748b; } .footer ul a:hover { color: #fff; }
.footer-bottom {
  padding-top: 20px; border-top: 1px solid #1e293b;
  display: flex; justify-content: space-between; font-size: 13px; color: #475569;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  h1 { font-size: 44px; }
  h2 { font-size: 32px; }
  .hero-text h1 { font-size: 44px; line-height: 52px; }
  .hero-inner, .split { gap: 48px; }
  .stats-row { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 768px) {
  .nav-links, .nav-right { display: none; }
  .nav-mobile-btn { display: block; }
  .nav-links.show {
    display: flex; flex-direction: column; position: fixed;
    top: 64px; left: 0; right: 0; background: #fff; padding: 24px;
    gap: 20px; border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg); z-index: 200;
  }

  .hero { padding: 80px 0 48px; }
  .hero-inner { grid-template-columns: 1fr; gap: 32px; }
  .hero-text { order: -1; }
  .hero-text h1 { font-size: 32px; line-height: 40px; }
  .hero-text .tagline { font-size: 16px; margin-bottom: 24px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-preview { display: none; }

  .section { padding: 64px 0; }
  h2 { font-size: 26px; }
  .split, .split.reverse { grid-template-columns: 1fr; gap: 32px; direction: ltr; }
  .feature-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: repeat(2,1fr); gap: 16px; }
  .stat-number { font-size: 36px; }
  .trust-bar-inner { gap: 16px; justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .cta-section h2 { font-size: 26px; }
}

@media (max-width: 480px) {
  .hero-text h1 { font-size: 28px; line-height: 34px; }
  .footer-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: 1fr 1fr; }
}
