/* ============================================================
   PrashFlow Controller -- marketing site design system
   Brand palette matches the product UI (frontend/tailwind.config.js)
   ============================================================ */

:root {
  --brand-400: #7c8cff;
  --brand-500: #5b63f5;
  --brand-600: #4638e0;
  --violet-500: #8b5cf6;
  --teal-400: #2dd4bf;
  --teal-500: #14b8a6;
  --amber-400: #fbbf24;
  --rose-400: #fb7185;

  --bg-0: #05070f;
  --bg-1: #0a0e1a;
  --bg-2: #0f1524;
  --bg-3: #151c2e;
  --border: rgba(148, 163, 184, 0.12);
  --border-strong: rgba(148, 163, 184, 0.22);

  --text-0: #f8fafc;
  --text-1: #cbd5e1;
  --text-2: #94a3b8;
  --text-3: #64748b;

  --gradient-brand: linear-gradient(135deg, var(--brand-500) 0%, var(--violet-500) 50%, var(--teal-500) 100%);
  --gradient-brand-soft: linear-gradient(135deg, rgba(91, 99, 245, 0.16) 0%, rgba(139, 92, 246, 0.13) 50%, rgba(20, 184, 166, 0.16) 100%);
  --gradient-radial-glow: radial-gradient(circle at 50% 0%, rgba(91, 99, 245, 0.28), transparent 60%);

  --shadow-glow: 0 0 0 1px rgba(91, 99, 245, 0.15), 0 8px 32px -8px rgba(91, 99, 245, 0.45);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.2), 0 16px 40px -20px rgba(0, 0, 0, 0.6);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg-0);
  color: var(--text-1);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, h4 {
  color: var(--text-0);
  font-weight: 700;
  line-height: 1.15;
  margin: 0;
  letter-spacing: -0.02em;
}

p {
  margin: 0;
}

code, pre {
  font-family: "SF Mono", "JetBrains Mono", "Fira Code", Consolas, monospace;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.gradient-text {
  background: linear-gradient(90deg, var(--brand-400), var(--violet-500), var(--teal-400), var(--brand-400));
  background-size: 300% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: hueflow 8s linear infinite;
}

/* ---------------- Background ambience ---------------- */

.bg-glow {
  position: fixed;
  inset: 0;
  background: var(--gradient-radial-glow);
  pointer-events: none;
  z-index: 0;
  opacity: 0.8;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 40%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

/* ---------------- Nav ---------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 7, 15, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 17px;
  color: var(--text-0);
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--gradient-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-glow);
  flex-shrink: 0;
}

.brand-mark svg {
  width: 18px;
  height: 18px;
}

.brand-lockup .sub {
  display: block;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: -2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  transition: color 0.15s ease;
}

.nav-links a:hover {
  color: var(--text-0);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-0);
  cursor: pointer;
  padding: 8px;
}

/* ---------------- Buttons ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-brand);
  color: white;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(91, 99, 245, 0.25), 0 12px 40px -8px rgba(91, 99, 245, 0.55);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-0);
  border-color: var(--border-strong);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(148, 163, 184, 0.35);
}

.btn-lg {
  padding: 14px 26px;
  font-size: 15px;
  border-radius: 14px;
}

.btn-sm {
  padding: 8px 14px;
  font-size: 13px;
  border-radius: 10px;
}

/* ---------------- Sections generic ---------------- */

section {
  position: relative;
  z-index: 1;
  padding: 120px 0;
}

.section-tight {
  padding: 96px 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-400);
  background: var(--gradient-brand-soft);
  border: 1px solid rgba(91, 99, 245, 0.25);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
}

.eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal-400);
  box-shadow: 0 0 8px var(--teal-400);
}

.section-head {
  max-width: 640px;
  margin: 0 auto 64px;
  text-align: center;
}

.section-head h2 {
  font-size: clamp(30px, 4vw, 42px);
  margin-bottom: 16px;
}

.section-head p {
  font-size: 17px;
  color: var(--text-2);
}

/* ---------------- Hero ---------------- */

.hero {
  padding: 84px 0 60px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(38px, 6vw, 68px);
  max-width: 920px;
  margin: 0 auto 24px;
}

.hero-sub {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--text-2);
  max-width: 640px;
  margin: 0 auto 40px;
}

.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.hero-meta {
  font-size: 13px;
  color: var(--text-3);
  margin-bottom: 72px;
}

.hero-meta code {
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
}

/* Terminal / gateway visual */

.hero-visual {
  position: relative;
  max-width: 920px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: -1px;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(120deg, rgba(91, 99, 245, 0.5), transparent 30%, transparent 70%, rgba(20, 184, 166, 0.5));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.window-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-3);
  opacity: 0.5;
}

.window-title {
  margin-left: 8px;
  font-size: 12px;
  color: var(--text-3);
  font-family: monospace;
}

.hero-code {
  padding: 26px 28px 30px;
  text-align: left;
  font-size: 13.5px;
  line-height: 1.75;
  overflow-x: auto;
}

.hero-code .ln {
  color: var(--text-3);
  display: inline-block;
  width: 20px;
  user-select: none;
}
.tok-key { color: #7dd3fc; }
.tok-str { color: #86efac; }
.tok-punc { color: var(--text-3); }
.tok-comment { color: var(--text-3); font-style: italic; }
.tok-prop { color: #c4b5fd; }

/* ---------------- Stat strip ---------------- */

.stat-strip {
  padding: 56px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}

.stat-num {
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 800;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 13px;
  color: var(--text-2);
}

/* ---------------- Problem / logos row of pain points ---------------- */

.pain-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.pain-card {
  padding: 28px;
  border-radius: var(--radius-md);
  background: var(--bg-2);
  border: 1px solid var(--border);
}

.pain-card .icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(251, 113, 133, 0.12);
  color: var(--rose-400);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.pain-card h4 {
  font-size: 16px;
  margin-bottom: 8px;
}

.pain-card p {
  font-size: 14px;
  color: var(--text-2);
}

/* ---------------- Flow diagram ---------------- */

.flow {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}

.flow-node {
  flex: 1;
  min-width: 220px;
  padding: 28px 24px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-align: center;
  position: relative;
}

.flow-node.center {
  background: var(--gradient-brand-soft);
  border-color: rgba(91, 99, 245, 0.35);
}

.flow-node .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gradient-brand);
  color: white;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 14px;
}

.flow-node h4 {
  font-size: 15px;
  margin-bottom: 8px;
}

.flow-node p {
  font-size: 13px;
  color: var(--text-2);
}

.flow-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  padding: 0 6px;
  flex: 0 0 auto;
}

/* ---------------- Feature grid ---------------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  padding: 30px;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--border);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.feature-card:hover {
  border-color: rgba(91, 99, 245, 0.4);
  transform: translateY(-3px);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--gradient-brand-soft);
  border: 1px solid rgba(91, 99, 245, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-400);
  margin-bottom: 20px;
}

.feature-card h3 {
  font-size: 17px;
  margin-bottom: 10px;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-2);
}

.feature-card.span-2 {
  grid-column: span 2;
}

/* ---------------- Spotlight sections (A/B testing, MCP) ---------------- */

.spotlight {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.spotlight.reverse .spotlight-copy {
  order: 2;
}

.spotlight.reverse .spotlight-visual {
  order: 1;
}

.spotlight-copy h2 {
  font-size: clamp(26px, 3.5vw, 34px);
  margin-bottom: 18px;
}

.spotlight-copy p.lead {
  font-size: 16px;
  color: var(--text-2);
  margin-bottom: 24px;
}

.check-list {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14.5px;
  color: var(--text-1);
}

.check-list .tick {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(20, 184, 166, 0.15);
  color: var(--teal-400);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.spotlight-visual {
  border-radius: var(--radius-lg);
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-card);
  padding: 24px;
}

/* Traffic split mock */

.mock-split-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  margin-bottom: 10px;
  font-size: 13px;
}

.mock-bar-track {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  margin: 0 14px;
}

.mock-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--gradient-brand);
}

.mock-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(91, 99, 245, 0.15);
  color: var(--brand-400);
}

.mock-pill.canary {
  background: rgba(20, 184, 166, 0.15);
  color: var(--teal-400);
}

/* MCP mock */

.mcp-mock-flow {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mcp-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 13px;
  color: var(--text-1);
}

.mcp-step .badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--gradient-brand-soft);
  color: var(--brand-400);
  flex-shrink: 0;
}

.mcp-step.dim {
  opacity: 0.55;
}

/* ---------------- Architecture ---------------- */

.arch-diagram {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  background: var(--bg-2);
  padding: 48px;
}

.arch-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.arch-box {
  padding: 20px 26px;
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  background: var(--bg-3);
  text-align: center;
  min-width: 160px;
}

.arch-box.controller {
  background: var(--gradient-brand-soft);
  border-color: rgba(91, 99, 245, 0.4);
  box-shadow: var(--shadow-glow);
}

.arch-box h5 {
  color: var(--text-0);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}

.arch-box span {
  font-size: 11.5px;
  color: var(--text-3);
}

.arch-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.arch-stack .arch-box {
  min-width: 200px;
}

.arch-connector {
  color: var(--text-3);
  font-size: 20px;
}

.arch-substeps {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px dashed var(--border);
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.arch-substep {
  font-size: 12px;
  color: var(--text-2);
  background: var(--bg-3);
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: 999px;
}

/* ---------------- RBAC ladder ---------------- */

.rbac-ladder {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rbac-tier {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 20px;
  align-items: center;
  padding: 18px 22px;
  border-radius: 14px;
  background: var(--bg-2);
  border: 1px solid var(--border);
}

.rbac-tier .tier-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-0);
  display: flex;
  align-items: center;
  gap: 10px;
}

.rbac-tier .tier-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gradient-brand);
}

.rbac-tier p {
  font-size: 13.5px;
  color: var(--text-2);
}

/* ---------------- Deploy / self-host ---------------- */

.deploy-card {
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(91, 99, 245, 0.1), rgba(20, 184, 166, 0.08));
  border: 1px solid rgba(91, 99, 245, 0.25);
  padding: 56px;
  text-align: center;
}

.deploy-card h2 {
  font-size: clamp(26px, 3.5vw, 36px);
  margin-bottom: 16px;
}

.deploy-card p {
  color: var(--text-2);
  max-width: 560px;
  margin: 0 auto 32px;
  font-size: 15.5px;
}

.deploy-snippet {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-0);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 13.5px;
  color: var(--teal-400);
  margin-bottom: 28px;
}

.deploy-snippet .copy-btn {
  background: rgba(255, 255, 255, 0.06);
  border: none;
  color: var(--text-2);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: flex;
}

.deploy-snippet .copy-btn:hover {
  color: var(--text-0);
  background: rgba(255, 255, 255, 0.12);
}

/* ---------------- FAQ ---------------- */

.faq-list {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-2);
  overflow: hidden;
}

.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  background: none;
  border: none;
  color: var(--text-0);
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.faq-q .chev {
  flex-shrink: 0;
  color: var(--text-3);
  transition: transform 0.2s ease;
}

.faq-item.open .chev {
  transform: rotate(180deg);
}

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}

.faq-a-inner {
  padding: 0 24px 22px;
  font-size: 14px;
  color: var(--text-2);
}

/* ---------------- Final CTA ---------------- */

.final-cta {
  text-align: center;
  padding: 100px 0 60px;
}

.final-cta h2 {
  font-size: clamp(32px, 5vw, 50px);
  margin-bottom: 20px;
}

.final-cta p {
  color: var(--text-2);
  font-size: 16px;
  max-width: 520px;
  margin: 0 auto 36px;
}

/* ---------------- Footer ---------------- */

footer {
  border-top: 1px solid var(--border);
  padding: 56px 0 32px;
  position: relative;
  z-index: 1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer-col h5 {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.footer-col a {
  font-size: 14px;
  color: var(--text-2);
  transition: color 0.15s ease;
}

.footer-col a:hover {
  color: var(--text-0);
}

.footer-brand p {
  font-size: 13.5px;
  color: var(--text-3);
  margin-top: 14px;
  max-width: 280px;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-3);
  flex-wrap: wrap;
  gap: 12px;
}

.footer-socials {
  display: flex;
  gap: 14px;
}

.footer-socials a {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  transition: all 0.15s ease;
}

.footer-socials a:hover {
  color: var(--text-0);
  border-color: var(--border-strong);
}

/* ---------------- Reveal animation ---------------- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ---------------- 404 page ---------------- */

.notfound {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px;
  position: relative;
  z-index: 1;
}

.notfound-code {
  font-size: clamp(90px, 18vw, 160px);
  font-weight: 800;
  background: linear-gradient(90deg, var(--brand-400), var(--violet-500), var(--teal-400), var(--rose-400), var(--brand-400));
  background-size: 300% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: hueflow 6s linear infinite;
  line-height: 1;
  margin-bottom: 8px;
}

.notfound h1 {
  font-size: clamp(22px, 3vw, 28px);
  margin-bottom: 12px;
}

.notfound p {
  color: var(--text-2);
  font-size: 15px;
  max-width: 440px;
  margin: 0 auto 32px;
}

.notfound-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.notfound-trace {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: monospace;
  font-size: 12px;
  color: var(--text-3);
  background: var(--bg-2);
  border: 1px solid var(--border);
  padding: 10px 16px;
  border-radius: 10px;
}

.notfound-trace .code {
  color: var(--rose-400);
}

/* ---------------- Responsive ---------------- */

@media (max-width: 920px) {
  .nav-links,
  .nav-actions .btn-ghost {
    display: none;
  }
  .nav-toggle {
    display: flex;
  }
  .stat-grid,
  .pain-grid,
  .feature-grid {
    grid-template-columns: 1fr 1fr;
  }
  .feature-card.span-2 {
    grid-column: span 2;
  }
  .spotlight,
  .spotlight.reverse {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .spotlight.reverse .spotlight-copy,
  .spotlight.reverse .spotlight-visual,
  .spotlight-copy,
  .spotlight-visual {
    order: initial;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .rbac-tier {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

@media (max-width: 640px) {
  section {
    padding: 80px 0;
  }
  .stat-grid,
  .pain-grid,
  .feature-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .feature-card.span-2 {
    grid-column: span 1;
  }
  .arch-row {
    flex-direction: column;
  }
  .arch-connector {
    transform: rotate(90deg);
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Mobile nav drawer */

.mobile-nav {
  position: fixed;
  inset: 68px 0 0 0;
  background: var(--bg-0);
  z-index: 99;
  padding: 32px 24px;
  display: none;
  flex-direction: column;
  gap: 4px;
}

.mobile-nav.open {
  display: flex;
}

.mobile-nav a {
  padding: 16px 4px;
  font-size: 17px;
  font-weight: 600;
  color: var(--text-0);
  border-bottom: 1px solid var(--border);
}

.mobile-nav .btn {
  margin-top: 20px;
  width: 100%;
}

/* ============================================================
   Colorful ambience: floating gradient orbs + animations
   ============================================================ */

@keyframes hueflow {
  0% { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}

@keyframes floatOrb1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(40px, -30px) scale(1.08); }
  66% { transform: translate(-30px, 20px) scale(0.95); }
}

@keyframes floatOrb2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-50px, 40px) scale(1.12); }
}

@keyframes floatOrb3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  40% { transform: translate(30px, 30px) scale(1.05); }
  70% { transform: translate(-20px, -25px) scale(0.92); }
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

@keyframes shimmer {
  0% { transform: translateX(-120%) skewX(-15deg); }
  100% { transform: translateX(220%) skewX(-15deg); }
}

.orb-field {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  will-change: transform;
}

.orb-1 {
  width: 480px;
  height: 480px;
  top: -160px;
  left: -120px;
  background: radial-gradient(circle, var(--brand-500), transparent 70%);
  animation: floatOrb1 22s ease-in-out infinite;
}

.orb-2 {
  width: 420px;
  height: 420px;
  top: 20%;
  right: -140px;
  background: radial-gradient(circle, var(--violet-500), transparent 70%);
  animation: floatOrb2 26s ease-in-out infinite;
}

.orb-3 {
  width: 360px;
  height: 360px;
  bottom: 5%;
  left: 30%;
  background: radial-gradient(circle, var(--teal-500), transparent 70%);
  animation: floatOrb3 30s ease-in-out infinite;
}

.orb-4 {
  width: 300px;
  height: 300px;
  top: 55%;
  left: -100px;
  background: radial-gradient(circle, var(--rose-400), transparent 70%);
  opacity: 0.2;
  animation: floatOrb2 34s ease-in-out infinite reverse;
}

/* Button shine sweep */
.btn-primary {
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: "";
  position: absolute;
  top: -50%;
  left: 0;
  width: 40%;
  height: 200%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: translateX(-120%) skewX(-15deg);
  pointer-events: none;
}

.btn-primary:hover::after {
  animation: shimmer 0.9s ease;
}

/* Eyebrow dot pulse */
.eyebrow .dot {
  animation: pulseGlow 2.4s ease-in-out infinite;
}

/* Colorful icon variety across feature cards -- cycles through the brand palette */
.feature-grid .feature-card:nth-child(6n+1) .feature-icon,
.pain-grid .pain-card:nth-child(3n+1) .icon {
  background: rgba(91, 99, 245, 0.14);
  border-color: rgba(91, 99, 245, 0.3);
  color: var(--brand-400);
}
.feature-grid .feature-card:nth-child(6n+2) .feature-icon {
  background: rgba(139, 92, 246, 0.14);
  border-color: rgba(139, 92, 246, 0.3);
  color: var(--violet-500);
}
.feature-grid .feature-card:nth-child(6n+3) .feature-icon,
.pain-grid .pain-card:nth-child(3n+2) .icon {
  background: rgba(20, 184, 166, 0.14);
  border-color: rgba(20, 184, 166, 0.3);
  color: var(--teal-400);
}
.feature-grid .feature-card:nth-child(6n+4) .feature-icon {
  background: rgba(251, 191, 36, 0.14);
  border-color: rgba(251, 191, 36, 0.3);
  color: var(--amber-400);
}
.feature-grid .feature-card:nth-child(6n+5) .feature-icon,
.pain-grid .pain-card:nth-child(3n+3) .icon {
  background: rgba(251, 113, 133, 0.14);
  border-color: rgba(251, 113, 133, 0.3);
  color: var(--rose-400);
}
.feature-grid .feature-card:nth-child(6n+6) .feature-icon {
  background: rgba(45, 212, 191, 0.14);
  border-color: rgba(45, 212, 191, 0.3);
  color: var(--teal-400);
}

/* Colorful stat numbers */
.stat-grid > div:nth-child(1) .stat-num { background: linear-gradient(135deg, var(--brand-400), var(--brand-600)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat-grid > div:nth-child(2) .stat-num { background: linear-gradient(135deg, var(--violet-500), var(--brand-500)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat-grid > div:nth-child(3) .stat-num { background: linear-gradient(135deg, var(--teal-400), var(--violet-500)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat-grid > div:nth-child(4) .stat-num { background: linear-gradient(135deg, var(--amber-400), var(--teal-400)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* Nav solidify on scroll */
.nav.scrolled {
  background: rgba(5, 7, 15, 0.92);
  border-bottom-color: var(--border-strong);
}

/* Respect reduced-motion preference across all browsers/OSes */
@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;
  }
}

/* Fallback for browsers without backdrop-filter support (older Firefox/Safari) */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .nav {
    background: rgba(5, 7, 15, 0.96);
  }
}

/* Reduce orb blur cost on small/low-power screens */
@media (max-width: 640px) {
  .orb {
    filter: blur(60px);
    opacity: 0.25;
  }
  .orb-1, .orb-2 { width: 280px; height: 280px; }
  .orb-3, .orb-4 { width: 220px; height: 220px; }
}
