/*
 * OutFit — hoja de estilos del sitio público.
 *
 * Los colores son literalmente los de la app (`lib/core/theme/app_theme.dart`),
 * no una aproximación: quien llega desde la ficha de Play debe reconocer lo
 * mismo que se va a instalar.
 *
 * No se carga ninguna fuente externa, y no es una preferencia estética. La
 * política de privacidad promete que no hay terceros; pedirle una tipografía a
 * Google enviaría la IP del visitante a Google y convertiría esa frase en
 * mentira. La de display va alojada aquí, subconjuntada a 6 KB.
 */

@font-face {
  font-family: 'OutFit Display';
  src: url('../fonts/outfit-display.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0f1216;
  --surface: #14181d;
  --surface-2: #181d23;
  --border: #2a3138;
  --border-soft: #212830;
  --text: #e6e9ec;
  --muted: #9aa4ae;
  --lime: #c8ff3d;
  --lime-soft: #dcff8a;
  --success: #4ade9b;
  --streak: #ffa53d;

  --display: 'OutFit Display', ui-monospace, 'JetBrains Mono', 'SF Mono',
    Menlo, Consolas, monospace;
  --body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue',
    sans-serif;

  --shell: min(1120px, 100% - 3rem);
  --r: 14px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* Retícula tenue de fondo: da textura sin competir con el contenido, y
   refuerza la idea de marcador. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(var(--border-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-soft) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 20%, transparent 75%);
  opacity: 0.5;
}

main, header, footer { position: relative; z-index: 1; }

.shell {
  width: var(--shell);
  margin-inline: auto;
}

/* ---------- Marca ---------------------------------------------------- */

.wordmark {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.045em;
  color: var(--text);
  text-decoration: none;
  display: inline-block;
}
.wordmark span { color: var(--lime); }

/* ---------- Cabecera -------------------------------------------------- */

.site-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.6rem 0;
}
.site-head .wordmark { font-size: 1.45rem; }

.head-links {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  font-size: 0.92rem;
}
.head-links a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.18s ease;
}
.head-links a:hover,
.head-links a:focus-visible { color: var(--text); }

/* ---------- Portada --------------------------------------------------- */

.hero {
  padding: clamp(3rem, 9vw, 7rem) 0 clamp(3rem, 7vw, 5.5rem);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

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

.eyebrow {
  font-family: var(--display);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--lime);
  margin: 0 0 1.4rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.eyebrow::before {
  content: '';
  width: 26px;
  height: 2px;
  background: var(--lime);
}

h1 {
  font-family: var(--display);
  font-size: clamp(2.4rem, 6.2vw, 4rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
  margin: 0 0 1.3rem;
  font-weight: 800;
  text-wrap: balance;
}
h1 em {
  font-style: normal;
  color: var(--lime);
}

.lede {
  font-size: clamp(1.02rem, 1.6vw, 1.15rem);
  color: var(--muted);
  margin: 0 0 2.2rem;
  max-width: 46ch;
  text-wrap: pretty;
}

/* ---------- Llamada a la acción --------------------------------------- */

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.4rem;
}

.btn-store {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  background: var(--lime);
  color: #14200a;
  text-decoration: none;
  padding: 0.95rem 1.6rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  border: 1px solid var(--lime);
  transition: transform 0.16s ease, box-shadow 0.22s ease;
  box-shadow: 0 0 0 rgba(200, 255, 61, 0);
}
.btn-store:hover,
.btn-store:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px -12px rgba(200, 255, 61, 0.55);
}
.btn-store svg { flex: none; }
.btn-store small {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.72;
}

.cta-note {
  font-size: 0.86rem;
  color: var(--muted);
}

/* ---------- Marcador de la portada ------------------------------------ */

.scoreboard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.6rem 1.6rem 1.4rem;
  box-shadow: 0 30px 70px -40px #000;
}

.scoreboard-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}
.chip {
  font-family: var(--display);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  color: var(--lime);
}

.counter {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(3.6rem, 12vw, 5.6rem);
  line-height: 0.92;
  letter-spacing: -0.06em;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}
.counter b { font-weight: 800; }
.counter i {
  font-style: normal;
  font-size: 0.32em;
  color: var(--muted);
  letter-spacing: 0;
}

.track {
  height: 8px;
  border-radius: 999px;
  background: #262c33;
  margin: 1.3rem 0 1.5rem;
  overflow: hidden;
}
.track > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--lime), var(--lime-soft));
  width: 73%;
}
@media (prefers-reduced-motion: no-preference) {
  .track > span {
    width: 0;
    animation: fill 2.4s 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  }
}
@keyframes fill { to { width: 73%; } }

.roster { display: grid; gap: 0.55rem; }
.athlete {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 0.9rem;
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid transparent;
  font-size: 0.92rem;
}
.athlete.is-you {
  border-color: var(--lime);
  background: #1b2410;
}
.athlete .streak {
  font-family: var(--display);
  font-size: 0.82rem;
  color: var(--streak);
}
.athlete .score {
  font-family: var(--display);
  font-size: 0.92rem;
  color: var(--muted);
}
.athlete.done .score { color: var(--success); }

/* ---------- Secciones -------------------------------------------------- */

section { padding: clamp(3rem, 7vw, 5.5rem) 0; }

h2 {
  font-family: var(--display);
  font-size: clamp(1.6rem, 3.4vw, 2.3rem);
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin: 0 0 1rem;
  font-weight: 800;
  text-wrap: balance;
}

.section-lede {
  color: var(--muted);
  max-width: 58ch;
  margin: 0 0 2.6rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.1rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.5rem 1.4rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.card:hover { border-color: #3a434d; transform: translateY(-3px); }

.card .num {
  font-family: var(--display);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  color: var(--lime);
  display: block;
  margin-bottom: 0.9rem;
}
.card h3 {
  font-size: 1.08rem;
  margin: 0 0 0.5rem;
  letter-spacing: -0.01em;
}
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* ---------- Bloque de privacidad --------------------------------------- */

.privacy-banner {
  border: 1px solid var(--border);
  border-left: 3px solid var(--lime);
  border-radius: var(--r);
  background: linear-gradient(100deg, #17200f 0%, var(--surface) 55%);
  padding: clamp(1.6rem, 4vw, 2.6rem);
}
.privacy-banner h2 { margin-bottom: 0.7rem; }
.privacy-banner p { color: var(--muted); margin: 0 0 1.2rem; max-width: 62ch; }
.privacy-banner a {
  color: var(--lime);
  text-decoration: none;
  border-bottom: 1px solid #4a5c25;
  padding-bottom: 1px;
}
.privacy-banner a:hover { border-color: var(--lime); }

/* ---------- Cierre ------------------------------------------------------ */

.closer {
  text-align: center;
  border-top: 1px solid var(--border);
  padding-top: clamp(3rem, 7vw, 5rem);
}
.closer h2 { margin-bottom: 1.6rem; }
.closer .cta-row { justify-content: center; }

/* ---------- Pie ---------------------------------------------------------- */

.site-foot {
  border-top: 1px solid var(--border);
  margin-top: 3rem;
  padding: 2rem 0 3rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.6rem;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 0.86rem;
}
.site-foot a { color: var(--muted); text-decoration: none; }
.site-foot a:hover { color: var(--text); }
.site-foot nav { display: flex; gap: 1.4rem; flex-wrap: wrap; }

/* ---------- Documento legal ---------------------------------------------- */

.doc { padding: clamp(2rem, 5vw, 3.5rem) 0 2rem; }
.doc-shell { width: min(760px, 100% - 3rem); margin-inline: auto; }

.doc h1 {
  font-size: clamp(1.9rem, 4.6vw, 2.7rem);
  margin-bottom: 0.6rem;
}
.doc .updated {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0 0 2.4rem;
}

.doc h2 {
  font-size: 1.25rem;
  margin: 2.8rem 0 0.9rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--border);
}
.doc h3 {
  font-size: 1rem;
  margin: 1.8rem 0 0.6rem;
  color: var(--lime-soft);
}
.doc p { color: #cfd5db; }
.doc ul,
.doc ol { color: #cfd5db; padding-left: 1.2rem; }
.doc li { margin-bottom: 0.4rem; }

/* Los pasos numerados son el corazón de la página de borrado de cuenta: se
   marcan en lima para que se vean como una secuencia y no como texto suelto. */
.doc ol { counter-reset: paso; list-style: none; padding-left: 0; }
.doc ol > li {
  counter-increment: paso;
  position: relative;
  padding-left: 2.2rem;
  margin-bottom: 0.7rem;
}
.doc ol > li::before {
  content: counter(paso);
  position: absolute;
  left: 0;
  top: 0.05em;
  width: 1.55rem;
  height: 1.55rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--lime);
  color: #14200a;
  font-size: 0.8rem;
  font-weight: 800;
}

.doc code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.1em 0.38em;
  color: var(--text);
}
.doc strong { color: var(--text); }
.doc a { color: var(--lime); }

.key-points {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--lime);
  border-radius: var(--r);
  padding: 1.4rem 1.6rem;
  margin-bottom: 2.4rem;
}
.key-points ul { margin: 0; padding-left: 1.1rem; }
.key-points li::marker { color: var(--lime); }

.doc table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.6rem;
  font-size: 0.92rem;
  display: block;
  overflow-x: auto;
}
.doc th, .doc td {
  text-align: left;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.doc th {
  font-family: var(--display);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.doc td { color: #cfd5db; }

.callout {
  border: 1px solid var(--border);
  border-left: 3px solid var(--streak);
  border-radius: var(--r);
  background: var(--surface);
  padding: 1.1rem 1.3rem;
  margin: 1.4rem 0;
}
.callout p { margin: 0; }
/* Un aviso con varios párrafos —renovación, cómo cancelar, qué pasa al
   cancelar— necesita respirar entre ellos; sin esto se leen como un bloque. */
.callout p + p { margin-top: 0.7rem; }

/* ---------- Aparición escalonada ----------------------------------------- */

/* La aparición es aditiva a propósito: el contenido es visible por defecto y
   la animación solo lo adorna.
   Al revés —arrancando en `opacity: 0`— cualquier entorno que no ejecute
   animaciones vería la página en blanco: un rastreador, una captura
   automática, o la revisión de la tienda. Es exactamente lo que pasó en la
   primera captura de esta página. */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(14px);
    animation: rise 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  }
  .reveal:nth-child(2) { animation-delay: 0.08s; }
  .reveal:nth-child(3) { animation-delay: 0.16s; }
  .reveal:nth-child(4) { animation-delay: 0.24s; }
}

@keyframes rise {
  to { opacity: 1; transform: none; }
}

:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
  border-radius: 4px;
}
