/* Nearest landing — matches approved mockup */

:root {
  --purple: #7c3aed;
  --purple-soft: #ede9fe;
  --navy: #0f172a;
  --footer-bg: #1e1b4b;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --bg: #ffffff;
  --bg-muted: #f8fafc;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes shimmer {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}
@keyframes popIn {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes iconBounce {
  0% { transform: scale(0.6); opacity: 0; }
  70% { transform: scale(1.08); }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 4px 14px rgba(124, 58, 237, 0.35); }
  50% { box-shadow: 0 4px 22px rgba(124, 58, 237, 0.55); }
}
@keyframes dotShift {
  0% { background-position: 0 0; }
  100% { background-position: 22px 22px; }
}

.load-in {
  animation: fadeDown 0.55s var(--ease) forwards;
}

.animate-child {
  opacity: 0;
  animation: fadeUp 0.65s var(--ease) forwards;
  animation-delay: calc(0.08s + var(--i, 0) * 0.07s);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body.landing-page {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  overflow-x: hidden;
}

.wrap { width: min(100% - 2rem, 1120px); margin-inline: auto; }

@keyframes pinDrift {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(8px, -14px) rotate(1.5deg); }
  50% { transform: translate(-5px, -22px) rotate(-1deg); }
  75% { transform: translate(6px, -8px) rotate(0.5deg); }
}
@keyframes pinPulse {
  0%, 100% { opacity: var(--o, 0.22); }
  50% { opacity: calc(var(--o, 0.22) * 1.35); }
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 2.5rem 0 3rem;
  background-color: var(--bg);
  background-image: radial-gradient(#cbd5e1 1px, transparent 1px);
  background-size: 22px 22px;
  animation: dotShift 24s linear infinite;
}
.hero-pins {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.float-pin {
  position: absolute;
  display: block;
  left: var(--x);
  top: var(--y);
  opacity: var(--o, 0.22);
  will-change: transform, opacity;
  animation:
    pinDrift var(--dur, 9s) ease-in-out infinite,
    pinPulse calc(var(--dur, 9s) * 1.4) ease-in-out infinite;
  animation-delay: var(--d, 0s), var(--d, 0s);
}
.float-pin::before {
  content: '';
  display: block;
  width: calc(30px * var(--s, 1));
  height: calc(30px * var(--s, 1));
  background: linear-gradient(145deg, color-mix(in srgb, var(--c, #7c3aed) 88%, #fff), var(--c, #7c3aed));
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow:
    0 10px 24px color-mix(in srgb, var(--c, #7c3aed) 35%, transparent),
    0 0 0 1px color-mix(in srgb, var(--c, #7c3aed) 20%, transparent);
}
.float-pin::after {
  content: '';
  position: absolute;
  width: calc(8px * var(--s, 1));
  height: calc(8px * var(--s, 1));
  background: rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  top: calc(7px * var(--s, 1));
  left: calc(7px * var(--s, 1));
  transform: rotate(-45deg);
}
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 0;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
  color: var(--navy);
  font-weight: 800;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.logo-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--purple), #9333ea);
  border-radius: 9px;
  font-size: 0.95rem;
}
.nav-links {
  display: flex;
  gap: 1.5rem;
  margin-left: auto;
  margin-right: 1rem;
}
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
}
.nav-links a:hover { color: var(--purple); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
}
.btn-primary {
  background: var(--purple);
  color: #fff;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.35);
  animation: pulseGlow 3s ease-in-out infinite;
  transition: transform 0.25s var(--spring);
}
.btn-primary:hover { transform: translateY(-2px) scale(1.03); }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.82rem; white-space: nowrap; }

.pill {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: var(--purple-soft);
  color: var(--purple);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
}
.hero-copy h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.85rem, 4vw, 2.65rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--navy);
}
.hero-copy h1 em {
  font-style: normal;
  color: var(--purple);
  background: linear-gradient(90deg, var(--purple), #9333ea, var(--purple));
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 4s linear infinite;
}
.lead {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 26rem;
  line-height: 1.6;
}

.store-row { display: flex; flex-wrap: wrap; gap: 0.65rem; margin-bottom: 1.25rem; }
.store-row-center { justify-content: center; }
.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.9rem;
  border-radius: 10px;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: transform 0.25s var(--spring), box-shadow 0.25s;
}
.store-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.12); }
.store-btn.dark { background: var(--navy); color: #fff; }
.store-btn.light { background: #fff; border-color: var(--border); color: var(--text); }
.store-btn.soon { opacity: 0.75; pointer-events: none; }
.store-icon { font-size: 1.25rem; }
.store-btn small { display: block; font-size: 0.58rem; opacity: 0.85; }
.store-btn strong { display: block; font-size: 0.85rem; }
.store-btn em { display: block; font-size: 0.62rem; color: var(--muted); font-style: normal; }

.trust-row {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.25rem;
}
.trust-row li {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}

.hero-phone { display: flex; justify-content: center; }
.device {
  background: #111;
  border-radius: 32px;
  padding: 8px;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);
  width: min(100%, 252px);
  animation: float 5s ease-in-out infinite;
}
.device-notch {
  width: 32%;
  height: 4px;
  background: #333;
  border-radius: 99px;
  margin: 2px auto 6px;
}
.device-screen {
  background: #f8fafc;
  border-radius: 26px;
  padding: 10px 8px 0;
  overflow: hidden;
}

/* App home mock — matches real Nearest UI */
.app-header { margin-bottom: 6px; }
.app-welcome { margin: 0; color: #7c3aed; font-weight: 600; font-size: 8px; }
.app-name { margin: 0; font-size: 16px; font-weight: 800; letter-spacing: -0.4px; color: #0f172a; line-height: 1.05; }

.app-nearest-to {
  display: flex;
  align-items: center;
  gap: 3px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 5px 7px;
  margin-bottom: 6px;
  font-size: 7px;
}
.nt-icon { font-size: 7px; }
.nt-label { color: #64748b; font-weight: 500; }
.nt-value { flex: 1; font-weight: 700; color: #0f172a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nt-chev { color: #64748b; font-size: 6px; }

.app-cats { display: flex; flex-direction: column; gap: 4px; margin-bottom: 6px; }
.app-cat {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--c);
  color: #fff;
  border-radius: 10px;
  padding: 7px 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.ac-emoji { width: 16px; text-align: center; font-size: 11px; flex-shrink: 0; }
.ac-label { flex: 1; font-weight: 700; font-size: 8px; letter-spacing: -0.2px; }
.ac-chev { opacity: 0.85; font-size: 10px; }

.app-section { margin: 0 0 4px; font-size: 8px; font-weight: 700; color: #0f172a; letter-spacing: -0.2px; }
.app-place {
  display: flex;
  align-items: center;
  gap: 5px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 5px 6px;
  margin-bottom: 3px;
}
.ap-thumb {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
  flex-shrink: 0;
}
.ap-text strong { display: block; font-size: 7px; font-weight: 600; color: #0f172a; }
.ap-text small { font-size: 6px; color: #64748b; }

.app-sos {
  display: flex;
  align-items: center;
  gap: 5px;
  background: #fff;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 5px 6px;
  margin: 4px 0 6px;
}
.sos-pill {
  width: 18px;
  height: 18px;
  background: #ef4444;
  color: #fff;
  border-radius: 5px;
  font-size: 5px;
  font-weight: 800;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.app-sos strong { display: block; font-size: 7px; color: #0f172a; }
.app-sos small { font-size: 5px; color: #64748b; }
.sos-chev { margin-left: auto; color: #ef4444; font-size: 8px; }

.app-tabs {
  display: flex;
  justify-content: space-around;
  background: #fff;
  border-top: 1px solid #e2e8f0;
  margin: 0 -8px;
  padding: 4px 2px 6px;
}
.at {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  font-size: 9px;
  color: #64748b;
  line-height: 1;
}
.at small { font-size: 5px; font-weight: 600; }
.at.active { color: #7c3aed; }

/* Phone mock — cascade when live */
.device.live .app-header { animation: fadeUp 0.4s var(--ease) backwards; }
.device.live .app-nearest-to { animation: fadeUp 0.4s var(--ease) 0.1s backwards; }
.device.live .app-cat:nth-child(1) { animation: popIn 0.45s var(--spring) 0.2s backwards; }
.device.live .app-cat:nth-child(2) { animation: popIn 0.45s var(--spring) 0.32s backwards; }
.device.live .app-cat:nth-child(3) { animation: popIn 0.45s var(--spring) 0.44s backwards; }
.device.live .app-section { animation: fadeUp 0.4s var(--ease) 0.5s backwards; }
.device.live .app-place:nth-of-type(1) { animation: fadeUp 0.4s var(--ease) 0.58s backwards; }
.device.live .app-place:nth-of-type(2) { animation: fadeUp 0.4s var(--ease) 0.66s backwards; }
.device.live .app-sos { animation: fadeUp 0.4s var(--ease) 0.74s backwards; }
.device.live .app-tabs { animation: fadeUp 0.4s var(--ease) 0.82s backwards; }

.section { padding: 2.5rem 0; }
.section-muted { background: var(--bg-muted); }
.section-title {
  text-align: center;
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0 0 1.5rem;
  color: var(--navy);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.feat {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem 1rem;
  text-align: center;
  transition: transform 0.35s var(--spring), box-shadow 0.35s, border-color 0.25s;
}
.feat:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 32px rgba(124, 58, 237, 0.1);
  border-color: #ddd6fe;
}
.feat.visible .feat-ico { animation: iconBounce 0.55s var(--spring) forwards; }
.feat-ico {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: var(--purple-soft);
  border-radius: 12px;
  font-size: 1.2rem;
  margin-bottom: 0.65rem;
}
.feat h3 { margin: 0 0 0.4rem; font-size: 0.95rem; }
.feat p { margin: 0; font-size: 0.8rem; color: var(--muted); line-height: 1.45; }

.use-row {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.use-row > div,
.use-item { flex: 1; min-width: 70px; text-align: center; transition: transform 0.3s var(--spring); }
.use-row.visible .use-item:nth-child(1) { animation: popIn 0.45s var(--spring) 0.05s backwards; }
.use-row.visible .use-item:nth-child(2) { animation: popIn 0.45s var(--spring) 0.1s backwards; }
.use-row.visible .use-item:nth-child(3) { animation: popIn 0.45s var(--spring) 0.15s backwards; }
.use-row.visible .use-item:nth-child(4) { animation: popIn 0.45s var(--spring) 0.2s backwards; }
.use-row.visible .use-item:nth-child(5) { animation: popIn 0.45s var(--spring) 0.25s backwards; }
.use-row.visible .use-item:nth-child(6) { animation: popIn 0.45s var(--spring) 0.3s backwards; }
.use-row > div:hover,
.use-item:hover { transform: translateY(-4px); }
.use-row span,
.use-item span {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 2px solid var(--purple);
  border-radius: 50%;
  font-size: 1rem;
  margin-bottom: 0.35rem;
}
.use-row small,
.use-item small { display: block; font-size: 0.72rem; font-weight: 600; color: var(--muted); }

.faq-wrap { max-width: 560px; margin-inline: auto; }
.faq-wrap details {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  background: #fff;
}
.faq-wrap summary { font-weight: 700; cursor: pointer; }
.faq-wrap p { margin: 0.5rem 0 0; font-size: 0.88rem; color: var(--muted); }

.download-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.75rem;
  transition: box-shadow 0.35s, transform 0.35s var(--spring);
}
.download-card.visible { animation: popIn 0.6s var(--spring) forwards; }
.qr-block { text-align: center; }
.qr-block p { margin: 0.5rem 0 0; font-size: 0.82rem; color: var(--muted); font-weight: 600; }

.site-footer {
  background: var(--footer-bg);
  color: #cbd5e1;
  padding: 2.5rem 0 1.25rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.logo-light { color: #fff; }
.footer-brand p { margin: 0.5rem 0 0; font-size: 0.82rem; opacity: 0.7; }
.footer-col { display: flex; flex-direction: column; gap: 0.4rem; }
.footer-col strong { color: #fff; font-size: 0.82rem; margin-bottom: 0.35rem; }
.footer-col a { color: #94a3b8; text-decoration: none; font-size: 0.8rem; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  font-size: 0.75rem;
  color: #64748b;
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .animate-child, .load-in { opacity: 1; animation: none; transform: none; }
  .reveal { opacity: 1; transform: none; }
  .device { animation: none; }
  .hero { animation: none; }
  .float-pin { animation: none; opacity: var(--o, 0.22); }
  .btn-primary { animation: none; }
  .hero-copy h1 em { animation: none; -webkit-text-fill-color: var(--purple); }
  .device.live * { animation: none !important; }
  .feat.visible .feat-ico { animation: none; }
}

@media (max-width: 900px) {
  .nav-links { display: none; }
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .lead { margin-inline: auto; }
  .store-row, .trust-row { justify-content: center; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .footer-brand {
    padding-bottom: 1.25rem;
    margin-bottom: 0.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  .footer-col {
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  .footer-col:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
  }
}

@media (max-width: 540px) {
  .hero { padding: 1.5rem 0 2rem; }
  .hero-pins .float-pin:nth-child(n+7) { display: none; }
  .hero-copy h1 { font-size: 1.55rem; }
  .features-grid { grid-template-columns: 1fr; }
  .use-row > div { min-width: 28%; }
  .device { width: 200px; }
  .section { padding: 1.75rem 0; }
}

@media (min-width: 901px) {
  .hero-phone { justify-content: flex-end; }
}
