/* Habobi — Cloudflare design tokens */
:root {
  --primary: #FF4801;
  --accent: #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;
  --surface-warm: #FFFBF5;
  --border: #E5E5E5;
  --border-strong: #D4D4D4;
  --link: #FF4801;
  --success: #00BD7D;
  --footer-bg: #171717;
  --on-primary: #FFFFFF;
  --on-dark: #FAFAFA;
  --code-green: #98C379;
  --code-cyan: #56B6C2;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-pill: 9999px;
  --font-display: "Syne", system-ui, sans-serif;
  --font-ui: "DM Sans", system-ui, sans-serif;
  --font-mono: ui-monospace, "Menlo", monospace;
  --container: min(1200px, 100% - 48px);
  --nav-height: 64px;
}

*,
*::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(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10000;
  padding: 12px 20px;
  background: var(--ink);
  color: var(--on-dark);
}

.skip-link:focus {
  left: 16px;
  top: 16px;
}

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

/* Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  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);
}

.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}

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

.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.nav-links {
  display: none;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  text-decoration: none;
}

.nav-links a:hover {
  background: var(--surface-alt);
  text-decoration: none;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  padding: 12px 20px;
  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;
  min-height: 44px;
}

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

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

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

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

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

.btn-ghost {
  background: transparent;
  color: var(--body);
}

.btn-ghost:hover {
  color: var(--ink);
  text-decoration: none;
}

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

.btn-on-dark:hover {
  background: var(--surface-alt);
  color: var(--ink);
  text-decoration: none;
}

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

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

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

  .nav-toggle {
    display: none;
  }

  .nav-login {
    display: inline-flex;
  }
}

.mobile-drawer {
  display: none;
  position: fixed;
  inset: var(--nav-height) 0 0 0;
  background: var(--surface);
  z-index: 999;
  padding: 24px;
  border-top: 1px solid var(--border);
  overflow-y: auto;
}

.mobile-drawer.is-open {
  display: block;
}

.mobile-drawer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-drawer a {
  display: block;
  padding: 14px 0;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  border-bottom: 1px solid var(--border);
  text-decoration: none;
}

.mobile-drawer .drawer-cta {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (min-width: 900px) {
  .mobile-drawer {
    display: none !important;
  }
}

/* Hero */
.hero {
  background: var(--accent-wash);
  padding: 80px 0 96px;
  overflow: hidden;
}

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

@media (min-width: 900px) {
  .hero {
    padding: 120px 0;
  }

  .hero-grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 64px;
  }
}

.hero-brand {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(14px, 2vw, 16px);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 16px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 600;
  line-height: 1.0;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin: 0 0 20px;
}

.hero-title .brand-word {
  display: block;
  color: var(--ink);
}

.hero-lead {
  font-size: 18px;
  line-height: 1.55;
  color: var(--body);
  max-width: 32rem;
  margin: 0 0 32px;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

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

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

.network-diagram {
  aspect-ratio: 4/3;
  background: linear-gradient(145deg, var(--surface-alt) 0%, var(--surface) 50%, var(--accent-muted) 100%);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}

.network-diagram::before {
  content: "";
  position: absolute;
  inset: -50%;
  background: conic-gradient(from 0deg, transparent, rgba(255, 72, 1, 0.08), transparent 30%);
  animation: beam 12s linear infinite;
}

@keyframes beam {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .network-diagram::before {
    animation: none;
  }

  html {
    scroll-behavior: auto;
  }
}

.diagram-nodes {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.diagram-hub {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 0 0 8px rgba(255, 72, 1, 0.15);
  z-index: 2;
}

.diagram-orbit {
  position: absolute;
  width: 85%;
  height: 85%;
  border: 1px dashed var(--border-strong);
  border-radius: 50%;
}

.diagram-node {
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}

.diagram-node:nth-child(1) { top: 8%; left: 50%; transform: translateX(-50%); }
.diagram-node:nth-child(2) { right: 8%; top: 50%; transform: translateY(-50%); }
.diagram-node:nth-child(3) { bottom: 8%; left: 50%; transform: translateX(-50%); }
.diagram-node:nth-child(4) { left: 8%; top: 50%; transform: translateY(-50%); }

/* Sections */
.section {
  padding: 80px 0;
}

@media (min-width: 900px) {
  .section {
    padding: 112px 0;
  }
}

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

.section-warm {
  background: var(--accent-wash);
}

.section-header {
  max-width: 640px;
  margin-bottom: 48px;
}

.section-header.centered {
  margin-inline: auto;
  text-align: center;
}

.section-eyebrow {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin: 0 0 12px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 16px;
}

.section-desc {
  font-size: 18px;
  line-height: 1.55;
  color: var(--muted);
  margin: 0;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

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

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

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

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

.card h3 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 8px;
}

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

/* Dark infra */
.infra-panel {
  background: var(--footer-bg);
  color: var(--on-dark);
  border-radius: var(--radius-xl);
  padding: 40px 24px;
  display: grid;
  gap: 32px;
}

@media (min-width: 900px) {
  .infra-panel {
    grid-template-columns: 1fr 1fr;
    padding: 48px;
    align-items: center;
  }
}

.infra-copy h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}

.infra-copy p {
  color: rgba(250, 250, 250, 0.75);
  font-size: 16px;
  line-height: 1.55;
  margin: 0 0 24px;
}

.code-panel {
  background: #1A1A1A;
  border-radius: var(--radius-lg);
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  overflow-x: auto;
}

.code-panel .kw { color: var(--code-cyan); }
.code-panel .str { color: var(--code-green); }
.code-panel .acc { color: var(--accent-soft); }
.code-panel .muted { color: #707070; }

/* Pricing */
.pricing-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}

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

.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
}

.pricing-card.featured {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
  position: relative;
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 24px;
  background: var(--primary);
  color: white;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
}

.pricing-card h3 {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--ink);
}

.pricing-price {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  color: var(--ink);
  margin: 16px 0;
}

.pricing-price span {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
}

.pricing-list {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  flex: 1;
}

.pricing-list li {
  font-size: 14px;
  color: var(--body);
  padding: 8px 0;
  padding-left: 24px;
  position: relative;
}

.pricing-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
}

/* Testimonials */
.testimonials {
  display: grid;
  gap: 20px;
}

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

.testimonial {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.testimonial blockquote {
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--body);
}

.testimonial cite {
  font-style: normal;
  font-size: 13px;
  color: var(--muted);
}

.testimonial cite strong {
  display: block;
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 2px;
}

/* FAQ */
.faq-list {
  max-width: 720px;
  margin-inline: auto;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

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

.faq-question:hover {
  color: var(--primary);
}

.faq-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.faq-item.is-open .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  display: none;
  padding: 0 0 20px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
}

.faq-item.is-open .faq-answer {
  display: block;
}

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

.cta-band h2 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 600;
  letter-spacing: -0.025em;
  margin: 0 0 16px;
}

.cta-band p {
  font-size: 18px;
  color: rgba(250, 250, 250, 0.8);
  max-width: 36rem;
  margin: 0 auto 32px;
}

.cta-band-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

/* Footer */
.site-footer {
  background: var(--footer-bg);
  color: rgba(250, 250, 250, 0.65);
  padding: 64px 0 32px;
  border-top: 1px solid #2a2a2a;
}

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

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

.footer-brand .logo {
  color: var(--on-dark);
  margin-bottom: 12px;
}

.footer-brand p {
  font-size: 14px;
  margin: 0;
  max-width: 280px;
}

.footer-col h4 {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--on-dark);
  margin: 0 0 16px;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col a {
  display: block;
  font-size: 14px;
  color: rgba(250, 250, 250, 0.65);
  padding: 6px 0;
  text-decoration: none;
}

.footer-col a:hover {
  color: var(--on-dark);
  text-decoration: none;
}

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

.related-links {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

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

@media (min-width: 900px) {
  .related-links {
    grid-template-columns: repeat(4, 1fr);
  }
}

.related-link {
  display: block;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.15s ease;
}

.related-link:hover {
  border-color: var(--primary);
  text-decoration: none;
}

.related-link strong {
  display: block;
  font-size: 16px;
  margin-bottom: 6px;
}

.related-link span {
  font-size: 14px;
  color: var(--muted);
}