/* ElLoro.Club · portada «ventanilla de avión». Solo la carga la página de inicio.
   --p va de 0 (ventanilla cerrada) a 1 (destino a pantalla completa). Lo mueve el scroll:
   con CSS (animation-timeline) donde el navegador lo admite; si no, con js/ventanilla.js. */
@property --p { syntax: "<number>"; inherits: true; initial-value: 0; }
.pv-inicio { --pared: #EEE8DC; --marco: #DCD4C5; --cab-h: 61px; }
.pv-inicio .pie { padding-bottom: 96px; }

/* ---------- piezas comunes: foto, velo, pared con ventanilla, texto ---------- */
.pv-foto { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(calc(1.04 - var(--p) * .04)); }
.pv-velo { position: absolute; inset: 0; pointer-events: none; opacity: clamp(0, calc(var(--p) * 1.6 - .4), 1);
  background: linear-gradient(180deg, rgba(2, 20, 32, .30) 0, rgba(2, 20, 32, 0) 30%, rgba(2, 20, 32, .25) 55%, rgba(2, 20, 32, .86) 100%); }
.pv-pared { position: absolute; inset: 0; pointer-events: none; overflow: hidden; --hw: min(34vw, 360px); --cx: 70%; --cy: 52%; }
.pv-hueco { position: absolute; left: var(--cx); top: var(--cy); width: var(--hw); height: calc(var(--hw) * 1.42);
  border-radius: calc(var(--hw) * .46); overflow: hidden;
  transform: translate(-50%, -50%) scale(calc(1 + var(--p) * var(--abre, 7)));
  box-shadow: inset 0 0 0 5px rgba(2, 42, 64, .12), inset 0 14px 30px rgba(0, 0, 0, .28),
              0 0 0 12px var(--marco), 0 0 0 13px #CFC6B5, 0 18px 50px 13px rgba(2, 42, 64, .18), 0 0 0 250vmax var(--pared); }
/* vidrio: un reflejo diagonal que se apaga al abrir */
.pv-hueco::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(118deg, rgba(255, 255, 255, .34) 0, rgba(255, 255, 255, .08) 26%, rgba(255, 255, 255, 0) 42%);
  box-shadow: inset 0 0 0 calc(var(--hw) * .035) rgba(255, 255, 255, .22);
  opacity: clamp(0, calc(1 - var(--p) * 4), 1); }
/* persiana de avión: plástico claro con estrías y un borde con tirador; baja un cuarto y sube al bajar */
.pv-persiana { position: absolute; inset: 0; z-index: 1;
  background: repeating-linear-gradient(180deg, #FBFAF6 0 9px, #EFEBE2 9px 10px), #FBFAF6;
  border-bottom: 9px solid #C9BFAE; box-shadow: 0 6px 14px rgba(2, 42, 64, .22);
  transform: translateY(calc(-74% - min(var(--p) * 3.2, 1) * 30%)); }
.pv-persiana::after { content: ""; position: absolute; left: 50%; bottom: -9px; width: 28%; height: 9px; transform: translateX(-50%);
  border-radius: 0 0 8px 8px; background: #A99E8B; }
.pv-texto { position: absolute; z-index: 2; left: 48px; right: 48px; bottom: 56px; max-width: 920px; color: #fff;
  opacity: clamp(0, calc((var(--p) - .62) * 4), 1); transform: translateY(calc((1 - min(var(--p) * 1.3, 1)) * 40px)); }
.pv-texto:focus-within { opacity: 1; }
.pv-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 14px; font: 600 13px/1.3 Poppins, sans-serif; letter-spacing: .16em; text-transform: uppercase; }
.pv-kicker b { background: var(--amarillo); color: var(--azul); padding: 6px 10px; border-radius: 4px; letter-spacing: .14em; }
.pv-frase { margin: 0; font: 700 clamp(42px, 6.4vw, 96px)/1.0 Inter, sans-serif; letter-spacing: -.03em; color: #fff; text-shadow: 0 2px 24px rgba(0, 0, 0, .25); max-width: 13ch; }
.pv-frase span, .pv-intro h1 span { color: var(--amarillo); }
.pv-acciones { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 26px 0 0; }
.pv-btn { display: inline-flex; align-items: center; min-height: 50px; padding: 0 24px; border-radius: 999px; background: var(--amarillo); color: var(--azul); font: 700 15px Poppins, sans-serif; text-decoration: none; border: 2px solid var(--amarillo); }
.pv-btn:hover { background: #fff04d; color: var(--azul); }
.pv-btn-linea { background: rgba(2, 20, 32, .35); color: #fff; border-color: #fff; }
.pv-btn-linea:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.pv-enlace { color: #fff; font-weight: 600; text-underline-offset: 4px; }
.pv-enlace:hover { color: var(--amarillo); }

/* ---------- 1. la ventanilla de la primera vista ---------- */
.pv-hero { position: relative; height: 210vh; background: var(--pared); }
.pv-escena { position: sticky; top: var(--cab-h); height: calc(100vh - var(--cab-h)); overflow: hidden; }
.pv-intro { position: absolute; z-index: 2; left: 48px; top: 50%; transform: translateY(calc(-50% - var(--p) * 120px)); width: min(46vw, 600px);
  opacity: clamp(0, calc(1 - var(--p) * 3), 1); color: var(--azul); }
.pv-intro .pv-kicker { color: var(--azul); }
.pv-intro h1 { margin: 0 0 18px; font: 700 clamp(40px, 5.2vw, 76px)/1.02 Inter, sans-serif; letter-spacing: -.03em; color: var(--azul); }
.pv-intro h1 span { color: var(--azul); background: linear-gradient(transparent 58%, var(--amarillo) 58%, var(--amarillo) 92%, transparent 92%); }
.pv-lead { margin: 0 0 22px; font-size: 17px; max-width: 40ch; color: #3A3F4A; }
.pv-baja { margin: 0; font: 600 14px Poppins, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--azul); }
.pv-baja span { display: inline-block; animation: pv-rebote 1.6s ease-in-out infinite; }
@keyframes pv-rebote { 50% { transform: translateY(5px); } }
.pv-texto-hero { pointer-events: auto; }

/* ---------- 2. ¿Qué quieres sentir? ---------- */
.pv-sentir { background: var(--pared); padding: 80px 24px 88px; }
.pv-sentir-in { max-width: 1200px; margin: 0 auto; }
.pv-kicker-osc { color: var(--azul); }
.pv-sentir h2 { font: 700 clamp(36px, 4.6vw, 64px)/1.05 Inter, sans-serif; letter-spacing: -.03em; margin: 0 0 26px; }
.pv-radio { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.pv-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 26px; }
.pv-chip { cursor: pointer; display: inline-flex; align-items: center; min-height: 46px; padding: 0 20px; border-radius: 999px; border: 2px solid var(--azul); color: var(--azul); background: #fff; font: 600 15px Poppins, sans-serif; user-select: none; }
.pv-chip:hover { background: #fff8b3; }
.pv-ops { position: relative; }
.pv-op { display: none; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); background: #fff; border-radius: 20px; overflow: hidden; box-shadow: 0 18px 50px rgba(2, 42, 64, .12); }
.pv-op-foto { width: 100%; height: 100%; min-height: 360px; max-height: 460px; object-fit: cover; display: block; }
.pv-op-txt { padding: 34px 34px 28px; }
.pv-op-txt h3 { font: 700 30px/1.1 Inter, sans-serif; margin: 0 0 8px; }
.pv-op-txt p { margin: 0 0 18px; color: #3A3F4A; }
.pv-op-txt ul { list-style: none; margin: 0; padding: 0; }
.pv-op-txt li { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--borde); }
.pv-fila { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 0; color: var(--azul); text-decoration: none; font: 600 16px/1.3 Inter, sans-serif; }
.pv-fila small { display: block; font: 400 13px Poppins, sans-serif; color: #4A4F5A; margin-top: 2px; }
.pv-fila i { font-style: normal; flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--amarillo); color: var(--azul); }
.pv-fila:hover span { text-decoration: underline; text-underline-offset: 3px; }
.pv-mini { flex: none; font: 600 13px Poppins, sans-serif; color: var(--azul); border: 2px solid var(--azul); border-radius: 999px; padding: 6px 12px; text-decoration: none; }
.pv-mini:hover { background: var(--azul); color: #fff; }
#pv-r-auroras:checked ~ .pv-ops .pv-op-auroras, #pv-r-ruinas:checked ~ .pv-ops .pv-op-ruinas, #pv-r-globo:checked ~ .pv-ops .pv-op-globo,
#pv-r-playa:checked ~ .pv-ops .pv-op-playa, #pv-r-aventura:checked ~ .pv-ops .pv-op-aventura, #pv-r-calma:checked ~ .pv-ops .pv-op-calma { display: grid; }
#pv-r-auroras:checked ~ .pv-chips .pv-chip-auroras, #pv-r-ruinas:checked ~ .pv-chips .pv-chip-ruinas, #pv-r-globo:checked ~ .pv-chips .pv-chip-globo,
#pv-r-playa:checked ~ .pv-chips .pv-chip-playa, #pv-r-aventura:checked ~ .pv-chips .pv-chip-aventura, #pv-r-calma:checked ~ .pv-chips .pv-chip-calma { background: var(--amarillo); }
#pv-r-auroras:focus-visible ~ .pv-chips .pv-chip-auroras, #pv-r-ruinas:focus-visible ~ .pv-chips .pv-chip-ruinas, #pv-r-globo:focus-visible ~ .pv-chips .pv-chip-globo,
#pv-r-playa:focus-visible ~ .pv-chips .pv-chip-playa, #pv-r-aventura:focus-visible ~ .pv-chips .pv-chip-aventura, #pv-r-calma:focus-visible ~ .pv-chips .pv-chip-calma { outline: 3px solid var(--azul); outline-offset: 3px; }

/* ---------- 3. cada destino llena la pantalla ---------- */
.pv-d { position: relative; height: calc(100vh - var(--cab-h)); min-height: 560px; overflow: hidden; background: var(--pared); }
.pv-d .pv-pared { --cx: 50%; --cy: 50%; --hw: min(30vw, 320px); }

/* ---------- 4. WhatsApp siempre a la vista ---------- */
.pv-wa { position: fixed; z-index: 60; right: 20px; bottom: 20px; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 24px; border-radius: 999px; background: var(--amarillo); color: var(--azul); border: 2px solid var(--azul);
  font: 700 16px Poppins, sans-serif; text-decoration: none; box-shadow: 0 10px 30px rgba(2, 42, 64, .3); }
.pv-wa:hover { background: #fff04d; color: var(--azul); }

/* ---------- el scroll mueve --p (navegadores que lo admiten) ---------- */
@supports (animation-timeline: view()) {
  .pv-hero { view-timeline: --pv-hero block; }
  .pv-escena { animation: pv-abre linear both; animation-timeline: --pv-hero; animation-range: contain 0% contain 72%; }
  .pv-d { animation: pv-abre linear both; animation-timeline: view(); animation-range: entry 0% cover 50%; }
}
@keyframes pv-abre { from { --p: 0; } to { --p: 1; } }

/* ---------- celular ---------- */
@media (max-width: 760px) {
  .pv-inicio { --cab-h: 61px; }
  .pv-hero { height: 190vh; }
  .pv-escena { height: calc(100svh - var(--cab-h)); }
  .pv-hero .pv-pared { --hw: min(52vw, 230px); --cx: 50%; --cy: 64%; }
  .pv-d .pv-pared { --hw: min(48vw, 210px); }
  .pv-hueco { --abre: 9; }
  .pv-intro { left: 20px; right: 20px; top: 26px; width: auto; transform: translateY(calc(var(--p) * -80px)); }
  .pv-intro h1 { font-size: 34px; margin-bottom: 10px; }
  .pv-lead { font-size: 15px; margin-bottom: 0; }
  .pv-baja { position: absolute; left: 0; right: 0; top: calc(100svh - var(--cab-h) - 88px); text-align: center; font-size: 12px; }
  .pv-texto { left: 20px; right: 20px; bottom: 92px; }
  .pv-frase { font-size: 40px; }
  .pv-kicker { font-size: 11px; gap: 8px; }
  .pv-acciones { gap: 10px; margin-top: 20px; }
  .pv-btn { min-height: 46px; padding: 0 18px; font-size: 14px; }
  .pv-enlace { display: none; }
  .pv-d { height: calc(100svh - var(--cab-h)); }
  .pv-sentir { padding: 56px 0 64px; }
  .pv-sentir-in > .pv-kicker, .pv-sentir h2 { padding: 0 20px; }
  /* en filas, sin deslizar: se ven las seis opciones y no hay franja que el teclado no alcance */
  .pv-chips { gap: 8px; padding: 0 16px; margin-bottom: 22px; }
  .pv-chip { white-space: nowrap; min-height: 44px; padding: 0 14px; font-size: 14px; }
  .pv-ops { padding: 0 16px; }
  .pv-op { grid-template-columns: 1fr; border-radius: 16px; }
  .pv-op-foto { min-height: 0; height: 220px; }
  .pv-op-txt { padding: 22px 20px 16px; }
  .pv-op-txt h3 { font-size: 24px; }
  .pv-wa { left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); }
}

/* ---------- sin movimiento: todo abierto y quieto ---------- */
@media (prefers-reduced-motion: reduce) {
  .pv-hero { height: auto; }
  .pv-escena { position: relative; top: 0; height: calc(100svh - var(--cab-h)); min-height: 560px; animation: none; --p: 1; }
  .pv-d { animation: none; --p: 1; }
  .pv-pared { display: none; }
  .pv-foto { transform: none; }
  .pv-intro { opacity: 1; color: #fff; top: 28px; transform: none; }
  .pv-intro h1, .pv-intro .pv-kicker, .pv-intro .pv-lead { color: #fff; }
  .pv-intro h1 span { color: var(--amarillo); background: none; }
  .pv-baja { display: none; }
  .pv-texto { opacity: 1; transform: none; }
  .pv-baja span { animation: none; }
}
