/* Lead Airo marketing site. Brand tokens match the app (frontend/src/index.css, mobile/lib/ui/theme.dart). */

@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("../fonts/Inter-Regular.ttf") format("truetype"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url("../fonts/Inter-Medium.ttf") format("truetype"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("../fonts/Inter-SemiBold.ttf") format("truetype"); }
@font-face { font-family: "Inter"; font-weight: 700; font-display: swap; src: url("../fonts/Inter-Bold.ttf") format("truetype"); }

:root {
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-soft: #eef2ff;
  --violet: #7c3aed;
  --accent: #f59e0b;
  --bg: #f9fafb;
  --surface: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;
  --hero-from: #6366f1;
  --hero-via: #4f46e5;
  --hero-to: #7c3aed;
  --radius: 16px;
  --shadow: 0 1px 2px rgb(17 24 39 / 0.05), 0 8px 24px rgb(17 24 39 / 0.06);
  --max: 1120px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: #818cf8;
    --primary-hover: #a5b4fc;
    --primary-soft: #1e1b4b;
    --bg: #0b0f17;
    --surface: #111827;
    --text: #e5e7eb;
    --muted: #9ca3af;
    --border: #1f2937;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 8px 24px rgb(0 0 0 / 0.3);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--primary); text-underline-offset: 3px; }
a:hover { color: var(--primary-hover); }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 0.5em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }

/* --- Header ---------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.15rem; }
.brand img { width: 34px; height: 34px; }
.nav { display: flex; align-items: center; gap: 24px; }
.nav .nav-link { color: var(--muted); text-decoration: none; font-weight: 500; font-size: 0.95rem; }
.nav .nav-link:hover { color: var(--text); }
@media (max-width: 760px) { .nav .nav-link { display: none; } }

/* --- Buttons --------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border-radius: 12px;
  font: 600 0.95rem/1 "Inter", system-ui, sans-serif; text-decoration: none; white-space: nowrap;
  border: 1px solid transparent; transition: background-color .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); color: #fff; }
@media (prefers-color-scheme: dark) { .btn-primary, .btn-primary:hover { color: #0b0f17; } }
.btn-light { background: #fff; color: #312e81; }
.btn-light:hover { background: #eef2ff; color: #312e81; }
.btn-ghost { border-color: rgb(255 255 255 / 0.45); color: #fff; }
.btn-ghost:hover { background: rgb(255 255 255 / 0.12); color: #fff; }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 0.9rem; }

/* Store badges (drawn in CSS; official artwork can replace them later). */
.stores { display: flex; flex-wrap: wrap; gap: 12px; }
.store {
  display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 18px 8px 14px;
  background: #0b0f17; color: #fff; border: 1px solid rgb(255 255 255 / 0.25); border-radius: 12px; text-decoration: none;
}
.store:hover { background: #1f2937; color: #fff; }
.store svg { width: 26px; height: 26px; flex: none; }
.store small { display: block; font-size: 0.7rem; opacity: 0.8; line-height: 1.1; }
.store strong { display: block; font-size: 1.05rem; font-weight: 600; line-height: 1.2; }
.store[aria-disabled="true"] { opacity: 0.7; cursor: default; }

/* --- Hero ------------------------------------------------------------------ */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background: linear-gradient(135deg, var(--hero-from), var(--hero-via) 55%, var(--hero-to));
}
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%; border: 56px solid rgb(255 255 255 / 0.08); pointer-events: none;
}
.hero::before { width: 520px; height: 520px; right: -180px; top: -200px; }
.hero::after { width: 380px; height: 380px; left: -200px; bottom: -220px; }
.hero .container { position: relative; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; padding-top: 72px; padding-bottom: 72px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: rgb(255 255 255 / 0.14); font-size: 0.85rem; font-weight: 600; margin-bottom: 20px; }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); font-weight: 700; margin-bottom: 18px; }
.hero h1 span { color: #fde68a; }
.hero .lead { font-size: 1.15rem; color: rgb(255 255 255 / 0.88); max-width: 34em; margin-bottom: 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }
.hero-note { font-size: 0.9rem; color: rgb(255 255 255 / 0.75); margin: 14px 0 0; }
@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; padding-top: 48px; padding-bottom: 56px; }
  .hero-visual { order: 2; }
}

/* Phone mock-ups around real app screenshots */
.phone {
  width: 100%; max-width: 280px; aspect-ratio: 540 / 1167; padding: 10px; border-radius: 42px;
  background: #11111b; box-shadow: 0 30px 60px rgb(17 10 60 / 0.45), inset 0 0 0 2px #2a2a3a;
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 32px; }
.hero-visual { display: flex; justify-content: center; align-items: flex-end; gap: 0; }
.hero-visual .phone:first-child { transform: translateX(28px) rotate(-6deg) scale(0.88); opacity: 0.95; }
.hero-visual .phone:last-child { position: relative; z-index: 1; }
@media (max-width: 520px) { .hero-visual .phone:first-child { display: none; } }

/* --- Sections -------------------------------------------------------------- */
section { padding: 88px 0; }
.section-head { text-align: center; max-width: 42em; margin: 0 auto 48px; }
.section-head h2 { font-size: clamp(1.75rem, 3.5vw, 2.4rem); }
.section-head p { color: var(--muted); font-size: 1.1rem; margin: 0; }
.kicker { display: block; color: var(--primary); font-weight: 600; font-size: 0.9rem; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 10px; }
@media (max-width: 640px) { section { padding: 64px 0; } }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .features { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.card p { color: var(--muted); margin: 0; font-size: 0.97rem; }
.icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); margin-bottom: 16px; }
.icon svg { width: 24px; height: 24px; }

/* Alternating screenshot rows */
.showcase { display: grid; gap: 88px; }
.show-row { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.show-row:nth-child(even) .show-media { order: 2; }
.show-media { display: flex; justify-content: center; padding: 32px; border-radius: 28px; background: linear-gradient(160deg, var(--primary-soft), transparent); }
.show-text h3 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.show-text p { color: var(--muted); font-size: 1.05rem; }
.checks { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.checks li { position: relative; padding-left: 30px; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 12px no-repeat;
}
@media (max-width: 820px) {
  .show-row { grid-template-columns: 1fr; gap: 28px; }
  .show-row:nth-child(even) .show-media { order: 0; }
}

.alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 900px) { .trust { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .trust { grid-template-columns: 1fr; } }
.trust .card { box-shadow: none; background: var(--bg); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }
.step { counter-increment: step; }
.step::before {
  content: counter(step); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--primary); color: #fff; font-weight: 700; margin-bottom: 14px;
}
@media (prefers-color-scheme: dark) { .step::before { color: #0b0f17; } }

.faq { max-width: 760px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px 22px; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--primary); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--muted); margin: 12px 0 0; }

.cta {
  border-radius: 28px; padding: 56px 40px; text-align: center; color: #fff;
  background: linear-gradient(135deg, var(--hero-from), var(--hero-via) 55%, var(--hero-to));
}
.cta h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); }
.cta p { color: rgb(255 255 255 / 0.88); font-size: 1.1rem; max-width: 36em; margin: 0 auto 28px; }
.cta .hero-actions, .cta .stores { justify-content: center; }
@media (max-width: 600px) { .cta { padding: 40px 22px; } }

/* --- Footer ---------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--border); padding: 40px 0; color: var(--muted); font-size: 0.92rem; }
.site-footer .container { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); }

/* --- Legal pages ------------------------------------------------------------ */
.legal-hero { background: linear-gradient(135deg, var(--hero-from), var(--hero-via) 55%, var(--hero-to)); color: #fff; padding: 56px 0 48px; }
.legal-hero h1 { font-size: clamp(2rem, 4.5vw, 2.8rem); margin-bottom: 8px; }
.legal-hero p { color: rgb(255 255 255 / 0.85); margin: 0; }
.legal { display: grid; grid-template-columns: 240px 1fr; gap: 56px; padding-top: 48px; padding-bottom: 80px; }
.toc { position: sticky; top: 88px; align-self: start; font-size: 0.92rem; }
.toc strong { display: block; margin-bottom: 10px; }
.toc ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--primary); }
.prose { max-width: 760px; min-width: 0; }
.prose h2 { font-size: 1.35rem; margin-top: 2.2em; padding-top: 8px; scroll-margin-top: 84px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.05rem; margin-top: 1.6em; }
.prose p, .prose li { color: var(--text); }
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 1em; }
.prose li { margin-bottom: 6px; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.2em; font-size: 0.95rem; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.prose th { background: var(--surface); font-weight: 600; }
@media (max-width: 600px) {
  /* Stack table rows as labelled cards on phones. */
  .prose table, .prose tbody, .prose tr, .prose td { display: block; width: 100%; }
  .prose thead { display: none; }
  .prose tr { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
  .prose td { border: 0; padding: 3px 0; }
  .prose td:first-child { font-weight: 600; padding-bottom: 6px; }
  .prose td[data-label]:not(:first-child)::before {
    content: attr(data-label); display: block; color: var(--muted); font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em;
  }
}
.note { background: var(--primary-soft); border: 1px solid color-mix(in srgb, var(--primary) 25%, transparent); border-radius: 14px; padding: 16px 20px; margin: 0 0 1.5em; }
.note p:last-child { margin: 0; }
.contact-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px 22px; }
.contact-card p:last-child { margin: 0; }
@media (max-width: 900px) {
  .legal { grid-template-columns: 1fr; gap: 24px; padding-top: 32px; }
  .toc { position: static; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px 20px; }
}
