/* ============================================================
   Tokens
   El ritmo de la página lo dan los cambios de fondo entre
   capítulos oscuro/claro (--ink/--surface se redefinen dentro de
   .tema-claro) — no rayitas divisoras entre secciones.
   El acento no es decorativo: son los tres colores que la app ya
   usa en el overlay real (ACEPTAR/HUECO/RECHAZAR).
   ============================================================ */
:root {
  --ink: #0a0c10;
  --surface: #15181e;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f1efe8;
  --text-dim: #949aa5;
  --link: #22d3ee;

  --acepta: #34d399;
  --hueco: #f5a623;
  --rechaza: #ef4444;

  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --pad: clamp(64px, 11vw, 148px);

  --font-display: -apple-system, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-body: -apple-system, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Code", "Roboto Mono", Menlo, Consolas, monospace;
}

.tema-claro {
  --ink: #f3f0e8;
  --surface: #ffffff;
  --line: rgba(20, 20, 15, 0.09);
  --text: #14171a;
  --text-dim: #62666f;
  --link: #0c7d94;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s ease;
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.wrap--narrow { max-width: 720px; }

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

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; margin: 0; }

:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; }

img { max-width: 100%; }

/* Cada <section> es un capítulo de color completo — el fondo cambia, nunca una línea. */
.section { background: var(--ink); color: var(--text); padding: var(--pad) 0; }

.eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--link);
  margin: 0 0 16px;
}

.section-title { font-size: clamp(1.9rem, 4.2vw, 2.7rem); line-height: 1.12; margin: 0 0 16px; }
.section-sub { color: var(--text-dim); max-width: 560px; margin: 0 0 56px; font-size: 1.06rem; }

.center { text-align: center; margin-left: auto; margin-right: auto; }

/* ---------- Reveal al hacer scroll ---------- */

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  body { transition: none; }
}

/* ---------- Topbar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(10, 12, 16, 0.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.topbar__inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }

.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; letter-spacing: 0.01em; font-size: 1.02rem; color: #f1efe8; }
.brand__logo { width: 26px; height: 26px; object-fit: contain; filter: drop-shadow(0 0 10px rgba(34, 211, 238, 0.4)); }

.nav { display: flex; }
.nav a {
  color: #949aa5;
  text-decoration: none;
  margin-left: 24px;
  font-size: 0.87rem;
  transition: color 0.15s;
}
.nav a:hover { color: #f1efe8; }

/* ---------- Botones ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  padding: 15px 26px;
  border-radius: 999px;
  font-size: 0.98rem;
  font-weight: 700;
  border: 1px solid transparent;
  font-family: var(--font-body);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn--primary { background: var(--acepta); color: #06231a; box-shadow: 0 14px 32px -12px rgba(52, 211, 153, 0.55); }
.btn--primary:hover { transform: translateY(-1px); box-shadow: 0 18px 36px -12px rgba(52, 211, 153, 0.65); }

.btn--disabled {
  background: transparent;
  border: 1px dashed var(--line);
  color: var(--text-dim);
  font-weight: 500;
  cursor: not-allowed;
}

/* ============================================================
   Hero — bloque centrado, tipografía grande, y debajo la
   tarjeta que hace en vivo lo que el texto describe.
   ============================================================ */

.hero { position: relative; overflow: hidden; padding: clamp(72px, 13vw, 132px) 0 0; text-align: center; }

.hero::before {
  content: "";
  position: absolute;
  inset: -10% -10% auto -10%;
  height: 620px;
  background: radial-gradient(ellipse at top, rgba(34, 211, 238, 0.16), transparent 62%);
  pointer-events: none;
}

.hero__inner { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; }

.badges { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 26px; }
.badge {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-dim);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 13px;
}
.badge--highlight { color: #06231a; background: var(--acepta); border-color: var(--acepta); font-weight: 700; }

.hero h1 { font-size: clamp(2.5rem, 7vw, 4.6rem); line-height: 1.04; margin: 0 0 24px; }

.hero__sub { color: var(--text-dim); max-width: 540px; margin: 0 auto 40px; font-size: clamp(1.05rem, 2vw, 1.2rem); }

.hero__actions { display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap; margin-bottom: 64px; }
.hero__version { color: var(--text-dim); font-size: 0.85rem; font-family: var(--font-mono); }

/* ---- Franja de descargas: el número vuelve a ser protagonista ---- */

.stat { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; margin-bottom: clamp(48px, 8vw, 80px); }
.stat__num {
  font-family: var(--font-mono);
  font-size: clamp(2.6rem, 8vw, 3.6rem);
  font-weight: 800;
  color: #f1efe8;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.stat__label {
  margin-top: 10px;
  color: var(--acepta);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
/* Palabra que rota bajo el contador: Uber → DiDi → InDrive, cada una con su color
   de marca. El swap de texto/color y el fade los maneja demo.js. */
.rotador__word {
  display: block;
  margin-top: 22px;
  font-size: clamp(1.7rem, 5vw, 2.3rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.01em;
  transition: opacity 0.28s ease, color 0.28s ease;
}
.rotador__word.is-fade { opacity: 0; }
.plat-uber    { color: #ffffff; }
.plat-didi    { color: #ff7a00; }
.plat-indrive { color: #c1f11d; }
@media (prefers-reduced-motion: reduce) {
  .rotador__word { transition: none; }
}

/* ---- La tarjeta demo: recreación fiel del overlay real de la app.
   Colores fijos (no toma los tokens de capítulo): es un recorte de
   pantalla del teléfono, no un elemento que deba adaptarse al fondo. ---- */

.demo-stage { position: relative; z-index: 1; padding-bottom: clamp(56px, 9vw, 100px); }
.demo-stage::before {
  content: "";
  position: absolute;
  inset: -40px -40px 0;
  background: radial-gradient(closest-side, rgba(52, 211, 153, 0.16), transparent 70%);
  z-index: -1;
}

/* Recreación 1:1 de diseno_cuadro_flotante.xml / bg_overlay_card.xml / bg_badge_*.xml —
 * mismos colores hex, mismo radio de esquina (18dp→18px), misma escala tipográfica (sp→px)
 * y el mismo orden de elementos que el overlay real dibuja sobre DiDi/Uber. Los colores no
 * son "un rojo cualquiera": son los mismos `#FF4444`/`#FF9F1C`/`#34C6DA` del código Kotlin. */
.demo {
  --c: #34c6da; /* color del estado — se sobreescribe por clase de estado abajo */
  background: #0b0e15;
  border: 2px solid var(--c);
  border-radius: 18px;
  padding: 14px 16px;
  box-shadow: 0 22px 44px -18px rgba(0, 0, 0, 0.7);
  max-width: 380px;
  margin: 0 auto;
  text-align: left;
  transition: border-color 0.25s ease;
}
.demo--rechazar { --c: #ff5a5a; }
.demo--hueco { --c: #ff9f1c; }

.demo__fila-superior { display: flex; align-items: center; gap: 10px; }

.demo-badge {
  flex: none;
  padding: 5px 12px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.06em;
  color: #0b0e15;
  transition: background 0.25s ease;
}
.demo-badge--aceptar { background: linear-gradient(315deg, #34c6da, #3b8fb5); }
.demo-badge--rechazar { background: #ff4444; }
.demo-badge--hueco { background: #ff9f1c; }

.demo__tarifa {
  flex: 1;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}

.demo__divisor { height: 1px; background: rgba(255, 255, 255, 0.15); margin: 11px 0; }

.demo__fila-metricas { display: flex; align-items: baseline; }
.demo__porkm {
  font-family: var(--font-mono);
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--c);
  font-variant-numeric: tabular-nums;
  transition: color 0.25s ease;
}
.demo__sep { margin: 0 10px; font-size: 1.375rem; color: rgba(255, 255, 255, 0.3); }
.demo__porhora { font-family: var(--font-mono); font-size: 1.25rem; font-weight: 700; color: #9aa0ac; font-variant-numeric: tabular-nums; }

.demo__total { margin-top: 4px; color: #7c838f; font-size: 0.875rem; letter-spacing: 0.01em; }

/* La notita NO es parte del overlay real — es una aclaración de esta página nada más,
   por eso vive fuera de la tarjeta y con una voz visualmente distinta (itálica, más chica). */
.demo__nota { min-height: 2.6em; max-width: 380px; margin: 14px auto 0; text-align: center; color: var(--link); font-size: 0.85rem; font-style: italic; }

.demo--entrando .demo__tarifa,
.demo--entrando .demo-badge { animation: demo-pop 0.4s ease; }

@keyframes demo-pop {
  0% { opacity: 0.35; transform: scale(0.97); }
  100% { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .demo--entrando .demo__tarifa, .demo--entrando .demo-badge { animation: none; }
}

/* ============================================================
   Cómo funciona — tres pasos unidos por una ruta punteada:
   es literalmente lo que un GPS dibuja.
   ============================================================ */

.pasos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }

.paso { position: relative; padding: 0 24px; }
.paso:first-child { padding-left: 0; }
.paso:last-child { padding-right: 0; }

.paso__num {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 8px 20px -10px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--link);
  margin-bottom: 22px;
  position: relative;
  z-index: 1;
}

.paso:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 21px;
  left: calc(50% + 42px);
  width: calc(100% - 42px);
  border-top: 2px dashed var(--line);
  z-index: 0;
}

.paso h3 { font-size: 1.2rem; margin-bottom: 12px; }
.paso p { color: var(--text-dim); font-size: 0.96rem; margin: 0; line-height: 1.7; max-width: 34ch; }

@media (max-width: 860px) {
  .pasos { grid-template-columns: 1fr; gap: 40px; }
  .paso { padding: 0; }
  .paso p { max-width: none; }
  .paso:not(:last-child)::after {
    top: 42px; left: 21px; height: 40px; width: 0; border-top: none; border-left: 2px dashed var(--line);
  }
}

/* ============================================================
   Configurar — recreación de la fila real de Ajustes de la app.
   Fondo/borde fijos: es un recorte de pantalla, no un componente
   de la página.
   ============================================================ */

.ajustes {
  background: #15181e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.ajuste-fila {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 26px 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.ajuste-fila:last-child { border-bottom: none; }

.ajuste-fila__icono {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--link);
}
.ajuste-fila__icono svg { width: 19px; height: 19px; }

.ajuste-fila__texto h3 { font-size: 1.02rem; margin-bottom: 5px; color: #f1efe8; }
.ajuste-fila__texto p { color: #949aa5; font-size: 0.92rem; margin: 0; line-height: 1.65; max-width: 62ch; }

/* ============================================================
   Confianza — oficial vs. copia. Corto, concreto, sin alarma.
   ============================================================ */

.confianza__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 8px; }

.confianza-col {
  border-radius: var(--radius-md);
  padding: 28px 30px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 16px 32px -18px rgba(0, 0, 0, 0.16);
}

.confianza-col h3 { font-size: 1.02rem; margin-bottom: 16px; }
.confianza-col--ok h3 { color: #0d9668; }
.confianza-col--no h3 { color: var(--rechaza); }

.confianza-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.confianza-col li { display: flex; gap: 10px; font-size: 0.92rem; color: var(--text); line-height: 1.55; }
.confianza-col li::before { flex: none; font-family: var(--font-mono); font-weight: 700; }
.confianza-col--ok li::before { content: "✓"; color: #0d9668; }
.confianza-col--no li::before { content: "✕"; color: var(--rechaza); }

@media (max-width: 720px) {
  .confianza__cols { grid-template-columns: 1fr; }
}

/* ---------- Permisos ---------- */

.permisos__tabla-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 16px 32px -18px rgba(0, 0, 0, 0.16);
  -webkit-overflow-scrolling: touch;
}
.permisos__tabla { width: 100%; min-width: 560px; border-collapse: collapse; background: var(--surface); font-size: 0.9rem; }
.permisos__tabla th, .permisos__tabla td { text-align: left; padding: 15px 22px; border-bottom: 1px solid var(--line); line-height: 1.5; }
.permisos__tabla th {
  color: var(--link);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.permisos__tabla td:first-child { color: var(--text); font-weight: 600; white-space: nowrap; }
.permisos__tabla td:nth-child(2) { color: var(--text-dim); }
.permisos__tabla td:last-child { color: var(--text-dim); font-size: 0.85rem; }
.permisos__tabla tbody tr:last-child td { border-bottom: none; }

/* ============================================================
   Filosofía — el capítulo sin componentes: una sola idea, grande.
   ============================================================ */

.philosophy { text-align: center; }
.philosophy__quote { margin: 0 auto; max-width: 780px; }
.philosophy__quote p { margin: 0 0 28px; font-size: clamp(1.15rem, 2.4vw, 1.5rem); line-height: 1.55; color: var(--text-dim); }
.philosophy__quote p:first-child { color: var(--text); font-size: clamp(1.5rem, 3.4vw, 2.1rem); font-weight: 600; line-height: 1.35; letter-spacing: -0.01em; }
.philosophy__quote p:last-child { margin-bottom: 0; }

/* ---------- Instalar ---------- */

.install__steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 12px; max-width: 660px; }
.install__steps > li {
  counter-increment: step;
  display: flex;
  gap: 18px;
  align-items: flex-start;
  border-radius: var(--radius-md);
  padding: 20px 24px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 12px 24px -16px rgba(0, 0, 0, 0.14);
}
.install__steps > li::before {
  content: counter(step);
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--link) 14%, transparent);
  color: var(--link);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.install__steps p { margin: 0; color: var(--text-dim); font-size: 0.94rem; line-height: 1.65; }
.install__steps strong { color: var(--text); }

/* ---------- FAQ ---------- */

.faq__list { display: grid; gap: 10px; max-width: 780px; }
.faq__item {
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 0 24px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 10px 20px -16px rgba(0, 0, 0, 0.14);
}
.faq__item summary {
  cursor: pointer;
  padding: 20px 32px 20px 0;
  min-height: 24px;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  list-style: none;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 20px;
  color: var(--link);
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1;
  transition: transform 0.18s ease;
}
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__item p { margin: 0 0 24px; color: var(--text-dim); font-size: 0.94rem; line-height: 1.7; }
.faq__item strong { color: var(--text); }

/* ---------- Soporte / Privacidad ---------- */

.support__row { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.privacy__text { color: var(--text-dim); font-size: 1.04rem; line-height: 1.75; max-width: 640px; margin: 0; }

/* ---------- Footer ---------- */

.footer { padding: 36px 0; color: #6d7380; font-size: 0.82rem; }
.footer__inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.footer a { color: #6d7380; }
.footer a:hover { color: #f1efe8; }

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 640px) {
  .topbar__inner { flex-wrap: wrap; height: auto; padding: 12px 0; row-gap: 10px; }
  .nav { width: 100%; gap: 20px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { margin-left: 0; flex: none; white-space: nowrap; }

  .hero { padding-top: 56px; }
  .hero__actions { gap: 14px; margin-bottom: 48px; }
  .stat { margin-bottom: 40px; }
  .demo { max-width: 100%; }

  .ajuste-fila { padding: 20px 20px; }
  .confianza-col { padding: 22px 22px; }
  .install__steps > li { padding: 16px 18px; gap: 12px; }
  .faq__item summary { padding: 18px 30px 18px 0; font-size: 0.95rem; }
}
