/* FriendsMap home page — Hearth design (same tokens as the app). */

:root {
  --bg: #FAF7F2;
  --map: #EFEAE1;
  --surface: #FFFFFF;
  --surface-2: #F3EEE6;
  --line: #E6DFD3;
  --ink: #1E2A2E;
  --muted: #56616A;
  --teal: #0E6B5C;
  --teal-soft: #D8EEE9;
  --on-teal: #FFFFFF;
  --clay: #B3441E;
  --clay-soft: #FBE3D9;
  --sos: #B42318;
  --shadow: 0 18px 40px rgba(30, 42, 46, 0.14);
  --radius: 28px;
  --wrap: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141A1C;
    --map: #172023;
    --surface: #1E2629;
    --surface-2: #232D30;
    --line: #2C3639;
    --ink: #F3EFE8;
    --muted: #B9C3C8;
    --teal: #5FD3BD;
    --teal-soft: #123C35;
    --on-teal: #0B2A25;
    --clay: #FFA07F;
    --clay-soft: #3A2118;
    --sos: #FF8A80;
    --shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Readex Pro', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--teal); }

.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }

.eyebrow {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--clay);
}

h1, h2, h3 { margin: 0; line-height: 1.12; letter-spacing: -0.01em; }
h2 { font-size: clamp(30px, 4.2vw, 44px); font-weight: 700; }
h3 { font-size: 20px; font-weight: 600; }
.lead { color: var(--muted); font-size: 18px; max-width: 560px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn svg { width: 20px; height: 20px; flex-shrink: 0; }
.btn-primary { background: var(--teal); color: var(--on-teal); box-shadow: 0 10px 24px rgba(14, 107, 92, 0.3); }
.btn-ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }

/* Nav */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.site-nav.scrolled { border-bottom-color: var(--line); }
.site-nav .wrap { display: flex; align-items: center; gap: 24px; height: 68px; }
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 20px;
  color: var(--ink);
  text-decoration: none;
}
.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--teal);
  color: var(--on-teal);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.logo-mark svg { width: 20px; height: 20px; }
.logo-mark img { width: 100%; height: 100%; border-radius: inherit; display: block; }
.logo-text span { color: var(--clay); }
.nav-links { display: flex; gap: 6px; margin-left: auto; align-items: center; list-style: none; padding: 0; margin-block: 0; }
.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
}
.nav-links a:hover { background: var(--surface-2); }
.nav-links .nav-download { background: var(--teal); color: var(--on-teal); font-weight: 600; }
.nav-links .nav-download:hover { background: var(--teal); filter: brightness(1.08); }
.menu-btn {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  place-items: center;
}
.menu-btn svg { width: 22px; height: 22px; }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 72px 0 96px; }
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(-14deg, transparent 0 62px, color-mix(in srgb, var(--surface) 70%, transparent) 62px 68px),
    repeating-linear-gradient(76deg, transparent 0 78px, color-mix(in srgb, var(--surface) 70%, transparent) 78px 84px),
    var(--map);
  mask-image: linear-gradient(to left, #000 35%, transparent 80%);
  -webkit-mask-image: linear-gradient(to left, #000 35%, transparent 80%);
}
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(40px, 6vw, 68px); font-weight: 700; }
.hero h1 em { font-style: normal; color: var(--teal); }
.hero .lead { margin: 22px 0 32px; font-size: 19px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-note { margin-top: 18px; font-size: 14px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.hero-note svg { width: 18px; height: 18px; color: var(--teal); flex-shrink: 0; }

.phones { position: relative; height: 620px; }
.phone {
  position: absolute;
  width: 280px;
  aspect-ratio: 390 / 844;
  border-radius: 40px;
  padding: 8px;
  background: #11181A;
  box-shadow: var(--shadow), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}
.phone img { width: 100%; height: 100%; border-radius: 32px; object-fit: cover; }
.phones .phone:nth-child(1) { left: 4%; top: 40px; transform: rotate(-5deg); }
.phones .phone:nth-child(2) { right: 4%; top: 0; transform: rotate(4deg); }

/* Promise strip */
.promise { background: var(--surface); border-block: 1px solid var(--line); }
.promise .wrap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; padding-block: 28px; }
.promise-item { display: flex; gap: 14px; align-items: flex-start; }
.promise-item .icon {
  width: 44px;
  height: 44px;
  border-radius: 22px;
  background: var(--teal-soft);
  color: var(--teal);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.promise-item .icon svg { width: 22px; height: 22px; }
.promise-item strong { display: block; font-weight: 600; }
.promise-item span { color: var(--muted); font-size: 15px; }

/* Sections */
section.block { padding: 96px 0; }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head .lead { margin-top: 14px; }

/* Outing flow */
.flow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  counter-reset: step;
}
.flow-step { display: flex; flex-direction: column; gap: 18px; }
.flow-step .phone { position: relative; width: 100%; max-width: 250px; margin-inline: auto; }
.flow-step h3 { display: flex; align-items: center; gap: 10px; }
.flow-step h3::before {
  counter-increment: step;
  content: counter(step);
  width: 30px;
  height: 30px;
  border-radius: 15px;
  background: var(--clay);
  color: var(--bg);
  font-size: 15px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.flow-step p { margin: 6px 0 0; color: var(--muted); font-size: 16px; }

/* Privacy band */
.privacy {
  background: var(--teal);
  color: var(--on-teal);
  border-radius: var(--radius);
  padding: 64px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.privacy .eyebrow { color: inherit; opacity: 0.8; }
.privacy .lead { color: inherit; opacity: 0.9; margin-top: 16px; }
.privacy ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.privacy li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: color-mix(in srgb, var(--on-teal) 10%, transparent);
  border-radius: 20px;
  padding: 16px 18px;
}
.privacy li svg { width: 22px; height: 22px; flex-shrink: 0; margin-top: 2px; }

/* Feature cards */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 28px;
}
.card .icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: var(--clay-soft);
  color: var(--clay);
  display: grid;
  place-items: center;
  margin-bottom: 18px;
}
.card .icon svg { width: 24px; height: 24px; }
.card.teal .icon { background: var(--teal-soft); color: var(--teal); }
.card p { margin: 8px 0 0; color: var(--muted); font-size: 16px; }

/* Showcase (navigate + night) */
.showcase { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.showcase + .showcase { margin-top: 96px; }
.showcase .phones-row { display: flex; justify-content: center; gap: 24px; }
.showcase .phone { position: relative; width: min(260px, 45%); }
.showcase.flip .text { order: 2; }
.checks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; }
.checks svg { width: 22px; height: 22px; color: var(--teal); flex-shrink: 0; margin-top: 2px; }

/* CTA */
.cta { text-align: center; padding: 96px 0 104px; }
.cta .lead { margin: 16px auto 32px; }
.cta .hero-actions { justify-content: center; }
.preview-note { margin-top: 28px; font-size: 13px; color: var(--muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 32px; font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footer-grid p { color: var(--muted); max-width: 300px; margin: 14px 0 0; }
.footer-grid h4 { margin: 0 0 12px; font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-grid a { color: var(--ink); text-decoration: none; }
.footer-grid a:hover { color: var(--teal); }
.footer-bottom {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
}
.footer-bottom a { color: var(--muted); }

/* Responsive */
@media (max-width: 960px) {
  .hero .wrap, .privacy, .showcase { grid-template-columns: 1fr; }
  .showcase.flip .text { order: 0; }
  .phones { height: 520px; max-width: 520px; margin-inline: auto; width: 100%; }
  .phone { width: 230px; }
  .flow { grid-template-columns: repeat(2, 1fr); row-gap: 48px; }
  .features { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .privacy { padding: 40px 28px; }
}

@media (max-width: 720px) {
  .menu-btn { display: grid; }
  .nav-links {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 12px 16px 20px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
  }
  .nav-links.open { display: flex; }
  .hero { padding: 40px 0 64px; }
  .phones { height: 440px; }
  .phone { width: 190px; border-radius: 32px; padding: 6px; }
  .phone img { border-radius: 26px; }
  .promise .wrap { grid-template-columns: 1fr; }
  section.block { padding: 64px 0; }
  .flow {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 16px;
    padding-bottom: 12px;
  }
  .flow-step { flex: 0 0 78%; scroll-snap-align: start; }
  .features { grid-template-columns: 1fr; }
  .showcase .phone { width: 46%; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}

/* AI band: always dark, like the in-car screens */
.ai-band {
  --ink: #F3EFE8;
  --muted: #B9C3C8;
  --gold: #FFB900;
  background: radial-gradient(1200px 600px at 80% 0%, rgba(255, 185, 0, 0.10), transparent 60%), #0F1519;
  color: var(--ink);
  padding: 104px 0;
}
.ai-band .eyebrow { color: var(--gold); }
.ai-band .lead { color: var(--muted); }
.ai-band .checks svg { color: var(--gold); }
.ai-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.ai-card {
  position: relative;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 24px;
  padding: 28px;
}
.ai-card .icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: rgba(255, 185, 0, 0.14);
  color: var(--gold);
  display: grid;
  place-items: center;
  margin-bottom: 18px;
}
.ai-card .icon svg { width: 24px; height: 24px; }
.ai-card p { margin: 8px 0 0; color: var(--muted); font-size: 16px; }
.tag {
  position: absolute;
  top: 24px;
  right: 24px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
}
.tag.live { background: rgba(95, 211, 189, 0.16); color: #5FD3BD; }
.tag.soon { background: rgba(255, 255, 255, 0.08); color: #B9C3C8; }

@media (max-width: 960px) {
  .ai-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .ai-band { padding: 64px 0; }
  .ai-grid { grid-template-columns: 1fr; }
}

.hero-note.soon-note { margin-top: 6px; font-weight: 600; color: var(--clay); }
