/* ==========================================================================
   Revium Systems — Design Tokens
   Dark navy + gold system, Space Grotesk (display) / Inter (body)
   ========================================================================== */

:root {
  --color-bg: #050d18;
  --color-bg-card: #0a1828;
  --color-bg-card-2: #0f2035;
  --color-bg-hover: #1f2d3d;
  --color-surface-tint: rgba(255, 255, 255, 0.02);
  --color-border: rgba(255, 255, 255, 0.08);
  --color-border-strong: rgba(255, 255, 255, 0.14);
  --color-border-gold: rgba(181, 160, 85, 0.25);

  --color-text: #f9fafb;
  --color-text-soft: #9ca3af;
  --color-text-faint: #7d869a;
  --color-text-inverse: #0a0e1a;

  --color-primary: #b5a055;
  --color-primary-dark: #8c7a3a;
  --color-gold: #d4af37;
  --color-accent: #e8c96d;
  --color-secondary: #1a3a5c;
  --color-success: #00d084;

  --gradient-gold: linear-gradient(135deg, #d4af37 0%, #b5a055 50%, #8c7a3a 100%);
  --gradient-primary: linear-gradient(135deg, #b5a055 0%, #1a3a5c 100%);
  --gradient-hero: linear-gradient(135deg, #050d18 0%, #0a1828 50%, #060e1c 100%);
  --gradient-card: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);

  --font-display: "Space Grotesk", Inter, sans-serif;
  --font-body: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --fs-xs: 0.78rem;
  --fs-sm: 0.9rem;
  --fs-base: 1rem;
  --fs-md: clamp(1.05rem, 1rem + 0.2vw, 1.15rem);
  --fs-lg: 1.3rem;
  --fs-xl: clamp(1.8rem, 1.4rem + 1.4vw, 2.5rem);
  --fs-2xl: clamp(2rem, 1.5rem + 2vw, 2.5rem);
  --fs-3xl: clamp(2.5rem, 1.7rem + 3.4vw, 4rem);

  --space-3xs: 0.25rem;
  --space-2xs: 0.5rem;
  --space-xs: 0.75rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 5rem;
  --space-3xl: 9rem;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-pill: 9999px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 30px rgba(181, 160, 85, 0.2);

  --container-max: 1200px;
  --container-narrow: 820px;

  --ease-out: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast: 200ms;
  --dur-med: 420ms;
}

/* ==========================================================================
   Reset
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  background: var(--color-bg);
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; padding: 0; }
input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4, p { margin: 0; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-gold);
  color: var(--color-text-inverse);
  padding: var(--space-xs) var(--space-sm);
  z-index: 999;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   Layout helpers
   ========================================================================== */

.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-md);
}

.section { padding-block: var(--space-2xl); }
.section-alt { background: var(--color-surface-tint); border-block: 1px solid var(--color-border); }
.section-dark {
  background: linear-gradient(180deg, rgba(181,160,85,0.04), rgba(181,160,85,0.01));
  border-block: 1px solid var(--color-border-gold);
}

.section-head {
  max-width: var(--container-narrow);
  margin-bottom: var(--space-xl);
}

.eyebrow {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: var(--space-sm);
}

h2 {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-sm);
}

h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
}

.section-lede {
  font-size: var(--fs-md);
  color: var(--color-text-soft);
  max-width: 62ch;
  line-height: 1.7;
}

.accent { color: var(--color-accent); }

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--dur-med) var(--ease-out), transform var(--dur-med) var(--ease-out);
}
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xs);
  padding: 0.9rem 1.7rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: var(--fs-sm);
  text-align: center;
  line-height: 1.3;
  text-wrap: balance;
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}

.btn-primary {
  background: var(--gradient-primary);
  color: #ffffff;
  border: 1px solid var(--color-border-gold);
  box-shadow: var(--shadow-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px rgba(212, 175, 55, 0.3);
  border-color: rgba(212, 175, 55, 0.6);
}

.btn-ghost {
  background: rgba(255,255,255,0.03);
  color: var(--color-text);
  border: 1px solid var(--color-border-strong);
}
.btn-ghost:hover {
  border-color: var(--color-gold);
  transform: translateY(-2px);
}

.btn-sm { padding: 0.6rem 1.2rem; font-size: var(--fs-xs); white-space: nowrap; }

.hero-inner > *, .diagnostic-layout > *, .compare > *, .fit-grid > *, .build-grid > *,
.card-grid > *, .leak-grid > *, .flow-timeline > *, .metric-grid > *, .footer-inner > *, .trust-list > * { min-width: 0; }
.btn-lg { padding: 1.1rem 2.2rem; font-size: var(--fs-base); }
.btn-block { width: 100%; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 13, 24, 0.8);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-sm);
  gap: var(--space-md);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--color-text);
}
.logo-mark { color: var(--color-gold); flex-shrink: 0; }
.logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}
.logo-text span { color: var(--color-accent); }

.main-nav ul { display: flex; gap: var(--space-md); }
.main-nav a {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--color-text-soft);
  transition: color var(--dur-fast) var(--ease-out);
  white-space: nowrap;
}
.main-nav a:hover { color: var(--color-accent); }

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

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-text);
  margin-inline: auto;
  transition: transform var(--dur-fast) var(--ease-out), opacity var(--dur-fast) var(--ease-out);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  display: none;
  border-top: 1px solid var(--color-border);
  background: var(--color-bg);
}
.mobile-nav[data-state="open"] { display: block; }
.mobile-nav nav {
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}
.mobile-nav ul { display: flex; flex-direction: column; gap: var(--space-sm); }
.mobile-nav a { font-size: var(--fs-md); font-weight: 500; }

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

.hero {
  position: relative;
  overflow: hidden;
  padding-block: 8rem 5rem;
  background: var(--gradient-hero);
}

.hero-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; }

.mesh-shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  animation: drift 26s ease-in-out infinite;
}
.shape-a {
  width: 520px; height: 520px;
  top: -180px; left: -120px;
  background: radial-gradient(circle, rgba(181,160,85,0.22), transparent 70%);
}
.shape-b {
  width: 460px; height: 460px;
  top: 40px; right: -160px;
  background: radial-gradient(circle, rgba(26,58,92,0.55), transparent 70%);
  animation-delay: -8s;
  animation-duration: 32s;
}
.shape-c {
  width: 380px; height: 380px;
  bottom: -180px; left: 35%;
  background: radial-gradient(circle, rgba(0,208,132,0.08), transparent 70%);
  animation-delay: -16s;
  animation-duration: 30s;
}
@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -20px) scale(1.06); }
}
@media (prefers-reduced-motion: reduce) { .mesh-shape { animation: none; } }

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 0%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, black 30%, transparent 75%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: var(--space-2xl);
  align-items: center;
}

.hero-copy .eyebrow {
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--color-border-gold);
  border-radius: var(--radius-pill);
  background: rgba(181,160,85,0.08);
  margin-bottom: var(--space-md);
}

.hero-copy h1 {
  font-family: var(--font-display);
  font-size: var(--fs-3xl);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--color-text);
  margin-bottom: var(--space-md);
  max-width: 16ch;
}

.hero-lede {
  font-size: var(--fs-md);
  color: var(--color-text-soft);
  max-width: 50ch;
  line-height: 1.7;
  margin-bottom: var(--space-sm);
}

.hero-sub {
  font-size: var(--fs-sm);
  color: var(--color-text-faint);
  max-width: 54ch;
  line-height: 1.7;
  margin-bottom: var(--space-lg);
}

.hero-ctas { display: flex; flex-wrap: wrap; gap: var(--space-sm); margin-bottom: var(--space-sm); }
.hero-microcopy { font-size: var(--fs-xs); color: var(--color-text-faint); }

.hero-visual { position: relative; justify-self: center; width: 100%; max-width: 440px; }
.hero-visual-glow {
  position: absolute;
  inset: -10%;
  z-index: -1;
  background: radial-gradient(circle at 60% 30%, rgba(181,160,85,0.2), transparent 65%);
  filter: blur(30px);
}

.glass {
  background: rgba(10, 24, 40, 0.7);
  border: 1px solid var(--color-border-gold);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow-lg);
}

.pipeline-card { border-radius: var(--radius-xl); padding: var(--space-lg) var(--space-md); }

.pipeline-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
}
.pipeline-card-title { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-sm); }
.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--color-success);
  background: rgba(0,208,132,0.1);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}
.live-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--color-success);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.pipeline-flow { display: flex; flex-direction: column; gap: var(--space-md); position: relative; }
.pipeline-flow::before {
  content: "";
  position: absolute;
  left: 19px; top: 22px; bottom: 22px;
  width: 1px;
  background: linear-gradient(to bottom, var(--color-border-gold), transparent);
}
.pipeline-node { display: flex; align-items: center; gap: var(--space-sm); position: relative; }

.node-icon {
  width: 40px; height: 40px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  background: var(--color-bg-card-2);
  border: 1px solid var(--color-border-gold);
  display: grid;
  place-items: center;
  color: var(--color-accent);
  z-index: 1;
}
.node-icon svg { width: 20px; height: 20px; }

.node-body { flex: 1; min-width: 0; }
.node-label { display: block; font-size: var(--fs-sm); font-weight: 600; margin-bottom: 5px; }
.node-bar { display: block; height: 5px; border-radius: var(--radius-pill); background: rgba(255,255,255,0.08); overflow: hidden; }
.node-bar span { display: block; height: 100%; border-radius: var(--radius-pill); background: var(--gradient-gold); opacity: 0.8; }
.node-bar-final span { background: var(--color-success); opacity: 1; }
.pipeline-node-final .node-label { color: var(--color-success); }

/* ==========================================================================
   Trust bar
   ========================================================================== */

.trust-bar {
  padding-block: var(--space-lg);
  background: var(--color-surface-tint);
  border-block: 1px solid var(--color-border);
}
.trust-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}
.trust-item { display: flex; flex-direction: column; gap: 4px; }
.trust-item strong {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  color: var(--color-accent);
}
.trust-item span { font-size: var(--fs-xs); color: var(--color-text-faint); text-transform: uppercase; letter-spacing: 0.08em; }

/* ==========================================================================
   Cards (shared)
   ========================================================================== */

.card-grid { display: grid; gap: var(--space-md); }
.card-grid-4 { grid-template-columns: repeat(4, 1fr); }

.card-icon {
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  background: rgba(181,160,85,0.1);
  border: 1px solid var(--color-border-gold);
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
}
.card-icon svg { width: 22px; height: 22px; }

.problem-card,
.build-card,
.metric-card {
  background: var(--gradient-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-md);
  transition: transform var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.problem-card:hover,
.build-card:hover,
.metric-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-border-gold);
  box-shadow: var(--shadow-glow);
}
.problem-card h3, .metric-card h3, .build-card h3 { font-size: 1.05rem; margin-bottom: var(--space-2xs); }
.problem-card p, .metric-card p, .build-card p { color: var(--color-text-soft); font-size: var(--fs-sm); }

/* ==========================================================================
   Section callout / channel chips (shared)
   ========================================================================== */

.section-callout {
  margin-top: var(--space-lg);
  max-width: var(--container-narrow);
  padding: var(--space-md) var(--space-lg);
  border-left: 3px solid var(--color-gold);
  background: rgba(181, 160, 85, 0.06);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.section-callout p {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: 600;
  line-height: 1.5;
  color: var(--color-text);
}

.section-cta { margin-top: var(--space-xl); }

.channel-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: var(--space-lg);
}
.channel-chips li {
  padding: 0.55rem 1rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border-strong);
  background: rgba(255, 255, 255, 0.03);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--color-text-soft);
}
.channel-chips-tight { margin-bottom: 0; }
.channel-chips-tight li {
  border-color: var(--color-border-gold);
  background: rgba(181, 160, 85, 0.08);
  color: var(--color-text);
}

/* ==========================================================================
   Compare
   ========================================================================== */

.compare {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--space-lg);
  align-items: center;
}
.compare-col {
  background: var(--gradient-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
}
.compare-old { opacity: 0.85; }
.compare-new {
  border-color: var(--color-border-gold);
  box-shadow: var(--shadow-glow);
  background: linear-gradient(135deg, rgba(181,160,85,0.08), rgba(255,255,255,0.02));
}
.compare-label {
  display: block;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  margin-bottom: var(--space-md);
}
.compare-new .compare-label { color: var(--color-gold); }

.compare-col ul { display: flex; flex-direction: column; gap: var(--space-sm); }
.compare-col li { font-size: var(--fs-sm); padding-left: 1.3rem; position: relative; color: var(--color-text-soft); }
.compare-old li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.65em;
  width: 8px; height: 2px;
  background: var(--color-text-faint);
}
.compare-new li { color: var(--color-text); font-weight: 500; }
.compare-new li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.5em;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--gradient-gold);
}
.compare-divider { color: var(--color-gold); display: grid; place-items: center; }
.compare-divider svg { width: 28px; height: 28px; }

/* ==========================================================================
   How It Works — flow timeline
   ========================================================================== */

.flow-timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-lg) var(--space-md);
}
.flow-step {
  position: relative;
  padding: var(--space-md);
  background: var(--gradient-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  transition: transform var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.flow-step:hover { transform: translateY(-4px); border-color: var(--color-border-gold); }
.flow-index {
  display: inline-block;
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--color-text-inverse);
  background: var(--gradient-gold);
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  margin-bottom: var(--space-sm);
}
.flow-step h3 { font-size: 1.05rem; margin-bottom: var(--space-3xs); }
.flow-step p { font-size: var(--fs-sm); color: var(--color-text-soft); }

/* ==========================================================================
   What We Do
   ========================================================================== */

.build-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-md); }
.build-card { padding: var(--space-lg) var(--space-md); }
.build-card h3 { margin-bottom: var(--space-sm); }

/* ==========================================================================
   Ways to Work With Revium — tier cards
   ========================================================================== */

.tier-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-md); align-items: stretch; }
.tier-card {
  display: flex;
  flex-direction: column;
  background: var(--gradient-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-lg) var(--space-md);
  transition: transform var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.tier-card:hover { transform: translateY(-4px); border-color: var(--color-border-gold); box-shadow: var(--shadow-glow); }
.tier-card h3 { margin-bottom: var(--space-3xs); }
.tier-subtitle { color: var(--color-gold); font-weight: 600; font-size: var(--fs-sm); margin-bottom: var(--space-sm); }
.tier-card > p:not(.tier-subtitle) { color: var(--color-text-soft); font-size: var(--fs-sm); margin-bottom: var(--space-lg); flex: 1; }

/* ==========================================================================
   Who We Work With — industries panel
   ========================================================================== */

.fit-industries { background: var(--gradient-card); border: 1px solid var(--color-border); }

/* ==========================================================================
   Flow arrows (Why Revium / Our Vision)
   ========================================================================== */

.flow-arrows {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: var(--space-md);
}
.flow-node {
  padding: 0.75rem 1.3rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border-gold);
  background: rgba(181, 160, 85, 0.08);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-sm);
}
.flow-node-final { background: var(--gradient-gold); color: var(--color-text-inverse); border-color: transparent; }
.flow-node-active { background: var(--gradient-gold); color: var(--color-text-inverse); border-color: transparent; }
.flow-node-future { background: transparent; border: 1px dashed var(--color-border-strong); color: var(--color-text-faint); }
.flow-arrow-icon { color: var(--color-gold); width: 20px; height: 20px; flex-shrink: 0; }
.vision-note { font-size: var(--fs-sm); color: var(--color-text-faint); max-width: 62ch; }

/* ==========================================================================
   Who We Help
   ========================================================================== */

.fit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-md); }
.fit-card { border-radius: var(--radius-xl); padding: var(--space-lg); }
.fit-yes {
  background: linear-gradient(135deg, rgba(181,160,85,0.08), rgba(255,255,255,0.02));
  border: 1px solid var(--color-border-gold);
  box-shadow: var(--shadow-glow);
}
.fit-no { background: transparent; border: 1px dashed var(--color-border-strong); }
.fit-card h3 { margin-bottom: var(--space-md); }
.fit-list { display: flex; flex-direction: column; gap: var(--space-sm); }
.fit-list li { display: flex; align-items: flex-start; gap: var(--space-xs); font-size: var(--fs-sm); }
.fit-list svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 1px; }
.fit-yes svg { color: var(--color-success); }
.fit-list-no li { color: var(--color-text-faint); }
.fit-list-no svg { color: var(--color-text-faint); }

/* ==========================================================================
   Metrics
   ========================================================================== */

.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-md); }

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

.faq-list { max-width: var(--container-narrow); border-top: 1px solid var(--color-border); }
.faq-item { border-bottom: 1px solid var(--color-border); }
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-2xs);
  text-align: left;
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: 600;
}
.faq-chevron { width: 20px; height: 20px; flex-shrink: 0; color: var(--color-text-faint); transition: transform var(--dur-fast) var(--ease-out); }
.faq-question[aria-expanded="true"] .faq-chevron { transform: rotate(180deg); color: var(--color-gold); }
.faq-answer { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--dur-med) var(--ease-out); overflow: hidden; }
.faq-answer > p {
  overflow: hidden;
  min-height: 0;
  padding-right: var(--space-lg);
  color: var(--color-text-soft);
  font-size: var(--fs-sm);
  line-height: 1.7;
}
.faq-item.is-open .faq-answer { grid-template-rows: 1fr; }
.faq-item.is-open .faq-answer > p { padding-bottom: var(--space-md); }

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

.final-cta {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(181,160,85,0.16), transparent 70%),
    var(--gradient-hero);
  border-top: 1px solid var(--color-border-gold);
  padding-block: 6.25rem;
}
.final-cta-inner { text-align: center; max-width: 660px; }
.final-cta p { color: var(--color-text-soft); font-size: var(--fs-md); margin-bottom: var(--space-lg); }

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

.site-footer { background: var(--color-bg); border-top: 1px solid var(--color-border); padding-top: var(--space-xl); }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr auto; gap: var(--space-lg); padding-bottom: var(--space-lg); }
.footer-brand p { margin-top: var(--space-sm); color: var(--color-text-soft); font-size: var(--fs-sm); max-width: 32ch; }
.footer-nav ul { display: flex; flex-direction: column; gap: var(--space-xs); }
.footer-nav a { font-size: var(--fs-sm); color: var(--color-text-soft); transition: color var(--dur-fast) var(--ease-out); }
.footer-nav a:hover { color: var(--color-accent); }
.footer-social { display: flex; gap: var(--space-sm); align-items: flex-start; }
.footer-social a {
  width: 38px; height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--color-border-strong);
  color: var(--color-text-soft);
  transition: color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.footer-social a:hover { color: var(--color-accent); border-color: var(--color-gold); }
.footer-social svg { width: 18px; height: 18px; }
.footer-bottom { border-top: 1px solid var(--color-border); padding-block: var(--space-md); }
.footer-bottom p { font-size: var(--fs-xs); color: var(--color-text-faint); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.chat-launcher {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 95;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--gradient-gold);
  color: var(--color-text-inverse);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.chat-launcher svg { width: 28px; height: 28px; }
.chat-launcher:hover { transform: translateY(-3px) scale(1.04); box-shadow: 0 10px 30px rgba(212, 175, 55, 0.35); }

.chat-panel {
  position: fixed;
  right: 20px;
  bottom: 88px;
  z-index: 95;
  width: min(380px, calc(100vw - 32px));
  max-height: min(600px, calc(100vh - 120px));
  display: flex;
  flex-direction: column;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-gold);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.chat-panel[hidden] { display: none; }
.chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: rgba(181, 160, 85, 0.1);
  border-bottom: 1px solid var(--color-border-gold);
}
.chat-head strong { display: block; font-family: var(--font-display); font-size: var(--fs-base); }
.chat-head span { font-size: var(--fs-xs); color: var(--color-text-soft); }
.chat-close { font-size: 1.6rem; line-height: 1; padding: 4px 10px; border-radius: var(--radius-sm); color: var(--color-text-soft); }
.chat-close:hover { color: var(--color-accent); }

.chat-log {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  min-height: 160px;
}
.chat-msg {
  max-width: 88%;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  line-height: 1.55;
}
.chat-msg-bot { align-self: flex-start; background: var(--color-bg-card-2); border: 1px solid var(--color-border); color: var(--color-text); }
.chat-msg-user { align-self: flex-end; background: var(--gradient-gold); color: var(--color-text-inverse); font-weight: 500; }
.chat-links { display: flex; flex-wrap: wrap; gap: var(--space-2xs); }
.chat-link {
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border-gold);
  background: rgba(181, 160, 85, 0.1);
  color: var(--color-accent);
  font-size: var(--fs-xs);
  font-weight: 600;
}
.chat-link:hover { background: rgba(181, 160, 85, 0.2); }

.chat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs);
  padding: var(--space-sm) var(--space-md);
  border-top: 1px solid var(--color-border);
  max-height: 150px;
  overflow-y: auto;
}
.chat-chips[hidden] { display: none; }
.chat-chip {
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border-strong);
  background: rgba(255, 255, 255, 0.03);
  font-size: var(--fs-xs);
  font-weight: 500;
  transition: border-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.chat-chip:hover { border-color: var(--color-gold); color: var(--color-accent); }
.chat-chip-primary { background: var(--gradient-primary); border-color: var(--color-border-gold); color: #fff; }

.chat-form { display: flex; gap: var(--space-2xs); padding: var(--space-sm) var(--space-md); border-top: 1px solid var(--color-border); }
.chat-form[hidden] { display: none; }
.chat-form input {
  flex: 1;
  min-width: 0;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border-strong);
  background: rgba(255, 255, 255, 0.04);
  font-size: var(--fs-sm);
  color-scheme: dark;
}
.chat-form input:focus { border-color: var(--color-gold); }
.chat-form button {
  width: 42px;
  border-radius: 50%;
  background: var(--gradient-gold);
  color: var(--color-text-inverse);
  font-weight: 700;
}

.whatsapp-fab {
  position: fixed;
  right: 20px;
  bottom: 88px;
  z-index: 90;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #25d366;
  color: #ffffff;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.whatsapp-fab svg { width: 30px; height: 30px; }
.whatsapp-fab:hover { transform: translateY(-3px) scale(1.04); box-shadow: 0 10px 30px rgba(37, 211, 102, 0.35); }
.whatsapp-fab:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 3px; border-radius: 50%; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1280px) {
  .main-nav { display: none; }
  .header-actions .btn-primary { display: none; }
  .nav-toggle { display: flex; }
}

@media (min-width: 1281px) {
  :root { --container-max: 1240px; }
  .hero { min-height: min(860px, calc(100vh - 73px)); display: flex; align-items: center; padding-block: 5rem; }
  .hero-inner { width: 100%; gap: 4rem; }
  .hero-copy h1 { max-width: 15ch; }
  .hero-visual { max-width: 500px; }
  .problem-card p, .metric-card p, .flow-step p, .build-card p, .fit-list li { font-size: 0.98rem; }
}

@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr); }
  .hero-visual { max-width: 480px; justify-self: start; }
  .hero-copy h1 { max-width: none; }
  .card-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .tier-grid { grid-template-columns: repeat(2, 1fr); }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .trust-list { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-social { grid-column: 1 / -1; }
}

/* Tablets and phones in "desktop site" mode (~800–1100px wide): larger text, multi-column layout */
@media (min-width: 769px) and (max-width: 1100px) and (min-device-width: 601px) {
  html { font-size: 112.5%; }
  .container { padding-inline: 2rem; }
  .hero { padding-block: 4.5rem 3.5rem; }
  .hero-inner { grid-template-columns: 1.1fr 0.9fr; gap: 2rem; }
  .hero-visual { justify-self: center; max-width: 400px; }
  .hero-copy h1 { font-size: 2.9rem; max-width: none; }
  .card-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
  .metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tier-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .trust-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .footer-inner { grid-template-columns: 1.4fr 1fr auto; }
  .footer-social { grid-column: auto; }
  .whatsapp-fab, .chat-launcher { width: 60px; height: 60px; }
  .whatsapp-fab { bottom: 96px; }
}

/* Phones in "desktop site" mode render a ~980px layout viewport shrunk to the screen:
   scale the root font with the viewport so it reads exactly like the normal phone layout. */
@media (max-device-width: 600px) and (min-width: 769px) {
  html { font-size: 4.1vw; }
  .container { padding-inline: 1.15rem; }
  .hero-copy h1 { font-size: 2.6rem; }
  .hero-visual { max-width: none; }
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .hero-copy .eyebrow { font-size: 0.7rem; letter-spacing: 0.06em; }
  .final-cta { padding-block: 4rem; }
  .whatsapp-fab, .chat-launcher { width: 3.1rem !important; height: 3.1rem !important; right: 0.9rem !important; }
  .chat-launcher { bottom: 0.9rem !important; }
  .whatsapp-fab { bottom: 4.6rem !important; }
  .whatsapp-fab svg { width: 1.6rem !important; height: 1.6rem !important; }
  .chat-launcher svg { width: 1.5rem !important; height: 1.5rem !important; }
  .chat-panel { right: 0.75rem !important; bottom: 4.6rem !important; width: calc(100vw - 1.5rem) !important; max-height: calc(100vh - 6rem) !important; }
}

@media (max-width: 768px), (max-device-width: 600px) {
  .mesh-shape { animation: none; filter: blur(50px); }
  .glass, .site-header { -webkit-backdrop-filter: none; backdrop-filter: none; }
  .site-header { background: rgba(5, 13, 24, 0.96); }
  .compare { grid-template-columns: 1fr; }
  .compare-divider { transform: rotate(90deg); width: fit-content; margin-inline: auto; }
  .card-grid-4, .build-grid, .fit-grid, .metric-grid, .tier-grid { grid-template-columns: minmax(0, 1fr); }
  .flow-timeline { grid-template-columns: minmax(0, 1fr); gap: 0.75rem; }
  .card-grid, .build-grid, .metric-grid, .fit-grid, .tier-grid { gap: 0.75rem; }
  h2 { font-size: 1.75rem; }
  .section-lede { font-size: 1rem; }
  .problem-card, .metric-card, .flow-step {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 0.9rem;
    align-items: start;
    padding: 1rem;
  }
  .problem-card .card-icon, .metric-card .card-icon, .flow-index { grid-row: span 2; margin: 0; }
  .problem-card h3, .metric-card h3, .flow-step h3 { margin: 0 0 0.15rem; }
  .build-card { padding: 1.1rem; }
  .build-card h3 { margin-bottom: 0.6rem; }
  .compare { gap: 0.5rem; }
  .compare-divider svg { width: 22px; height: 22px; }
  .trust-bar { padding-block: 1.5rem; }
  .footer-inner { grid-template-columns: minmax(0, 1fr); }
  .section { padding-block: 2.75rem; }
  .hero { padding-block: 2.5rem 2.5rem; }
  .section-head { margin-bottom: 1.5rem; }
  .fit-card, .compare-col, .tier-card { padding: var(--space-md); }
  .flow-node { padding: 0.6rem 1rem; font-size: var(--fs-xs); }
  .section-callout { padding: var(--space-sm) var(--space-md); }
  .section-callout p { font-size: 1rem; }
  .whatsapp-fab, .chat-launcher { width: 50px; height: 50px; right: 14px; }
  .chat-launcher { bottom: 14px; }
  .whatsapp-fab { bottom: 74px; }
  .whatsapp-fab svg { width: 26px; height: 26px; }
  .chat-launcher svg { width: 24px; height: 24px; }
  .chat-panel { right: 12px; bottom: 74px; width: calc(100vw - 24px); max-height: calc(100vh - 100px); }
}

@media (max-width: 480px) {
  .flow-timeline { grid-template-columns: minmax(0, 1fr); }
  .container { padding-inline: 1.15rem; }
  .hero-copy h1 { font-size: clamp(2.1rem, 9.2vw, 2.6rem); }
  .hero-copy .eyebrow { font-size: 0.7rem; letter-spacing: 0.06em; }
  .final-cta { padding-block: 4rem; }
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .hero-ctas .btn { width: 100%; }
  .trust-list { grid-template-columns: 1fr 1fr; }
}
