/* ========================================================
   V&B Overlays — landing
   Colores y componentes tomados de la app (src/styles/global.css):
   mismo fondo, mismo verde, mismas tarjetas que las páginas de Guías.
   ======================================================== */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fuentes/Inter-latin.woff2') format('woff2');
}

:root {
  /* paleta base de la app */
  --bg: #090a10;
  --bg-2: #0f111a;
  --card: #131622;
  --border: #1b1e2c;
  --input: #181c2b;
  --btn-2: #23283b;

  /* acentos */
  --green: #38EF7D;
  --green-hover: #3ddda6;
  --brand: #74F662;
  --cyan: #00f5d4;
  --danger: #ff0055;
  --warning: #ffbe0b;
  --on-accent: #051a14;

  /* texto */
  --text: #ffffff;
  --text-soft: #b6bbc9;
  --dim: #7f8699;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

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

h1, h2, h3 {
  margin: 0;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

p { margin: 0; }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 28px; }
.wrap--ancho { max-width: 1440px; }

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus {
  position: fixed; top: 8px; left: 8px; z-index: 100;
  background: var(--green); color: var(--on-accent);
  padding: 8px 14px; border-radius: 8px; font-weight: 600;
}

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

/* --- Botones (los de la app) --- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 8px;
  font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.btn-primary { background: var(--green); color: var(--on-accent); }
.btn-primary:hover { background: var(--green-hover); }
.btn-secondary { background: var(--btn-2); color: var(--text); }
.btn-secondary:hover { background: #2c3249; }
.btn-outline { color: var(--green); border: 1px solid rgba(56, 239, 125, 0.4); }
.btn-outline:hover { background: rgba(56, 239, 125, 0.1); }
.btn-lg { padding: 14px 24px; font-size: 16px; font-weight: 700; border-radius: 10px; }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

/* --- Barra superior --- */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(9, 10, 16, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 64px; }
.marca { display: flex; align-items: center; gap: 10px; text-decoration: none; font-size: 18px; }
.marca img { width: 36px; height: 36px; }
.marca-vb { font-weight: 800; }
.marca-overlays { font-weight: 700; color: var(--brand); }
.nav-enlaces { display: flex; gap: 28px; font-size: 14px; font-weight: 500; }
.nav-enlaces a { color: var(--dim); text-decoration: none; transition: color .2s ease; }
.nav-enlaces a:hover { color: var(--text); }

/* --- Portada --- */
.hero { position: relative; padding: 60px 0 80px; overflow: hidden; }
.hero::before, .error::before {
  /* la misma grilla del lienzo del Editor de Layouts, apenas visible */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 0%, transparent 100%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 0%, transparent 100%);
}
.hero::after {
  content: ""; position: absolute; top: -220px; right: -120px; width: 720px; height: 520px; pointer-events: none;
  background: radial-gradient(closest-side, rgba(56, 239, 125, 0.10), transparent);
}
.hero > * { position: relative; z-index: 1; }

.hero-texto { max-width: 820px; }
.pastilla {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 99px; margin-bottom: 22px;
  background: rgba(56, 239, 125, 0.10); border: 1px solid rgba(56, 239, 125, 0.35);
  color: var(--green); font-size: 13px; font-weight: 600;
}
.pastilla .punto { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(56, 239, 125, 0.2); }
.hero h1 { font-size: clamp(34px, 4.6vw, 56px); letter-spacing: -0.03em; line-height: 1.06; }
.hero h1 .acento { color: var(--green); }
.hero .lead { margin-top: 20px; max-width: 700px; font-size: 18px; color: var(--text-soft); }
.acciones { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.requisitos { margin-top: 18px; font-size: 13px; color: var(--dim); }

/* --- La escena: el cockpit con los overlays encima --- */
.escena { margin: 48px 0 0; }
.escena-lienzo {
  position: relative; container-type: inline-size;
  aspect-ratio: 2000 / 837;
  border: 1px solid var(--border); border-radius: 14px; overflow: hidden;
  background: #000;
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.02);
}
.escena-fondo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ov { position: absolute; z-index: 2; filter: drop-shadow(0 0.4cqw 1cqw rgba(0, 0, 0, 0.55)); }
/* anchos = tamaño real del overlay / 2400: como verlos en un monitor de ese ancho */
.ov-standings   { left: 1.4%;  top: 3.2%;    width: 37.25%; }
.ov-mapa        { right: 1.4%; top: 3.2%;    width: 14.5%; }
.ov-aviso       { right: 1.4%; top: 37%;     width: 13.75%; }
.ov-radar       { left: 50%;   top: 40%;     width: 8.6%;  transform: translate(-50%, -50%); }
.ov-inputs      { left: 50%;   top: 55%;     width: 27.1%; transform: translateX(-50%); }
.ov-combustible { left: 1.4%;  bottom: 3.4%; width: 18.75%; }
.ov-relative    { right: 1.4%; bottom: 3.4%; width: 22.4%; }
.escena .ov-spotter { left: 50%; top: 4.5%; transform: translateX(-50%); font-size: calc(100cqw / 2400 * 16); }
.escena figcaption { margin-top: 16px; font-size: 13.5px; color: var(--dim); text-align: center; }

/* --- Tarjeta del spotter (HTML, igual que en la app) --- */
.spotter-card {
  --acento: #24d1c4;
  display: flex; align-items: center; gap: 0.75em;
  width: max-content; max-width: 100%;
  padding: 0.75em 1.125em 0.75em 0.75em;
  border-radius: 0.875em;
  background: rgba(15, 17, 22, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-left: 0.25em solid var(--acento);
  box-shadow: 0 0.625em 1.875em rgba(0, 0, 0, 0.45);
  color: #f2f4f8; font-size: 16px;
}
.spotter-card.urgente { --acento: #ff5a52; }
.spotter-card img {
  flex: 0 0 auto; width: 5.5em; height: 5.5em; border-radius: 50%;
  object-fit: cover; object-position: center 42%;
  border: 2px solid rgba(255, 255, 255, 0.14); background: #1b1e26;
}
.spotter-card .quien { font-size: 0.6875em; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--acento); margin-bottom: 0.25em; }
.spotter-card .mensaje { font-size: 1em; font-weight: 600; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* --- Secciones --- */
.seccion { padding: 84px 0; border-top: 1px solid var(--border); }
.antetitulo { margin-bottom: 10px; font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--green); }
.seccion h2 { font-size: clamp(26px, 3vw, 36px); max-width: 720px; }
.seccion .entrada { margin-top: 14px; max-width: 680px; font-size: 16px; color: var(--text-soft); }

/* --- Tarjetas de overlays (como las de las Guías de la app) --- */
.rejilla { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; margin-top: 44px; }
.t-6 { grid-column: span 6; }
.t-3 { grid-column: span 3; }
.t-2 { grid-column: span 2; }

.tarjeta {
  display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 18px; align-content: start; min-width: 0;
  padding: 24px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--border);
}
.tarjeta-cabecera { display: flex; align-items: flex-start; gap: 14px; }
.numero {
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(56, 239, 125, 0.15); border: 1px solid rgba(56, 239, 125, 0.35);
  color: var(--green); font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums;
}
.tarjeta h3 { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.3; }
.tarjeta h3 .alias { margin-left: 6px; font-size: 13px; font-weight: 500; color: var(--dim); letter-spacing: 0; white-space: nowrap; }
.tarjeta .desc { margin-top: 4px; font-size: 14px; line-height: 1.5; color: var(--dim); }

.previa {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  min-height: var(--alto, 0); padding: 18px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
}
.previa img { filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5)); }

.puntos { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; align-self: start; }
.puntos li { display: flex; align-items: flex-start; gap: 8px; font-size: 13.5px; line-height: 1.45; color: var(--text-soft); }
.puntos li::before { content: "•"; color: var(--green); font-weight: bold; }
.t-6 .puntos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 28px; }

.tarjeta--partida { grid-row: auto; grid-template-rows: none; grid-template-columns: 5fr 6fr; gap: 28px; align-items: center; }
.tarjeta--partida .tarjeta-texto { display: flex; flex-direction: column; gap: 18px; }
.tarjeta--partida .puntos { display: flex; }
.tarjeta--partida .previa { flex-direction: row; flex-wrap: wrap; gap: 14px; padding: 28px 20px; align-self: stretch; }
.tarjeta--partida .spotter-card { font-size: 13px; }

/* --- Además de los overlays --- */
.extras { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 44px; }
.extra { padding: 22px; border-radius: 12px; background: var(--card); border: 1px solid var(--border); }
.extra-icono {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; margin-bottom: 14px; border-radius: 10px;
  background: var(--input); border: 1px solid var(--border); color: var(--green);
}
.extra-icono svg { width: 19px; height: 19px; }
.extra h3 { font-size: 15.5px; font-weight: 700; letter-spacing: -0.01em; }
.extra p { margin-top: 8px; font-size: 13.5px; line-height: 1.5; color: var(--dim); }

/* --- Cómo funciona --- */
.pasos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 44px; }
.paso { padding-left: 18px; border-left: 2px solid var(--green); }
.paso-num { margin-bottom: 8px; font-size: 13px; font-weight: 800; color: var(--green); font-variant-numeric: tabular-nums; }
.paso h3 { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.paso p { margin-top: 8px; font-size: 14px; line-height: 1.55; color: var(--dim); }

/* --- Cierre --- */
.cierre {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 32px;
  padding: 40px 44px; border-radius: 16px;
  background: var(--card); border: 1px solid var(--border);
}
.cierre-texto { display: flex; align-items: center; gap: 22px; min-width: 0; }
.cierre-texto img { width: 84px; height: 84px; flex-shrink: 0; }
.cierre h2 { font-size: 24px; max-width: 460px; }
.cierre p { margin-top: 8px; max-width: 460px; font-size: 14.5px; color: var(--dim); }
.cierre .acciones { margin-top: 0; }

/* --- Pie --- */
.pie { padding: 32px 0 40px; border-top: 1px solid var(--border); font-size: 13.5px; color: var(--dim); }
.pie .wrap { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px 28px; }
.pie-marca { display: flex; align-items: center; gap: 10px; }
.pie-marca img { width: 26px; height: 26px; }
.pie-enlaces { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.pie-enlaces a { text-decoration: none; transition: color .2s ease; }
.pie-enlaces a:hover { color: var(--green); }
.pie-nota { flex-basis: 100%; font-size: 12px; opacity: 0.8; }

/* --- Página de error (404.html) --- */
.error {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 100vh; min-height: 100svh;
  padding: 48px 24px; text-align: center;
}
.error > * { position: relative; }
.error-marca { display: flex; flex-direction: column; align-items: center; gap: 12px; text-decoration: none; font-size: 20px; }
.error-marca img { width: 104px; height: 104px; }
.error-codigo {
  margin-top: 20px;
  font-size: clamp(132px, 30vw, 280px); font-weight: 800; line-height: 0.9; letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
}
.error-codigo .cero { color: var(--green); }
.error h1 { margin-top: 16px; font-size: clamp(24px, 3.4vw, 34px); }
.error-texto { margin-top: 12px; max-width: 540px; color: var(--text-soft); text-wrap: balance; }
.error .acciones { justify-content: center; }
.solo-lectores { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* --- Pantallas medianas --- */
@media (max-width: 1040px) {
  .extras { grid-template-columns: repeat(2, 1fr); }
  .t-6 .puntos { grid-template-columns: 1fr; }
  .tarjeta--partida .puntos { display: flex; }
}

@media (max-width: 900px) {
  .nav-enlaces { display: none; }
  .t-3, .t-2 { grid-column: span 6; }
  .previa { min-height: 0; }
  .tarjeta--partida { grid-template-columns: 1fr; gap: 18px; }
  .tarjeta--partida .previa { justify-content: flex-start; }
  .pasos { grid-template-columns: 1fr; gap: 28px; }
}

/* --- Celular --- */
@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  .hero { padding: 44px 0 56px; }
  .hero .lead { font-size: 16.5px; }
  .btn-lg { padding: 13px 20px; font-size: 15px; }

  /* la escena pasa a un recorte más alto y muestra menos overlays, más grandes */
  .escena { margin-top: 40px; }
  .escena-lienzo { aspect-ratio: 4 / 3; border-radius: 12px; }
  .ov-standings { left: 2.5%; top: 3%; width: 62%; }
  .ov-mapa { right: 2.5%; top: 3%; width: 31%; }
  .ov-radar { top: 46%; width: 20%; }
  .ov-inputs { top: auto; bottom: 4%; width: 90%; }
  .ov-combustible, .ov-relative, .ov-aviso, .ov-spotter { display: none; }
  .escena figcaption { text-align: left; }

  .seccion { padding: 60px 0; }
  .rejilla, .extras, .pasos { margin-top: 32px; }
  .extras { grid-template-columns: 1fr; }
  .tarjeta { padding: 18px; }
  .previa { padding: 12px; }
  .tarjeta--partida .previa { padding: 16px; }
  .tarjeta--partida .spotter-card { font-size: 12px; }
  .cierre { padding: 28px 20px; }
  .cierre-texto { align-items: flex-start; gap: 16px; }
  .cierre-texto img { width: 60px; height: 60px; }
  .cierre h2 { font-size: 21px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .nav-enlaces a, .pie-enlaces a { transition: none; }
}
