/* =========================================================================
   Buscounchollo · Calendario de Adviento · Fase 1 (inscripción)
   Réplica del diseño PROMO BUC_v4.ai — mesas 1-4.
   Mobile-first. Medidas móviles en "px de diseño 393" × --m;
   medidas de escritorio en "px de diseño 1440" × --d.
   ========================================================================= */

@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../assets/fonts/outfit-latin-wght-normal.woff2") format("woff2-variations"),
       url("../assets/fonts/outfit-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../assets/fonts/outfit-latin-ext-wght-normal.woff2") format("woff2-variations"),
       url("../assets/fonts/outfit-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* Marca */
  --red: #CA002F;
  --red-dark: #A80027;
  --black: #000000;
  --white: #FFFFFF;
  /* Grises y crema extraídos del .ai */
  --ink: #363636;          /* texto principal (0.212 gris) */
  --field: #F6F6F6;        /* campos escritorio / tarjeta móvil */
  --line: #E8E8E8;         /* bordes de campo y casilla */
  --cream: #F8E5D9;        /* inicio del degradado de fondo */
  --overlay: rgba(0, 0, 0, .6);
  --focus: #000000;

  --m: 1px;                                /* escala móvil */
  --d: min(1px, calc(100vw / 1440));       /* escala escritorio */
  --font: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  background-color: var(--white);
  background-image: linear-gradient(180deg, var(--cream) 0, var(--white) calc(860 * var(--m)));
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
img, svg { display: block; }
img { max-width: 100%; height: auto; }
button, input { font: inherit; color: inherit; }
a { color: inherit; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
svg use { fill: none; stroke: currentColor; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  padding: 10px 16px; border-radius: 999px;
  background: var(--black); color: var(--white); text-decoration: none; font-weight: 500;
}
.skip-link:focus { top: 16px; }

/* ---------- Página ---------------------------------------------------- */
.page {
  overflow-x: clip;
  padding: 0 16px calc(32 * var(--m));
}

/* ---------- Logo ------------------------------------------------------ */
.masthead { display: flex; justify-content: center; padding-top: calc(27.7 * var(--m)); }
/* Logo oficial (Logo.svg, 528 × 164). La caja reserva solo la parte visible del
   dibujo (289 × 81 en el .ai); el margen transparente inferior del SVG sobresale
   sin empujar el contenido. */
.logo-slot {
  width: calc(175 * var(--m));
  aspect-ratio: 289 / 81;
  min-height: 0;            /* que la imagen no estire la caja */
}
.logo {
  display: block;
  width: 100%;
  height: auto;
}

/* ---------- Hero ------------------------------------------------------ */
.hero { text-align: center; }
.hero__title { display: block; color: var(--red); line-height: 1; }
.hero__kicker {
  display: block;
  font-weight: 300;
  font-size: calc(23.86 * var(--m));
  margin-top: calc(23.5 * var(--m));
  letter-spacing: 0;
}
.hero__headline {
  display: block;
  font-weight: 800;
  font-size: calc(36.51 * var(--m));
  margin-top: calc(10.5 * var(--m));
  letter-spacing: -.005em;
}

.hero__dates {
  margin: calc(12 * var(--m)) auto 0;
  max-width: calc(330 * var(--m));
  font-weight: 500;
  font-size: max(16px, calc(15.5 * var(--m)));
  line-height: 1.3;
  color: var(--ink);
  text-wrap: balance;
}

/* Cuenta atrás: todas las medidas en em (escala única) */
.countdown {
  --cd: calc(22.25 * var(--m));
  font-size: var(--cd);
  width: 12.27em;
  max-width: 100%;
  height: 3.5em;
  margin: 1.43em auto 0;
  padding-top: .5em;
  border-radius: .72em;
  background: var(--red);
  color: var(--white);
}
.countdown__label { font-weight: 500; font-size: max(16px, .5075em); line-height: 1; }
.countdown__units {
  display: grid;
  grid-template-columns: minmax(1.5em, max-content) .875em minmax(1.5em, max-content) .875em minmax(1.5em, max-content) .875em minmax(1.5em, max-content);
  justify-content: center;
  margin-top: .45em;
}
.countdown__unit { display: flex; flex-direction: column; align-items: center; }
.countdown__num {
  font-weight: 800; font-size: 1em; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.countdown__name {
  font-weight: 500; font-size: max(16px, .3335em); line-height: 1;
  text-transform: uppercase; margin-top: .05em;
}
.countdown__sep { font-weight: 700; font-size: 1em; line-height: 1; text-align: center; transform: translateY(.06em); }

/* ---------- Bloque principal (móvil: una columna) --------------------- */
.layout { display: flex; flex-direction: column; align-items: center; }
.stage, .card { display: contents; }

.intro {
  order: 1;
  max-width: calc(330 * var(--m));
  margin-top: calc(28 * var(--m));
  text-align: center;
  font-weight: 500;
  font-size: calc(20.61 * var(--m));
  line-height: calc(27.5 * var(--m));
  color: var(--ink);
}

.visual {
  order: 3;
  width: min(100%, calc(361 * var(--m)));
  margin-top: calc(32 * var(--m));
}
.visual img { width: 100%; }

.benefits {
  order: 4;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, calc(118 * var(--m))));
  justify-content: center;
  column-gap: calc(2 * var(--m));
  width: 100%;
  margin-top: calc(36 * var(--m));
}
.benefit { display: flex; flex-direction: column; align-items: center; text-align: center; }
.benefit__icon {
  height: calc(29.5 * var(--m));
  color: var(--red);
  stroke-width: 3.4;
  overflow: visible;
}
.benefit__icon--user { width: calc(29.5 * var(--m) * 62 / 61); }
.benefit__icon--gift { width: calc(29.5 * var(--m) * 60 / 66); }
.benefit__icon--trophy { width: calc(29.5 * var(--m) * 67 / 64); }
.benefit__icon use { stroke-width: inherit; }
.benefit__text {
  margin-top: calc(10 * var(--m));
  padding: 0 calc(10.5 * var(--m));
  font-size: max(16px, calc(10 * var(--m)));
  line-height: max(22px, calc(14 * var(--m)));
  font-weight: 400;
}
.benefit__text strong { font-weight: 700; }

/* Tarjeta de registro */
.signup {
  order: 2;
  width: min(100%, calc(352 * var(--m)));
  margin-top: calc(18 * var(--m));
  padding: calc(18 * var(--m)) calc(15.5 * var(--m)) calc(22.8 * var(--m));
  border-radius: calc(12 * var(--m));
  background: var(--field);
  scroll-margin-top: 16px;
}
.signup:focus { outline: none; }
.signup__lead {
  text-align: center;
  font-weight: 700;
  font-size: max(16px, calc(14.11 * var(--m)));
  line-height: calc(20.7 * var(--m));
  color: var(--ink);
}
.signup__lead strong { font-weight: 700; color: var(--red); }

.form { margin-top: calc(14 * var(--m)); }
.field { position: relative; }
.field + .field { margin-top: calc(14 * var(--m)); }
.field__icon {
  position: absolute;
  left: calc(10.5 * var(--m));
  top: calc(19.8 * var(--m));
  transform: translateY(-50%);
  width: calc(16.5 * var(--m));
  height: calc(16.5 * var(--m));
  color: var(--ink);
  stroke-width: 1.2;
  pointer-events: none;
}
.field__icon use { stroke-width: inherit; }
.field__input {
  display: block;
  width: 100%;
  height: calc(39.6 * var(--m));
  padding: 0 calc(12 * var(--m)) 0 calc(37 * var(--m));
  border: .876px solid var(--line);
  border-radius: calc(8 * var(--m));
  background: var(--white);
  font-weight: 300;
  font-size: 16px; /* ≥16px: evita el zoom automático de iOS al enfocar */
  color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field__input::placeholder { color: var(--ink); opacity: 1; }
.field__input:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.field__input[aria-invalid="true"] { border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red); }
.field__error {
  margin-top: 4px;
  padding-left: 2px;
  font-size: max(16px, max(12px, calc(12 * var(--m))));
  line-height: 1.3;
  font-weight: 500;
  color: var(--red);
}
.field__error--check { padding-left: 0; margin-top: 2px; }

.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border: 0; border-radius: 999px;
  cursor: pointer;
  font-weight: 500;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .2s ease, transform .1s ease;
}
.btn--primary { background: var(--red); color: var(--white); }
.btn--primary:hover { background: var(--red-dark); }
.btn--primary:active { transform: scale(.99); }
.btn:disabled { cursor: progress; }
.btn--primary:disabled { background: var(--red); opacity: .85; }

.form__submit {
  width: 100%;
  height: calc(39.6 * var(--m));
  margin-top: calc(16 * var(--m));
  font-size: max(16px, calc(13.78 * var(--m)));
}
.btn__spinner {
  display: none;
  width: 1.1em; height: 1.1em;
  border: 2px solid rgba(255, 255, 255, .45);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
.form[data-state="sending"] .btn__spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .btn__spinner { animation-duration: 2.4s; } }

.check {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  column-gap: calc(10 * var(--m));
  margin-top: calc(14 * var(--m));
  padding-left: calc(2 * var(--m));
}
/* Casilla propia: borde visible y marca de verificación como imagen SVG de fondo
   (los pseudo-elementos ::before no se pintan sobre <input> en Safari ni Firefox). */
.check__input {
  appearance: none; -webkit-appearance: none;
  flex: none;
  width: 18px; height: 18px;
  margin: calc((15 * var(--m) - 18px) / 2) 0 0;
  border: 1.5px solid var(--ink);
  border-radius: 4px;
  background: var(--white) center / 12px 12px no-repeat;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}
.check__input:checked {
  background-color: var(--red);
  border-color: var(--red);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.4 6.3l2.4 2.4 4.8-5' fill='none' stroke='%23fff' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.check__input[aria-invalid="true"] { border-color: var(--red); box-shadow: 0 0 0 1px var(--red); }
.check__input:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
@media (forced-colors: active) { .check__input:checked { background-color: CanvasText; } }
.check__label {
  font-size: max(14px, calc(12.25 * var(--m)));
  line-height: max(17px, calc(15 * var(--m)));
  font-weight: 400;
  color: var(--ink);
  cursor: pointer;
}
.check__label a { color: var(--red); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
.check__label a:hover { text-decoration-thickness: 2px; }
.check .field__error { grid-column: 2; }

.form__status {
  margin-top: calc(12 * var(--m));
  padding: 10px 12px;
  border-radius: 8px;
  font-size: max(16px, max(13px, calc(13 * var(--m))));
  line-height: 1.4;
  font-weight: 500;
  text-align: center;
}
.form__status[data-tone="error"] { background: #FBE5EA; color: #8F0021; }
.form__status[data-tone="info"] { background: var(--white); color: var(--ink); border: 1px solid var(--line); }
.form__status[data-tone="ok"] { background: var(--white); color: var(--ink); border: 1px solid var(--line); }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Botón flotante móvil (se oculta mientras el formulario está en pantalla) ------------------ */
.float-cta {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  width: min(calc(100% - 32px), calc(361 * var(--m)));
  height: 48px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 999px;
  background: var(--red);
  color: var(--white);
  font-weight: 500;
  font-size: 16px;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .18);
  transform: translate(-50%, 0);
  transition: transform .25s ease, opacity .25s ease, visibility .25s;
}
.float-cta:hover { background: var(--red-dark); }
.float-cta[data-hidden="true"] {
  transform: translate(-50%, calc(100% + 24px));
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) { .float-cta { transition: opacity .01s, visibility .01s; } }

/* ---------- Popup de confirmación ------------------------------------ */
.modal {
  --p: var(--m);
  width: min(calc(100% - 32px), calc(337.1 * var(--p)));
  max-width: none;
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: calc(53.5 * var(--p)) calc(28 * var(--p)) calc(38 * var(--p));
  border: 0;
  border-radius: calc(28 * var(--p));
  background: var(--white);
  color: var(--ink);
  text-align: center;
  overflow: auto;
  overscroll-behavior: contain;
}
.modal::backdrop { background: var(--overlay); }
.modal[open] { animation: modal-in .22s ease-out; }
.modal[open]::backdrop { animation: fade-in .22s ease-out; }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .modal[open], .modal[open]::backdrop { animation: none; }
}

.modal__close {
  position: absolute;
  top: calc(12.5 * var(--p));
  right: calc(10 * var(--p));
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.modal__close svg { width: calc(18 * var(--p)); height: calc(18 * var(--p)); stroke-width: 1.4; }
.modal__close svg use { stroke-width: inherit; vector-effect: non-scaling-stroke; }
.modal__close:hover { background: rgba(0, 0, 0, .05); }

.modal__icon {
  width: calc(47 * var(--p));
  height: calc(47 * var(--p) * 62.5 / 74);
  margin: 0 auto;
  color: var(--red);
  stroke-width: 2.6;
}
.modal__icon use { stroke-width: inherit; }

.modal__title {
  margin-top: calc(24 * var(--p));
  font-weight: 500;
  font-size: calc(23.01 * var(--p));
  line-height: calc(33.9 * var(--p));
  color: var(--ink);
  overflow-wrap: anywhere;
}
.modal__title strong { display: block; font-weight: 700; color: var(--red); }

.modal__body { margin-top: calc(31 * var(--p)); }
.modal__lead, .modal__text {
  font-size: max(16px, calc(15.93 * var(--p)));
  line-height: calc(23.45 * var(--p));
}
.modal__lead { font-weight: 500; }
.modal__text { font-weight: 100; max-width: calc(272 * var(--p)); margin: 0 auto; }

.modal__back {
  width: calc(172 * var(--p));
  height: calc(28.6 * var(--p));
  min-height: 32px;
  margin-top: calc(28 * var(--p));
  font-size: max(16px, calc(13.94 * var(--p)));
  text-transform: uppercase;
}

/* ========================================================================
   Tablet vertical (600–1023): misma composición móvil, algo más grande
   ======================================================================== */
@media (min-width: 600px) {
  :root { --m: 1.32px; }
  body { background-image: linear-gradient(180deg, var(--cream) 0, var(--white) calc(860 * var(--m))); }
}

/* ========================================================================
   Escritorio (≥1024): mesa 1
   ======================================================================== */
@media (min-width: 1024px) {
  body {
    background-image: linear-gradient(180deg, var(--cream) 0, var(--white) calc(2128.7 * var(--d)));
  }
  .page { padding: 0 0 calc(56.7 * var(--d)); }

  .masthead { padding-top: calc(40 * var(--d)); }
  .logo-slot { width: calc(288.6 * var(--d)); }

  .hero__kicker { font-size: calc(50.78 * var(--d)); margin-top: calc(34 * var(--d)); }
  .hero__headline { font-size: calc(90.7 * var(--d)); margin-top: calc(32.2 * var(--d)); }
  .hero__dates { max-width: none; margin-top: calc(22 * var(--d)); font-size: max(17px, calc(26 * var(--d))); }

  .countdown { --cd: calc(48 * var(--d)); width: 12.25em; border-radius: .46em; margin-top: .7em; }

  .float-cta { display: none; }

  .layout { display: flex; flex-direction: column; align-items: flex-start; }
  .stage { order: 1; }
  .benefits { order: 2; }

  .benefits {
    display: grid;
    grid-template-columns: calc(436 * var(--d)) calc(429 * var(--d)) auto;
    justify-content: start;
    column-gap: 0;
    width: auto;
    margin: calc(56 * var(--d)) 0 0 calc(50% - 610 * var(--d) + 8 * var(--d));
  }
  .benefit { flex-direction: row; align-items: flex-start; text-align: left; }
  .benefit__icon { height: calc(61 * var(--d)); stroke-width: 1.658; flex: none; }
  .benefit__icon--user { width: calc(62 * var(--d)); margin-top: calc(0 * var(--d)); }
  .benefit__icon--gift { width: calc(60 * var(--d)); height: calc(66 * var(--d)); margin: calc(-2.5 * var(--d)) 0 0 calc(-1 * var(--d)); }
  .benefit__icon--trophy { width: calc(67 * var(--d)); height: calc(64 * var(--d)); margin: calc(-1 * var(--d)) 0 0 calc(-1 * var(--d)); stroke-width: 2; }
  .benefit__text {
    margin: calc(-3 * var(--d)) 0 0 calc(18 * var(--d));
    padding: 0;
    font-size: max(16px, max(15px, calc(22.96 * var(--d))));
    line-height: max(21px, calc(32.5 * var(--d)));
    white-space: nowrap;
  }
  .benefit__icon--gift + .benefit__text { margin-left: calc(18 * var(--d)); }
  .benefit__icon--trophy + .benefit__text { margin-left: calc(12 * var(--d)); }
  .benefit__text strong, .benefit__text span { display: block; }

  /* Escenario: tarjeta blanca a la izquierda, taquillas a la derecha */
  .stage {
    display: flow-root;
    position: relative;
    width: calc(1290 * var(--d));
    aspect-ratio: 1290 / 1279;
    margin: calc(24 * var(--d)) 0 0 calc(50% - 610 * var(--d));
  }
  .visual {
    position: absolute;
    z-index: 0;
    top: 0;
    left: calc(46 * var(--d));
    width: calc(1244 * var(--d));
    margin: 0;
  }
  .card {
    display: block;
    position: relative;
    z-index: 1;
    width: calc(592.6 * var(--d));
    margin-top: calc(16 * var(--d));
    padding: calc(32.3 * var(--d)) calc(21 * var(--d)) calc(42.2 * var(--d));
    border-radius: calc(26 * var(--d));
    background: var(--white);
  }
  .intro {
    max-width: calc(550 * var(--d));
    margin: 0 auto;
    font-size: max(24px, calc(35.97 * var(--d)));
    line-height: max(32px, calc(47.9 * var(--d)));
    text-wrap: balance;
  }
  .signup {
    width: auto;
    margin: calc(24 * var(--d)) 0 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
  }
  .signup__lead {
    font-size: max(17px, calc(24.62 * var(--d)));
    line-height: max(25px, calc(36.2 * var(--d)));
  }
  .form { margin-top: calc(24 * var(--d)); }
  .field + .field { margin-top: calc(12 * var(--d)); }
  .field__icon { left: calc(15 * var(--d)); top: calc(25.85 * var(--d)); width: calc(21.5 * var(--d)); height: calc(21.5 * var(--d)); stroke-width: 1; }
  .field__input {
    height: calc(51.7 * var(--d));
    padding-left: calc(49.4 * var(--d));
    border: 0;
    border-radius: calc(10 * var(--d));
    background: var(--field);
    font-size: max(16px, calc(18 * var(--d)));
  }
  .field__input[aria-invalid="true"] { box-shadow: inset 0 0 0 1.5px var(--red); }
  .form__submit {
    height: calc(36.9 * var(--d));
    min-height: 34px;
    margin-top: calc(24 * var(--d));
    font-size: max(16px, max(15px, calc(18 * var(--d))));
  }
  .check { column-gap: calc(12 * var(--d)); margin-top: calc(20 * var(--d)); padding-left: 0; }
  .check__input { margin-top: calc((max(16px, calc(19 * var(--d))) - 18px) / 2); }
  .check__label { font-size: max(14px, max(13px, calc(16 * var(--d)))); line-height: max(16px, calc(19 * var(--d))); }
  .field__error--check { padding-left: 0; }
  .field__error { font-size: max(16px, max(13px, calc(14 * var(--d)))); }
  .form__status { font-size: max(16px, max(14px, calc(15 * var(--d)))); margin-top: calc(14 * var(--d)); }
  .form__status[data-tone="info"], .form__status[data-tone="ok"] { background: var(--field); border: 0; }

  /* Popup escritorio: mesa 2 */
  .modal {
    --p: var(--d);
    width: min(calc(100% - 48px), calc(833.5 * var(--p)));
    padding: calc(53.5 * var(--p)) calc(60 * var(--p)) calc(65.6 * var(--p));
    border-radius: calc(34 * var(--p));
  }
  .modal__close { top: calc(27 * var(--p)); right: calc(21 * var(--p)); }
  .modal__close svg { width: calc(28 * var(--p)); height: calc(28 * var(--p)); }
  .modal__icon { width: calc(74 * var(--p)); height: calc(62.5 * var(--p)); stroke-width: 2; }
  .modal__title { margin-top: calc(38.3 * var(--p)); font-size: calc(39.39 * var(--p)); line-height: calc(48 * var(--p)); }
  .modal__title strong { display: inline; }
  .modal__body { margin-top: calc(50.2 * var(--p)); }
  .modal__lead, .modal__text { font-size: max(17px, calc(24.62 * var(--p))); line-height: max(24px, calc(36.2 * var(--p))); }
  .modal__text { max-width: calc(530 * var(--p)); }
  .modal__back {
    width: calc(265.7 * var(--p));
    height: calc(44.2 * var(--p));
    margin-top: calc(49.8 * var(--p));
    font-size: max(16px, calc(21.54 * var(--p)));
  }
}

/* Móvil compacto · v1.4.2: menos aire en la cabecera para que el formulario
   completo se vea al entrar también en móviles pequeños. */
@media (max-width: 1023.98px) {
  .masthead { padding-top: calc(16 * var(--m)); }
  .hero__kicker { margin-top: calc(22 * var(--m)); }   /* el SVG del logo sobresale ~5 px de su caja */
  .hero__headline { margin-top: calc(6 * var(--m)); }
  .hero__dates { margin-top: calc(8 * var(--m)); font-size: max(16px, calc(14.5 * var(--m))); }
  /* Cuenta atrás compacta: misma información, menos alto */
  .countdown {
    --cd: calc(19 * var(--m));
    width: fit-content; max-width: 100%; height: auto;
    margin: calc(16 * var(--m)) auto 0;
    padding: .45em .9em .5em;
    border-radius: .6em;
  }
  .countdown__label { font-size: max(16px, .58em); }
  .countdown__units { margin-top: .3em; }
  .countdown__num { font-size: calc(36 * var(--m)); }
  .countdown__sep { font-size: calc(28 * var(--m)); line-height: calc(36 * var(--m)); transform: translateY(-.15em); }
  .countdown__name { font-size: calc(14 * var(--m)); margin-top: .12em; }
  .intro { margin-top: calc(16 * var(--m)); font-size: calc(18.5 * var(--m)); line-height: calc(24.5 * var(--m)); }
  /* Ritmo: 16 entre bloques · tarjeta con relleno simétrico 18 / 16 */
  .signup { margin-top: calc(16 * var(--m)); padding: calc(18 * var(--m)) calc(16 * var(--m)); }
  /* Hueco final del alto del botón flotante (48 + 16 + 16) para que nunca tape el último texto */
  .page { padding-bottom: calc(50px + env(safe-area-inset-bottom, 0px)); }
}

/* ========================================================================
   Escritorio compacto (≥1024) · v1.4.2
   Petición de BUC: el formulario completo, con su botón, tiene que verse al
   entrar en un portátil sin apenas scroll. Se reduce la cabecera y la cuenta
   atrás pasa a ser una franja estrecha en una sola línea.
   ======================================================================== */
@media (min-width: 1024px) {
  .masthead { padding-top: calc(26 * var(--d)); }
  .logo-slot { width: calc(215 * var(--d)); }

  .hero__kicker { font-size: calc(38 * var(--d)); margin-top: calc(30 * var(--d)); }   /* aire bajo el logo */
  .hero__headline { font-size: calc(68 * var(--d)); margin-top: calc(10 * var(--d)); }
  .hero__dates { margin-top: calc(14 * var(--d)); font-size: max(16px, calc(22 * var(--d))); }

  /* Cuenta atrás en franja: «Abriremos la primera taquilla en:  20 : 15 : 08 : 13» */
  .countdown {
    --cd: max(26px, calc(34 * var(--d)));
    display: flex; align-items: center; justify-content: center; gap: .7em;
    width: fit-content; max-width: 100%; height: auto;
    margin: calc(22 * var(--d)) auto 0;
    padding: .32em .9em .36em;
    border-radius: .42em;
  }
  .countdown__label { font-size: max(16px, .5em); white-space: nowrap; }
  .countdown__units { margin-top: 0; }

  .stage { margin-top: calc(32 * var(--d)); }   /* aire entre contador y formulario */
  .card {
    margin-top: 0;
    padding: calc(24 * var(--d));
  }
  .intro {
    font-size: max(21px, calc(29 * var(--d)));
    line-height: max(28px, calc(37 * var(--d)));
  }
  .signup { margin-top: calc(16 * var(--d)); }
  .signup__lead {
    font-size: max(16px, calc(20 * var(--d)));
    line-height: max(23px, calc(28 * var(--d)));
  }
  .form { margin-top: calc(16 * var(--d)); }
  .check { margin-top: calc(16 * var(--d)); }
  .form__submit { height: max(40px, calc(44 * var(--d))); margin-top: calc(18 * var(--d)); }
}

/* Pantallas muy anchas: la composición de 1440 se mantiene centrada */
@media (min-width: 1440px) {
  :root { --d: 1px; }
}

/* ===========================================================================
   Inscripción + Comunidad de WhatsApp · v1.5.2
   Dos acciones separadas, en una sola columna en móvil y escritorio:
   1) «Apúntate gratis» justo debajo del check de bases legales.
   2) Frase de la comunidad y, debajo, «Unirme a la comunidad».
   =========================================================================== */
.form__actions { margin-top: calc(18 * var(--m)); }
.community { margin-top: calc(22 * var(--m)); }
.community__text {
  max-width: calc(300 * var(--m));
  margin: 0 auto;
  text-align: center;
  font-weight: 400;
  font-size: max(16px, calc(14.5 * var(--m)));
  line-height: calc(20.5 * var(--m));
  color: var(--black);
  text-wrap: balance;
}
.community__actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: calc(10 * var(--m));
  margin-top: calc(14 * var(--m));
}
.form__actions .form__submit,
.community__btn {
  width: 100%;
  height: max(44px, calc(44 * var(--m)));
  margin: 0;
  padding: 0 calc(12 * var(--m));
  font-size: max(16px, calc(14 * var(--m)));
  white-space: nowrap;
}

.btn--outline {
  gap: calc(9 * var(--m));
  background: var(--white);
  color: var(--red);
  box-shadow: inset 0 0 0 1.5px var(--red);
  text-decoration: none;
}
.btn--outline:hover { background: #FDF0F3; }
.btn--outline:active { transform: scale(.99); }
.btn__icon { flex: none; width: calc(22 * var(--m)); height: calc(15 * var(--m)); }
.btn__icon use { fill: currentColor; stroke: none; }

@media (min-width: 1024px) {
  /* Escritorio: misma estructura que en móvil, una acción debajo de otra */
  .community__btn { padding: 0 max(18px, calc(22 * var(--d))); }
  .form__actions { margin-top: calc(20 * var(--d)); }
  .community { margin-top: calc(28 * var(--d)); }
  .community__text {
    max-width: calc(470 * var(--d));
    font-size: max(16px, calc(20 * var(--d)));
    line-height: max(22px, calc(27 * var(--d)));
  }
  .community__actions { gap: calc(14 * var(--d)); margin-top: calc(16 * var(--d)); }
  .form__actions .form__submit,
  .community__btn {
    height: max(44px, calc(50 * var(--d)));
    font-size: max(16px, max(15px, calc(18 * var(--d))));
  }
  .btn--outline { gap: calc(10 * var(--d)); }
  .btn__icon { width: calc(27 * var(--d)); height: calc(18 * var(--d)); }
}

/* ===========================================================================
   v1.6.0 · Pie de página con el contacto oficial de la promoción
   (las bases legales exigen que sorteos@buscounchollo.com figure en la landing)
   =========================================================================== */
.site-footer {
  padding: 28px 20px calc(96px + env(safe-area-inset-bottom, 0px)); /* hueco para el botón flotante */
  text-align: center;
  font-size: max(16px, 14px);
  line-height: 1.5;
  color: var(--ink);
  border-top: 1px solid var(--line);
  background: var(--white);
}
.site-footer p + p { margin-top: 6px; }
.site-footer a { color: var(--red); text-decoration: underline; text-underline-offset: 2px; font-weight: 500; }
.site-footer a:hover { text-decoration-thickness: 2px; }
.site-footer__links a { font-weight: 400; color: var(--ink); }
.site-footer__small { font-size: max(16px, 12px); color: #6B6B6B; }
@media (min-width: 1024px) {
  .site-footer { padding-bottom: 32px; font-size: max(16px, 15px); }
}
