:root {
  --graphite: #18181b;
  --graphite-70: #3f3f46;
  --graphite-50: #71717a;
  --muted: #e5e7ea;
  --surface: #f1efe9;
  --white: #ffffff;
  --radius: 16px;
  --wrap: 1080px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--graphite);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
}

a {
  color: inherit;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--muted);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.01em;
  color: var(--graphite);
}

.registered-symbol {
  font-size: 0.55em;
  vertical-align: super;
  margin-left: 1px;
  line-height: 0;
  font-weight: 500;
}

.brand__logo {
  display: block;
  width: 28px;
  height: 28px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 14px;
  font-weight: 600;
}

.site-nav a {
  text-decoration: none;
  color: var(--graphite-70);
}

.site-nav__cta {
  color: var(--white) !important;
  background: var(--graphite);
  padding: 8px 16px;
  border-radius: 999px;
}

/* Hero */
.hero {
  padding: 96px 0 72px;
  /* Foto de montañeros (bg-hero.jpg) con una capa oscura translúcida encima
     — no una capa clara: el texto ahora es blanco (ver `.hero__title` etc.
     más abajo), así que necesita un fondo oscuro para tener contraste, no
     uno claro. Acotada a `.hero` (no a `body`): con la foto en
     `background-attachment: fixed` sobre toda la página, `cover` se
     calcula contra la altura TOTAL del documento (mucho mayor que un
     viewport) y la imagen queda ampliada de forma extrema, apareciendo
     cortada y fuera de sitio en secciones muy por debajo del hero en vez
     de cubrirlo a él. Acotada a esta sección de altura fija, `cover` cubre
     exactamente lo que se pretende: el propio hero, nítido y completo. */
  background: linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.45)), url('/assets/bg-hero.jpg') center/cover no-repeat;
}

.hero__inner {
  max-width: 700px;
}

/* Sombra suave compartida por los tres bloques de texto del hero — sin
   ella, el blanco puro se lava contra las zonas de nieve más claras de la
   foto (justo donde está el texto), perdiendo legibilidad. */
.hero__title,
.hero-description,
.hero-tagline {
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.hero__title {
  margin: 0 0 20px;
  font-size: clamp(36px, 6vw, 56px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.08;
  color: var(--white);
}

.hero-description {
  margin: 0 0 24px;
  max-width: 680px;
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--white);
}

.hero-tagline {
  margin: 0 0 32px;
  max-width: 52ch;
  font-size: 20px;
  font-weight: 600;
  font-style: italic;
  letter-spacing: -0.01em;
  line-height: 1.4;
  color: var(--white);
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.store-badge {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 200px;
  padding: 10px 20px;
  border-radius: 12px;
  text-decoration: none;
  line-height: 1.25;
  /* `.store-badge--link` es ahora un <button> (abre el modal de lista de
     espera, ver app.js) en vez de un <a>: reset del estilo nativo de botón
     para que se vea igual que antes. Inocuo sobre el <span> "Muy pronto en
     Google Play", que no tiene chrome nativo que resetear. */
  border: none;
  background: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
  appearance: none;
}

.store-badge--soon {
  background: var(--graphite);
  color: var(--white);
  opacity: 0.92;
}

.store-badge--link {
  /* Solo se usa dentro del hero (ver index.html) — reescrito para
     contraste sobre la foto oscurecida: el `border` gris claro + texto
     grafito original era prácticamente invisible sobre `bg-hero.jpg`. */
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
}

.store-badge__eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.75;
}

.store-badge__name {
  font-size: 16px;
  font-weight: 700;
}

/* Modal de lista de espera */
.waitlist-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* Un selector de clase (author CSS) gana sobre la regla `[hidden] { display:
   none }` del navegador (user-agent) aunque tengan la misma especificidad
   — los estilos de autor siempre ganan a los de UA por origen de cascada,
   antes de comparar especificidad. Sin esto, `display: flex` de arriba
   dejaría el modal SIEMPRE visible pese al atributo `hidden` en el HTML. */
.waitlist-modal[hidden] {
  display: none;
}

.waitlist-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(24, 24, 27, 0.55);
  backdrop-filter: blur(2px);
}

.waitlist-modal__panel {
  position: relative;
  width: 100%;
  max-width: 400px;
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px 28px 28px;
  box-shadow: 0 24px 48px rgba(24, 24, 27, 0.25);
}

.waitlist-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  background: var(--surface);
  border-radius: 50%;
  font-size: 15px;
  line-height: 1;
  color: var(--graphite-70);
  cursor: pointer;
}

.waitlist-modal__title {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--graphite);
}

.waitlist-modal__subtitle {
  margin: 0 0 20px;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--graphite-70);
}

.waitlist-form {
  display: flex;
  gap: 8px;
}

.waitlist-form input[type='email'] {
  flex: 1;
  min-width: 0;
  padding: 11px 14px;
  border: 1px solid var(--muted);
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  color: var(--graphite);
}

.waitlist-form input[type='email']:focus {
  outline: 2px solid var(--graphite);
  outline-offset: 1px;
}

.waitlist-form button[type='submit'] {
  border: none;
  border-radius: 10px;
  padding: 0 18px;
  background: var(--graphite);
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
}

.waitlist-form button[type='submit']:disabled {
  opacity: 0.6;
  cursor: default;
}

.waitlist-form__status {
  margin: 14px 0 0;
  font-size: 14px;
  min-height: 1.4em;
}

.waitlist-form__status[data-state='ok'] {
  color: #16794f;
}

.waitlist-form__status[data-state='error'] {
  color: #b3261e;
}

@media (max-width: 480px) {
  .waitlist-form {
    flex-direction: column;
  }
}

/* Sections */
.section-title {
  margin: 0 0 28px;
  font-size: clamp(24px, 3.4vw, 32px);
  font-weight: 800;
  letter-spacing: -0.01em;
  text-align: center;
}

.features {
  padding: 64px 0;
  background: var(--surface);
}

.sport-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sport-grid li {
  background: var(--white);
  border: 1px solid var(--muted);
  border-radius: 12px;
  padding: 14px 16px;
  font-weight: 600;
  font-size: 14px;
  text-align: center;
}

.pillars {
  padding: 72px 0;
}

.pillars__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.pillar h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 800;
}

.pillar p {
  margin: 0;
  color: var(--graphite-70);
  font-size: 14.5px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--muted);
  padding: 28px 0;
  color: var(--graphite-50);
  font-size: 13px;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.site-footer a {
  text-decoration: underline;
}

@media (max-width: 560px) {
  .site-nav {
    gap: 14px;
  }
  .hero {
    padding: 48px 0 40px;
  }
  .store-badge {
    min-width: 0;
    flex: 1 1 auto;
  }
}

/* Cabecera (logo + "Deportes" + "Privacidad" + CTA "Descargar") no cabe en
   una fila a partir de ~420px de ancho — bug preexistente, no introducido
   por este rediseño, pero visible al verificar la nueva cabecera con el
   logo. Se ocultan los enlaces secundarios (llegan igual haciendo scroll a
   esas secciones) y se deja solo el CTA, patrón estándar de cabecera móvil. */
@media (max-width: 480px) {
  .site-nav a:not(.site-nav__cta) {
    display: none;
  }
  /* Con los enlaces secundarios ocultos, `.site-nav` solo contiene el CTA
     — sin esto quedaría pegado al borde derecho (herencia de `.site-header
     __inner { justify-content: space-between }`). `flex: 1` le cede el
     espacio que dejan los enlaces ocultos y `justify-content: center` centra
     el CTA en ese espacio, junto al logo/marca a la izquierda. */
  .site-nav {
    flex: 1;
    justify-content: center;
  }
}
