/**
 * NADIR Algorithm Tier Design System
 * Shared styles for tier pricing hub + Pulse / Meridian / Apex deliverable pages.
 * Version: 2026-06-10
 */

/* ─── Design tokens ───────────────────────────────────────────────────────── */
:root {
  --charcoal-1000: #060708;
  --charcoal-950: #0a0b0d;
  --charcoal-900: #0f1115;
  --charcoal-800: #181c23;
  --charcoal-750: #1e232b;
  --charcoal-700: #252b34;
  --charcoal-600: #2f3641;
  --gray-500: #7a8494;
  --gray-400: #9aa3b0;
  --gray-300: #bcc3cd;
  --magma-500: #e85a24;
  --magma-400: #f97316;
  --magma-glow: rgba(249, 115, 22, 0.35);
  --apex: #a78bfa;
  --apex-dim: rgba(167, 139, 250, 0.15);
  --apex-glow: rgba(167, 139, 250, 0.35);
  --meridian: #38bdf8;
  --meridian-dim: rgba(56, 189, 248, 0.15);
  --meridian-glow: rgba(56, 189, 248, 0.35);
  --pulse: #34d399;
  --pulse-dim: rgba(52, 211, 153, 0.12);
  --pulse-glow: rgba(52, 211, 153, 0.35);
  --echo: #fbbf24;
  --echo-dim: rgba(251, 191, 36, 0.12);
  --critical: #f87171;
  --caution: #fbbf24;
  --nominal: #4ade80;
  --bg: var(--charcoal-950);
  --text: #f2f4f7;
  --text2: var(--gray-300);
  --text3: var(--gray-500);
  --border: rgba(255, 255, 255, 0.08);
  --border-accent: rgba(249, 115, 22, 0.3);
  --font: "Manrope", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --shadow-tier: 0 32px 100px rgba(0, 0, 0, 0.55);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --tier-accent: var(--meridian);
  --tier-dim: var(--meridian-dim);
  --tier-glow: var(--meridian-glow);
}

[data-tier="pulse"] {
  --tier-accent: var(--pulse);
  --tier-dim: var(--pulse-dim);
  --tier-glow: var(--pulse-glow);
}

[data-tier="meridian"] {
  --tier-accent: var(--meridian);
  --tier-dim: var(--meridian-dim);
  --tier-glow: var(--meridian-glow);
}

[data-tier="apex"] {
  --tier-accent: var(--apex);
  --tier-dim: var(--apex-dim);
  --tier-glow: var(--apex-glow);
}

/* ─── Reset & base ───────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body.tier-page {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.tier-page ::selection {
  background: color-mix(in srgb, var(--tier-accent) 35%, transparent);
  color: var(--text);
}

/* ─── Atmospheric backgrounds ────────────────────────────────────────────── */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black, transparent);
}

.bg-glow {
  position: fixed;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 600px;
  z-index: -2;
  pointer-events: none;
  background: radial-gradient(ellipse, rgba(249, 115, 22, 0.08) 0%, transparent 70%);
}

.bg-tier-orb {
  position: fixed;
  width: 640px;
  height: 640px;
  border-radius: 50%;
  z-index: -2;
  pointer-events: none;
  filter: blur(80px);
  opacity: 0.35;
  background: radial-gradient(circle, var(--tier-glow) 0%, transparent 70%);
  top: -120px;
  right: -180px;
  animation: tier-orb-drift 18s var(--ease-out) infinite alternate;
}

.bg-tier-orb--secondary {
  width: 480px;
  height: 480px;
  top: auto;
  bottom: -80px;
  left: -120px;
  right: auto;
  opacity: 0.22;
  animation-duration: 24s;
  animation-direction: alternate-reverse;
}

@keyframes tier-orb-drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(-40px, 30px) scale(1.08); }
}

.bg-scanline {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.04;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(255, 255, 255, 0.03) 2px,
    rgba(255, 255, 255, 0.03) 4px
  );
}

/* ─── Layout ─────────────────────────────────────────────────────────────── */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-wide {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 72px 0;
  position: relative;
}

.section-soft {
  background: rgba(255, 255, 255, 0.015);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-tier-accent {
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--tier-dim) 80%, transparent) 0%,
    transparent 100%
  );
  border-top: 1px solid color-mix(in srgb, var(--tier-accent) 20%, var(--border));
}

.section-divider {
  height: 1px;
  background: var(--border);
  margin: 0;
}

/* ─── Header & navigation ────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 11, 13, 0.88);
  backdrop-filter: blur(16px);
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: 1280px;
  margin: 0 auto;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.06em;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #8f2d8a, #ff7a00);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
}

.site-nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.nav-link {
  color: var(--text3);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: color 0.15s;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--tier-accent);
}

.tier-nav-strip {
  display: flex;
  gap: 6px;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.tier-nav-strip a {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  color: var(--text3);
  transition: all 0.15s var(--ease-out);
}

.tier-nav-strip a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.tier-nav-strip a.is-active {
  color: var(--tier-accent);
  background: var(--tier-dim);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tier-accent) 30%, transparent);
}

.tier-nav-strip a[data-tier-link="pulse"].is-active { color: var(--pulse); background: var(--pulse-dim); }
.tier-nav-strip a[data-tier-link="meridian"].is-active { color: var(--meridian); background: var(--meridian-dim); }
.tier-nav-strip a[data-tier-link="apex"].is-active { color: var(--apex); background: var(--apex-dim); }

/* ─── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s var(--ease-out);
  font-family: var(--font);
}

.btn-primary {
  background: linear-gradient(135deg, var(--magma-500), var(--magma-400));
  color: #fff;
  box-shadow: 0 4px 20px var(--magma-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 28px var(--magma-glow);
}

.btn-tier {
  background: linear-gradient(135deg, color-mix(in srgb, var(--tier-accent) 90%, #000), var(--tier-accent));
  color: #0a0b0d;
  box-shadow: 0 4px 24px var(--tier-glow);
}

.btn-tier:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.btn-ghost {
  background: transparent;
  color: var(--text2);
  border-color: var(--border);
}

.btn-ghost:hover {
  border-color: color-mix(in srgb, var(--tier-accent) 40%, var(--border));
  color: var(--text);
}

.btn-sm {
  padding: 7px 14px;
  font-size: 12px;
}

/* ─── Typography ─────────────────────────────────────────────────────────── */
.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tier-accent);
  margin-bottom: 10px;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.gradient-text {
  background: linear-gradient(
    115deg,
    #f3f5f7 0%,
    #ffe8c8 30%,
    #ffb14a 50%,
    #ff6d2e 75%,
    #db4722 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tier-gradient-text {
  background: linear-gradient(135deg, var(--text) 0%, var(--tier-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.lead {
  color: var(--text2);
  font-size: 17px;
  max-width: 62ch;
  line-height: 1.65;
}

/* ─── Hero ───────────────────────────────────────────────────────────────── */
.hero {
  padding: 80px 0 64px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: start;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.badge {
  font-size: 11px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text2);
  background: rgba(255, 255, 255, 0.03);
}

.badge-accent {
  border-color: color-mix(in srgb, var(--tier-accent) 40%, var(--border));
  color: var(--tier-accent);
  background: var(--tier-dim);
}

.badge-tier {
  border-color: color-mix(in srgb, var(--tier-accent) 35%, transparent);
  color: var(--tier-accent);
  background: var(--tier-dim);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.hero-card {
  background: var(--charcoal-800);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.hero-card--tier {
  border-color: color-mix(in srgb, var(--tier-accent) 25%, var(--border));
  box-shadow: var(--shadow-tier), 0 0 60px color-mix(in srgb, var(--tier-glow) 50%, transparent);
}

.hero-stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 20px;
}

.hero-stat {
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.hero-stat strong {
  display: block;
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 700;
  color: var(--tier-accent);
}

.hero-stat span {
  font-size: 11px;
  color: var(--text3);
}

/* ─── Tier pills & cards ─────────────────────────────────────────────────── */
.tier-pills {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

.tier-pill {
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s var(--ease-out), border-color 0.15s;
}

.tier-pill:hover {
  transform: translateY(-2px);
}

.tier-pill strong {
  display: block;
  font-size: 15px;
  margin-bottom: 2px;
}

.tier-pill span {
  font-size: 11px;
  color: var(--text3);
}

.tier-pill.apex { border-color: rgba(167, 139, 250, 0.35); background: var(--apex-dim); }
.tier-pill.apex strong { color: var(--apex); }
.tier-pill.meridian { border-color: rgba(56, 189, 248, 0.35); background: var(--meridian-dim); }
.tier-pill.meridian strong { color: var(--meridian); }
.tier-pill.pulse { border-color: rgba(52, 211, 153, 0.35); background: var(--pulse-dim); }
.tier-pill.pulse strong { color: var(--pulse); }
.tier-pill.echo { border-color: rgba(251, 191, 36, 0.35); background: var(--echo-dim); }
.tier-pill.echo strong { color: var(--echo); }

/* ─── Philosophy cards ───────────────────────────────────────────────────── */
.philosophy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 32px;
}

.phil-card {
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--charcoal-800);
  transition: border-color 0.2s, transform 0.2s var(--ease-out);
}

.phil-card:hover {
  border-color: color-mix(in srgb, var(--tier-accent) 25%, var(--border));
  transform: translateY(-2px);
}

.phil-card .icon {
  font-size: 24px;
  margin-bottom: 12px;
}

/* ─── Tier detail blocks ───────────────────────────────────────────────────── */
.tier-detail-grid {
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin-top: 40px;
}

.tier-detail {
  border-radius: 20px;
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--charcoal-800);
}

.tier-detail-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 28px 32px;
  border-bottom: 1px solid var(--border);
}

.tier-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 800;
}

.tier-detail.apex .tier-icon,
.tier-icon.apex {
  background: var(--apex-dim);
  color: var(--apex);
  border: 1px solid rgba(167, 139, 250, 0.3);
}

.tier-detail.meridian .tier-icon,
.tier-icon.meridian {
  background: var(--meridian-dim);
  color: var(--meridian);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.tier-detail.pulse .tier-icon,
.tier-icon.pulse {
  background: var(--pulse-dim);
  color: var(--pulse);
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.tier-detail.echo .tier-icon,
.tier-icon.echo {
  background: var(--echo-dim);
  color: var(--echo);
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.tier-tagline {
  color: var(--text2);
  font-size: 14px;
  margin-top: 4px;
}

.tier-badge-right {
  text-align: right;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text3);
}

.tier-badge-right strong {
  display: block;
  font-size: 22px;
  color: var(--text);
  font-weight: 700;
}

.tier-detail-body {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
}

.tier-col {
  padding: 28px 32px;
  border-right: 1px solid var(--border);
}

.tier-col:last-child {
  border-right: none;
}

.tier-col h4 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 14px;
}

.tier-col ul {
  list-style: none;
}

.tier-col li {
  font-size: 13px;
  color: var(--text2);
  padding: 6px 0 6px 20px;
  position: relative;
  line-height: 1.5;
}

.tier-col li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.tier-col.supports li::before { background: var(--nominal); }
.tier-col.not-supports li::before { background: var(--critical); opacity: 0.7; }
.tier-col.serves li::before { background: var(--tier-accent); }

.math-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.math-tag {
  font-family: var(--mono);
  font-size: 10px;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text3);
}

.tier-detail.apex .math-tag,
[data-tier="apex"] .math-tag {
  border-color: rgba(167, 139, 250, 0.25);
  color: #c4b5fd;
}

.tier-detail.meridian .math-tag,
[data-tier="meridian"] .math-tag {
  border-color: rgba(56, 189, 248, 0.25);
  color: #7dd3fc;
}

.tier-detail.pulse .math-tag,
[data-tier="pulse"] .math-tag {
  border-color: rgba(52, 211, 153, 0.25);
  color: #6ee7b7;
}

/* ─── Comparison table ─────────────────────────────────────────────────────── */
.compare-wrap {
  overflow-x: auto;
  margin-top: 32px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

table.compare {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 800px;
}

table.compare th,
table.compare td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

table.compare th {
  background: var(--charcoal-750);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text3);
}

table.compare th.t-apex { color: var(--apex); }
table.compare th.t-meridian { color: var(--meridian); }
table.compare th.t-pulse { color: var(--pulse); }
table.compare th.t-echo { color: var(--echo); }
table.compare td:first-child {
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

table.compare tr:last-child td { border-bottom: none; }
table.compare tr:hover td { background: rgba(255, 255, 255, 0.02); }

.check { color: var(--nominal); font-weight: 700; }
.partial { color: var(--caution); font-weight: 600; font-size: 12px; }
.no { color: var(--text3); }

/* ─── Pricing ──────────────────────────────────────────────────────────────── */
.pricing-anchor { scroll-margin-top: 80px; }

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 36px;
}

.price-card {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 28px 24px;
  background: var(--charcoal-800);
  display: flex;
  flex-direction: column;
}

.price-card.featured {
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.12), 0 20px 60px rgba(0, 0, 0, 0.3);
  position: relative;
}

.price-card.featured::before {
  content: "Production default";
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--meridian);
  color: #0a0b0d;
  padding: 4px 12px;
  border-radius: 999px;
}

.price-tier-name {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.price-card.apex .price-tier-name { color: var(--apex); }
.price-card.meridian .price-tier-name { color: var(--meridian); }
.price-card.pulse .price-tier-name { color: var(--pulse); }
.price-card.echo .price-tier-name { color: var(--echo); }

.price-amount {
  font-family: var(--mono);
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}

.price-unit {
  font-size: 13px;
  color: var(--text3);
  margin: 6px 0 16px;
}

.price-includes {
  list-style: none;
  flex: 1;
}

.price-includes li {
  font-size: 12px;
  color: var(--text2);
  padding: 5px 0 5px 18px;
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.price-includes li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--nominal);
  font-size: 11px;
}

.price-min {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text3);
}

/* ─── API panels ───────────────────────────────────────────────────────────── */
.addon-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 36px;
}

.addon-panel {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--charcoal-800);
  overflow: hidden;
}

.addon-panel-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.addon-panel-body { padding: 0; }

.addon-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.addon-row:last-child { border-bottom: none; }
.addon-row .label { color: var(--text2); }
.addon-row .label strong {
  display: block;
  color: var(--text);
  font-size: 14px;
  margin-bottom: 2px;
}

.addon-row .price {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  color: var(--magma-400);
}

.addon-row .price small {
  font-size: 11px;
  color: var(--text3);
  font-weight: 400;
}

/* ─── Scope badges & API endpoint cards ────────────────────────────────────── */
.scope-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.scope-card {
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.15s;
}

.scope-card:hover {
  border-color: color-mix(in srgb, var(--tier-accent) 30%, var(--border));
}

.scope-card code {
  display: block;
  font-size: 12px;
  color: var(--tier-accent);
  margin-bottom: 6px;
}

.scope-card p {
  font-size: 12px;
  color: var(--text3);
  line-height: 1.5;
}

.endpoint-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

.endpoint-row {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--charcoal-800);
  font-size: 13px;
}

.endpoint-method {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  text-align: center;
}

.endpoint-method.get { background: rgba(52, 211, 153, 0.15); color: var(--pulse); }
.endpoint-method.post { background: rgba(56, 189, 248, 0.15); color: var(--meridian); }
.endpoint-method.ws { background: rgba(167, 139, 250, 0.15); color: var(--apex); }

.endpoint-path {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text2);
}

.endpoint-latency {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text3);
}

/* ─── Fleet packages ───────────────────────────────────────────────────────── */
.fleet-packages {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 36px;
}

.fleet-pkg {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 28px;
  background: var(--charcoal-800);
}

.fleet-pkg h3 { margin-bottom: 4px; }

.fleet-pkg .pkg-price {
  font-family: var(--mono);
  font-size: 28px;
  font-weight: 700;
  margin: 12px 0;
}

.fleet-pkg p {
  font-size: 13px;
  color: var(--text2);
  margin-bottom: 16px;
}

.fleet-pkg ul { list-style: none; }

.fleet-pkg li {
  font-size: 12px;
  color: var(--text2);
  padding: 4px 0 4px 16px;
  position: relative;
}

.fleet-pkg li::before {
  content: "·";
  position: absolute;
  left: 4px;
  color: var(--tier-accent);
}

/* ─── Upsell flow ──────────────────────────────────────────────────────────── */
.upsell-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 32px;
  padding: 28px;
  border-radius: var(--radius);
  border: 1px dashed var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.upsell-node {
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--border);
  text-decoration: none;
}

.upsell-node.pulse { color: var(--pulse); border-color: rgba(52, 211, 153, 0.3); background: var(--pulse-dim); }
.upsell-node.meridian { color: var(--meridian); border-color: rgba(56, 189, 248, 0.3); background: var(--meridian-dim); }
.upsell-node.apex { color: var(--apex); border-color: rgba(167, 139, 250, 0.3); background: var(--apex-dim); }
.upsell-arrow { color: var(--text3); font-size: 18px; }

/* ─── Metric rings & latency gauges ────────────────────────────────────────── */
.metric-ring-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 28px;
}

.metric-ring {
  text-align: center;
  padding: 20px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--charcoal-800);
}

.metric-ring svg {
  width: 88px;
  height: 88px;
  margin: 0 auto 10px;
  display: block;
}

.metric-ring .ring-value {
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 700;
  color: var(--tier-accent);
}

.metric-ring .ring-label {
  font-size: 11px;
  color: var(--text3);
  margin-top: 4px;
}

.latency-bar-wrap {
  margin-top: 20px;
}

.latency-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text3);
  margin-bottom: 6px;
}

.latency-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.latency-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--tier-accent), color-mix(in srgb, var(--tier-accent) 60%, #fff));
  transition: width 1.2s var(--ease-out);
}

/* ─── Buyer persona cards ──────────────────────────────────────────────────── */
.persona-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 32px;
}

.persona-card {
  padding: 28px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--charcoal-800);
  position: relative;
  overflow: hidden;
}

.persona-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--tier-accent), transparent);
}

.persona-role {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tier-accent);
  margin-bottom: 8px;
}

.persona-quote {
  font-size: 15px;
  font-style: italic;
  color: var(--text2);
  margin: 12px 0;
  padding-left: 16px;
  border-left: 2px solid color-mix(in srgb, var(--tier-accent) 40%, transparent);
}

/* ─── Integration timeline ───────────────────────────────────────────────── */
.timeline {
  position: relative;
  margin-top: 36px;
  padding-left: 28px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--tier-accent), transparent);
}

.timeline-step {
  position: relative;
  padding: 0 0 32px 24px;
}

.timeline-step::before {
  content: "";
  position: absolute;
  left: -24px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--tier-accent);
  box-shadow: 0 0 12px var(--tier-glow);
}

.timeline-step h4 {
  font-size: 14px;
  margin-bottom: 6px;
}

.timeline-step p {
  font-size: 13px;
  color: var(--text2);
}

/* ─── Chart panels ─────────────────────────────────────────────────────────── */
.chart-panel {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--charcoal-800);
  padding: 24px;
  margin-top: 20px;
}

.chart-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.chart-panel-header h4 {
  font-size: 14px;
}

.chart-canvas {
  width: 100%;
  height: 220px;
  display: block;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.25);
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 12px;
  font-size: 11px;
  color: var(--text3);
}

.chart-legend span::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  margin-right: 6px;
  vertical-align: middle;
}

/* ─── ROI calculator ───────────────────────────────────────────────────────── */
.roi-calc {
  border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--tier-accent) 25%, var(--border));
  background: var(--charcoal-800);
  padding: 28px 32px;
  margin-top: 28px;
}

.roi-calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 20px;
}

.roi-field label {
  display: block;
  font-size: 12px;
  color: var(--text3);
  margin-bottom: 6px;
}

.roi-field input,
.roi-field select {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.3);
  color: var(--text);
  font-family: var(--mono);
  font-size: 14px;
}

.roi-result {
  margin-top: 24px;
  padding: 20px;
  border-radius: 12px;
  background: var(--tier-dim);
  border: 1px solid color-mix(in srgb, var(--tier-accent) 25%, transparent);
}

.roi-result strong {
  font-family: var(--mono);
  font-size: 28px;
  color: var(--tier-accent);
}

/* ─── FAQ ──────────────────────────────────────────────────────────────────── */
.faq-grid {
  display: grid;
  gap: 12px;
  margin-top: 32px;
}

.faq-item {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--charcoal-800);
  overflow: hidden;
}

.faq-q {
  padding: 18px 22px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.faq-q::after {
  content: "+";
  color: var(--text3);
  font-size: 18px;
  font-weight: 400;
}

.faq-item.open .faq-q::after { content: "−"; }

.faq-a {
  display: none;
  padding: 0 22px 18px;
  font-size: 13px;
  color: var(--text2);
  line-height: 1.65;
}

.faq-item.open .faq-a { display: block; }

/* ─── CTA band ─────────────────────────────────────────────────────────────── */
.cta-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 40px;
  border-radius: 20px;
  border: 1px solid color-mix(in srgb, var(--tier-accent) 30%, var(--border));
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--tier-dim) 60%, transparent),
    rgba(249, 115, 22, 0.04)
  );
}

/* ─── Footer ───────────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0 28px;
  margin-top: 40px;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
  font-size: 13px;
  color: var(--text3);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-links a {
  color: var(--text3);
  text-decoration: none;
}

.footer-links a:hover { color: var(--tier-accent); }

.tier-footer-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 12px;
}

.tier-footer-strip a {
  color: var(--text3);
  text-decoration: none;
}

.tier-footer-strip a:hover { color: var(--text); }
.tier-footer-strip a.t-pulse:hover { color: var(--pulse); }
.tier-footer-strip a.t-meridian:hover { color: var(--meridian); }
.tier-footer-strip a.t-apex:hover { color: var(--apex); }

.claim-boundary {
  margin-top: 48px;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(251, 191, 36, 0.2);
  background: rgba(251, 191, 36, 0.05);
  font-size: 12px;
  color: var(--text3);
  line-height: 1.55;
}

.claim-boundary strong { color: var(--caution); }

code {
  font-family: var(--mono);
  font-size: 12px;
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 6px;
  border-radius: 4px;
}

/* ─── Scroll reveal ────────────────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Feature bento grid (tier pages) ──────────────────────────────────────── */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
  margin-top: 32px;
}

.bento-cell {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--charcoal-800);
  padding: 24px;
  min-height: 140px;
}

.bento-cell.span-4 { grid-column: span 4; }
.bento-cell.span-6 { grid-column: span 6; }
.bento-cell.span-8 { grid-column: span 8; }
.bento-cell.span-12 { grid-column: span 12; }

.bento-cell h4 {
  font-size: 14px;
  margin-bottom: 8px;
  color: var(--text);
}

.bento-cell p {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.55;
}

.bento-cell--accent {
  border-color: color-mix(in srgb, var(--tier-accent) 30%, var(--border));
  background: linear-gradient(145deg, var(--tier-dim), var(--charcoal-800));
}

/* ─── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 1000px) {
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .metric-ring-grid { grid-template-columns: repeat(2, 1fr); }
  .bento-cell.span-4,
  .bento-cell.span-6,
  .bento-cell.span-8 { grid-column: span 12; }
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .philosophy-grid { grid-template-columns: 1fr; }
  .tier-detail-header { grid-template-columns: 1fr; }
  .tier-detail-body { grid-template-columns: 1fr; }
  .tier-col {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .tier-col:last-child { border-bottom: none; }
  .fleet-packages { grid-template-columns: 1fr; }
  .addon-grid { grid-template-columns: 1fr; }
  .persona-grid { grid-template-columns: 1fr; }
  .roi-calc-grid { grid-template-columns: 1fr; }
  .hero-stat-row { grid-template-columns: 1fr; }
  .tier-nav-strip { display: none; }
}

@media (max-width: 560px) {
  .pricing-grid { grid-template-columns: 1fr; }
  .endpoint-row { grid-template-columns: 1fr; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .bg-tier-orb { animation: none; }
  .latency-bar-fill { transition: none; }
}
