/* Landing de lanzamiento (solo index.html; delete-account usa styles.css). */
:root {
  /* Modo claro: mismo esquema que la app (fondo blanco, texto pizarra) con
   * los acentos del vídeo. Texto con contraste AA o mejor; sobre el naranja
   * solo va texto oscuro (el blanco sobre #F97316 no llega a AA). */
  --bg: #ffffff;
  --bg-2: #f8fafc;
  --bg-3: #f1f5f9;
  --ink: #0f172a;
  --ink-2: #334155;
  --ink-3: #475569;
  --line: #e2e8f0;
  --glass: rgba(255, 255, 255, 0.78);
  --glass-strong: rgba(255, 255, 255, 0.94);
  --accent: #f97316;
  --accent-2: #c2410c;
  --on-accent: #0f172a;
  --trail: #0284c7;
  --ok: #047857;
  --hr: #e11d48;
  --danger: #b91c1c;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 12px 32px rgba(15, 23, 42, 0.08);
  --radius: 20px;
  --wrap: 1180px;
  --font: 'Raleway', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color-scheme: light;
}

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

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  /* Raleway trae cifras de estilo antiguo por defecto: en métricas se leen desiguales. */
  font-variant-numeric: lining-nums;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; border-radius: 6px; }

.glass {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: var(--shadow);
}

/* Cabecera */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 30;
  /* Casi opaca: con 0,86 se veían sombras y tarjetas pasando por detrás,
     como manchas flotando bajo el menú. */
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 18px; letter-spacing: -0.01em; }
.brand svg { flex: none; }
.wordmark { font-family: var(--font); font-weight: 700; font-size: 22px; letter-spacing: -0.01em; color: var(--ink); }
.wordmark sup { font-size: 0.4em; font-weight: 700; margin-left: 1px; vertical-align: top; position: relative; top: 0.2em; }
.site-nav { display: flex; gap: 22px; align-items: center; font-size: 15px; }
.site-nav a { text-decoration: none; color: var(--ink-2); }
.site-nav a:hover { color: var(--ink); }
.site-nav__cta { color: var(--on-accent) !important; background: var(--accent); padding: 8px 16px; border-radius: 999px; font-weight: 700; }
@media (max-width: 720px) { .site-nav a:not(.site-nav__cta) { display: none; } }

/* Hero: fondo limpio con un halo naranja muy suave; el mapa vive dentro de
   la tarjeta de telemetría, no detrás del texto (antes un mapa a sangre
   detrás del logo, que se quedaba en una franja cuando su CSS llegaba tarde). */
.hero {
  position: relative; padding-top: 64px;
  background:
    radial-gradient(60% 55% at 78% 30%, rgba(255, 237, 213, 0.75), rgba(255, 255, 255, 0) 70%),
    radial-gradient(45% 40% at 10% 10%, rgba(224, 242, 254, 0.6), rgba(255, 255, 255, 0) 70%),
    linear-gradient(to bottom, var(--bg-2), var(--bg));
}
.hero__content {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 460px); align-items: center; gap: 56px;
  padding-top: 72px; padding-bottom: 72px;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-2);
}
.eyebrow::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse-glow 2.4s ease-in-out infinite; }
.hero h1 {
  font-size: clamp(42px, 6vw, 76px); line-height: 1.02; letter-spacing: -0.035em; margin: 14px 0 18px;
  color: var(--ink);
}
.hero__lead { font-size: clamp(17px, 1.6vw, 19px); color: var(--ink-2); max-width: 520px; margin: 0 0 28px; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; }

/* Botones: uno naranja (la acción) y uno secundario. Sobre el naranja, texto
   oscuro: el blanco no llega a 3:1. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 22px;
  border-radius: 14px; font: inherit; font-size: 16px; font-weight: 700; text-decoration: none; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn--accent { background: var(--accent); color: var(--on-accent); border: 0; box-shadow: 0 10px 28px -8px rgba(249, 115, 22, 0.6); }
.btn--accent:hover { background: #fb923c; transform: translateY(-1px); }
.btn--ghost { background: var(--glass-strong); color: var(--ink); border: 1px solid var(--line); }
.btn--ghost:hover { border-color: var(--accent); }
.btn:active { transform: translateY(0); }

.store-status { margin: 16px 0 0; font-size: 14px; color: var(--ink-3); }
.store-status strong { color: var(--ink-2); }
.value-badges { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.value-badges li {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px;
  background: var(--glass-strong); border: 1px solid var(--line); font-size: 13px; font-weight: 700; color: var(--ink-2);
}
.value-badges svg { color: var(--ok); flex: none; }

/* Botón de "Prueba de GPS" de /ayuda (mismo estilo de tarjeta). */
.store-badge {
  display: inline-flex; flex-direction: column; justify-content: center; min-width: 168px; padding: 10px 18px;
  border-radius: 14px; border: 1px solid var(--line); background: var(--glass-strong); color: var(--ink);
  text-decoration: none; font: inherit; line-height: 1.2; cursor: default;
}
.store-badge small { font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.06em; }
.store-badge strong { font-size: 17px; }
.store-badge--action { cursor: pointer; background: var(--accent); border: 0; color: var(--on-accent); }
.store-badge--action small { color: var(--on-accent); }
.store-badge--action:hover { filter: brightness(1.06); }

@media (max-width: 768px) {
  .ctas { flex-direction: column; align-items: stretch; }
  .btn { width: 100%; }
}

/* Tarjeta de telemetría: cristal, con el mapa arriba. */
.telemetry { justify-self: end; width: 100%; padding: 18px; border-radius: 24px; box-shadow: 0 30px 70px -30px rgba(15, 23, 42, 0.35), 0 12px 32px rgba(15, 23, 42, 0.08); }
.telemetry__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.telemetry__title { font-size: 15px; font-weight: 700; margin: 0; }
.telemetry__badge { font-size: 11px; font-weight: 700; color: var(--on-accent); background: #fed7aa; padding: 2px 8px; border-radius: 999px; }
.telemetry__route { font-size: 12px; color: var(--ink-3); margin: 2px 0 12px; }
.telemetry__map { position: relative; height: 250px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: #e2e8f0; margin-bottom: 12px; }
.hero-map { position: absolute; inset: 0; }
.telemetry__map .layer-switch { position: absolute; top: 10px; left: 10px; z-index: 2; margin: 0; }
.telemetry__map .maplibregl-ctrl-bottom-right .maplibregl-ctrl-group { display: none; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; }
.metric { background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 7px 10px; }
.metric dt { font-size: 11px; color: var(--ink-3); }
.metric dd { margin: 0; font-size: 19px; font-weight: 750; font-variant-numeric: lining-nums tabular-nums; letter-spacing: -0.01em; }
.metric dd small { font-size: 12px; font-weight: 600; color: var(--ink-2); margin-left: 2px; }
.metric--hr dd { color: var(--hr); }
.profile { margin: 12px 0 6px; position: relative; }
.profile svg { width: 100%; height: 70px; display: block; cursor: crosshair; touch-action: none; }
.profile__area { fill: url(#profile-fill); }
.profile__line { fill: none; stroke: var(--accent-2); stroke-width: 2; }
.profile__cursor { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 3 3; }
.profile__dot { fill: var(--accent); stroke: #fff; stroke-width: 2; }
.scrubber { display: flex; align-items: center; gap: 10px; }
.scrubber input[type='range'] { flex: 1; accent-color: var(--accent); }
.play-toggle {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg-2);
  color: var(--ink); cursor: pointer; font-size: 14px; flex: none;
}
.telemetry__note { font-size: 11px; color: var(--ink-3); margin: 10px 0 0; }

@media (max-width: 960px) {
  .hero__content { grid-template-columns: 1fr; gap: 36px; padding-top: 40px; padding-bottom: 48px; }
  .telemetry { justify-self: stretch; }
}

/* Franja de datos */
.facts { padding: 28px 0 8px; }
.facts__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.fact { padding: 18px; text-align: left; }
.fact strong { display: block; font-size: clamp(26px, 3vw, 36px); letter-spacing: -0.02em; font-variant-numeric: lining-nums tabular-nums; }
.fact > span { color: var(--ink-2); font-size: 14px; }
@media (max-width: 720px) { .facts__grid { grid-template-columns: repeat(2, 1fr); } }

/* Secciones */
section[id] { scroll-margin-top: 80px; }
.section { padding: 96px 0 24px; }
.section__head { max-width: 680px; margin-bottom: 36px; }
.section__head h2 { font-size: clamp(30px, 4vw, 46px); letter-spacing: -0.03em; line-height: 1.08; margin: 10px 0 12px; }
.section__head p { color: var(--ink-2); margin: 0; font-size: 18px; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature { padding: 24px; position: relative; overflow: hidden; }
.feature::before {
  content: ''; position: absolute; inset: -40% auto auto -30%; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.12), transparent 70%); pointer-events: none;
}
.feature__icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: #ffedd5; color: var(--accent-2); margin-bottom: 14px; }
.feature h3 { margin: 0 0 6px; font-size: 19px; letter-spacing: -0.01em; }
.feature p { margin: 0; color: var(--ink-2); font-size: 15px; }
@media (max-width: 900px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .features { grid-template-columns: 1fr; } }

/* Vídeo real de la app en un teléfono: bisel oscuro y pantalla 9:16,
   para que la barra de pestañas de la app se lea como parte de la pantalla y
   no como algo flotando sobre la página. Sin controles del navegador. */
.demo-showcase { display: grid; grid-template-columns: 1fr minmax(240px, 320px); gap: 56px; align-items: center; }
.demo-points { margin: 26px 0 0; padding: 0; list-style: none; display: grid; gap: 16px; color: var(--ink-2); font-size: 16px; }
.demo-points li { display: flex; gap: 14px; align-items: flex-start; }
.demo-points__icon {
  flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: #ffedd5; color: var(--accent-2);
}
.demo-points strong { display: block; color: var(--ink); font-size: 17px; margin-bottom: 2px; }
.demo-phone { margin: 0; }
.device {
  position: relative; width: min(300px, 100%); margin: 0 auto; padding: 10px; border-radius: 44px;
  background: linear-gradient(150deg, #334155, #0b1220);
  box-shadow: 0 40px 80px -28px rgba(234, 88, 12, 0.5), 0 24px 48px -12px rgba(15, 23, 42, 0.35), inset 0 0 0 1.5px rgba(255, 255, 255, 0.12);
}
.device__screen { position: relative; aspect-ratio: 9 / 16; border-radius: 34px; overflow: hidden; background: var(--bg-2); }
/* Cámara en el bisel, no sobre la pantalla (tapaba el texto de la app). */
.device__camera { position: absolute; top: 2px; left: 50%; z-index: 2; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: #020617; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12); }
.device video { display: block; width: 100%; height: 100%; object-fit: cover; }
.demo-phone__toggle {
  font: inherit; font-size: 13px; font-weight: 700; min-height: 32px;
  padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); cursor: pointer;
}
.demo-phone__toggle:hover { border-color: var(--accent); }
.demo-phone figcaption { margin-top: 16px; display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 13px; color: var(--ink-3); }
@media (max-width: 800px) {
  .demo-showcase { grid-template-columns: 1fr; gap: 28px; }
}

/* Gratis, sin muro de pago */
.free-list { list-style: none; margin: 0; padding: 8px 24px; display: grid; }
.free-list li { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr) auto; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.free-list li:last-child { border-bottom: 0; }
.free-list__name { font-weight: 700; font-size: 17px; }
.free-list__detail { color: var(--ink-2); font-size: 15px; }
.free-pill { font-size: 13px; font-weight: 800; color: var(--ok); background: #d1fae5; padding: 4px 12px; border-radius: 999px; }
@media (max-width: 700px) {
  .free-list { padding: 4px 18px; }
  .free-list li { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; }
  .free-list__detail { grid-column: 1; grid-row: 2; font-size: 14px; }
  .free-pill { grid-row: 1 / span 2; grid-column: 2; }
}

/* Privacidad */
.privacy { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.privacy .glass { padding: 26px; }
.privacy h3 { margin: 0 0 8px; }
.privacy p { margin: 0; color: var(--ink-2); }
@media (max-width: 800px) { .privacy { grid-template-columns: 1fr; } }

/* CTA final (destino de "Descargar") */
.final-cta { text-align: center; padding: 56px 24px; margin: 96px 0 0; background: linear-gradient(135deg, #fff7ed, #f0f9ff); }
.final-cta h2 { font-size: clamp(30px, 4vw, 44px); letter-spacing: -0.03em; margin: 10px 0 10px; }
.final-cta p { color: var(--ink-2); margin: 0 auto 22px; max-width: 560px; }
.final-cta .ctas { justify-content: center; }
.store-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.store-chip { display: inline-flex; flex-direction: column; align-items: center; min-width: 128px; padding: 10px 18px; border-radius: 14px; background: var(--glass-strong); border: 1px solid var(--line); line-height: 1.25; }
.store-chip strong { font-size: 16px; }
.store-chip small { font-size: 12px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.06em; }

/* Pie */
.site-footer { border-top: 1px solid var(--line); margin-top: 72px; padding: 28px 0 40px; color: var(--ink-3); font-size: 14px; }
.site-footer__inner { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between; }
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
/* El naranja como texto es el oscuro (--accent-2, ≥4,5:1), no el de relleno. */
.site-footer__tagline { margin: 0; font-size: 15px; font-weight: 600; color: var(--ink-3); }
.site-footer__tagline strong { color: var(--accent-2); font-weight: 800; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--ink); }
.social { display: flex; gap: 12px; }
.attribution { font-size: 12px; color: var(--ink-3); margin-top: 14px; }

/* Lista de espera */
.waitlist-modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; }
.waitlist-modal[hidden] { display: none; }
.waitlist-modal__backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.45); }
.waitlist-modal__panel { position: relative; width: min(440px, 100%); padding: 28px; background: var(--glass-strong); }
.waitlist-modal__close { position: absolute; top: 12px; right: 12px; background: none; border: 0; color: var(--ink-2); font-size: 18px; cursor: pointer; }
.waitlist-modal__title { margin: 0 0 6px; }
.waitlist-modal__subtitle { margin: 0 0 18px; color: var(--ink-2); }
.waitlist-form { display: flex; gap: 8px; flex-wrap: wrap; }
.waitlist-form input { flex: 1 1 200px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: inherit; }
.waitlist-form button { padding: 12px 18px; border-radius: 12px; border: 0; background: var(--accent); color: var(--on-accent); font: inherit; font-weight: 700; cursor: pointer; }
.waitlist-form__status { min-height: 1.4em; margin: 12px 0 0; color: var(--ink-2); }
.waitlist-form__status[data-state='ok'] { color: var(--ok); }
.waitlist-form__status[data-state='error'] { color: var(--danger); }

/* Selector de capa (sobre el mapa) */
.layer-switch { display: flex; gap: 2px; padding: 3px; border-radius: 10px; background: rgba(255, 255, 255, 0.92); border: 1px solid var(--line); box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12); }
.layer-switch button {
  font: inherit; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 7px;
  border: 0; background: transparent; color: var(--ink-2); cursor: pointer;
}
.layer-switch button[aria-pressed='true'] { background: var(--accent); color: var(--on-accent); }

/* Mapa */
.maplibregl-ctrl-attrib { background: rgba(255, 255, 255, 0.85) !important; color: var(--ink-2) !important; }
.maplibregl-ctrl-attrib a { color: var(--ink-2) !important; }
.map-marker { width: 18px; height: 18px; border-radius: 50%; background: var(--accent); border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(249, 115, 22, 0.3); animation: pulse-glow 2s ease-in-out infinite; }

/* Animaciones */
@keyframes fade-in-up { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.5); }
  50% { box-shadow: 0 0 0 10px rgba(249, 115, 22, 0); }
}
.reveal { opacity: 0; }
.reveal.is-visible { animation: fade-in-up 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards; }
.no-js .reveal { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal.is-visible { opacity: 1; animation: none; }
  .eyebrow::before, .map-marker { animation: none; }
  .btn { transition: none; }
}
