/* ============================================================
   HW Collections — Landing pages
   Tokens derivados de la paleta real de la app móvil (ver
   hotwheels-app/src/theme/variables.scss): --hw-blue, --hw-red,
   --hw-yellow, --hw-black, --hw-gray, --hw-light. Tipografía:
   Poppins (la misma que usa la app), pareada con JetBrains Mono
   para etiquetas técnicas/de catálogo — el mismo lenguaje que ya
   se usó en el "Recorrido HW Collections" de esta sesión.
   ============================================================ */

:root {
  /* ---- Marca (idénticos a la app) ---- */
  --hw-blue: #0047A1;
  --hw-blue-deep: #003877;
  --hw-red: #EE1D23;
  --hw-yellow: #F2A900;
  --hw-black: #111111;

  /* ---- Superficie/tinta propias de este sitio (no genéricas) ---- */
  --ink: #0B0D12;
  --paper: #F5F7FA;
  --surface: #FFFFFF;
  --muted: #5B6472;
  --faint: #6E7887;
  --border: #E1E5EC;

  --shadow-card: 0 2px 14px rgba(11, 13, 18, 0.06);
  --shadow-raised: 0 18px 40px -14px rgba(0, 71, 161, 0.28);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 26px;

  --font-display: 'Poppins', 'Helvetica Neue', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #EEF1F8;
    --paper: #090C13;
    --surface: #10141F;
    --muted: #9AA4B8;
    --faint: #6B7488;
    --border: #232C40;
    --hw-blue: #5C90DF;
    --hw-blue-deep: #8FB4EA;
    --hw-red: #FF6A6F;
    --hw-yellow: #F2BC3E;
    --shadow-card: 0 2px 16px rgba(0, 0, 0, 0.4);
    --shadow-raised: 0 20px 48px -18px rgba(92, 144, 223, 0.35);
  }
}
:root[data-theme="dark"] {
  --ink: #EEF1F8;
  --paper: #090C13;
  --surface: #10141F;
  --muted: #9AA4B8;
  --faint: #6B7488;
  --border: #232C40;
  --hw-blue: #5C90DF;
  --hw-blue-deep: #8FB4EA;
  --hw-red: #FF6A6F;
  --hw-yellow: #F2BC3E;
  --shadow-card: 0 2px 16px rgba(0, 0, 0, 0.4);
  --shadow-raised: 0 20px 48px -18px rgba(92, 144, 223, 0.35);
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-display);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.mono { font-family: var(--font-mono); }

h1, h2, h3 { text-wrap: balance; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }

/* ---------- Accesibilidad: foco visible + skip-link ---------- */
.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  background: var(--hw-blue);
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  z-index: 100;
  transition: top 200ms ease;
}
.skip-link:focus { top: 12px; }

a:focus-visible,
button:focus-visible,
.btn:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--hw-blue);
  outline-offset: 3px;
  border-radius: 4px;
  transition: outline-offset 150ms ease;
}

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
}
.site-header__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 17px;
}
.site-header__brand img { width: 34px; height: 34px; border-radius: 9px; }
.site-header__nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--muted);
}
.site-header__nav a { transition: color 180ms ease; }
.site-header__nav a:hover { color: var(--hw-blue); }
.site-header__nav a[aria-current="page"] { color: var(--hw-blue); font-weight: 700; }
.site-header__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--hw-blue);
  color: #fff;
  padding: 10px 18px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 14px;
  box-shadow: var(--shadow-raised);
  transition: transform 180ms ease;
}
.site-header__cta:hover { transform: translateY(-1px); }
.site-header__cta:active { transform: scale(0.97); }

@media (max-width: 760px) {
  .site-header__nav { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 88px 0 64px;
  overflow: hidden;
}
.hero__stripes {
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 620px;
  background:
    repeating-linear-gradient(115deg, transparent 0 74px, var(--hw-red) 74px 78px, transparent 78px 152px),
    repeating-linear-gradient(115deg, transparent 40px 110px, var(--hw-yellow) 110px 113px, transparent 113px 190px);
  opacity: 0.07;
  pointer-events: none;
  z-index: 0;
}
.hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hw-blue-deep);
  background: color-mix(in srgb, var(--hw-blue) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--hw-blue) 28%, transparent);
  padding: 6px 14px;
  border-radius: 100px;
}
.hero__eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--hw-red); }

.hero h1 {
  font-size: clamp(36px, 5.4vw, 58px);
  font-weight: 800;
  line-height: 1.05;
  margin: 22px 0 20px;
}
.hero h1 em {
  font-style: normal;
  color: var(--hw-blue);
  position: relative;
}
.hero p.lede {
  font-size: 18px;
  line-height: 1.65;
  color: var(--muted);
  max-width: 52ch;
  margin-bottom: 32px;
}

.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 40px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 15px;
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.btn--primary { background: var(--hw-blue); color: #fff; box-shadow: var(--shadow-raised); }
.btn--primary:hover { transform: translateY(-2px); }
.btn--ghost { background: var(--surface); color: var(--ink); border: 1.5px solid var(--border); }
.btn--ghost:hover { border-color: var(--hw-blue); color: var(--hw-blue); }
.btn:active { transform: scale(0.97); }

.hero__stats { display: flex; gap: 32px; flex-wrap: wrap; }
.hero__stat strong { display: block; font-size: 26px; font-weight: 800; }
.hero__stat span { font-family: var(--font-mono); font-size: 12px; color: var(--faint); text-transform: uppercase; letter-spacing: 0.06em; }

/* ---------- Phone mockup (CSS/SVG, no screenshots reales) ---------- */
.phone {
  position: relative;
  width: min(320px, 100%);
  margin: 0 auto;
  aspect-ratio: 9 / 18.5;
  background: #0E1116;
  border-radius: 46px;
  padding: 14px;
  box-shadow: var(--shadow-raised), 0 2px 0 rgba(255,255,255,0.04) inset;
}
.phone::before {
  content: '';
  position: absolute;
  top: 26px; left: 50%;
  transform: translateX(-50%);
  width: 90px; height: 20px;
  background: #0E1116;
  border-radius: 0 0 16px 16px;
  z-index: 2;
}
.phone__screen {
  width: 100%;
  height: 100%;
  border-radius: 32px;
  background: linear-gradient(180deg, var(--hw-blue) 0%, var(--hw-blue) 92px, var(--paper) 92px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.phone__bar {
  height: 92px;
  display: flex;
  align-items: flex-end;
  padding: 0 20px 14px;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
}
.phone__card {
  margin: 14px;
  background: var(--surface);
  border-radius: 14px;
  box-shadow: var(--shadow-card);
  padding: 12px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.phone__card .swatch {
  width: 42px; height: 42px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--hw-blue), var(--hw-blue-deep));
}
.phone__card .swatch--red { background: linear-gradient(135deg, var(--hw-red), #b5171b); }
.phone__card .swatch--yellow { background: linear-gradient(135deg, var(--hw-yellow), #b9800a); }
.phone__card .lines { flex: 1; }
.phone__card .lines .l1 { height: 9px; width: 78%; background: var(--ink); opacity: 0.82; border-radius: 4px; margin-bottom: 6px; }
.phone__card .lines .l2 { height: 7px; width: 46%; background: var(--faint); border-radius: 4px; }
.phone__fab {
  margin-top: auto;
  align-self: center;
  margin-bottom: 18px;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--hw-red);
  box-shadow: 0 8px 18px rgba(238,29,35,0.4);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 22px; font-weight: 700;
}

/* ---------- Section shell ---------- */
section { padding: 88px 0; }
.section__head { max-width: 640px; margin: 0 auto 52px; text-align: center; }
.section__eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hw-red);
  font-weight: 600;
  display: block;
  margin-bottom: 12px;
}
.section__head h2 { font-size: clamp(28px, 3.6vw, 38px); font-weight: 800; margin-bottom: 14px; }
.section__head p { color: var(--muted); font-size: 16.5px; line-height: 1.6; }

/* ---------- Feature grid (mismo lenguaje visual de las cards de la app) ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 860px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }

.feature-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px 22px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px -14px rgba(11, 13, 18, 0.22);
  border-color: color-mix(in srgb, var(--hw-blue) 30%, var(--border));
}
.features .feature-card:first-child { grid-column: span 2; }
.features .feature-card:first-child p { max-width: 46ch; }
@media (max-width: 560px) { .features .feature-card:first-child { grid-column: span 1; } }

.feature-card__accent {
  position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: var(--hw-blue);
}
.feature-card:nth-child(3n+2) .feature-card__accent { background: var(--hw-red); }
.feature-card:nth-child(3n+3) .feature-card__accent { background: var(--hw-yellow); }

.feature-card__icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--hw-blue) 12%, transparent);
  color: var(--hw-blue);
  margin-bottom: 18px;
}
.feature-card__icon svg { width: 22px; height: 22px; }
.feature-card:nth-child(3n+2) .feature-card__icon { background: color-mix(in srgb, var(--hw-red) 12%, transparent); color: var(--hw-red); }
.feature-card:nth-child(3n+3) .feature-card__icon { background: color-mix(in srgb, var(--hw-yellow) 18%, transparent); color: #92660a; }

.feature-card__index {
  position: absolute;
  top: 20px;
  right: 22px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--faint);
  letter-spacing: 0.05em;
}

.feature-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.feature-card p { color: var(--muted); font-size: 14.5px; line-height: 1.55; }

/* ---------- Cómo funciona ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; counter-reset: step; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding-left: 4px; }
.step__num {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--hw-blue);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.step__num::before {
  content: '';
  width: 30px; height: 2px;
  background: var(--hw-red);
  display: inline-block;
}
.step h3 { font-size: 19px; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 14.5px; line-height: 1.6; }

/* ---------- Rareza / catálogo strip ---------- */
.spec-strip {
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 44px 40px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
@media (max-width: 760px) { .spec-strip { grid-template-columns: repeat(2, 1fr); } }
.spec-strip__item { text-align: center; }
.spec-strip__item strong { display: block; font-size: 30px; font-weight: 800; }
.spec-strip__item span { font-family: var(--font-mono); font-size: 11.5px; color: rgba(255,255,255,0.55); text-transform: uppercase; letter-spacing: 0.07em; }

/* ---------- CTA final ---------- */
.cta-final {
  text-align: center;
  background: linear-gradient(160deg, var(--hw-blue) 0%, var(--hw-blue-deep) 100%);
  border-radius: var(--radius-lg);
  padding: 72px 32px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.cta-final::before {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(115deg, transparent 0 60px, rgba(255,255,255,0.05) 60px 63px, transparent 63px 126px);
}
.cta-final__inner { position: relative; z-index: 1; }
.cta-final h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; margin-bottom: 16px; }
.cta-final p { color: rgba(255,255,255,0.85); font-size: 16.5px; margin-bottom: 32px; max-width: 48ch; margin-inline: auto; }
.cta-final .btn--ghost { background: #fff; color: var(--hw-blue); border: none; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
}
.site-footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.site-footer__brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.site-footer__brand img { width: 26px; height: 26px; border-radius: 7px; }
.site-footer__links { display: flex; gap: 24px; font-size: 14px; color: var(--muted); }
.site-footer__links a:hover { color: var(--hw-blue); }
.site-footer__legal { font-size: 12.5px; color: var(--faint); margin-top: 18px; }

/* ---------- Legal / privacidad ---------- */
.legal {
  padding: 64px 0 100px;
  max-width: 780px;
  margin: 0 auto;
}
.legal h1 { font-size: clamp(30px, 4vw, 42px); font-weight: 800; margin-bottom: 10px; }
.legal .updated { font-family: var(--font-mono); font-size: 13px; color: var(--faint); margin-bottom: 40px; display: block; }
.legal h2 { font-size: 21px; font-weight: 700; margin: 40px 0 14px; }
.legal p, .legal li { color: var(--muted); font-size: 15.5px; line-height: 1.75; }
.legal ul { padding-left: 22px; margin: 12px 0; }
.legal li { margin-bottom: 8px; }
.legal a { color: var(--hw-blue); font-weight: 600; }
.legal strong { color: var(--ink); }

/* ---------- Auth card (verificar / eliminar-cuenta) ---------- */
.auth-shell {
  min-height: calc(100dvh - 140px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
}
.auth-card {
  width: 100%;
  max-width: 480px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 40px 36px;
}
.auth-card--wide { max-width: 560px; }
.auth-card__icon {
  width: 56px; height: 56px;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
}
.auth-card__icon svg { width: 28px; height: 28px; }
.auth-card__icon--loading { background: color-mix(in srgb, var(--hw-blue) 12%, transparent); color: var(--hw-blue); }
.auth-card__icon--success { background: color-mix(in srgb, #1e8e5a 14%, transparent); color: #1e8e5a; }
.auth-card__icon--error { background: color-mix(in srgb, var(--hw-red) 12%, transparent); color: var(--hw-red); }
.auth-card h1 { font-size: 22px; font-weight: 800; text-align: center; margin-bottom: 10px; }
.auth-card__desc { color: var(--muted); font-size: 15px; text-align: center; line-height: 1.6; }

.auth-card__spinner {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 3px solid color-mix(in srgb, var(--hw-blue) 25%, transparent);
  border-top-color: var(--hw-blue);
  animation: auth-spin 800ms linear infinite;
}
@keyframes auth-spin { to { transform: rotate(360deg); } }

.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 7px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 15px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  transition: border-color 180ms ease;
}
.field select { appearance: auto; cursor: pointer; }
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  border-color: var(--hw-blue);
}
.field input:disabled {
  background: var(--paper);
  color: var(--muted);
  cursor: not-allowed;
}
.field textarea { resize: vertical; min-height: 84px; font-family: inherit; }
.field__hint { font-size: 12.5px; color: var(--faint); margin-top: 6px; }

.auth-actions { display: flex; gap: 12px; margin-top: 28px; }
.auth-actions .btn { flex: 1; justify-content: center; cursor: pointer; border: none; font-family: inherit; }
.btn--danger { background: var(--hw-red); color: #fff; }
.btn--danger:hover { transform: translateY(-2px); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.auth-error {
  background: color-mix(in srgb, var(--hw-red) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--hw-red) 30%, transparent);
  color: var(--hw-red);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 14px;
  margin-bottom: 18px;
}

/* Spinner pequeño dentro de un botón (ej. "Reenviando…" en verificar.html) */
.btn__spinner {
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, #fff 35%, transparent);
  border-top-color: #fff;
  animation: auth-spin 800ms linear infinite;
}
.auth-card .auth-error { margin: 20px 0 0; text-align: center; }
.auth-actions[hidden], .auth-error[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .site-header__cta, .feature-card, .skip-link, .site-header__nav a { transition: none; }
}
