
:root {
  --am-bg: #ffffff;
  --am-bg-dark: #020617;
  --am-text: #0b1220;
  --am-text-muted: #6b7280;
  --am-primary: #2563eb;
  --am-primary-soft: #60a5fa;
  --am-radius-card: 20px;
  --am-shadow-soft: 0 18px 45px rgba(15,23,42,0.12);
}

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

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", sans-serif;
  background: var(--am-bg);
  color: var(--am-text);
  -webkit-font-smoothing: antialiased;
  transition: background 0.25s ease, color 0.25s ease;
}

body.dark {
  background: var(--am-bg-dark);
  color: #e5e7eb;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

/* Header */

header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(16px);
  background: rgba(255,255,255,0.96);
  border-bottom: 1px solid rgba(148,163,184,0.35);
}
body.dark header {
  background: rgba(15,23,42,0.96);
  border-bottom-color: rgba(30,64,175,0.7);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.75rem 0;
}

.brand {
  display: flex;
  align-items: center;
  min-width: 260px;
}

.brand-img {
  height: 140px;
  width: auto;
  object-fit: contain;
}

.brand-logo-dark { display: none; }
body.dark .brand-logo-light { display: none; }
body.dark .brand-logo-dark { display: block; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.95rem;
  color: var(--am-text-muted);
}
body.dark .nav-links { color: #9ca3af; }

.nav-links a {
  position: relative;
  font-weight: 500;
}
.nav-links a.active { color: var(--am-text); }
body.dark .nav-links a.active { color: #e5e7eb; }

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.35rem;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg,#60a5fa,#2563eb);
  transition: width 0.16s ease-out;
}
.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.3rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.16s ease;
}

.btn-primary {
  background: linear-gradient(135deg,#2563eb,#1d4ed8);
  color: #f9fafb;
  box-shadow: 0 12px 28px rgba(37,99,235,0.45);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 40px rgba(37,99,235,0.65);
}

.btn-outline {
  border-color: rgba(148,163,184,0.7);
  background: transparent;
  color: var(--am-text);
}
body.dark .btn-outline {
  color: #e5e7eb;
  background: rgba(15,23,42,0.9);
}
.btn-outline:hover { background: #e5e7eb33; }

.nav-cta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* Theme toggle */

.mode-toggle {
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f9fafb;
  cursor: pointer;
  font-size: 1rem;
}
body.dark .mode-toggle { background: #020617; }

/* Mobile nav */

.nav-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.7);
  background: #f9fafb;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
body.dark .nav-toggle { background: #020617; }

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: #111827;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
body.dark .nav-toggle span,
body.dark .nav-toggle span::before,
body.dark .nav-toggle span::after { background: #e5e7eb; }

.nav-toggle span::before { transform: translateY(-5px); }
.nav-toggle span::after { transform: translateY(5px); }
.nav-toggle.active span { transform: rotate(45deg); }
.nav-toggle.active span::before { transform: rotate(-90deg); }
.nav-toggle.active span::after { opacity: 0; }

.nav-mobile {
  display: none;
  flex-direction: column;
  gap: 0.8rem;
  padding: 0.85rem 0 1.2rem;
  font-size: 0.94rem;
  border-top: 1px solid rgba(148,163,184,0.2);
}

/* Hero */

.hero { padding: 2.4rem 0 3.6rem; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0,1.15fr) minmax(0,0.85fr);
  gap: 2.4rem;
  align-items: center;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.76rem;
  margin-bottom: 0.9rem;
}
body.dark .hero-kicker { background: #1f2933; color: #bfdbfe; }

.hero-kicker span.badge {
  padding: 0.16rem 0.55rem;
  border-radius: 999px;
  background: rgba(37,99,235,0.12);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.7rem;
}

.hero h1 {
  font-size: clamp(2.4rem, 3vw + 1.6rem, 3.3rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin: 0 0 0.7rem;
}
.hero h1 span {
  background: linear-gradient(120deg,#2563eb,#0ea5e9);
  -webkit-background-clip: text;
  color: transparent;
}

.hero-sub {
  font-size: 1rem;
  color: var(--am-text-muted);
  max-width: 34rem;
  margin-bottom: 1.5rem;
}
body.dark .hero-sub { color: #9ca3af; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 1.1rem;
}

.hero-footnote {
  font-size: 0.82rem;
  color: var(--am-text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.hero-footnote span.dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34,197,94,0.35);
}
body.dark .hero-footnote { color: #9ca3af; }

/* Hero metrics card */

.hero-card {
  border-radius: 26px;
  padding: 1.5rem 1.4rem;
  border: 1px solid rgba(148,163,184,0.35);
  background: radial-gradient(circle at 0% 0%,#eff6ff,#ffffff 45%,#e5e7eb 100%);
  box-shadow: var(--am-shadow-soft);
}
body.dark .hero-card {
  background: radial-gradient(circle at 0% 0%,#111827,#020617 60%);
  border-color: rgba(148,163,184,0.5);
}

.hero-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.hero-card-metric-main { font-size: 1.7rem; font-weight: 700; }
.hero-card-metric-sub { font-size: 0.82rem; color: #6b7280; }
body.dark .hero-card-metric-sub { color: #9ca3af; }

.hero-card-pill {
  font-size: 0.7rem;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  background: rgba(37,99,235,0.08);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #1d4ed8;
}
body.dark .hero-card-pill {
  background: #020617;
  border: 1px solid rgba(96,165,250,0.7);
  color: #bfdbfe;
}

.hero-card-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 0.85rem;
  margin-top: 1.1rem;
}
.metric-tile {
  border-radius: 18px;
  padding: 0.8rem 0.9rem;
  border: 1px solid rgba(148,163,184,0.4);
  background: #ffffff;
}
body.dark .metric-tile {
  background: #020617;
  border-color: rgba(148,163,184,0.5);
}
.metric-label { font-size: 0.72rem; color: #6b7280; }
body.dark .metric-label { color: #9ca3af; }
.metric-value { font-size: 1.05rem; font-weight: 600; }
.metric-pill-good {
  margin-top: 0.25rem;
  font-size: 0.74rem;
  color: #16a34a;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.metric-pill-good span.dot {
  width: 6px; height: 6px; border-radius: 999px; background: #22c55e;
}

/* Sections */

.section { padding: 3.1rem 0; }
.section-light { background: #f9fafb; }
body.dark .section-light { background: #020617; }

.section-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section-header {
  max-width: 650px;
  margin: 0 auto 2rem;
  text-align: center;
}
.section-kicker {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #9ca3af;
  margin-bottom: 0.3rem;
}
.section-title {
  font-size: 1.7rem;
  letter-spacing: -0.03em;
  margin-bottom: 0.35rem;
}
.section-subtitle {
  font-size: 0.95rem;
  color: var(--am-text-muted);
}
body.dark .section-subtitle { color: #9ca3af; }

.feature-row {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 1rem;
}
.feature-card {
  border-radius: 18px;
  padding: 1.1rem 1rem;
  background: #ffffff;
  border: 1px solid rgba(148,163,184,0.35);
}
body.dark .feature-card {
  background: #020617;
  border-color: rgba(148,163,184,0.5);
}
.feature-card h3 {
  font-size: 0.98rem;
  margin: 0 0 0.25rem;
}
.feature-card p {
  font-size: 0.84rem;
  color: var(--am-text-muted);
}
body.dark .feature-card p { color: #9ca3af; }

/* Steps */

.steps-grid {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 1.1rem;
}
.step-card {
  border-radius: 18px;
  padding: 1rem 1rem 0.9rem;
  border: 1px solid rgba(148,163,184,0.35);
  background: #ffffff;
}
body.dark .step-card {
  background: #020617;
  border-color: rgba(148,163,184,0.5);
}
.step-badge {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: rgba(37,99,235,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.86rem;
  font-weight: 600;
  margin-bottom: 0.45rem;
}
body.dark .step-badge { background: rgba(37,99,235,0.3); }
.step-title { font-size: 0.96rem; font-weight: 600; margin-bottom: 0.2rem; }
.step-body { font-size: 0.84rem; color: var(--am-text-muted); }
body.dark .step-body { color: #9ca3af; }

/* Pricing */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 1.6rem;
}
.plan {
  border-radius: 22px;
  padding: 1.6rem 1.4rem;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 8px 22px rgba(15,23,42,0.08);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
body.dark .plan {
  background: #020617;
  border-color: rgba(148,163,184,0.5);
  box-shadow: 0 16px 40px rgba(15,23,42,0.9);
}
.plan.highlight {
  border-color: var(--am-primary);
  box-shadow: 0 18px 40px rgba(37,99,235,0.25);
  position: relative;
}
.plan.highlight::before {
  content: "Most popular";
  position: absolute;
  top: 1.1rem;
  right: 1.2rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 0.16rem 0.6rem;
  border-radius: 999px;
  background: rgba(37,99,235,0.08);
  color: #1d4ed8;
}
body.dark .plan.highlight::before {
  background: rgba(37,99,235,0.25);
  color: #bfdbfe;
}
.plan-name { font-weight: 600; margin-bottom: 0.15rem; }
.plan-tagline { font-size: 0.88rem; color: var(--am-text-muted); margin-bottom: 0.7rem; }
body.dark .plan-tagline { color: #9ca3af; }
.plan-price { font-size: 1.8rem; font-weight: 700; }
.plan-price span { font-size: 0.86rem; margin-left: 0.1rem; color: var(--am-text-muted); }
body.dark .plan-price span { color: #9ca3af; }
.plan-items {
  list-style: none;
  padding: 0;
  margin: 0.9rem 0 1.2rem;
  font-size: 0.86rem;
  color: #4b5563;
}
body.dark .plan-items { color: #e5e7eb; }
.plan-items li {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.4rem;
}
.plan-items li::before {
  content: "✓";
  font-size: 0.8rem;
  color: #16a34a;
}

/* Developers */

.docs-layout {
  display: grid;
  grid-template-columns: minmax(0,0.9fr) minmax(0,1.1fr);
  gap: 2.2rem;
}
.docs-nav,
.docs-content {
  border-radius: 18px;
  padding: 1.4rem 1.4rem;
  background: #ffffff;
  border: 1px solid #e5e7eb;
}
body.dark .docs-nav,
body.dark .docs-content {
  background: #020617;
  border-color: rgba(148,163,184,0.5);
}
.docs-nav h3 { margin-top: 0; font-size: 0.96rem; }

.docs-nav ul {
  list-style: none;
  padding: 0;
  margin: 0.6rem 0 0;
  font-size: 0.86rem;
  color: #4b5563;
}
body.dark .docs-nav ul { color: #e5e7eb; }

.code-block {
  background: #020617;
  color: #e5e7eb;
  border-radius: 10px;
  padding: 0.85rem 0.9rem;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  overflow-x: auto;
}

/* Contact */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0,1.15fr) minmax(0,0.9fr);
  gap: 2.1rem;
}
.contact-card {
  border-radius: 22px;
  padding: 1.7rem 1.5rem;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 26px rgba(15,23,42,0.08);
}
body.dark .contact-card {
  background: #020617;
  border-color: rgba(148,163,184,0.5);
  box-shadow: 0 16px 40px rgba(15,23,42,0.95);
}

.field { margin-bottom: 0.9rem; }
.field label {
  display: block;
  font-size: 0.84rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.6rem 0.7rem;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  background: #f9fafb;
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: border 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--am-primary);
  box-shadow: 0 0 0 1px rgba(37,99,235,0.35);
  background: #ffffff;
}
body.dark .field input,
body.dark .field select,
body.dark .field textarea {
  background: #020617;
  border-color: rgba(148,163,184,0.5);
  color: #e5e7eb;
}
body.dark .field input:focus,
body.dark .field select:focus,
body.dark .field textarea:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 1px rgba(96,165,250,0.6);
}
.field-hint {
  font-size: 0.76rem;
  color: #6b7280;
  margin-top: 0.18rem;
}
body.dark .field-hint { color: #9ca3af; }

textarea { min-height: 110px; resize: vertical; }

/* Footer */

footer {
  margin-top: auto;
  padding: 1.7rem 0 1.9rem;
  background: #f9fafb;
  border-top: 1px solid #e5e7eb;
  font-size: 0.78rem;
  color: #6b7280;
}
body.dark footer {
  background: #020617;
  border-top-color: #111827;
  color: #9ca3af;
}
.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-links { display: flex; gap: 1rem; }
.footer-links a { text-decoration: underline; text-underline-offset: 3px; }

/* Reveal animation */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive / mobile header restructuring */

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: minmax(0,1fr); }
  .hero-card { margin-top: 1.3rem; }
  .feature-row,
  .pricing-grid,
  .steps-grid,
  .docs-layout,
  .contact-grid {
    grid-template-columns: minmax(0,1fr);
  }
}

@media (max-width: 720px) {
  header {
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
  }

  .nav {
    padding: 0.35rem 0;
    align-items: center;
  }

  .brand {
    flex: 1;
    min-width: 0;
  }

  .brand-img {
    height: 80px;
  }

  .nav-links,
  .nav-cta { display: none; }

  .nav-toggle {
    display: inline-flex;
    margin-left: 0.5rem;
  }

  .nav-mobile {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: #ffffffee;
    backdrop-filter: blur(14px);
    box-shadow: 0 16px 40px rgba(15,23,42,0.18);
    border-bottom-left-radius: 18px;
    border-bottom-right-radius: 18px;
    padding: 0.8rem 1.25rem 1.2rem;
    gap: 0.6rem;
  }
  body.dark .nav-mobile {
    background: #020617f0;
    box-shadow: 0 16px 40px rgba(0,0,0,0.75);
  }

  .nav-mobile a {
    padding: 0.25rem 0;
    font-size: 0.95rem;
  }

  .nav-mobile .btn-primary {
    width: 100%;
    margin-top: 0.9rem;
    border-radius: 14px;
  }

  .hero { padding-top: 1.6rem; }
}
