/* Altahdi — 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;
  --border: #e5e5e5;
  --border-strong: #d4d4d4;
  --link: #ff4801;
  --success: #00bd7d;
  --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% - 48px));
  --nav-height: 64px;
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-ui: "IBM Plex Sans", 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;
  letter-spacing: -0.005em;
  color: var(--body);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
}

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

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

a:hover {
  text-decoration: underline;
}

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

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

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

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

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

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

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

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

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

.brand-mark {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 8px;
}

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

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

.header-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, border-color 0.15s ease, transform 0.1s 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-lg {
  padding: 14px 24px;
  font-size: 15px;
}

.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-mobile {
  display: none;
  position: fixed;
  inset: var(--nav-height) 0 0 0;
  background: var(--surface);
  padding: 24px;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--border);
  overflow-y: auto;
  z-index: 999;
}

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

.nav-mobile a {
  color: var(--ink);
  font-weight: 500;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  text-decoration: none;
}

.nav-mobile a:hover {
  background: var(--surface-alt);
}

/* Hero */
.hero {
  background: var(--accent-wash);
  padding: 48px 0 80px;
  border-bottom: 1px solid var(--accent-muted);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  gap: 48px;
  align-items: center;
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(48px, 12vw, 88px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin: 0 0 16px;
}

.hero-brand span {
  color: var(--accent);
}

.hero h1 {
  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;
}

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

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

.hero-search {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 480px;
  margin-top: 8px;
}

.hero-search input {
  flex: 1 1 200px;
  min-height: 52px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-family: var(--font-ui);
  font-size: 16px;
  background: var(--surface);
}

.hero-search input:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 72, 1, 0.2);
}

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

.network-diagram {
  width: 100%;
  aspect-ratio: 4/3;
}

.hero-note {
  font-size: 13px;
  color: var(--muted);
  margin: 16px 0 0;
}

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

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

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

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

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

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

.card-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
}

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

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

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

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

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

.plan-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
}

.plan-card.featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.plan-label {
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 0 0 8px;
}

.plan-card h3 {
  font-family: var(--font-display);
  font-size: 24px;
  margin: 0 0 8px;
  color: var(--ink);
}

.plan-price {
  font-size: 32px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 4px;
}

.plan-price span {
  font-size: 16px;
  font-weight: 400;
  color: var(--muted);
}

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

.plan-features li {
  padding: 8px 0;
  font-size: 15px;
  color: var(--body);
  border-bottom: 1px solid var(--border);
  padding-left: 24px;
  position: relative;
}

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

.plan-card .btn {
  width: 100%;
}

.pricing-disclaimer {
  font-size: 13px;
  color: var(--muted);
  margin-top: 32px;
  line-height: 1.45;
}

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

.dark-panel h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 36px);
  margin: 0 0 12px;
  color: var(--on-dark);
}

.dark-panel p {
  color: #a3a3a3;
  font-size: 16px;
  max-width: 560px;
  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;
  border: 1px solid #333;
}

.code-panel .tok-key {
  color: #ff7038;
}

.code-panel .tok-str {
  color: #98c379;
}

.code-panel .tok-cmt {
  color: #707070;
}

/* Testimonials */
.testimonial-grid {
  display: grid;
  gap: 24px;
}

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

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

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

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

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

.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 20px 40px 20px 0;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  position: relative;
  min-height: 44px;
}

.faq-question::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 24px;
  font-weight: 400;
  color: var(--accent);
}

.faq-item.is-open .faq-question::after {
  content: "−";
}

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

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

/* CTA band */
.cta-band {
  background: var(--accent-wash);
  border-top: 1px solid var(--accent-muted);
  border-bottom: 1px solid var(--accent-muted);
  text-align: center;
  padding: 64px 24px;
}

.cta-band h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 40px);
  margin: 0 0 12px;
  color: var(--ink);
}

.cta-band p {
  color: var(--muted);
  margin: 0 0 28px;
  font-size: 18px;
}

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

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

.footer-brand {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--on-dark);
  margin-bottom: 12px;
}

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

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

.footer-col li {
  margin-bottom: 10px;
}

.footer-col a {
  color: #a3a3a3;
  text-decoration: none;
}

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

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

.promo-banner {
  background: var(--ink);
  color: var(--on-dark);
  text-align: center;
  padding: 12px 24px;
  font-size: 14px;
}

.promo-banner a {
  color: var(--accent-soft);
  font-weight: 500;
}

.feature-split {
  display: grid;
  gap: 48px;
  align-items: center;
}

.feature-split h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 36px);
  margin: 0 0 12px;
  color: var(--ink);
}

.feature-split p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
  margin: 0;
}

.media-frame {
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--surface-alt);
  padding: 32px;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

  .nav-desktop {
    display: flex;
  }

  .header-actions .btn-ghost.login-desktop {
    display: inline-flex;
  }

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

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

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

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

  .pricing-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .testimonial-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .feature-split {
    grid-template-columns: 1fr 1fr;
  }

  .feature-split.reverse .feature-copy {
    order: 2;
  }

  .feature-split.reverse .feature-media {
    order: 1;
  }

  .footer-grid {
    grid-template-columns: 1.5fr repeat(3, 1fr);
  }

  .section {
    padding: 112px 0;
  }
}

@media (max-width: 767px) {
  .header-actions .login-desktop {
    display: none;
  }
}