/* Wishit · estilos comunes: tokens, cabecera, botones, pie y la máquina de regalos (pop-up) */
:root {
  --etapa: #F8D9DC;
  --tablero: #FFFFFF;
  --tinta: #2A1A20;
  --tinta-suave: #6E535C;
  --granate: #B02848;
  --granate-oscuro: #8C1E3A;
  --oro: #F4B20F;
  --crema: #FFF6F1;
  --rosa-papel: #FBEFF0;
  --linea: #1A1114;
  --fuente-titulo: "Fraunces", "Iowan Old Style", Georgia, serif;
  --fuente-texto: "Albert Sans", "Segoe UI", Helvetica, Arial, sans-serif;
  /* Caligráfica de los títulos «Wish it»: sustituta gratuita de Howell Script; si llega el archivo de Howell,
     basta con declarar su @font-face y ponerla la primera de esta lista */
  --fuente-script: "Pinyon Script", "Snell Roundhand", "Segoe Script", cursive;
  --fuente-mano: "Caveat", "Segoe Print", "Comic Sans MS", cursive;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: auto; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--tablero); color: var(--tinta);
  font-family: var(--fuente-texto); font-size: 17px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--oro); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Cabecera ---------- */
.cabecera {
  position: fixed; inset: 0 0 auto 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: calc(12px + env(safe-area-inset-top, 0px)) clamp(16px, 4vw, 48px) 12px;
}
.cabecera--solida { position: sticky; top: 0; background: color-mix(in srgb, var(--crema) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 1px 0 rgba(42, 26, 32, .06); }
.cabecera .marca { display: inline-flex; align-items: center; text-decoration: none; }
.cabecera .marca img { height: 54px; width: auto; filter: drop-shadow(0 2px 6px rgba(90, 20, 40, .18)); }
.cabecera nav { display: flex; align-items: center; gap: clamp(10px, 2.4vw, 30px); font-weight: 600; font-size: 15px; }
.cabecera nav .enlace { text-decoration: none; opacity: .85; padding: 6px 2px; }
.cabecera nav .enlace:hover, .cabecera nav .enlace[aria-current="page"] { opacity: 1; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
@media (max-width: 720px) {
  .cabecera .marca img { height: 44px; }
  .cabecera nav { font-size: 14px; gap: 12px; }
  .cabecera nav .boton { padding: 10px 14px; font-size: 13px; }
}
@media (max-width: 420px) { .cabecera nav .boton .largo { display: none; } }

/* ---------- Botones ---------- */
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--granate); color: #fff; font: 600 15px/1 var(--fuente-texto);
  text-decoration: none; box-shadow: 0 6px 18px rgba(176, 40, 72, .25);
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}
.boton:hover { background: var(--granate-oscuro); transform: translateY(-1px); box-shadow: 0 10px 24px rgba(176, 40, 72, .3); }
.boton:active { transform: translateY(0); }
.boton--claro { background: #fff; color: var(--granate); box-shadow: 0 6px 18px rgba(0, 0, 0, .12); }
.boton--claro:hover { background: var(--crema); }
.boton--borde { background: transparent; color: var(--granate); box-shadow: inset 0 0 0 2px var(--granate); }
.boton--borde:hover { background: rgba(176, 40, 72, .08); }
.boton[disabled] { opacity: .5; cursor: not-allowed; transform: none; }

/* ---------- Pie ---------- */
.pie { padding: 22px clamp(16px, 5vw, 64px); font-size: 13px; color: var(--tinta-suave); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; background: var(--tablero); }
.pie a { text-decoration: none; }
.pie a:hover { text-decoration: underline; }

/* ---------- Máquina de regalos ---------- */
dialog:focus { outline: none; }
dialog.maquina-popup {
  width: min(620px, calc(100vw - 24px), calc((100svh - 150px) * 1200 / 1607)); max-height: calc(100vh - 24px); max-height: calc(100svh - 24px);
  padding: 0; border: 0; border-radius: 24px; background: #E9CFC3; color: var(--tinta); overflow: visible;
  box-shadow: 0 40px 100px rgba(60, 10, 30, .4);
}
dialog.maquina-popup::backdrop { background: rgba(60, 20, 35, .6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.maquina-popup .cerrar {
  position: absolute; top: -14px; right: -14px; z-index: 6; width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: #fff; color: var(--tinta); font-size: 24px; line-height: 1; cursor: pointer; box-shadow: 0 6px 18px rgba(0, 0, 0, .2);
}
.maquina-popup .titulo {
  position: absolute; left: 0; right: 0; top: -58px; margin: 0; text-align: center; color: #fff;
  font: 400 clamp(30px, 4vw, 42px)/1 var(--fuente-script); text-shadow: 0 2px 12px rgba(60, 10, 30, .35);
}
.maquina { position: relative; border-radius: 24px; overflow: hidden; aspect-ratio: 1200 / 1607; max-height: calc(100svh - 150px); margin: 0 auto; }
.maquina > img { width: 100%; height: 100%; object-fit: cover; transition: filter .35s ease; }
.maquina:has(.hot:hover) > img, .maquina:has(.hot:focus-visible) > img { filter: brightness(.7) saturate(.85); }
.maquina .hot {
  position: absolute; display: block; border-radius: 10px; overflow: visible; text-decoration: none;
  animation: late 3.4s ease-in-out infinite; animation-delay: calc(var(--i, 0) * .19s);
  transition: transform .3s cubic-bezier(.22, 1, .36, 1), filter .3s ease;
}
.maquina .hot .recorte { position: absolute; inset: 0; overflow: hidden; border-radius: 10px; }
.maquina .hot .recorte img { position: absolute; max-width: none; pointer-events: none; }
.maquina .hot:hover, .maquina .hot:focus-visible {
  animation: none; transform: translateY(-3%) scale(1.06); filter: brightness(1.12) saturate(1.1); z-index: 5;
  box-shadow: 0 0 0 2px rgba(244, 178, 15, .95), 0 0 26px 6px rgba(244, 178, 15, .55), 0 14px 28px rgba(60, 10, 30, .35);
}
.maquina:has(.hot:hover) .hot:not(:hover), .maquina:has(.hot:focus-visible) .hot:not(:focus-visible) { animation: none; filter: brightness(.7) saturate(.85); }
.maquina .hot .burbuja {
  position: absolute; left: 50%; bottom: calc(100% + 12px); translate: -50% 6px; z-index: 6;
  padding: 8px 14px; border-radius: 14px; white-space: nowrap; pointer-events: none;
  background: #fff; color: var(--granate); font: 600 14px/1.1 var(--fuente-texto);
  box-shadow: 0 8px 22px rgba(60, 10, 30, .25); opacity: 0; transition: opacity .2s ease, translate .2s ease;
}
.maquina .hot .burbuja::after {
  content: ""; position: absolute; left: 50%; top: 100%; translate: -50% -1px;
  border: 7px solid transparent; border-top-color: #fff;
}
.maquina .hot.abajo .burbuja { bottom: auto; top: calc(100% + 12px); translate: -50% -6px; }
.maquina .hot.abajo .burbuja::after { top: auto; bottom: 100%; translate: -50% 1px; border-top-color: transparent; border-bottom-color: #fff; }
.maquina .hot:hover .burbuja, .maquina .hot:focus-visible .burbuja { opacity: 1; translate: -50% 0; }
@keyframes late {
  0%, 100% { box-shadow: 0 0 0 0 rgba(244, 178, 15, 0); }
  50% { box-shadow: 0 0 0 2px rgba(244, 178, 15, .5), 0 0 18px 3px rgba(244, 178, 15, .3); }
}
.maquina .pista-maquina {
  position: absolute; left: 50%; bottom: 3.5%; translate: -50% 0; padding: 8px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, .92); font: 500 13px/1.2 var(--fuente-texto); color: var(--tinta); white-space: nowrap; pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .maquina .hot { animation: none; }
  .boton { transition: none; }
}

/* ---------- Pop-up de pre-reserva (comun.js) ---------- */
dialog.prerreserva {
  width: min(460px, calc(100vw - 24px)); max-height: calc(100svh - 24px); overflow: auto;
  padding: clamp(24px, 5vw, 34px); border: 0; border-radius: 26px; background: var(--crema); color: var(--tinta);
  box-shadow: 0 40px 100px rgba(60, 10, 30, .4); text-align: center;
}
dialog.prerreserva::backdrop { background: rgba(60, 20, 35, .6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
dialog.prerreserva[open] { animation: aparecer-pr .4s cubic-bezier(.2, .8, .2, 1); }
@keyframes aparecer-pr { from { opacity: 0; translate: 0 14px; scale: .97; } }
.prerreserva .cerrar { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: #fff; box-shadow: 0 4px 14px rgba(0, 0, 0, .12); font-size: 22px; line-height: 1; cursor: pointer; }
.prerreserva .sello-pr { display: inline-block; margin: 0; padding: 6px 14px; border-radius: 999px; background: var(--granate); color: #fff; font: 700 12px/1 var(--fuente-texto); letter-spacing: .1em; text-transform: uppercase; }
.prerreserva .script { margin: 12px 0 8px; font: 400 clamp(36px, 9vw, 46px)/1.05 var(--fuente-script); color: var(--granate); }
.prerreserva .texto-pr { margin: 0 0 18px; color: var(--tinta-suave); font-size: 15px; }
.prerreserva form { display: grid; gap: 14px; text-align: left; }
.campo-pr { display: grid; gap: 6px; font: 600 14px/1.2 var(--fuente-texto); }
.campo-pr input { width: 100%; padding: 12px 13px; border-radius: 12px; border: 1.5px solid #E8D5DA; background: #fff; font: 400 16px/1.2 var(--fuente-texto); }
.campo-pr input:focus { outline: none; border-color: var(--granate); box-shadow: 0 0 0 3px rgba(176, 40, 72, .15); }
.campo-pr.error input { border-color: var(--granate); }
.angel { padding: 16px; border-radius: 18px; background: #fff; border: 2px dashed var(--oro); text-align: center; }
.angel-titulo { margin: 0 0 8px; font: 700 15px/1.25 var(--fuente-texto); color: var(--granate); }
.angel-cifras { display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: 10px; margin: 0 0 12px; font-size: 13px; line-height: 1.25; color: var(--tinta-suave); }
.angel-cifras strong { display: block; margin-bottom: 4px; font: 800 30px/1 var(--fuente-titulo); color: var(--tinta); }
.angel-cifras .flecha { align-self: center; color: var(--oro); font-weight: 700; font-size: 20px; }
.marca-pr { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; font-weight: 600; cursor: pointer; }
.marca-pr input { accent-color: var(--granate); width: 18px; height: 18px; }
.error-pr { margin: 0; color: var(--granate); font-weight: 600; font-size: 14px; }
.boton.ancho-pr { width: 100%; padding: 15px; font-size: 16px; }
.gracias-pr { text-align: left; }
.gracias-pr p { margin: 0 0 12px; }
.gracias-pr .email-pr { overflow-wrap: anywhere; }
.prerreserva .nota-pr { margin: 14px 0 0; font-size: 12px; color: var(--tinta-suave); }
@media (max-width: 380px) {
  dialog.prerreserva { padding: 56px 18px 20px; }
  .angel { padding: 14px 10px; }
}
@media (prefers-reduced-motion: reduce) { dialog.prerreserva[open] { animation: none; } }
