/* DIY Repair AI — marketing site
   Brand tokens pulled from the app's Resources/Theme.swift so the site and
   the product read as one thing. */

:root {
  --bg: #05070c;
  --bg-alt: #0a0d16;
  --surface: #12151f;
  --surface-2: #171b28;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f5f7fa;
  --text-muted: #98a1b3;
  --text-faint: #6b7385;

  --blue: #2563eb;
  --blue-light: #3b82f6;
  --indigo: #6366f1;
  --green: #10b981;
  --amber: #f59e0b;
  --red: #ef4444;

  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --container: 1160px;

  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue-light);
}

section { position: relative; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--blue), var(--indigo));
  color: #fff;
  box-shadow: 0 10px 30px -8px rgba(37, 99, 235, 0.55);
}
.btn-primary:hover { box-shadow: 0 14px 34px -6px rgba(37, 99, 235, 0.7); }

.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }

.btn-block { width: 100%; }
.btn-lg { padding: 16px 30px; font-size: 16px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 7, 12, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.brand img { width: 32px; height: 32px; border-radius: 9px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-muted);
}
.nav-links a:hover { color: var(--text); }

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

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.05);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  position: relative;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle span::before,
.nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

.nav-mobile-panel {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 8px 0 20px;
  border-top: 1px solid var(--border);
}
.nav-mobile-panel a {
  padding: 12px 4px;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: 10px;
}
.nav-mobile-panel a:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.nav-mobile-panel .btn { margin-top: 10px; }

body.nav-open .nav-mobile-panel { display: flex; }
body.nav-open .nav-toggle span { background: transparent; }
body.nav-open .nav-toggle span::before { transform: translateY(6px) rotate(45deg); }
body.nav-open .nav-toggle span::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  overflow: hidden;
  padding: 84px 0 40px;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 16px 0 20px;
}
.hero-sub {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 480px;
  margin-bottom: 32px;
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 28px; }
.hero-note { font-size: 13.5px; color: var(--text-faint); }

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero-glow {
  position: absolute;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.45), rgba(99, 102, 241, 0.15) 55%, transparent 75%);
  filter: blur(10px);
  z-index: 0;
}
.phone {
  position: relative;
  z-index: 1;
  width: 280px;
  border-radius: 34px;
  border: 1px solid var(--border-strong);
  box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255,255,255,0.02);
  overflow: hidden;
  transform: rotate(-1.5deg);
}
.phone img { width: 100%; }

/* ---------- How it works ---------- */
.how {
  padding: 80px 0;
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
}
.section-head { max-width: 620px; margin: 0 0 48px; }
.section-head h2 {
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-top: 14px;
}
.section-head p { color: var(--text-muted); font-size: 16.5px; margin-top: 12px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px 24px;
}
.step-num {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
  background: linear-gradient(135deg, var(--blue), var(--indigo));
  color: #fff;
  margin-bottom: 18px;
}
.step h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.step p { color: var(--text-muted); font-size: 14.5px; }

/* ---------- Features ---------- */
.features { padding: 96px 0; }
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  padding: 56px 0;
  border-top: 1px solid var(--border);
}
.feature-row:first-of-type { border-top: none; padding-top: 0; }
.feature-row.reverse .feature-copy { order: 2; }
.feature-row.reverse .feature-art { order: 1; }

.feature-tag {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.tag-blue { background: rgba(37, 99, 235, 0.16); color: var(--blue-light); }
.tag-green { background: rgba(16, 185, 129, 0.16); color: var(--green); }
.tag-amber { background: rgba(245, 158, 11, 0.16); color: var(--amber); }
.tag-indigo { background: rgba(99, 102, 241, 0.18); color: #a5a8ff; }

.feature-copy h3 {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin-bottom: 16px;
}
.feature-copy p { color: var(--text-muted); font-size: 16px; margin-bottom: 20px; }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 7px 13px;
}

.feature-art { display: flex; justify-content: center; }
.feature-art .phone { width: 240px; transform: none; }
.feature-row:nth-of-type(odd) .phone { transform: rotate(1.2deg); }
.feature-row:nth-of-type(even) .phone { transform: rotate(-1.2deg); }

/* ---------- Pricing ---------- */
.pricing {
  padding: 96px 0;
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
}
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 820px;
  margin: 0 auto;
}
.price-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
}
.price-card.pro {
  border-color: rgba(99, 102, 241, 0.5);
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.1), var(--surface) 40%);
  position: relative;
}
.price-badge {
  position: absolute;
  top: -13px;
  right: 28px;
  background: linear-gradient(135deg, var(--blue), var(--indigo));
  color: #fff;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.03em;
  padding: 6px 12px;
  border-radius: 999px;
}
.price-card h3 { font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.price-card .price {
  font-size: 40px;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin: 14px 0 4px;
}
.price-card .price span { font-size: 15px; font-weight: 600; color: var(--text-muted); }
.price-card .price-note { font-size: 13.5px; color: var(--text-faint); margin-bottom: 24px; min-height: 20px; }
.price-features { display: flex; flex-direction: column; gap: 13px; margin-bottom: 28px; flex: 1; }
.price-features li { display: flex; gap: 10px; font-size: 14.5px; color: var(--text-muted); align-items: flex-start; }
.price-features li strong { color: var(--text); font-weight: 600; }
.check {
  flex-shrink: 0;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.16);
  color: var(--green);
  font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-top: 1px;
}
.pricing-fineprint {
  max-width: 820px;
  margin: 28px auto 0;
  font-size: 13px;
  color: var(--text-faint);
  text-align: center;
  line-height: 1.6;
}
.pricing-fineprint a { color: var(--text-muted); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- FAQ ---------- */
.faq { padding: 96px 0; }
.faq-list { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 22px;
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 0;
  font-weight: 700;
  font-size: 15.5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  flex-shrink: 0;
  font-size: 20px;
  font-weight: 400;
  color: var(--text-faint);
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { color: var(--text-muted); font-size: 14.5px; padding-bottom: 20px; max-width: 640px; }

/* ---------- Final CTA ---------- */
.final-cta {
  margin: 0 24px 96px;
  max-width: calc(var(--container) - 48px);
  margin-left: auto;
  margin-right: auto;
  border-radius: var(--radius-lg);
  padding: 72px 40px;
  text-align: center;
  background: linear-gradient(135deg, #1d3fd6, var(--indigo) 60%, #7c3aed);
  overflow: hidden;
  position: relative;
}
.final-cta h2 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 14px;
}
.final-cta p { color: rgba(255,255,255,0.85); font-size: 16.5px; margin-bottom: 30px; }
.final-cta .btn-ghost { background: rgba(255,255,255,0.14); border-color: rgba(255,255,255,0.3); color: #fff; }
.final-cta .btn-ghost:hover { background: rgba(255,255,255,0.22); }
.final-cta .hero-ctas { justify-content: center; margin-bottom: 0; }

/* ---------- Footer ---------- */
.site-footer { padding: 64px 0 40px; border-top: 1px solid var(--border); }
.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 48px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}
.footer-brand { max-width: 320px; }
.footer-brand .brand { margin-bottom: 14px; }
.footer-brand p { color: var(--text-muted); font-size: 14.5px; }
.footer-cols { display: flex; gap: 64px; flex-wrap: wrap; }
.footer-col h4 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-faint); margin-bottom: 16px; }
.footer-col a, .footer-col span { display: block; color: var(--text-muted); font-size: 14.5px; margin-bottom: 12px; }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 13px;
}
.footer-bottom .legal-note { max-width: 640px; }

/* ---------- Legal pages ---------- */
.legal-main { padding: 64px 0 100px; }
.legal-header { max-width: 720px; margin: 0 auto 48px; }
.legal-header h1 { font-size: clamp(30px, 4vw, 42px); font-weight: 900; letter-spacing: -0.02em; margin-bottom: 12px; }
.legal-header .updated { color: var(--text-faint); font-size: 14px; }
.legal-body { max-width: 720px; margin: 0 auto; color: var(--text-muted); font-size: 15.5px; }
.legal-body h2 { color: var(--text); font-size: 20px; font-weight: 800; margin: 40px 0 14px; letter-spacing: -0.01em; }
.legal-body h2:first-child { margin-top: 0; }
.legal-body p { margin-bottom: 16px; }
.legal-body ul { margin-bottom: 16px; padding-left: 20px; list-style: disc; }
.legal-body li { margin-bottom: 8px; }
.legal-body a { color: var(--blue-light); text-decoration: underline; text-underline-offset: 2px; }
.legal-body strong { color: var(--text); }
.legal-callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--amber);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin-bottom: 24px;
  font-size: 14.5px;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { order: -1; padding-bottom: 20px; }
  .hero-sub { max-width: none; }
  .feature-row { grid-template-columns: 1fr; gap: 32px; }
  .feature-row.reverse .feature-copy { order: 1; }
  .feature-row.reverse .feature-art { order: 2; }
  .steps { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .footer-top { flex-direction: column; gap: 32px; }
}

@media (max-width: 380px) {
  .brand { font-size: 15px; }
  .brand img { width: 28px; height: 28px; }
}
