/* Halloween 2026 · The Brands Club
   Paleta oficial (PALETA FINAL TBC): azul Pantone 2925C, rosado 213C, navy 295C, blanco y negro.
   Tipografía de marca: Mohr Rounded. */

@font-face { font-family: "Mohr Rounded"; src: url("assets/fonts/MohrRounded-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Mohr Rounded"; src: url("assets/fonts/MohrRounded-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Mohr Rounded"; src: url("assets/fonts/MohrRounded-Black.ttf") format("truetype"); font-weight: 900; font-display: swap; }

:root {
  --azul: #48a9f6;          /* Pantone 2925C */
  --azul-claro: #82b7f2;    /* variación 1 */
  --rosa: #ff338b;          /* Pantone 213C */
  --rosa-hondo: #af3767;    /* variación 3 */
  --navy: #063d74;          /* Pantone 295C */
  --navy-noche: #112e54;    /* variación 3 */
  --negro: #000000;
  --negro-suave: #161617;   /* variación 3 */
  --gris: #a5a5a5;          /* variación 2 */
  --gris-claro: #d8d8d8;    /* variación 1 */
  --blanco: #ffffff;

  --fondo: var(--negro);
  --superficie: rgba(17, 46, 84, 0.55);
  --borde: rgba(130, 183, 242, 0.22);
  --texto: var(--blanco);
  --texto-suave: var(--gris-claro);

  --fuente: "Mohr Rounded", "Nunito", system-ui, sans-serif;
  --curva: cubic-bezier(.22, 1, .36, 1);
  --radio: 20px;
  --gutter: clamp(16px, 4vw, 48px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--fuente);
  color: var(--texto);
  background:
    radial-gradient(60rem 40rem at 85% -10%, rgba(255, 51, 139, .16), transparent 60%),
    radial-gradient(50rem 40rem at 0% 30%, rgba(72, 169, 246, .14), transparent 60%),
    linear-gradient(180deg, var(--negro) 0%, var(--navy-noche) 70%, var(--negro) 100%);
  background-attachment: fixed;
  line-height: 1.5;
}
img, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--azul); outline-offset: 3px; border-radius: 8px; }

/* Barra superior */
.barra {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px var(--gutter);
  background: rgba(0, 0, 0, .72);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--borde);
}
.barra__marca img { height: 40px; width: auto; }
.barra__usuario { display: flex; align-items: center; gap: 10px; font-size: 14px; min-width: 0; }
.barra__usuario img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: var(--navy); }
.barra__usuario span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 40vw; }
.enlace { background: none; border: 0; padding: 6px 4px; color: var(--azul); cursor: pointer; font-weight: 700; }
.enlace:hover { color: var(--azul-claro); }

/* Portada */
.portada {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 8px var(--gutter) 40px;
  max-width: 880px; margin: 0 auto;
}
.portada__logo {
  width: min(560px, 100%); height: auto;
  /* El logo viene sobre negro: con "lighten" el negro desaparece y queda solo el dibujo sobre el fondo. */
  mix-blend-mode: lighten;
}
.portada__antetitulo {
  margin: 0 0 6px; padding: 4px 14px; border-radius: 999px;
  background: var(--rosa); color: var(--blanco);
  font-weight: 900; font-size: 13px; letter-spacing: .02em;
}
.portada__titulo {
  margin: 8px 0 10px;
  font-weight: 900; font-size: clamp(30px, 6vw, 52px); line-height: 1.08; letter-spacing: -.01em;
  text-wrap: balance;
}
.portada__bajada { margin: 0 0 24px; color: var(--texto-suave); font-size: clamp(16px, 2.2vw, 19px); max-width: 38em; text-wrap: pretty; }

.acceso { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.acceso__google { min-height: 44px; }
.acceso__nota { margin: 0; font-size: 14px; color: var(--gris); }

.estado {
  display: flex; align-items: center; gap: 14px; text-align: left;
  padding: 14px 18px; border-radius: var(--radio);
  background: var(--superficie); border: 1px solid var(--borde);
  max-width: 560px; width: 100%;
}
.estado__icono { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--rosa); }
.estado__icono svg { width: 24px; height: 24px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.estado__icono--azul { background: var(--azul); }
.estado p { margin: 0; }
.estado strong { font-weight: 900; }
.estado small { color: var(--texto-suave); font-size: 14px; }

.aviso { margin: 0; padding: 10px 14px; border-radius: 12px; font-size: 14px; }
.aviso--error { background: rgba(255, 51, 139, .14); border: 1px solid rgba(255, 51, 139, .5); color: #ffd0e3; }

/* Tiendas */
.tiendas { padding: 0 var(--gutter) 64px; max-width: 1240px; margin: 0 auto; }
.tiendas__cabecera { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 18px; }
.tiendas__cabecera h2 { margin: 0; font-weight: 900; font-size: clamp(22px, 3.4vw, 30px); }
.tiendas__cabecera p { margin: 0; color: var(--gris); font-size: 14px; }

.grilla { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.tarjeta {
  position: relative; width: 100%; padding: 0; text-align: left; cursor: pointer;
  border-radius: var(--radio); overflow: hidden;
  background: var(--negro-suave); border: 1px solid var(--borde);
  transition: transform .35s var(--curva), border-color .2s, box-shadow .35s var(--curva);
}
.tarjeta:hover { transform: translateY(-4px); border-color: var(--azul); box-shadow: 0 18px 40px -18px rgba(72, 169, 246, .55); }
.tarjeta:active { transform: translateY(-1px) scale(.99); }
.tarjeta__foto { aspect-ratio: 4 / 5; width: 100%; height: auto; object-fit: cover; background: var(--navy-noche); }
.tarjeta__info {
  position: absolute; inset: auto 0 0 0; padding: 48px 16px 14px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .88) 55%);
}
.tarjeta__nombre { margin: 0; font-weight: 900; font-size: 21px; line-height: 1.15; }
.tarjeta__meta { margin: 2px 0 0; font-size: 13px; color: var(--gris-claro); }
.sello {
  position: absolute; top: 12px; left: 12px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 999px;
  background: var(--rosa); color: #fff; font-weight: 900; font-size: 13px;
  box-shadow: 0 6px 18px -6px rgba(255, 51, 139, .8);
}
.tarjeta--votada { border-color: var(--rosa); box-shadow: 0 0 0 2px var(--rosa); }

/* Botones */
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px; border: 0; cursor: pointer; text-decoration: none;
  font-weight: 900; font-size: 16px;
  transition: transform .2s var(--curva), background .2s, opacity .2s;
}
.boton:active { transform: scale(.97); }
.boton:disabled { cursor: not-allowed; opacity: .55; }
.boton--voto { background: var(--rosa); color: #fff; }
.boton--voto:not(:disabled):hover { background: #ff4f9b; }
.boton--secundario { background: transparent; color: #fff; border: 1.5px solid var(--borde); }
.boton--secundario:hover { border-color: var(--azul); }
.boton--ancho { width: 100%; }
.boton-icono {
  flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; background: rgba(255, 255, 255, .08);
}
.boton-icono:hover { background: rgba(255, 255, 255, .16); }
.boton-icono svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }

/* Hoja de tienda */
dialog { color: var(--texto); font-family: var(--fuente); }
dialog::backdrop { background: rgba(0, 0, 0, .78); }
.hoja {
  width: min(1100px, 100%); max-width: 100%; height: 100dvh; max-height: 100dvh;
  margin: 0 auto; padding: 0; border: 0;
  background: linear-gradient(180deg, var(--negro-suave), var(--navy-noche));
  display: none; flex-direction: column;
}
.hoja[open] { display: flex; animation: subir .4s var(--curva); }
@media (min-width: 900px) {
  .hoja { height: calc(100dvh - 48px); margin-top: 24px; border-radius: 24px; border: 1px solid var(--borde); }
}
.hoja__cabecera { display: flex; align-items: center; gap: 12px; padding: 12px var(--gutter); border-bottom: 1px solid var(--borde); }
.hoja__cabecera h2 { margin: 0; font-weight: 900; font-size: clamp(20px, 3vw, 28px); line-height: 1.15; }
.hoja__cuerpo { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 16px var(--gutter) 24px; }
.hoja__resumen { margin: 0 0 14px; color: var(--gris-claro); font-size: 14px; }
.hoja__pie {
  padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--borde); background: rgba(0, 0, 0, .55);
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
}
.hoja__pie p { margin: 0; font-size: 14px; color: var(--gris-claro); }
.hoja__pie .boton { width: min(420px, 100%); }

.galeria { list-style: none; margin: 0; padding: 0; columns: 2 160px; column-gap: 10px; }
.galeria li { break-inside: avoid; margin-bottom: 10px; }
.galeria button { display: block; width: 100%; padding: 0; border: 0; border-radius: 14px; overflow: hidden; cursor: zoom-in; background: var(--navy-noche); }
.galeria img { width: 100%; height: auto; transition: transform .4s var(--curva); }
.galeria button:hover img { transform: scale(1.03); }
.galeria video { width: 100%; border-radius: 14px; background: #000; }
.documento {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 8px;
  padding: 12px 16px; border-radius: 14px; border: 1px solid var(--borde);
  color: #fff; text-decoration: none; font-weight: 700;
}
.documento:hover { border-color: var(--azul); }
.documento svg { width: 22px; height: 22px; fill: none; stroke: var(--azul); stroke-width: 2; }

/* Visor */
.visor {
  width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; padding: 0; border: 0;
  background: rgba(0, 0, 0, .96);
  display: none; align-items: center; justify-content: center;
}
.visor[open] { display: flex; }
.visor__marco { margin: 0; width: 100%; height: 100%; display: grid; place-items: center; padding: 56px 8px; touch-action: pan-y; }
.visor__marco img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; animation: aparecer .25s ease; }
.visor__cerrar { position: absolute; top: 12px; right: 12px; z-index: 2; }
.visor__nav { position: absolute; top: 50%; translate: 0 -50%; z-index: 2; }
.visor__nav--prev { left: 12px; }
.visor__nav--next { right: 12px; }
.visor__contador { position: absolute; bottom: calc(14px + env(safe-area-inset-bottom)); left: 0; right: 0; margin: 0; text-align: center; font-size: 14px; color: var(--gris-claro); }
@media (max-width: 600px) { .visor__nav { display: none; } }

/* Confirmación */
.confirmar {
  width: min(440px, calc(100% - 32px)); padding: 24px; border-radius: 24px;
  border: 1px solid var(--rosa); background: var(--negro-suave);
  box-shadow: 0 30px 80px -30px rgba(255, 51, 139, .6);
}
.confirmar[open] { animation: aparecer .3s var(--curva); }
.confirmar h2 { margin: 0 0 6px; font-weight: 900; font-size: 22px; line-height: 1.2; }
.confirmar p { margin: 0 0 16px; color: var(--gris-claro); }
.confirmar__acciones { display: flex; gap: 10px; flex-wrap: wrap; }
.confirmar__acciones .boton { flex: 1 1 140px; }

/* Pie */
.pie { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 24px var(--gutter) 36px; color: var(--gris); font-size: 14px; border-top: 1px solid var(--borde); }
.pie p { margin: 0; }

/* Carga */
.esqueleto { aspect-ratio: 4 / 5; border-radius: var(--radio); background: linear-gradient(100deg, var(--negro-suave) 30%, var(--navy-noche) 50%, var(--negro-suave) 70%); background-size: 300% 100%; animation: brillo 1.4s linear infinite; }

@keyframes subir { from { opacity: 0; transform: translateY(24px); } }
@keyframes aparecer { from { opacity: 0; transform: scale(.97); } }
@keyframes brillo { to { background-position: -150% 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
