/* ============================================================
   UpgradePilot marketing site — design tokens
   ============================================================ */
:root {
  --color-bg: #ffffff;
  --color-bg-alt: #f8fafc;
  --color-bg-card: #ffffff;
  --color-text: #0f172a;
  --color-text-muted: #475569;
  --color-border: #e2e8f0;
  --color-primary: #4f46e5;
  --color-primary-dark: #4338ca;
  --color-accent: #8b5cf6;
  --color-success: #16a34a;
  --color-code-bg: #0f172a;
  --color-code-text: #e2e8f0;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 32px rgba(79, 70, 229, 0.16);
  --radius: 14px;
  --radius-sm: 8px;
  --max-width: 1160px;
  --gradient: linear-gradient(135deg, #4f46e5 0%, #8b5cf6 100%);
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #0b1120;
    --color-bg-alt: #0f172a;
    --color-bg-card: #131b2e;
    --color-text: #f1f5f9;
    --color-text-muted: #94a3b8;
    --color-border: #22304a;
    --color-code-bg: #060a14;
    --color-code-text: #cbd5e1;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 12px 32px rgba(99, 102, 241, 0.25);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: inherit;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 88px 0;
}

@media (max-width: 720px) {
  section {
    padding: 56px 0;
  }
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-primary);
  background: rgba(79, 70, 229, 0.1);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
}

h1,
h2,
h3,
h4 {
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.12;
}

h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  line-height: 1.2;
}

h3 {
  font-size: 1.3rem;
}

p {
  margin: 0 0 16px;
  color: var(--color-text-muted);
}

.section-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 56px;
}

.section-head p {
  font-size: 1.08rem;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: var(--shadow-lg);
}

.btn-primary:hover {
  box-shadow: 0 16px 40px rgba(79, 70, 229, 0.28);
}

.btn-secondary {
  background: var(--color-bg-card);
  color: var(--color-text);
  border-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}

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

.btn-ghost {
  background: transparent;
  color: var(--color-text);
  padding: 10px 18px;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

.btn-sm {
  padding: 9px 18px;
  font-size: 0.9rem;
}

/* ============================================================
   Nav
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--color-bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  text-decoration: none;
  color: var(--color-text);
}

.brand img {
  width: 32px;
  height: 32px;
}

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

.nav-links a {
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--color-text-muted);
  transition: color 0.15s ease;
}

.nav-links a:hover {
  color: var(--color-primary);
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  margin: 5px 0;
  border-radius: 2px;
}

@media (max-width: 860px) {
  .nav-links {
    position: fixed;
    inset: 72px 0 0 0;
    background: var(--color-bg);
    flex-direction: column;
    padding: 32px 24px;
    gap: 20px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

  .nav-links.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .nav-toggle {
    display: block;
  }

  .nav-cta .btn-ghost {
    display: none;
  }
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  padding-top: 96px;
  padding-bottom: 64px;
  text-align: center;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  top: -160px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 500px;
  background: radial-gradient(closest-side, rgba(139, 92, 246, 0.22), transparent);
  z-index: -1;
}

.hero-lead {
  max-width: 680px;
  margin: 0 auto 36px;
  font-size: 1.15rem;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

.hero-badges {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.badge {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-text-muted);
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  padding: 6px 14px;
  border-radius: 999px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  max-width: 760px;
  margin: 0 auto;
}

.stat {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px 12px;
  box-shadow: var(--shadow-sm);
}

.stat strong {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--color-primary);
}

.stat span {
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

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

/* ============================================================
   Why / feature grid
   ============================================================ */
.why {
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 900px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }
}

.feature-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  color: #fff;
  font-size: 1.3rem;
}

.feature-card h3 {
  margin-bottom: 8px;
}

.feature-card p {
  margin: 0;
  font-size: 0.96rem;
}

/* ============================================================
   Pricing cards
   ============================================================ */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  align-items: stretch;
}

@media (max-width: 860px) {
  .plans-grid {
    grid-template-columns: 1fr;
  }
}

.plan-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  position: relative;
}

.plan-card.featured {
  border: 2px solid var(--color-primary);
  box-shadow: var(--shadow-lg);
}

.plan-tag {
  position: absolute;
  top: -14px;
  left: 36px;
  background: var(--gradient);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
}

.plan-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.plan-price {
  font-size: 2.4rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.plan-price span {
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

.plan-desc {
  font-size: 0.96rem;
  margin-bottom: 24px;
}

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

.plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.95rem;
  padding: 9px 0;
  border-bottom: 1px solid var(--color-border);
}

.plan-features li:last-child {
  border-bottom: none;
}

.plan-features .check {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(22, 163, 74, 0.12);
  color: var(--color-success);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  margin-top: 2px;
}

/* ============================================================
   Comparison table
   ============================================================ */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

table.compare {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
  background: var(--color-bg-card);
}

table.compare th,
table.compare td {
  text-align: left;
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.94rem;
}

table.compare th {
  background: var(--color-bg-alt);
  font-weight: 700;
}

table.compare tbody tr:last-child td {
  border-bottom: none;
}

table.compare td:first-child {
  font-weight: 600;
  color: var(--color-text);
}

table.compare .yes {
  color: var(--color-success);
  font-weight: 700;
}

table.compare .muted {
  color: var(--color-text-muted);
}

/* ============================================================
   Code block (hero mock)
   ============================================================ */
.code-block {
  background: var(--color-code-bg);
  color: var(--color-code-text);
  border-radius: var(--radius);
  padding: 22px 26px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.88rem;
  text-align: left;
  max-width: 640px;
  margin: 0 auto;
  box-shadow: var(--shadow-lg);
  overflow-x: auto;
}

.code-block .dim {
  color: #64748b;
}

.code-block .green {
  color: #4ade80;
}

.code-block .violet {
  color: #a78bfa;
}

/* ============================================================
   Contact
   ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

@media (max-width: 860px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

.contact-info h3 {
  margin-top: 28px;
}

.contact-info h3:first-child {
  margin-top: 0;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.contact-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  font-size: 0.96rem;
}

.contact-list a {
  text-decoration: none;
  color: var(--color-primary);
  font-weight: 600;
}

.icon-dot {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

form.contact-form {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-md);
}

.form-row {
  margin-bottom: 18px;
}

.form-row label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text);
  font-family: inherit;
  font-size: 0.95rem;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.form-note {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin-top: 14px;
  margin-bottom: 0;
}

.form-status {
  margin-top: 14px;
  font-size: 0.9rem;
  font-weight: 600;
  display: none;
}

.form-status.show {
  display: block;
}

.form-status.ok {
  color: var(--color-success);
}

.form-status.err {
  color: #dc2626;
}

/* ============================================================
   CTA banner
   ============================================================ */
.cta-banner {
  background: var(--gradient);
  border-radius: var(--radius);
  padding: 56px 40px;
  text-align: center;
  color: #fff;
}

.cta-banner h2 {
  color: #fff;
}

.cta-banner p {
  color: rgba(255, 255, 255, 0.88);
  max-width: 560px;
  margin: 0 auto 28px;
}

.cta-banner .btn-secondary {
  background: #fff;
  color: var(--color-primary-dark);
  border: none;
}

.cta-banner .btn-ghost {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

/* ============================================================
   Footer
   ============================================================ */
footer {
  border-top: 1px solid var(--color-border);
  padding: 48px 0 28px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 32px;
  margin-bottom: 32px;
}

.footer-brand p {
  max-width: 320px;
  font-size: 0.9rem;
}

.footer-cols {
  display: flex;
  gap: 56px;
  flex-wrap: wrap;
}

.footer-col h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-bottom: 14px;
}

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

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

.footer-col a {
  text-decoration: none;
  color: var(--color-text);
  font-size: 0.92rem;
}

.footer-col a:hover {
  color: var(--color-primary);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* ============================================================
   Utility
   ============================================================ */
.center {
  text-align: center;
}

.mt-0 {
  margin-top: 0;
}

/* ============================================================
   Multi-page additions (SEO / content pages)
   ============================================================ */
.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--color-primary);
  color: #fff;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  z-index: 100;
}
.skip-link:focus { left: 8px; }

.nav-links a[aria-current="page"] { color: var(--color-primary); }

section.tight { padding: 40px 0; }
section.alt {
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}
.container.narrow { max-width: 820px; }

.page-hero { padding: 56px 0 32px; }
.page-hero .lead { font-size: 1.1rem; color: var(--color-text-muted); }
.crumbs { font-size: 0.85rem; color: var(--color-text-muted); margin-bottom: 18px; }
.crumbs a { color: var(--color-text-muted); text-decoration: none; }
.crumbs a:hover { color: var(--color-primary); }
.crumbs span { margin: 0 4px; }

.answer {
  border-left: 4px solid var(--color-primary);
  background: var(--color-bg-alt);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 16px 20px;
  margin: 20px 0 0;
  color: var(--color-text);
  font-size: 1.02rem;
}
.answer strong:first-child { color: var(--color-primary); margin-right: 4px; }

.notice {
  border: 1px dashed var(--color-accent);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-bottom: 32px;
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

.prose h2 { margin-top: 40px; scroll-margin-top: 90px; }
.prose p, .prose li { color: var(--color-text-muted); }
.prose ul { padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.prose a, .faq-a a { color: var(--color-primary); }
ul.ticks { list-style: none; padding-left: 0; }
.prose ul.ticks { padding-left: 0; }
ul.ticks li { position: relative; padding-left: 28px; }
ul.ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--color-success); font-weight: 700; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-3 { grid-template-columns: 1fr; } }

.card-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 26px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.card-link:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--color-primary); }
.card-link h3 { margin: 8px 0 6px; }
.card-link p { font-size: 0.95rem; color: var(--color-text-muted); flex: 1; }
.link-arrow { color: var(--color-primary); font-weight: 600; text-decoration: none; font-size: 0.95rem; }
a.link-arrow:hover { text-decoration: underline; }

.pill {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
}
.pill-up { background: rgba(79, 70, 229, 0.1); border-color: rgba(79, 70, 229, 0.3); color: var(--color-primary); }

.two-col { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } }
.panel {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px;
}
.panel-accent { border-color: var(--color-primary); box-shadow: var(--shadow-lg); }
.panel h3 { margin-top: 10px; }

.steps { counter-reset: step; list-style: none; padding: 0; max-width: 820px; margin: 0 auto; }
.steps li {
  counter-increment: step;
  position: relative;
  padding: 0 0 22px 56px;
  color: var(--color-text-muted);
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -2px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.steps strong { color: var(--color-text); }

.doc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 16px 0 8px; }
@media (max-width: 640px) { .doc-grid { grid-template-columns: 1fr; } }
.doc-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg-card);
  text-decoration: none;
  color: var(--color-text);
  font-size: 0.9rem;
}
.doc-card:hover { border-color: var(--color-primary); }
.doc-card strong { font-size: 1rem; }
.doc-card span:last-child { color: var(--color-text-muted); }

.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg-card);
  margin-bottom: 12px;
}
.faq-item summary {
  cursor: pointer;
  padding: 16px 20px;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--color-primary); font-size: 1.3rem; line-height: 1; }
.faq-item[open] summary::after { content: "–"; }
.faq-a { padding: 0 20px 6px; color: var(--color-text-muted); }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  padding: 6px 14px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.9rem;
  color: var(--color-text);
}
.chip:hover { border-color: var(--color-primary); color: var(--color-primary); }

.scenario {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 24px;
  scroll-margin-top: 90px;
}
.scenario h2 { font-size: 1.4rem; margin: 10px 0 14px; }
.scenario dt { font-weight: 700; margin-top: 12px; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--color-primary); }
.scenario dd { margin: 4px 0 0; color: var(--color-text-muted); }

.contact-info ul.ticks { margin-bottom: 24px; }
.contact-info ul.ticks li { color: var(--color-text-muted); margin-bottom: 8px; }
