/* ============================================================
   SafeRouter — static site styles
   ============================================================ */

:root {
  --bg: #0a0e1a;
  --bg-alt: #0d1322;
  --surface: #131a2c;
  --surface-2: #182136;
  --border: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(148, 163, 184, 0.28);

  --text: #e6eaf3;
  --text-muted: #97a3b8;
  --text-faint: #6b7a93;

  --indigo: #6366f1;
  --cyan: #22d3ee;
  --amber: #fbbf24;
  --green: #34d399;

  --grad: linear-gradient(100deg, #818cf8 0%, #22d3ee 100%);

  --radius: 14px;
  --radius-sm: 10px;

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

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

html { scroll-behavior: smooth; }

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

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

.container-narrow { max-width: 820px; }

section { position: relative; }

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

/* ---------- type ---------- */
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; }

h1 { font-size: clamp(2.1rem, 5.4vw, 3.4rem); }

h2 { font-size: clamp(1.6rem, 3.6vw, 2.3rem); margin-bottom: 14px; }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--cyan);
  margin-bottom: 10px;
}

.section {
  padding: 88px 0;
}

.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-sub {
  color: var(--text-muted);
  max-width: 640px;
  margin-bottom: 44px;
  font-size: 1.05rem;
}

code {
  font-family: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: rgba(99, 102, 241, 0.14);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 6px;
  padding: 1px 6px;
  color: #a5b4fc;
  white-space: nowrap;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.98rem;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--grad);
  color: #0a0e1a;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.35);
}

.btn-ghost {
  border-color: var(--border-strong);
  color: var(--text);
  background: rgba(148, 163, 184, 0.06);
}

.btn-ghost:hover {
  background: rgba(148, 163, 184, 0.12);
  transform: translateY(-2px);
}

.btn-sm { padding: 9px 18px; font-size: 0.88rem; }

.btn-lg { padding: 16px 36px; font-size: 1.05rem; }

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 14, 26, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

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

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

.brand-mark { width: 30px; height: 30px; border-radius: 8px; }

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

.nav-links > a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.15s;
}

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

.nav-links > a.btn { color: #0a0e1a; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

/* ---------- hero ---------- */
.hero {
  padding: 96px 0 72px;
  text-align: center;
  background:
    radial-gradient(ellipse 80% 55% at 50% -10%, rgba(99, 102, 241, 0.28), transparent),
    radial-gradient(ellipse 50% 40% at 85% 20%, rgba(34, 211, 238, 0.12), transparent);
}

.hero::before {
  content: "";
  position: absolute;
  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: 44px 44px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, black 30%, transparent 75%);
  pointer-events: none;
}

.hero .container { position: relative; }

.hero-badge {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: 999px;
  padding: 6px 16px;
  margin-bottom: 26px;
}

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  color: var(--text-muted);
  font-size: 1.14rem;
  max-width: 720px;
  margin: 22px auto 0;
}

.hero-sub strong { color: var(--text); font-weight: 600; }

.hero-cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 34px;
}

.hero-note {
  margin-top: 18px;
  font-size: 0.9rem;
  color: var(--text-faint);
}

.hero-note strong { color: var(--amber); }

/* stat strip */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-top: 60px;
  padding: 26px 10px;
  background: rgba(19, 26, 44, 0.7);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-num {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-variant-numeric: tabular-nums;
}

.stat-label { font-size: 0.78rem; color: var(--text-faint); line-height: 1.4; }

/* ---------- problem ---------- */
.problem-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.problem-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.2s, transform 0.2s;
}

.problem-card:hover {
  border-color: rgba(251, 191, 36, 0.4);
  transform: translateY(-3px);
}

.problem-icon { font-size: 1.7rem; margin-bottom: 12px; }

.problem-card h3 { font-size: 1.12rem; margin-bottom: 8px; }

.problem-card p { color: var(--text-muted); font-size: 0.95rem; }

/* ---------- pipeline ---------- */
.pipeline {
  display: flex;
  align-items: stretch;
  gap: 12px;
  margin-bottom: 54px;
}

.pipe-node {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  min-width: 0;
}

.pipe-node-core {
  flex: 1.6;
  background:
    linear-gradient(var(--surface-2), var(--surface-2)) padding-box,
    var(--grad) border-box;
  border: 2px solid transparent;
  box-shadow: 0 8px 40px rgba(99, 102, 241, 0.18);
}

.pipe-title { font-weight: 700; font-size: 0.98rem; }

.pipe-title em { font-style: normal; color: var(--cyan); font-weight: 600; font-size: 0.85rem; }

.pipe-desc { font-size: 0.84rem; color: var(--text-faint); }

.pipe-steps {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 8px;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.pipe-steps span::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  margin-right: 8px;
  vertical-align: 2px;
}

.pipe-arrow {
  align-self: center;
  color: var(--text-faint);
  font-size: 1.4rem;
  flex: 0 0 auto;
}

/* ---------- how steps ---------- */
.how-steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
  counter-reset: step;
}

.how-step {
  display: flex;
  gap: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  transition: border-color 0.2s, transform 0.2s;
}

.how-step:hover {
  border-color: rgba(99, 102, 241, 0.45);
  transform: translateX(4px);
}

.step-num {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.05rem;
  color: #0a0e1a;
  background: var(--grad);
}

.how-step h3 { font-size: 1.08rem; margin-bottom: 6px; }

.how-step p { color: var(--text-muted); font-size: 0.95rem; }

.how-step p strong { color: var(--text); font-weight: 600; }

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

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  border-color: rgba(99, 102, 241, 0.45);
  transform: translateY(-4px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
}

.feature-icon { font-size: 1.7rem; margin-bottom: 14px; }

.feature-card h3 { font-size: 1.08rem; margin-bottom: 8px; }

.feature-card p { color: var(--text-muted); font-size: 0.93rem; }

/* ---------- calculator ---------- */
.calc {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 54px;
}

.calc-inputs { display: flex; flex-direction: column; gap: 26px; }

.calc-field { display: flex; flex-direction: column; gap: 10px; }

.calc-field label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
}

.calc-field output {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--surface-2);
  outline: none;
  border: 1px solid var(--border);
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--grad);
  border: 2px solid #0a0e1a;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
  cursor: grab;
}

input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--indigo);
  border: 2px solid #0a0e1a;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
  cursor: grab;
}

.calc-results {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.calc-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  border-bottom: 1px dashed var(--border);
  padding-bottom: 14px;
}

.calc-row:last-of-type { border-bottom: 0; padding-bottom: 0; }

.calc-row span { color: var(--text-muted); font-size: 0.92rem; }

.calc-row strong {
  font-size: 1.3rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.calc-row-accent strong {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.calc-row #resSaving:not(.neg) { color: var(--green); }

.unit { font-size: 0.85rem; font-weight: 600; color: var(--text-faint); margin-left: 2px; }

.calc-note {
  font-size: 0.84rem;
  color: var(--text-faint);
  line-height: 1.55;
}

.calc-note strong { color: var(--cyan); }

/* ---------- compare table ---------- */
.compare-wrap { overflow-x: auto; }

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

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

.compare-table thead th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  background: rgba(148, 163, 184, 0.05);
}

.compare-table tbody th[scope="row"] {
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

.compare-table td { color: var(--text-muted); min-width: 220px; }

.compare-table td:last-child {
  color: var(--text);
  background: rgba(99, 102, 241, 0.07);
}

.compare-table tr:last-child th,
.compare-table tr:last-child td { border-bottom: 0; }

/* ---------- pricing ---------- */
.pricing-card {
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    linear-gradient(120deg, rgba(99, 102, 241, 0.7), rgba(34, 211, 238, 0.5)) border-box;
  border: 2px solid transparent;
  border-radius: var(--radius);
  padding: 40px;
  max-width: 860px;
}

.pricing-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.pricing-tag {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--cyan);
}

.pricing-price {
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}

.pricing-per { font-size: 1.1rem; font-weight: 600; color: var(--text-muted); }

.pricing-equiv { color: var(--text-muted); font-size: 0.92rem; margin-top: 4px; }

.pricing-badge {
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: var(--green);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  font-size: 0.9rem;
}

.pricing-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 13px;
  margin-bottom: 32px;
}

.pricing-list li {
  padding-left: 30px;
  position: relative;
  color: var(--text-muted);
  font-size: 0.97rem;
}

.pricing-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(52, 211, 153, 0.15);
  color: var(--green);
  font-size: 0.75rem;
  font-weight: 800;
  display: grid;
  place-items: center;
}

.pricing-list li strong { color: var(--text); font-weight: 600; }

.pricing-cta {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.pricing-fine { font-size: 0.84rem; color: var(--text-faint); }

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

.timeline-step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  position: relative;
}

.timeline-step::after {
  content: "→";
  position: absolute;
  right: -18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-faint);
  font-size: 1.3rem;
  z-index: 1;
}

.timeline-step:last-child::after { display: none; }

.timeline-day {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--amber);
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 14px;
}

.timeline-step h3 { font-size: 1.08rem; margin-bottom: 8px; }

.timeline-step p { color: var(--text-muted); font-size: 0.93rem; }

/* ---------- roadmap ---------- */
.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.roadmap-card {
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 30px;
}

.roadmap-status {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--amber);
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 999px;
  padding: 5px 13px;
  margin-bottom: 16px;
}

.roadmap-card h3 { font-size: 1.2rem; margin-bottom: 10px; }

.roadmap-card p { color: var(--text-muted); font-size: 0.96rem; }

/* ---------- faq ---------- */
.faq-list { display: flex; flex-direction: column; gap: 12px; }

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

.faq-item summary {
  padding: 18px 22px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  list-style: none;
  position: relative;
  padding-right: 52px;
  transition: color 0.15s;
}

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

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--text-faint);
  transition: transform 0.2s;
}

.faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); color: var(--cyan); }

.faq-item summary:hover { color: var(--cyan); }

.faq-item p {
  padding: 0 22px 20px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ---------- cta ---------- */
.cta {
  text-align: center;
  background:
    radial-gradient(ellipse 60% 80% at 50% 110%, rgba(99, 102, 241, 0.25), transparent);
  padding: 100px 0;
}

.cta .section-sub { margin-left: auto; margin-right: auto; }

/* ---------- footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 30px;
  background: var(--bg-alt);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.footer-brand span { font-weight: 800; font-size: 1.05rem; }

.footer-brand p {
  color: var(--text-faint);
  font-size: 0.88rem;
  margin-top: 8px;
  max-width: 380px;
}

.footer-links {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  align-content: flex-start;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
}

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

.footer-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 0.8rem;
}

/* ---------- reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { transition: none !important; animation: none !important; }
}

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .stat-strip { grid-template-columns: repeat(3, 1fr); row-gap: 24px; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .pipeline { flex-direction: column; }
  .pipe-arrow { transform: rotate(90deg); align-self: center; }
  .calc { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: 1fr; }
  .timeline-step::after {
    content: "↓";
    right: auto;
    left: 50%;
    top: auto;
    bottom: -24px;
    transform: translateX(-50%);
  }
  .timeline-step:last-child::after { display: none; }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }

  .nav-links {
    position: absolute;
    top: 66px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(10, 14, 26, 0.97);
    border-bottom: 1px solid var(--border);
    display: none;
    padding: 10px 24px 18px;
  }

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

  .nav-links > a { padding: 13px 0; border-bottom: 1px solid var(--border); }

  .nav-links > a:last-child { border-bottom: 0; margin-top: 10px; text-align: center; }

  .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); }

  .section { padding: 64px 0; }

  .hero { padding: 72px 0 56px; }

  .stat-strip { grid-template-columns: repeat(2, 1fr); }

  .problem-grid, .feature-grid, .roadmap-grid { grid-template-columns: 1fr; }

  .pricing-card { padding: 28px; }

  .pricing-price { font-size: 2.1rem; }

  .compare-table td { min-width: 160px; }

  .how-step { flex-direction: column; gap: 12px; padding: 22px; }
}
