/* AutoPool landing. Mobile-first; colors from the app's AppTheme.kt. */
:root {
  color-scheme: light dark;
  --primary: #0b5cad;
  --primary-c: #e7f1fb;
  --on-primary-c: #082848;
  --secondary: #0e7490;
  --secondary-c: #e6f4f6;
  --bg: #f2f2f7;
  --surface: #ffffff;
  --fg: #1c1c1e;
  --muted: #5e6570;
  --outline: #d8dadf;
  --nav-bg: rgba(242, 242, 247, 0.78);
  --band-bg: linear-gradient(135deg, #0b5cad, #0e7490);
  --radius: 22px;
  --gutter: 16px;
  font-family: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --primary: #9ecaff;
    --primary-c: #1c2a38;
    --on-primary-c: #d6e8ff;
    --secondary: #7fd3e6;
    --secondary-c: #15282d;
    --bg: #000000;
    --surface: #1c1c1e;
    --fg: #f2f2f7;
    --muted: #a1a7b0;
    --outline: #2f3137;
    --nav-bg: rgba(0, 0, 0, 0.7);
    --band-bg: linear-gradient(135deg, #0b3f75, #0b5466);
  }
}

:root[data-theme="dark"] {
  --primary: #9ecaff;
  --primary-c: #1c2a38;
  --on-primary-c: #d6e8ff;
  --secondary: #7fd3e6;
  --secondary-c: #15282d;
  --bg: #000000;
  --surface: #1c1c1e;
  --fg: #f2f2f7;
  --muted: #a1a7b0;
  --outline: #2f3137;
  --nav-bg: rgba(0, 0, 0, 0.7);
  --band-bg: linear-gradient(135deg, #0b3f75, #0b5466);
}

:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.55;
  overflow-x: hidden;
}

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

a { color: var(--primary); }

h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -0.02em; }

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}

.muted { color: var(--muted); }

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--outline);
  padding-top: env(safe-area-inset-top);
}

.nav-inner { display: flex; align-items: center; gap: 1rem; height: 60px; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--fg);
  text-decoration: none;
}

.brand img { border-radius: 8px; }

.nav-links { display: none; gap: 1.5rem; margin-left: auto; }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 1.1rem;
  border-radius: 999px;
  background: var(--primary);
  color: var(--surface);
  font-weight: 600;
  text-decoration: none;
  margin-left: auto;
}

.btn-small { font-size: 0.9rem; }

/* Hero */
.hero { position: relative; padding: 2rem 0 2.5rem; overflow: hidden; }

.blob {
  position: absolute;
  inset: -20% -40% auto auto;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--secondary) 35%, transparent), transparent 70%);
  filter: blur(20px);
  animation: drift 18s ease-in-out infinite alternate;
  pointer-events: none;
}

.hero-grid { position: relative; display: grid; gap: 2.5rem; }

.eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--secondary);
}

h1 { font-size: clamp(2.2rem, 9vw, 4.2rem); font-weight: 700; }

h1 .eyebrow { display: block; }

.grad {
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede { font-size: 1.1rem; color: var(--muted); margin: 1rem 0 1.25rem; max-width: 34rem; }

.stores { display: grid; gap: 0.75rem; }

.store {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 56px;
  padding: 0.5rem 1.25rem;
  border-radius: 14px;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.2;
  text-decoration: none;
  text-align: center;
  color: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.store small { font-weight: 500; font-size: 0.72rem; opacity: 0.85; }

.store-play { background: #01875f; }

.store-apple { background: #1c1c1e; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .store-apple { background: #f2f2f7; color: #1c1c1e; }
}

:root[data-theme="dark"] .store-apple { background: #f2f2f7; color: #1c1c1e; }

.pills { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0; margin: 1.25rem 0 0; }

.pills li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: var(--primary-c);
  color: var(--on-primary-c);
  font-size: 0.85rem;
  font-weight: 600;
}

/* Phone frame + screenshot placeholder */
.phone {
  position: relative;
  margin: 0 auto;
  width: min(62vw, 260px);
  aspect-ratio: 9 / 19.5;
  border-radius: 40px;
  border: 8px solid #1c1c1e;
  background: linear-gradient(160deg, var(--primary-c), var(--secondary-c));
  box-shadow: 0 30px 60px -20px rgba(11, 92, 173, 0.35);
  overflow: hidden;
}

.phone img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* Real screenshots already include the device frame, so drop the CSS frame. */
.phone:has(img) {
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  overflow: visible;
  aspect-ratio: auto;
}

.phone:has(img) img {
  position: static;
  height: auto;
  filter: drop-shadow(0 24px 30px rgba(11, 92, 173, 0.28));
}

.phone-hero { animation: float 6s ease-in-out infinite; }

/* Sections */
.section { padding: 3rem 0; }

h2 { font-size: clamp(1.75rem, 6.5vw, 2.75rem); font-weight: 700; }

h3 { font-size: 1.15rem; }

.sub { font-size: 1.05rem; color: var(--muted); max-width: 40rem; margin: 0.75rem 0 0; }

.tint { background: var(--surface); }

.steps { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 0.6rem; }

.step, .feature, .cloud, .qa {
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
}

.step, .feature { display: flex; align-items: center; gap: 0.9rem; }

.step p, .feature p, .cloud p, .qa p { margin: 0.35rem 0 0; color: var(--muted); font-size: 0.95rem; }

.feature h3 { font-size: 1.05rem; }

.step { padding: 0.6rem 0.85rem; gap: 0.75rem; }

.step p { margin: 0; color: var(--fg); }

.step b { font-weight: 700; }

.num {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 50%;
  background: var(--primary);
  color: var(--surface);
  font-weight: 700;
}

.split { display: grid; gap: 2rem; align-items: center; }

.checks { list-style: none; padding: 0; margin: 1.25rem 0 0; display: grid; gap: 0.6rem; }

.checks li { position: relative; padding-left: 2rem; font-weight: 500; }

.checks li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0.05rem;
  width: 1.4rem;
  height: 1.4rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--secondary-c);
  color: var(--secondary);
  font-size: 0.8rem;
  font-weight: 700;
}

/* Two phones: horizontal scroll-snap on mobile */
.shots {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  margin: 0 calc(-1 * var(--gutter));
  padding: 0.5rem var(--gutter) 1.5rem;
  scrollbar-width: none;
}

.shots::-webkit-scrollbar { display: none; }

.shots .phone { flex: 0 0 auto; width: min(62vw, 260px); margin: 0; scroll-snap-align: center; }

.grid { display: grid; gap: 0.6rem; margin-top: 1.5rem; }

.ico {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 14px;
  background: var(--primary-c);
  font-size: 1.3rem;
}

/* Privacy band */
.band { background: var(--band-bg); color: #fff; }

.band .eyebrow { color: #bfe9f2; }

.band .sub { color: rgba(255, 255, 255, 0.82); }

.badges { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }

.badges li {
  padding: 0.8rem 1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.85rem;
}

.badges b { display: block; color: #fff; font-size: 1rem; margin-bottom: 0.15rem; }

.cloud { margin-top: 1.25rem; }

.tag {
  display: inline-block;
  vertical-align: middle;
  margin-left: 0.4rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: var(--secondary-c);
  color: var(--secondary);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.cta { text-align: center; }

.cta .sub { margin-left: auto; margin-right: auto; }

.stores-center { margin: 1.5rem auto 0; max-width: 420px; }

/* Footer */
.footer {
  border-top: 1px solid var(--outline);
  padding: 2rem 0 calc(2rem + env(safe-area-inset-bottom));
}

.footer-inner { display: grid; gap: 1rem; justify-items: start; }

.footer-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }

.footer-links a { color: var(--muted); text-decoration: none; }

.footer-links a[aria-current] { color: var(--fg); }

.lang-links { grid-column: 1 / -1; }

.footer p { margin: 0; font-size: 0.9rem; }

/* Tablet */
@media (min-width: 640px) {
  :root { --gutter: 32px; }
  .hero { padding: 3rem 0 3.5rem; }
  .hero-text { text-align: center; }
  .lede { margin-left: auto; margin-right: auto; }
  .stores { grid-template-columns: repeat(2, minmax(0, 220px)); justify-content: center; }
  .pills { justify-content: center; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .badges { grid-template-columns: repeat(3, 1fr); }
  .shots { overflow: visible; margin: 0; padding: 0; justify-content: center; }
  .shots .phone { width: 240px; }
  .section { padding: 4rem 0; }
  .footer-inner { grid-template-columns: auto 1fr auto; align-items: center; }
  .footer-links { justify-content: center; }
}

/* Desktop */
@media (min-width: 1024px) {
  .nav-links { display: flex; }
  .nav-links + .btn { margin-left: 0.5rem; }
  .hero-grid { grid-template-columns: 1.15fr 0.85fr; align-items: center; }
  .hero-text { text-align: left; }
  .lede { margin-left: 0; }
  .stores { justify-content: start; }
  .pills { justify-content: start; }
  .phone-hero { width: 300px; }
  .split { grid-template-columns: 1.4fr 1fr; gap: 3rem; }
  .shots .phone:nth-child(2) { transform: translateY(2.5rem); }
  .badges { grid-template-columns: repeat(6, 1fr); }
}

/* Hover only on devices that hover */
@media (hover: hover) {
  .store:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.4); }
  .feature { transition: transform 0.25s ease, border-color 0.25s ease; }
  .feature:hover { transform: translateY(-4px); border-color: var(--primary); }
  .nav-links a:hover, .footer-links a:hover { color: var(--fg); }
}

/* Reveal animations (main.js adds .in) */
.js .reveal, .js .pop {
  opacity: 0;
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: calc(var(--d, 0) * 80ms);
}

.js .reveal { transform: translateY(24px); }

.js .pop { transform: scale(0.9); }

.js .reveal.in, .js .pop.in { opacity: 1; transform: none; }

.js .shots .phone.reveal.in:nth-child(2) { transform: none; }

@media (min-width: 1024px) {
  .js .shots .phone.reveal.in:nth-child(2) { transform: translateY(2.5rem); }
}

@keyframes float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -12px; }
}

@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(-60px, 40px) scale(1.15); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .phone-hero, .blob { animation: none; }
  .js .reveal, .js .pop { opacity: 1; transform: none; transition: none; }
}

/* Theme switch (top right) */
.theme-toggle {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-left: 0.5rem;
  border: 1px solid var(--outline);
  border-radius: 50%;
  background: var(--surface);
  color: var(--fg);
  cursor: pointer;
}

.theme-toggle svg { width: 20px; height: 20px; }

.theme-toggle .icon-sun { display: none; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* Each screenshot slot has a light and a dark image; show the one that matches the theme. */
.shot-dark { display: none; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .shot-light { display: none; }
  :root:not([data-theme="light"]) .shot-dark { display: block; }
}

:root[data-theme="dark"] .shot-light { display: none; }
:root[data-theme="dark"] .shot-dark { display: block; }
