/* ═════════════════════════════════════════════════════════════════════
   estilo-flujo.css

   Paleta "Rosas y champaña": vino profundo de fondo, champaña para lo
   que se toca y rosa empolvado en los detalles. Cálida y romántica, pero
   con poca saturación para que se sienta en calma: las fotos ponen la fuerza.

   Lo comparten index, pagar, pago-spei, encuesta, promo y
   privacidad. Cada página agrega solo lo suyo.
   ═════════════════════════════════════════════════════════════════════ */

:root {
  color-scheme: dark;
  --noche:    oklch(0.19 0.04 355);
  --noche-1:  oklch(0.225 0.045 355);
  --noche-2:  oklch(0.265 0.05 355);
  --noche-3:  oklch(0.315 0.05 355);
  --hilo:     oklch(0.94 0.018 40 / .12);
  --hilo-2:   oklch(0.94 0.018 40 / .22);
  --luna:     oklch(0.94 0.018 40);
  --luna-2:   oklch(0.85 0.024 25);
  --luna-3:   oklch(0.74 0.032 10);
  --foco:     oklch(0.87 0.06 85);
  --foco-2:   oklch(0.93 0.045 85);
  --foco-suave: oklch(0.87 0.06 85 / .13);
  --rosa:     oklch(0.76 0.07 5);
  --rosa-suave: oklch(0.76 0.07 5 / .14);
  --tinta-foco: oklch(0.22 0.045 355);
  --musgo:    oklch(0.84 0.05 140);
  --musgo-fondo: oklch(0.36 0.035 140 / .45);
  --petalo:   oklch(0.84 0.07 25);
  --petalo-fondo: oklch(0.38 0.08 20 / .45);

  --display: 'Bodoni Moda', 'Didot', 'Bodoni 72', Georgia, serif;
  --texto:   'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --margen: clamp(20px, 5vw, 64px);
  --r-xl:   clamp(20px, 2.4vw, 28px);
  --r-lg:   20px;
  --r-md:   14px;
  --salida: cubic-bezier(0.23, 1, 0.32, 1);
  --cabecera: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--cabecera) + 16px); background: var(--noche); }
body {
  margin: 0; min-height: 100svh; background: var(--noche); color: var(--luna);
  font: 400 1.0625rem/1.68 var(--texto);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip;
}
::selection { background: oklch(0.87 0.06 85 / .35); color: var(--luna); }
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--foco); outline-offset: 3px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ═════════ TIPOGRAFÍA ═════════
   Bodoni (la letra del logo) solo en títulos grandes y cifras, con tamaño
   óptico bajo para que sus trazos finos aguanten sobre fondo oscuro. Todo lo
   demás en Figtree, con más interlineado porque letra clara sobre oscuro se
   ve más ligera. */
.titulo-pagina {
  margin: 0; font-family: var(--display); font-optical-sizing: none; font-variation-settings: 'opsz' 30;
  font-weight: 600; font-size: clamp(2.4rem, 5.2vw, 3.9rem); line-height: 1.02; letter-spacing: -0.02em;
  text-wrap: balance;
}
.titulo-pagina em { font-style: italic; font-weight: 500; color: var(--rosa); }
.lead { font-size: clamp(1.04rem, 1.4vw, 1.18rem); line-height: 1.65; color: var(--luna-2); max-width: 58ch; }
.subtitulo { margin: 0; font-family: var(--texto); font-weight: 650; font-size: clamp(1.2rem, 2vw, 1.45rem); line-height: 1.3; letter-spacing: -0.015em; }
.cifra { font-family: var(--display); font-optical-sizing: none; font-variation-settings: 'opsz' 30; font-weight: 600; font-variant-numeric: lining-nums; }

/* ═════════ CABECERA DE LOS PASOS ═════════ */
.cabecera-flujo {
  position: sticky; top: 0; z-index: 40; height: var(--cabecera);
  background: oklch(0.155 0.04 355 / .8);
  -webkit-backdrop-filter: blur(22px) saturate(160%); backdrop-filter: blur(22px) saturate(160%);
}
.cabecera-flujo::after {
  content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 18px; pointer-events: none;
  background: linear-gradient(oklch(0.155 0.04 355 / .6), transparent);
}
.cabecera-flujo-in {
  width: min(100% - 2 * var(--margen), 1120px); height: 100%; margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.cabecera-flujo-nota { font-size: .9rem; color: var(--luna-3); }
.marca { display: block; line-height: 0; text-decoration: none; }
.marca-logo {
  display: block; height: 28px; aspect-ratio: 1027.4 / 281.5; background-color: var(--luna);
  -webkit-mask: url('/marca/godettia-horizontal-crema.svg') left center / contain no-repeat;
  mask: url('/marca/godettia-horizontal-crema.svg') left center / contain no-repeat;
}

.pagina { width: min(100% - 2 * var(--margen), 1120px); margin-inline: auto; padding-block: clamp(32px, 6vw, 72px) 120px; }
.pagina--angosta { width: min(100% - 2 * var(--margen), 560px); }

/* ═════════ BOTONES ═════════
   Luz de foco sobre tinta. La respuesta vive al presionar, no al soltar. */
.boton {
  --fondo: var(--foco); --tinta-boton: var(--tinta-foco);
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 52px; padding: 0 1.6em; border-radius: 999px; border: 0;
  background: var(--fondo); color: var(--tinta-boton); text-decoration: none;
  font-weight: 650; font-size: 1rem; letter-spacing: .005em; cursor: pointer; white-space: nowrap;
  transition: transform .35s var(--salida), background-color .25s ease, box-shadow .25s ease, opacity .25s ease;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.boton:hover { --fondo: var(--foco-2); }
.boton:active { transform: scale(.97); transition-duration: 90ms; }
.boton:disabled { opacity: .4; cursor: default; transform: none; --fondo: var(--foco); }
.boton--linea {
  --fondo: transparent; --tinta-boton: var(--luna);
  box-shadow: inset 0 0 0 1.5px oklch(0.94 0.018 40 / .32);
}
.boton--linea:hover { --fondo: oklch(0.94 0.018 40 / .08); }
.boton--linea:disabled { --fondo: transparent; }
.boton--chico { min-height: 42px; padding: 0 1.15em; font-size: .94rem; }
.boton--bloque { display: flex; width: 100%; }
/* Flecha dentro de su propio círculo, pegada al borde del botón. */
.boton-icono {
  display: inline-grid; place-items: center; width: 32px; height: 32px; margin-right: -1em; flex: none;
  border-radius: 50%; background: oklch(0.19 0.04 355 / .1);
  transition: transform .5s var(--salida);
}
.boton--linea .boton-icono { background: oklch(0.94 0.018 40 / .1); }
.boton-icono svg { width: 15px; height: 15px; }
@media (hover: hover) and (pointer: fine) {
  .boton:hover .boton-icono { transform: translate(2px, -1px) scale(1.05); }
}
.enlace { color: var(--foco); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; font-weight: 600; }
.enlace:hover { text-decoration-thickness: 2px; }

/* ═════════ CAMPOS ═════════
   16px de letra como mínimo: menos hace que el iPhone acerque la pantalla
   al tocar el campo. */
.field { display: grid; gap: 8px; margin-bottom: 18px; }
.field > label, .etiqueta-campo { font-size: .92rem; font-weight: 600; color: var(--luna-2); }
.field label .opcional, .etiqueta-campo .opcional { font-weight: 400; color: var(--luna-3); }
.control,
.field input[type=text], .field input[type=email], .field input[type=tel],
.field input[type=number], .field textarea, .field select {
  width: 100%; min-height: 52px; padding: 13px 16px; border: 0; border-radius: var(--r-md);
  background: var(--noche-2); color: var(--luna); font-size: 1rem;
  box-shadow: inset 0 0 0 1.5px var(--hilo);
  transition: box-shadow .2s ease, background-color .2s ease;
  -webkit-appearance: none; appearance: none;
}
.control::placeholder, .field input::placeholder, .field textarea::placeholder { color: var(--luna-3); opacity: .85; }
.control:focus, .field input:focus, .field textarea:focus, .field select:focus {
  outline: none; background: var(--noche-3);
  box-shadow: inset 0 0 0 2px var(--foco), 0 0 0 4px var(--foco-suave);
}
.field input:-webkit-autofill { -webkit-text-fill-color: var(--luna); transition: background-color 9999s; }
.field textarea, textarea.control { min-height: 96px; resize: vertical; line-height: 1.5; }
.invalido { box-shadow: inset 0 0 0 2px var(--petalo), 0 0 0 4px oklch(0.82 0.07 35 / .14) !important; }

/* ═════════ AVISOS ═════════ */
.error, .estado { padding: 14px 16px; border-radius: var(--r-md); font-size: .96rem; line-height: 1.5; }
.error, .estado.mal { background: var(--petalo-fondo); color: var(--petalo); }
.estado.bien { background: var(--musgo-fondo); color: var(--musgo); }
.estado.aviso { background: var(--foco-suave); color: var(--foco-2); }
.estado { text-align: center; font-weight: 600; }

.girar { width: 34px; height: 34px; border-radius: 50%; border: 2.5px solid var(--hilo-2); border-top-color: var(--foco); animation: girar .9s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }

/* ═════════ HOJA (avisos que piden atención) ═════════
   Aparece como material: desenfoque y escala a la vez. En celular sube
   desde abajo, donde está el pulgar. */
.capa {
  position: fixed; inset: 0; z-index: 90; display: none; align-items: center; justify-content: center; padding: 20px;
  background: oklch(0.1 0.035 355 / .62);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.capa.visible { display: flex; animation: capa-entra .35s ease both; }
.hoja-dialogo {
  width: min(100%, 440px); padding: 34px 28px 28px; border-radius: 30px; text-align: center;
  background: var(--noche-2); box-shadow: inset 0 0 0 1px var(--hilo), 0 40px 100px oklch(0.06 0.04 355 / .6);
  animation: hoja-entra .6s var(--salida) both;
}
.hoja-dialogo h2, .hoja-dialogo h3 { margin: 16px 0 10px; font-family: var(--texto); font-weight: 650; font-size: 1.4rem; line-height: 1.25; letter-spacing: -0.015em; }
.hoja-dialogo p { color: var(--luna-2); }
.hoja-dialogo .hoja-nota { margin-top: 10px; font-size: .92rem; color: var(--luna-3); }
.hoja-acciones { display: grid; gap: 10px; margin-top: 24px; }
.hoja-icono { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--foco-suave); color: var(--foco); }
.hoja-icono svg { width: 26px; height: 26px; }
.hoja-icono--exitoso { background: var(--musgo-fondo); color: var(--musgo); }
.hoja-icono--fallido, .hoja-icono--alerta { background: var(--petalo-fondo); color: var(--petalo); }
@keyframes capa-entra { from { opacity: 0; } to { opacity: 1; } }
@keyframes hoja-entra { from { opacity: 0; transform: scale(.96) translateY(10px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@media (max-width: 560px) {
  .capa { align-items: flex-end; padding: 0; }
  .hoja-dialogo { width: 100%; border-radius: 30px 30px 0 0; padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
  @keyframes hoja-entra { from { transform: translateY(100%); } to { transform: none; } }
}

/* ═════════ CALENDARIO (Flatpickr) ═════════ */
.flatpickr-calendar {
  font-family: var(--texto) !important; border: 0 !important; border-radius: 22px !important;
  background: var(--noche-2) !important; padding: 8px !important; color: var(--luna) !important;
  box-shadow: inset 0 0 0 1px var(--hilo) !important;
}
.flatpickr-calendar.arrowTop::before, .flatpickr-calendar.arrowTop::after,
.flatpickr-calendar.arrowBottom::before, .flatpickr-calendar.arrowBottom::after { display: none !important; }
.flatpickr-months { padding: 4px 0 6px; }
.flatpickr-months .flatpickr-month, .flatpickr-weekdays { background: transparent !important; color: var(--luna) !important; fill: var(--luna) !important; }
.flatpickr-current-month { font-size: 1.05rem !important; font-weight: 650 !important; color: var(--luna) !important; }
.flatpickr-current-month input.cur-year, .flatpickr-current-month .cur-month { color: var(--luna) !important; font-weight: 650 !important; background: transparent !important; }
.flatpickr-current-month .numInputWrapper span.arrowUp::after { border-bottom-color: var(--luna-2) !important; }
.flatpickr-current-month .numInputWrapper span.arrowDown::after { border-top-color: var(--luna-2) !important; }
.flatpickr-prev-month, .flatpickr-next-month { fill: var(--luna-2) !important; color: var(--luna-2) !important; padding: 12px !important; }
.flatpickr-prev-month:hover svg, .flatpickr-next-month:hover svg { fill: var(--foco) !important; }
.flatpickr-prev-month.flatpickr-disabled, .flatpickr-next-month.flatpickr-disabled { opacity: .25; }
span.flatpickr-weekday { color: var(--luna-3) !important; font-weight: 600 !important; font-size: .78rem !important; background: transparent !important; }
.flatpickr-day { color: var(--luna) !important; border-radius: 14px !important; font-weight: 500 !important; border-color: transparent !important; transition: background-color .15s ease; }
.flatpickr-day:hover, .flatpickr-day:focus { background: var(--noche-3) !important; }
.flatpickr-day.today { box-shadow: inset 0 0 0 1.5px oklch(0.87 0.06 85 / .55) !important; }
.flatpickr-day.selected, .flatpickr-day.selected:hover, .flatpickr-day.selected:focus {
  background: var(--foco) !important; color: var(--tinta-foco) !important; box-shadow: none !important; font-weight: 650 !important;
}
.flatpickr-day.flatpickr-disabled, .flatpickr-day.flatpickr-disabled:hover,
.flatpickr-day.prevMonthDay, .flatpickr-day.nextMonthDay { color: var(--luna-3) !important; opacity: .4; background: transparent !important; }
.flatpickr-day.flatpickr-disabled { text-decoration: line-through; cursor: not-allowed; }

/* ═════════ BARRA DE TOTAL (celular) ═════════ */
.barra-total {
  position: fixed; z-index: 30; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
  display: none; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 8px 8px 20px;
  border-radius: 999px; background: oklch(0.21 0.04 355 / .84);
  -webkit-backdrop-filter: blur(24px) saturate(160%); backdrop-filter: blur(24px) saturate(160%);
  box-shadow: inset 0 0 0 1px var(--hilo), 0 18px 50px oklch(0.06 0.04 355 / .5);
}
.barra-total span { display: block; font-size: .8rem; color: var(--luna-3); line-height: 1.1; }
.barra-total strong { font-family: var(--display); font-variation-settings: 'opsz' 30; font-optical-sizing: none; font-size: 1.35rem; font-weight: 600; line-height: 1.15; }
.barra-total .boton { min-height: 46px; }

/* ═════════ MOVIMIENTO Y PREFERENCIAS ═════════ */
@media (prefers-reduced-motion: reduce) {
  .capa.visible, .hoja-dialogo { animation: none; }
  .girar { animation-duration: 2.4s; }
  .boton:active { transform: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .cabecera-flujo, .barra-total, .capa { background: var(--noche-1); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  :root { --luna-2: oklch(0.92 0.01 85); --luna-3: oklch(0.85 0.012 255); --hilo: oklch(0.94 0.018 40 / .3); --hilo-2: oklch(0.94 0.018 40 / .45); }
}

/* ═════════ FOTO DE LA NOCHE ═════════
   Cabeza de las páginas de pago: recuerda qué están reservando antes de
   hablar de dinero. */
.foto-noche { position: relative; margin: 0 0 26px; aspect-ratio: 16 / 8; border-radius: 28px; overflow: hidden; background: var(--noche-1); box-shadow: inset 0 0 0 1px var(--hilo); }
.foto-noche img { width: 100%; height: 100%; object-fit: cover; }
.foto-noche::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, oklch(0.19 0.04 355 / .88)); }
.foto-noche figcaption {
  position: absolute; left: 20px; right: 20px; bottom: 16px; z-index: 1;
  font-family: var(--display); font-optical-sizing: none; font-variation-settings: 'opsz' 30;
  font-style: italic; font-weight: 500; font-size: clamp(1.2rem, 3.6vw, 1.45rem); line-height: 1.15; color: var(--luna);
}
.foto-noche--baja { aspect-ratio: 16 / 6; }
@media (max-width: 560px) {
  .foto-noche { margin-inline: calc(-1 * var(--margen) + 8px); border-radius: 24px; aspect-ratio: 16 / 9; }
  .foto-noche--baja { aspect-ratio: 16 / 7; }
}

/* ═════════ BOLETO ═════════
   El detalle de la reserva como boleto de cine: cabeza con el número,
   corte perforado y el total abajo. */
.boleto { position: relative; margin-bottom: 18px; border-radius: 24px; background: var(--noche-1); box-shadow: inset 0 0 0 1px var(--hilo); }
.boleto-cabeza { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 18px 22px 4px; }
.boleto-marca { font-family: var(--display); font-optical-sizing: none; font-variation-settings: 'opsz' 30; font-style: italic; font-weight: 500; font-size: 1.2rem; color: var(--rosa); }
.boleto-num { font-size: .82rem; font-weight: 600; letter-spacing: .06em; color: var(--luna-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.boleto-cuerpo { padding: 2px 22px 8px; }
.boleto-corte { position: relative; height: 26px; background: radial-gradient(circle at 0 50%, var(--noche) 12px, transparent 12.5px), radial-gradient(circle at 100% 50%, var(--noche) 12px, transparent 12.5px); }
.boleto-corte::after { content: ''; position: absolute; left: 26px; right: 26px; top: 50%; border-top: 1.5px dashed var(--hilo-2); }
.boleto-pie { padding: 6px 22px 18px; }
.sello {
  display: inline-block; padding: 5px 12px; border-radius: 10px; box-shadow: inset 0 0 0 2px var(--musgo);
  color: var(--musgo); font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; transform: rotate(-6deg);
}

/* Entrada en escalera: cada bloque llega un poco después del anterior. */
.escalonado > * { animation: sube .7s var(--salida) both; animation-delay: calc(var(--n, 0) * 70ms); }
@keyframes sube { from { opacity: 0; transform: translateY(14px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }

/* Solo en la vista previa con ?demo. */
.demo-aviso { margin-bottom: 18px; padding: 10px 14px; border-radius: 12px; background: var(--rosa-suave); color: var(--luna-2); font-size: .88rem; text-align: center; }

@media (prefers-reduced-motion: reduce) { .escalonado > * { animation: none; } }

/* ═════════ RENDIMIENTO EN CELULAR ═════════
   Mismo arreglo que en la portada: sin vidrio esmerilado ni entradas
   desenfocadas en pantallas táctiles, que se repintan en cada cuadro. */
@media (hover: none) and (pointer: coarse) {
  .cabecera-flujo, .barra-total { background: var(--noche-1); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .capa { background: oklch(0.1 0.035 355 / .74); -webkit-backdrop-filter: none; backdrop-filter: none; }
  @keyframes hoja-entra { from { opacity: 0; transform: scale(.96) translateY(10px); } to { opacity: 1; transform: none; } }
  @keyframes sube { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

  /* Botones: la curva de siempre mete casi todo el movimiento en dos o tres
     cuadros; en un botón que se encoge 3% se lee como un brinco. Aquí, más
     pareja, y el botón en su propia capa para no redibujarlo al encogerlo. */
  .boton {
    will-change: transform;
    transition: transform .26s cubic-bezier(.25, .8, .35, 1), background-color .2s ease, opacity .2s ease;
  }
  .boton:active { transform: scale(.96); transition-duration: .14s; }
  .boton:disabled { transform: none; }
}
