/* =========================================================================
   NiteUp — hoja de estilos común (landing, legales y páginas de deep link).
   Los tokens son los mismos que usa la app Android (constants/Colors), para
   que web y app se lean como el mismo producto.
   ========================================================================= */

@font-face {
  font-family: "Alexandria";
  src: url("../fonts/alexandria-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Alexandria";
  src: url("../fonts/alexandria-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0a0a0a;
  --surface: #141414;
  --surface-2: #1c1c1c;
  --border: #2a2a2a;
  --text: #ffffff;
  --text-2: #a3a3a3;
  --primary: #bcd01b;
  --primary-soft: rgba(188, 208, 27, 0.14);
  --accent: #e1fa3c;
  --radius: 20px;
  --radius-sm: 12px;
  --maxw: 1120px;
  --nav-h: 72px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Alexandria", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

h1,
h2,
h3 {
  font-weight: 600;
  line-height: 1.12;
  margin: 0 0 0.5em;
  letter-spacing: -0.025em;
}
h1 {
  font-size: clamp(2.3rem, 6.4vw, 4.1rem);
}
h2 {
  font-size: clamp(1.8rem, 4vw, 2.7rem);
}
h3 {
  font-size: 1.15rem;
}
p {
  margin: 0 0 1em;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------------------------------------------------------------- layout */

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: clamp(56px, 9vw, 112px) 0;
  position: relative;
}

.section-head {
  max-width: 660px;
  margin-bottom: clamp(32px, 5vw, 56px);
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid rgba(188, 208, 27, 0.28);
  border-radius: 999px;
  padding: 6px 15px;
  margin-bottom: 18px;
}

.lead {
  color: var(--text-2);
  font-size: clamp(1rem, 2.2vw, 1.15rem);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--primary);
  color: #000;
  padding: 12px 18px;
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 100;
}
.skip-link:focus {
  left: 0;
}

/* ------------------------------------------------------------------- nav */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  /* Negro puro, el mismo del logo: con el gris de antes se notaba el
     recuadro del icono contra la barra. */
  background: #000;
  backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease;
}
.nav.is-scrolled {
  border-bottom-color: var(--border);
}

.nav .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}
.brand:hover {
  text-decoration: none;
}
.brand img {
  width: 38px;
  height: 38px;
  transition: transform 0.3s ease;
}
.brand:hover img {
  transform: rotate(-6deg) scale(1.06);
}

.nav-links {
  display: flex;
  gap: 26px;
  margin-left: auto;
  align-items: center;
}
.nav-links a:not(.btn) {
  color: var(--text-2);
  font-size: 0.95rem;
  text-decoration: none;
  position: relative;
}
.nav-links .btn {
  text-decoration: none;
}
.nav-links a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -6px;
  height: 2px;
  background: var(--primary);
  transition: right 0.25s ease;
}
.nav-links a:not(.btn):hover {
  color: var(--text);
}
.nav-links a:not(.btn):hover::after {
  right: 0;
}

@media (max-width: 880px) {
  .nav-links a:not(.btn) {
    display: none;
  }
}

/* --------------------------------------------------------------- botones */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1rem;
  font-family: inherit;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.18s ease, background-color 0.18s ease,
    border-color 0.18s ease, box-shadow 0.18s ease;
}
.btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
}
.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--primary);
  color: #000;
}
.btn-primary:hover {
  background: var(--accent);
  box-shadow: 0 10px 30px rgba(188, 208, 27, 0.25);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover {
  border-color: var(--primary);
}

.btn-sm {
  padding: 10px 20px;
  font-size: 0.9rem;
}

/* Insignias oficiales de las tiendas */
.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}
.stores img {
  height: 54px;
  width: auto;
  transition: transform 0.2s ease, filter 0.2s ease;
}
/* La insignia de Google trae 29px de margen transparente arriba y abajo sobre
   un lienzo de 250, así que a la misma altura CSS su botón se ve un 23% más
   pequeño que el de Apple, que ocupa su caja entera. Se compensa la altura en
   vez de recortar el archivo: ese margen es la zona de respeto que pide la
   guía de marca de Google, y así queda cumplida. */
.stores img[src*="play-badge"] {
  height: 70px;
}
.store-link:hover img {
  transform: translateY(-3px);
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.6));
}

/* ------------------------------------------------------------------ hero */

.hero {
  position: relative;
  min-height: calc(100svh - var(--nav-h));
  display: flex;
  align-items: center;
  padding: clamp(48px, 7vw, 92px) 0 clamp(56px, 8vw, 96px);
  overflow: hidden;
  isolation: isolate;
}

/* El mismo vídeo que abre la app, de fondo y sin sonido */
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  opacity: 0.42;
}
.hero-veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(
      70% 60% at 18% 28%,
      rgba(188, 208, 27, 0.2),
      transparent 62%
    ),
    linear-gradient(180deg, rgba(10, 10, 10, 0.72), rgba(10, 10, 10, 0.94) 72%,
      var(--bg));
}

.hero .wrap {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}

.hero-copy {
  max-width: 580px;
}

.hero h1 .accent {
  color: var(--primary);
  /* Se escribe sola al cargar: da la sensación de que la web está viva */
  display: inline-block;
}

.hero .lead {
  font-size: clamp(1.05rem, 2.4vw, 1.3rem);
  margin-bottom: 30px;
  max-width: 30em;
}

.hero-note {
  margin-top: 20px;
  font-size: 0.88rem;
  color: var(--text-2);
}

.scroll-hint {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-2);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.scroll-hint::after {
  content: "";
  width: 1px;
  height: 34px;
  background: linear-gradient(var(--primary), transparent);
  animation: hint 1.8s ease-in-out infinite;
}
@keyframes hint {
  0%,
  100% {
    opacity: 0.25;
    transform: scaleY(0.6);
    transform-origin: top;
  }
  50% {
    opacity: 1;
    transform: scaleY(1);
    transform-origin: top;
  }
}
@media (max-width: 900px) {
  .scroll-hint {
    display: none;
  }
}

/* Maqueta de teléfono */
.phones {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
}

.phone {
  position: relative;
  border-radius: 36px;
  padding: 9px;
  background: linear-gradient(160deg, #313131, #0d0d0d);
  border: 1px solid #3a3a3a;
  box-shadow: 0 34px 70px rgba(0, 0, 0, 0.7);
  width: 244px;
  flex-shrink: 0;
}
.phone img {
  border-radius: 28px;
  display: block;
}
.phone-float {
  animation: float 7s ease-in-out infinite;
}
.phone-back {
  width: 200px;
  transform: rotate(-5deg);
  opacity: 0.9;
  animation: float 8.5s ease-in-out infinite reverse;
}
@keyframes float {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -14px;
  }
}

@media (max-width: 900px) {
  .hero {
    min-height: 0;
  }
  .hero .wrap {
    grid-template-columns: 1fr;
  }
  .hero-copy {
    max-width: none;
  }
  .phone-back {
    display: none;
  }
}

/* --------------------------------------------------- tira de logos */

.marquee {
  position: relative;
  overflow: hidden;
  padding: 26px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: #0c0c0c;
  /* Los extremos se difuminan para que entren y salgan sin cortarse */
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent,
    #000 12%,
    #000 88%,
    transparent
  );
  mask-image: linear-gradient(
    90deg,
    transparent,
    #000 12%,
    #000 88%,
    transparent
  );
}
.marquee-track {
  display: flex;
  gap: 46px;
  width: max-content;
  animation: slide 34s linear infinite;
}
.marquee:hover .marquee-track {
  animation-play-state: paused;
}
.marquee img {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  object-fit: cover;
  filter: grayscale(1);
  opacity: 0.55;
  transition: filter 0.25s ease, opacity 0.25s ease, transform 0.25s ease;
}
.marquee img:hover {
  filter: none;
  opacity: 1;
  transform: scale(1.12);
}
@keyframes slide {
  to {
    transform: translateX(-50%);
  }
}

/* -------------------------------------------------------------- tarjetas */

.grid {
  display: grid;
  gap: 20px;
}
.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}
.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}
@media (max-width: 900px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 620px) {
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  overflow: hidden;
  transition: border-color 0.22s ease, transform 0.22s ease;
}
/* Halo lima que sigue al cursor (las coordenadas las pone el JS) */
.card::before {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  left: var(--mx, 50%);
  top: var(--my, 0);
  translate: -50% -50%;
  background: radial-gradient(closest-side, rgba(188, 208, 27, 0.14), transparent);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.card:hover {
  border-color: #3d3d3d;
  transform: translateY(-4px);
}
.card:hover::before {
  opacity: 1;
}

.card h3,
.card p {
  position: relative;
}
.card h3 {
  margin-bottom: 8px;
}
.card p {
  color: var(--text-2);
  margin: 0;
  font-size: 0.96rem;
}

.card-icon {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-soft);
  margin-bottom: 18px;
  transition: transform 0.25s ease, background-color 0.25s ease;
}
.card:hover .card-icon {
  transform: translateY(-2px) scale(1.06);
  background: rgba(188, 208, 27, 0.22);
}
.card-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--primary);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ----------------------------------------------------------------- pasos */

.steps {
  counter-reset: step;
  display: grid;
  gap: 26px;
}

.step {
  position: relative;
  padding-left: 66px;
}
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--primary);
  color: #000;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Línea que une los pasos */
.step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 23px;
  top: 52px;
  bottom: -26px;
  width: 1px;
  background: linear-gradient(var(--border), transparent);
}
.step h3 {
  margin-bottom: 6px;
}
.step p {
  color: var(--text-2);
  margin: 0;
  font-size: 0.96rem;
}

/* ------------------------------------------------------- bloque destacado */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
@media (max-width: 860px) {
  .split {
    grid-template-columns: 1fr;
  }
}

.checklist {
  list-style: none;
  margin: 0 0 30px;
  padding: 0;
  display: grid;
  gap: 12px;
}
.checklist li {
  position: relative;
  padding-left: 32px;
  color: var(--text-2);
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 18px;
  height: 10px;
  border-left: 2.5px solid var(--primary);
  border-bottom: 2.5px solid var(--primary);
  transform: rotate(-45deg);
}

/* ------------------------------------------------------------------ FAQ */

.faq {
  display: grid;
  gap: 12px;
  max-width: 820px;
}

.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.faq details[open] {
  border-color: #3d3d3d;
  background: var(--surface-2);
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "+";
  color: var(--primary);
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
  transition: transform 0.22s ease;
}
.faq details[open] summary::after {
  transform: rotate(45deg);
}
.faq p {
  color: var(--text-2);
  margin: 12px 0 0;
  animation: fade-in 0.3s ease;
}
@keyframes fade-in {
  from {
    opacity: 0;
    translate: 0 -6px;
  }
}

/* ------------------------------------------------------------------- CTA */

.cta {
  position: relative;
  overflow: hidden;
  text-align: center;
  background: linear-gradient(180deg, var(--surface), #0d0d0d);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: clamp(38px, 6vw, 72px) 24px;
}
.cta::before {
  content: "";
  position: absolute;
  inset: -40% 30% 60%;
  background: radial-gradient(
    closest-side,
    rgba(188, 208, 27, 0.18),
    transparent
  );
  pointer-events: none;
}
.cta > * {
  position: relative;
}
.cta .stores {
  justify-content: center;
  margin-top: 28px;
}

/* ---------------------------------------------------------------- footer */

.footer {
  border-top: 1px solid var(--border);
  padding: 52px 0 36px;
  color: var(--text-2);
  font-size: 0.92rem;
}
.footer .wrap {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
}
@media (max-width: 760px) {
  .footer .wrap {
    grid-template-columns: 1fr;
  }
}
.footer h4 {
  color: var(--text);
  font-size: 0.95rem;
  margin: 0 0 12px;
}
.footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.footer a {
  color: var(--text-2);
  text-decoration: none;
}
.footer a:hover {
  color: var(--primary);
}
.footer-bottom {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
}

/* ------------------------------------------------- aparición al hacer scroll */

/* Ojo: el estado oculto cuelga de .js-reveal, que pone el propio script.
   Sin JS —o si el observador no llega a dispararse— la web se ve entera; una
   animación de entrada nunca puede ser la condición para leer el contenido. */
.js-reveal [data-reveal] {
  opacity: 0;
  translate: 0 22px;
  transition: opacity 0.6s ease, translate 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.js-reveal [data-reveal].is-visible {
  opacity: 1;
  translate: 0 0;
}
/* Escalonado dentro de una misma rejilla */
.js-reveal [data-reveal-stagger] > * {
  opacity: 0;
  translate: 0 22px;
  transition: opacity 0.55s ease, translate 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.js-reveal [data-reveal-stagger].is-visible > * {
  opacity: 1;
  translate: 0 0;
}
.js-reveal [data-reveal-stagger].is-visible > *:nth-child(2) {
  transition-delay: 0.07s;
}
.js-reveal [data-reveal-stagger].is-visible > *:nth-child(3) {
  transition-delay: 0.14s;
}
.js-reveal [data-reveal-stagger].is-visible > *:nth-child(4) {
  transition-delay: 0.21s;
}
.js-reveal [data-reveal-stagger].is-visible > *:nth-child(5) {
  transition-delay: 0.28s;
}
.js-reveal [data-reveal-stagger].is-visible > *:nth-child(6) {
  transition-delay: 0.35s;
}

/* --------------------------------------------------- páginas de contenido */

.doc {
  padding: clamp(32px, 6vw, 64px) 0 80px;
}
.doc .wrap {
  max-width: 820px;
}
.doc h1 {
  font-size: clamp(1.9rem, 5vw, 2.6rem);
}
.doc h2 {
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  color: var(--primary);
  margin-top: 2em;
}
.doc p,
.doc li {
  color: #d8d8d8;
  font-size: 1rem;
}
.doc .meta {
  color: var(--text-2);
  font-size: 0.9rem;
}
.doc a {
  text-decoration: underline;
}

/* --------------------------------------------------- páginas de deep link */

.redirect {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px 20px;
}
.redirect .box {
  max-width: 420px;
  width: 100%;
}
.redirect img.logo {
  width: 92px;
  border-radius: 24px;
  margin: 0 auto 24px;
}
.redirect h1 {
  font-size: clamp(1.5rem, 5vw, 2rem);
}
.redirect .lead {
  margin-bottom: 28px;
}
.redirect .actions {
  display: grid;
  gap: 12px;
  justify-items: center;
}
.redirect .actions .btn {
  width: 100%;
  max-width: 320px;
}
.spinner {
  width: 34px;
  height: 34px;
  margin: 0 auto 18px;
  border: 3px solid rgba(255, 255, 255, 0.16);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.hidden {
  display: none !important;
}

/* ------------------------------------------------------------ movimiento --
   Quien pida menos movimiento se queda con la web quieta: nada de flotar,
   deslizar ni vídeo de fondo. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.001ms !important;
  }
  [data-reveal],
  [data-reveal-stagger] > * {
    opacity: 1;
    translate: none;
  }
  .hero-video {
    display: none;
  }
}
