/* Design tokens — Cloudflare-inspired */
:root {
  --primary: #ff4801;
  --accent-hover: #d63c01;
  --accent-soft: #ff7038;
  --accent-wash: #fffbf5;
  --accent-muted: #f0e3de;
  --ink: #1a1a1a;
  --body: #262626;
  --muted: #707070;
  --canvas: #fafafa;
  --surface: #ffffff;
  --surface-alt: #f5f5f5;
  --border: #e5e5e5;
  --border-strong: #d4d4d4;
  --footer-bg: #171717;
  --on-primary: #ffffff;
  --on-dark: #fafafa;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-pill: 9999px;
  --container: min(1200px, calc(100% - 2rem));
  --nav-height: 64px;
  --section-pad: clamp(4rem, 8vw, 7rem);
  --font-display: "Space Grotesk", "STK Bureau Sans", system-ui, sans-serif;
  --font-ui: "DM Sans", "STK Bureau Sans", system-ui, sans-serif;
  --font-mono: ui-monospace, "Departure Mono", Menlo, monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.005em;
  color: var(--body);
  background: var(--canvas);
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-hover);
}

:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  padding: 12px 20px;
  background: var(--primary);
  color: var(--on-primary);
  border-radius: var(--radius-md);
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.container {
  width: var(--container);
  margin-inline: auto;
}

/* Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
  gap: 1rem;
}

.logo {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}

.logo span {
  color: var(--muted);
  font-weight: 500;
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 1.5rem;
}

.nav-desktop a {
  font-size: 14px;
  font-weight: 500;
  color: var(--body);
  text-decoration: none;
}

.nav-desktop a:hover {
  color: var(--ink);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface);
  cursor: pointer;
  color: var(--ink);
}

.menu-toggle svg {
  width: 20px;
  height: 20px;
}

.nav-mobile {
  display: none;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem 0 1.25rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

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

.nav-mobile a {
  padding: 0.75rem 0;
  font-weight: 500;
  color: var(--body);
  text-decoration: none;
}

@media (min-width: 768px) {
  .nav-desktop {
    display: flex;
  }

  .menu-toggle {
    display: none;
  }

  .nav-mobile {
    display: none !important;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 12px 20px;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease, border-color 0.15s ease;
}

.btn:active {
  transform: translateY(1px) scale(0.98);
}

.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--on-primary);
}

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--border-strong);
  color: var(--ink);
}

.btn-on-dark {
  background: var(--primary);
  color: var(--on-primary);
}

.btn-on-dark:hover {
  background: var(--accent-soft);
  color: var(--on-primary);
}

/* Hero */
.hero {
  position: relative;
  padding: clamp(3rem, 10vw, 7.5rem) 0 clamp(4rem, 12vw, 8rem);
  background: var(--accent-wash);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 80% 60% at 70% 20%,
    rgba(255, 112, 56, 0.12),
    transparent 60%
  );
  pointer-events: none;
}

.hero-grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

.hero-eyebrow {
  display: inline-block;
  margin-bottom: 1rem;
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
}

.hero-title {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-size: clamp(3.25rem, 10vw, 4.5rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.hero-lead {
  margin: 0 0 2rem;
  max-width: 34ch;
  font-size: clamp(1.05rem, 2vw, 1.125rem);
  line-height: 1.55;
  color: var(--muted);
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.hero-bullets {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.hero-bullets li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 15px;
  color: var(--body);
}

.hero-bullets svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--primary);
}

.hero-visual {
  position: relative;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 1.5rem;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.diagram-panel {
  border-radius: var(--radius-lg);
  background: var(--footer-bg);
  color: var(--on-dark);
  padding: 1.75rem;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
}

.diagram-panel .token-key {
  color: #ff7038;
}

.diagram-panel .token-str {
  color: #98c379;
}

.diagram-panel .token-dim {
  color: #707070;
}

.diagram-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.diagram-metrics div {
  text-align: center;
}

.diagram-metrics strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--on-dark);
}

.diagram-metrics span {
  font-size: 12px;
  color: #909090;
  font-family: var(--font-ui);
}

/* Sections */
.section {
  padding: var(--section-pad) 0;
}

.section-header {
  max-width: 40rem;
  margin-bottom: 3rem;
}

.section-header h2 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.section-header p {
  margin: 0;
  font-size: 1.0625rem;
  color: var(--muted);
  line-height: 1.55;
}

.section--alt {
  background: var(--surface);
}

.card-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .card-grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .card-grid--4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.section--alt .product-card {
  background: var(--canvas);
}

.product-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 1rem;
  border-radius: var(--radius-md);
  background: var(--accent-muted);
  color: var(--primary);
}

.product-card h3 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.product-card p {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
  line-height: 1.5;
}

/* Steps */
.steps {
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

.step {
  position: relative;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-bottom: 1rem;
  border-radius: var(--radius-pill);
  background: var(--primary);
  color: var(--on-primary);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-display);
}

.step h3 {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--ink);
}

.step p {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
}

/* Trust strip */
.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
  align-items: center;
  padding: 2rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--surface-alt);
}

.trust-item {
  flex: 1 1 140px;
  text-align: center;
}

.trust-item strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ink);
}

.trust-item span {
  font-size: 13px;
  color: var(--muted);
}

/* Dark band */
.dark-band {
  padding: var(--section-pad) 0;
  background: var(--footer-bg);
  color: var(--on-dark);
}

.dark-band .section-header h2,
.dark-band .section-header p {
  color: var(--on-dark);
}

.dark-band .section-header p {
  color: #a3a3a3;
}

.dark-band-inner {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 900px) {
  .dark-band-inner {
    grid-template-columns: 1fr auto;
  }
}

/* CTA band */
.cta-band {
  padding: var(--section-pad) 0;
  background: var(--accent-wash);
  text-align: center;
}

.cta-band h2 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.cta-band p {
  margin: 0 auto 1.75rem;
  max-width: 36ch;
  color: var(--muted);
  font-size: 1.0625rem;
}

/* Footer */
.site-footer {
  padding: 3rem 0 2rem;
  background: var(--footer-bg);
  color: #a3a3a3;
  font-size: 14px;
}

.footer-grid {
  display: grid;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr;
  }
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--on-dark);
  text-decoration: none;
}

.footer-brand:hover {
  color: var(--on-dark);
}

.site-footer p {
  margin: 0.75rem 0 0;
  line-height: 1.5;
  max-width: 32ch;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  color: #d4d4d4;
  text-decoration: none;
}

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

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid #2a2a2a;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  font-size: 13px;
}

.disclaimer {
  margin-top: 1rem;
  font-size: 12px;
  color: #707070;
  line-height: 1.45;
  max-width: 65ch;
}