/* HitNSpin — Cloudflare-inspired design tokens */
: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;
  --success: #00bd7d;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-pill: 9999px;
  --container: min(1120px, 100% - 2rem);
  --section-pad: clamp(4rem, 8vw, 7rem);
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-ui: "Source Sans 3", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, 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;
  color: var(--body);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: var(--on-dark);
  border-radius: var(--radius-md);
  z-index: 1000;
}

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

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

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

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 1rem;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--ink);
  text-decoration: none;
}

.brand-lockup:hover {
  text-decoration: none;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent-soft) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-mark svg {
  width: 18px;
  height: 18px;
  fill: var(--on-primary);
}

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

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 0.5rem 0.75rem;
  font: inherit;
  cursor: pointer;
  color: var(--ink);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

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

.nav-links a:hover {
  color: var(--ink);
  text-decoration: none;
}

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

.btn:hover {
  text-decoration: none;
}

.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);
  background: var(--surface);
}

.btn-lg {
  padding: 14px 28px;
  font-size: 16px;
}

/* Hero */
.hero {
  background: var(--accent-wash);
  border-bottom: 1px solid var(--accent-muted);
  padding: clamp(3rem, 10vw, 7.5rem) 0 var(--section-pad);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-eyebrow {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  margin: 0 0 1rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

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

.hero-title .accent {
  color: var(--primary);
}

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

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

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

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

.hero-bullets .check {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  color: var(--success);
}

.hero-visual {
  position: relative;
}

.infra-panel {
  background: var(--footer-bg);
  color: var(--on-dark);
  border-radius: var(--radius-xl);
  padding: 2rem 2.25rem;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset;
}

.infra-panel h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 1rem;
  color: var(--on-dark);
}

.code-block {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.code-block .token-key {
  color: #98c379;
}

.code-block .token-str {
  color: #56b6c2;
}

.code-block .token-accent {
  color: var(--accent-soft);
}

.spin-ring {
  position: absolute;
  top: -20px;
  right: -20px;
  width: 120px;
  height: 120px;
  border: 3px solid var(--accent-muted);
  border-top-color: var(--primary);
  border-radius: 50%;
  opacity: 0.9;
  animation: spin-slow 12s linear infinite;
  pointer-events: none;
}

@keyframes spin-slow {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .spin-ring {
    animation: none;
  }
}

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

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

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

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

.section-header h2 {
  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);
  margin: 0 0 0.75rem;
}

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

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

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

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

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

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

/* Trust */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  text-align: center;
}

.trust-metric {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 0.25rem;
}

.trust-label {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.trust-note {
  margin-top: 2.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--surface-alt);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
}

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  counter-reset: step;
}

.step {
  counter-increment: step;
}

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

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

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

/* CTA band */
.cta-band {
  background: var(--footer-bg);
  color: var(--on-dark);
  padding: var(--section-pad) 0;
  text-align: center;
}

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

.cta-band p {
  margin: 0 auto 1.75rem;
  max-width: 36rem;
  color: rgba(250, 250, 250, 0.75);
  font-size: 1.0625rem;
  line-height: 1.55;
}

.cta-band .btn-primary {
  font-size: 16px;
}

/* Footer */
.site-footer {
  background: var(--footer-bg);
  color: rgba(250, 250, 250, 0.65);
  padding: 3rem 0 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
  line-height: 1.5;
}

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

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

.footer-legal {
  margin: 0;
}

.footer-legal a {
  color: var(--accent-soft);
}

.footer-copy {
  margin: 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(250, 250, 250, 0.45);
}

/* Mobile nav */
@media (max-width: 768px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    gap: 0.5rem;
  }

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

  .nav-links li {
    width: 100%;
  }

  .nav-links .btn {
    width: 100%;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    order: -1;
  }

  .spin-ring {
    width: 80px;
    height: 80px;
    top: -10px;
    right: -10px;
  }

  .nav-inner {
    position: relative;
  }
}
