/* ═══════════════════════════════════════════════════════════
   Palu Estudio — popup de cualificación previo a la agenda
   Hereda los tokens de styles.css (:root). Una pregunta por
   pantalla, estilo Typeform, con el vocabulario de la marca:
   corchetes, eyebrows, Furlong para la pregunta y Snell solo
   en las pantallas finales.
   ═══════════════════════════════════════════════════════════ */

.booking {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  /* hueco arriba para que el panel centrado no tape la nav (que sigue visible,
     atenuada bajo el overlay) + aire lateral/inferior en móvil */
  padding: var(--nav-h) 16px 16px;
}
.booking[hidden] {
  display: none;
}

/* No bloqueamos con overflow:hidden en <html>: eso rompería el position:sticky
   de la nav (se iría fuera de pantalla) y obligaría a compensar la scrollbar.
   En su lugar dejamos la página intacta (nav y scrollbar en su sitio, cero
   salto) y evitamos el scroll de fondo con un guard en JS (booking.js) +
   overscroll-behavior en el carril. */

.booking__overlay {
  position: absolute;
  inset: 0;
  background: rgba(51, 38, 32, 0.6);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

/* móvil: tarjeta centrada · ≥768px: panel grande centrado */
.booking__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 80vh;
  height: 80dvh;
  background: var(--paper);
  border-radius: 16px;
  box-shadow: 0 30px 70px rgba(51, 38, 32, 0.4);
  overflow: hidden;
}

/* ── progreso: hairline que se llena de vino ──────────────── */

.booking__progress {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--hairline);
}
.booking__progress-bar {
  display: block;
  height: 100%;
  width: 0;
  background: var(--wine);
  transition: width 0.55s var(--ease-out);
}

/* ── cabecera ─────────────────────────────────────────────── */

.booking__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 10px;
}

.booking__brand {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(51, 38, 32, 0.6);
}

.booking__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--hairline);
  border-radius: 100px;
  background: transparent;
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition:
    background-color 0.25s var(--ease-out),
    color 0.25s var(--ease-out),
    border-color 0.25s var(--ease-out);
}
.booking__close:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

/* ── escenario: una pregunta a la vez ─────────────────────── */

.booking__stage {
  flex: 1;
  display: flex;
  overflow-y: auto;
  overscroll-behavior: contain; /* el scroll del carril no se propaga al fondo */
  padding: 0 24px 24px;
}

.booking__step {
  margin: auto;
  width: 100%;
  max-width: 620px;
  padding: 20px 0 28px;
}

.booking__kicker {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--wine);
  margin-bottom: 16px;
}

.booking__question {
  font-family: var(--font-display);
  font-size: clamp(30px, 5.4vw, 46px);
  font-weight: 400;
  /* en mayúsculas la cola de la Q de la Furlong invade la línea siguiente:
     algo más de interlínea */
  line-height: 1.3;
  text-transform: uppercase;
}
/* recibe foco programático (lectores de pantalla) pero no es interactivo */
.booking__question:focus,
.booking__end-title:focus {
  outline: none;
}

/* «*Opcional» — Onest light, en tinta y sin heredar las mayúsculas del título */
.booking__optional {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 300;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  margin-left: 10px;
  white-space: nowrap;
}

/* opciones: tarjetas con tecla [ A ] */

.booking__options {
  display: grid;
  gap: 10px;
  margin-top: 30px;
}

.booking__option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  padding: 14px 18px;
  border: 1.5px solid rgba(51, 38, 32, 0.25);
  border-radius: 3px;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition:
    border-color 0.22s var(--ease-out),
    background-color 0.22s var(--ease-out),
    color 0.22s var(--ease-out),
    transform 0.22s var(--ease-out);
}
.booking__option:hover {
  border-color: var(--ink);
  transform: translateY(-1px);
}
.booking__option.is-selected {
  background: var(--wine);
  border-color: var(--wine);
  color: var(--paper);
}

.booking__key {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: rgba(51, 38, 32, 0.55);
  transition: color 0.22s var(--ease-out);
}
.booking__option.is-selected .booking__key {
  color: rgba(247, 247, 242, 0.75);
}

/* texto libre: hairline marrón que se marca al enfocar */

.booking__input {
  width: 100%;
  margin-top: 30px;
  padding: 8px 2px 12px;
  border: 0;
  border-bottom: 1px solid rgba(51, 38, 32, 0.45);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 300;
  caret-color: var(--wine);
  transition: border-color 0.25s var(--ease-out);
}
.booking__input:focus {
  outline: none;
  border-color: var(--ink);
}
.booking__input::placeholder {
  color: rgba(51, 38, 32, 0.35);
}

/* siguiente */

.booking__next-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 32px;
}

.booking__next-row .btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.booking__enter {
  display: none;
  font-size: 13px;
  color: rgba(51, 38, 32, 0.55);
}
@media (hover: hover) and (min-width: 768px) {
  .booking__enter {
    display: inline;
  }
}

/* ── pie: volver ──────────────────────────────────────────── */

.booking__foot {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 8px 20px calc(12px + env(safe-area-inset-bottom));
}

.booking__back {
  border: 0;
  background: none;
  padding: 6px 0;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(51, 38, 32, 0.55);
  cursor: pointer;
  transition: color 0.22s var(--ease-out);
}
.booking__back:hover {
  color: var(--ink);
}

/* ── pantallas finales ────────────────────────────────────── */

.booking__end {
  margin: auto;
  width: 100%;
  max-width: 560px;
  text-align: center;
  padding: 24px 0 32px;
}

.booking__script {
  font-family: var(--font-script);
  font-size: clamp(36px, 6vw, 54px);
  line-height: 1.1;
  color: var(--wine);
  transform: rotate(-2deg);
  margin-bottom: 10px;
}

.booking__end-title {
  font-family: var(--font-display);
  font-size: clamp(26px, 4.4vw, 38px);
  line-height: 1.12;
}
/* pantalla de descarte: título en mayúsculas (sin la Snell de arriba) */
.booking__end .booking__end-title {
  text-transform: uppercase;
  line-height: 1.28;
}

.booking__end-body {
  margin-top: 16px;
  font-size: 16px;
  line-height: 1.7;
  color: rgba(51, 38, 32, 0.8);
}

.booking__end .btn {
  margin-top: 28px;
}

/* paso Calendly: ocupa todo el escenario */

.booking__step--cal {
  margin: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  display: flex;
  flex-direction: column;
  text-align: center;
  padding: 4px 0 0;
}
/* pantalla de agenda: «último paso» en la display, mayúsculas, recto y en
   tinta; el subtítulo baja a Onest light (la Snell se reserva para la
   pantalla de descarte) */
.booking__step--cal .booking__script {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.4vw, 32px);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--ink);
  transform: none;
  margin-bottom: 6px;
}
.booking__step--cal .booking__end-title {
  font-family: var(--font-body);
  font-size: clamp(17px, 2.2vw, 21px);
  font-weight: 300;
  line-height: 1.4;
}

.booking__cal-frame {
  flex: 1;
  width: 100%;
  min-height: 420px;
  margin-top: 12px;
  border: 0;
  border-radius: 3px;
}

/* cuando el formulario terminó, el pie sobra y el calendario quiere aire */
.booking--end .booking__foot {
  display: none;
}
.booking--end .booking__stage {
  padding-left: 24px;
  padding-right: 24px;
}

/* ── honeypot (invisible para personas) ───────────────────── */

.booking__hp {
  position: absolute;
  left: -9999px;
  top: 0;
  opacity: 0;
  pointer-events: none;
}

/* ── responsive: panel centrado en tablet/desktop ─────────── */

@media (min-width: 768px) {
  .booking {
    padding: var(--nav-h) 32px 32px;
  }
  .booking__panel {
    width: min(760px, calc(100vw - 64px));
    border-radius: 6px;
    box-shadow: 0 40px 90px rgba(51, 38, 32, 0.4);
  }
  .booking__head {
    padding: 24px 28px 12px;
  }
  .booking__stage {
    padding: 0 64px 24px;
  }
  .booking__foot {
    padding: 8px 28px 16px;
  }
}

@media (min-width: 1024px) {
  .booking__panel {
    width: min(920px, calc(100vw - 96px));
  }
  .booking__stage {
    padding: 0 96px 24px;
  }
}
