/* Capa fotográfica y de efectos del sitio público: portada con foto por destino, parallax, destellos,
   cinta de ciudades, destinos, tarjetas con inclinación 3D y fondos de sección.
   Se carga después de modern.css. Todo respeta «reducir movimiento» (al final del archivo). */

main { overflow-x: clip; }

/* ---------- barra de progreso de lectura ---------- */

.scroll-progress {
  position: fixed; z-index: 120; top: 0; left: 0; right: 0; height: 3px; pointer-events: none;
  background: linear-gradient(90deg, var(--sun), var(--coral) 55%, var(--lagoon));
  transform: scaleX(0); transform-origin: 0 50%;
}

/* ---------- cabecera ---------- */

.site-header { transition: background .35s, box-shadow .35s, border-color .35s; }
.site-header.scrolled { background: rgba(6, 38, 46, .84); border-color: rgba(255, 255, 255, .14); box-shadow: 0 16px 44px rgba(4, 24, 30, .38); }

/* ---------- botones ---------- */

.btn-lg { min-height: 54px; padding: 0 28px; font-size: 1rem; }
.btn-glass {
  background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .38); color: var(--white);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.btn-glass:hover { background: rgba(255, 255, 255, .22); border-color: rgba(255, 255, 255, .6); transform: translateY(-2px); }

/* Destello que recorre los botones principales. */
.btn-primary { position: relative; overflow: hidden; isolation: isolate; }
.btn-primary::after {
  content: ''; position: absolute; z-index: -1; top: 0; bottom: 0; left: -70%; width: 45%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .38), transparent); transform: skewX(-20deg);
}
.btn-primary:hover:not(:disabled)::after { left: 135%; transition: left .75s var(--ease); }
.btn-shine::after { animation: shine 5s 2.5s ease-in-out infinite; }
@keyframes shine { 0%, 72% { left: -70%; } 100% { left: 135%; } }

/* ---------- portada ---------- */

.hero { min-height: clamp(660px, 100svh, 960px); display: flex; flex-direction: column; justify-content: center; }
.hero-photo { position: absolute; inset: 0; z-index: 0; overflow: hidden; will-change: transform; }
.hero-photo img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 60%;
  opacity: 0; transform: scale(1.06); transition: opacity 1.4s var(--ease);
}
.hero-photo img.is-loaded { opacity: 1; animation: kenburns 30s ease-in-out infinite alternate; }
@keyframes kenburns { from { transform: scale(1.06); } to { transform: scale(1.18) translate3d(-2%, -1.5%, 0); } }

.hero-shade {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(4, 30, 37, .86) 0%, rgba(4, 30, 37, .58) 40%, rgba(4, 30, 37, .08) 75%),
    linear-gradient(180deg, rgba(4, 30, 37, .6) 0%, transparent 26%, transparent 58%, rgba(4, 30, 37, .55) 100%);
}
.hero::after { opacity: .5; }
.hero-inner { padding: 150px 0 250px; }
.hero h1 { text-shadow: 0 8px 50px rgba(0, 0, 0, .35); }
.hero-lead { text-shadow: 0 2px 20px rgba(0, 0, 0, .35); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-actions .wa-dot { flex: none; }

/* Entrada de la portada: empieza cuando se cierra la pantalla de destino. */
body:not(.gate-open) .hero h1 > * { display: inline-block; animation: title-in 1.1s var(--ease) both; }
body:not(.gate-open) .hero h1 > em { animation-delay: .16s; }
body:not(.gate-open) .hero .eyebrow { animation: fade-up .9s var(--ease) both; }
body:not(.gate-open) .hero-lead { animation: fade-up .9s .3s var(--ease) both; }
body:not(.gate-open) .hero-actions { animation: fade-up .9s .42s var(--ease) both; }
body:not(.gate-open) .trust { animation: fade-up .9s .54s var(--ease) both; }
body:not(.gate-open) .chooser { animation: fade-up 1s .62s var(--ease) both; }
@keyframes title-in { from { opacity: 0; transform: translateY(44px) rotate(1.5deg); filter: blur(10px); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(24px); } }

/* Destellos de luz que suben despacio sobre la foto. */
.hero-sparkles { position: absolute; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; }
.hero-sparkles i {
  position: absolute; bottom: -24px; left: var(--x); width: var(--s, 6px); height: var(--s, 6px); border-radius: 50%; opacity: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, .95), rgba(255, 228, 170, .45) 45%, transparent 70%);
  animation: float-up var(--t, 14s) var(--d, 0s) linear infinite;
}
.hero-sparkles i:nth-child(1) { --x: 6%; --s: 7px; --t: 15s; --d: 0s; }
.hero-sparkles i:nth-child(2) { --x: 14%; --s: 4px; --t: 12s; --d: 3s; }
.hero-sparkles i:nth-child(3) { --x: 23%; --s: 9px; --t: 18s; --d: 6s; }
.hero-sparkles i:nth-child(4) { --x: 31%; --s: 5px; --t: 13s; --d: 1.5s; }
.hero-sparkles i:nth-child(5) { --x: 42%; --s: 6px; --t: 16s; --d: 8s; }
.hero-sparkles i:nth-child(6) { --x: 51%; --s: 10px; --t: 20s; --d: 4s; }
.hero-sparkles i:nth-child(7) { --x: 60%; --s: 4px; --t: 11s; --d: 9s; }
.hero-sparkles i:nth-child(8) { --x: 68%; --s: 7px; --t: 17s; --d: 2s; }
.hero-sparkles i:nth-child(9) { --x: 76%; --s: 5px; --t: 14s; --d: 7s; }
.hero-sparkles i:nth-child(10) { --x: 84%; --s: 8px; --t: 19s; --d: 5s; }
.hero-sparkles i:nth-child(11) { --x: 91%; --s: 4px; --t: 12s; --d: 10s; }
.hero-sparkles i:nth-child(12) { --x: 97%; --s: 6px; --t: 15s; --d: 6.5s; }
@keyframes float-up {
  0% { opacity: 0; transform: translate3d(0, 0, 0); }
  12% { opacity: .9; }
  70% { opacity: .55; }
  100% { opacity: 0; transform: translate3d(36px, -92vh, 0); }
}

/* ---------- selector de servicio ---------- */

.choice { transition: border-color .2s, transform .3s var(--ease), box-shadow .3s, background .2s; }
.choice:hover { transform: translateY(-5px); box-shadow: 0 20px 36px -16px var(--cat); }
.choice-icon { transition: transform .35s var(--ease), background .2s, color .2s; }
.choice:hover .choice-icon { transform: rotate(-8deg) scale(1.1); }

/* ---------- catálogo ---------- */

.media-stock img { transition: transform .7s var(--ease); }
.card:hover .media img { transform: scale(1.08); }
.card.tilting {
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-8px);
  transition: transform .1s linear, box-shadow .25s;
}
.card-glare {
  position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0; transition: opacity .35s;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, .32), transparent 55%);
  mix-blend-mode: soft-light;
}
.card.tilting .card-glare { opacity: 1; }
.card .cat-chip {
  align-self: flex-start; padding: 4px 10px 4px 8px; border-radius: 999px; background: var(--cat-soft, var(--sand)); color: var(--ink);
}

/* Catálogo vacío: foto de la categoría, mensaje y botón de WhatsApp. */
.empty-rich {
  position: relative; display: grid; place-items: center; min-height: 360px; padding: 0; overflow: hidden;
  border: 0; border-radius: 30px; color: var(--white); isolation: isolate;
  box-shadow: 0 30px 60px -30px rgba(8, 52, 61, .6);
}
.empty-rich .media { position: absolute; inset: 0; z-index: -2; aspect-ratio: auto; height: 100%; }
.empty-rich::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(4, 30, 37, .35), rgba(4, 30, 37, .82)); }
.empty-body { display: flex; flex-direction: column; align-items: center; gap: 18px; max-width: 34em; padding: 56px 24px; }
.empty-rich .icon { margin: 0; color: inherit; }
.empty-icon {
  display: grid; place-items: center; width: 62px; height: 62px; border-radius: 20px;
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .32); backdrop-filter: blur(10px);
}
.empty-rich p { color: rgba(255, 255, 255, .9); font-size: 1.05rem; }
.empty-rich p strong { display: inline-block; margin-bottom: 6px; font-family: var(--font-display); font-size: 1.7rem; font-weight: 600; color: var(--white); letter-spacing: -.01em; }

/* ---------- cinta de ciudades ---------- */

/* La cinta tapa el borde superior de «Cómo funciona»: queda centrada sobre él (margin-bottom compensa
   el margin-top negativo de la sección) y con poca inclinación para cubrirlo también en pantallas anchas. */
.ribbon + .section-ocean { border-radius: 0; }
.ribbon {
  position: relative; z-index: 2; width: 106%; margin: 0 0 20px -3%; padding: 15px 0; overflow: hidden; transform: rotate(-1.2deg);
  background: linear-gradient(90deg, #e5522f, #f47b45 40%, #ffb052 75%, #ffc75a);
  color: var(--white); box-shadow: 0 20px 44px -18px rgba(198, 58, 31, .6);
}
.ribbon-track { display: flex; width: max-content; animation: marquee 48s linear infinite; }
.ribbon:hover .ribbon-track { animation-play-state: paused; }
.ribbon-run { display: flex; flex: none; align-items: center; gap: 28px; padding-right: 28px; }
.ribbon-run span { font-family: var(--font-display); font-size: 1.4rem; font-style: italic; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; text-shadow: 0 2px 10px rgba(150, 40, 10, .25); }
.ribbon-run .icon { color: rgba(255, 255, 255, .85); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- cómo funciona (foto de atardecer) ---------- */

.section-ocean {
  padding-bottom: 150px;
  background:
    radial-gradient(70% 90% at 90% 0%, rgba(20, 163, 154, .3), transparent 60%),
    linear-gradient(180deg, rgba(5, 34, 41, .9), rgba(5, 34, 41, .78) 45%, rgba(5, 34, 41, .95)),
    var(--photo, none) center 40% / cover no-repeat,
    var(--ocean-deep);
}
.steps li { position: relative; overflow: hidden; background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .14); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.steps li::before {
  content: ''; position: absolute; inset: 0 0 auto; height: 3px;
  background: linear-gradient(90deg, var(--sun), var(--coral)); transform: scaleX(0); transform-origin: 0 50%; transition: transform .5s var(--ease);
}
.steps li:hover::before { transform: scaleX(1); }
.step-num { position: relative; transition: transform .35s var(--ease); }
.step-num::after {
  content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid rgba(255, 199, 90, .55);
  animation: ring 2.8s ease-out infinite;
}
.steps li:nth-child(2) .step-num::after { animation-delay: .9s; }
.steps li:nth-child(3) .step-num::after { animation-delay: 1.8s; }
.steps li:hover .step-num { transform: scale(1.08) rotate(-6deg); }
@keyframes ring { from { transform: scale(.85); opacity: 1; } to { transform: scale(1.45); opacity: 0; } }

/* ---------- destinos ---------- */

.section-dest {
  position: relative; z-index: 2; margin-top: -48px; border-radius: 48px 48px 0 0;
  background: radial-gradient(50% 60% at 100% 0%, rgba(20, 163, 154, .12), transparent 70%), var(--sand);
}
.dest-head { max-width: 40em; margin: 0 auto 40px; text-align: center; }
.dest-head .section-lead { margin-inline: auto; }
.dest-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
.dest-card {
  position: relative; display: block; min-height: 440px; padding: 0; overflow: hidden; isolation: isolate;
  border: 0; border-radius: 34px; background: var(--ocean-deep); color: var(--white); text-align: left; cursor: pointer;
  box-shadow: 0 30px 60px -28px rgba(8, 52, 61, .6);
  transition: transform .35s var(--ease), box-shadow .35s;
}
.dest-card:hover { transform: translateY(-6px); box-shadow: 0 40px 70px -30px rgba(8, 52, 61, .7); }
.dest-card.tilting { transform: perspective(1100px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-6px); transition: transform .1s linear, box-shadow .35s; }
.dest-do { background: linear-gradient(140deg, #ff9d5c, #e2484f); }
.dest-tc { background: linear-gradient(140deg, #5fd6c8, #0b5d68); }
.dest-photo { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.dest-card:hover .dest-photo { transform: scale(1.08); }
.dest-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(4, 30, 37, 0) 30%, rgba(4, 30, 37, .88)); }
.dest-body { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; gap: 6px; padding: 30px; }
.dest-flag { width: max-content; margin-bottom: 8px; overflow: hidden; border: 3px solid rgba(255, 255, 255, .92); border-radius: 12px; line-height: 0; box-shadow: 0 10px 22px rgba(0, 0, 0, .3); }
.dest-flag .flag-svg { border-radius: 0; box-shadow: none; }
.dest-body strong { font-family: var(--font-display); font-size: clamp(1.8rem, 3vw, 2.5rem); font-weight: 600; line-height: 1.05; letter-spacing: -.02em; }
.dest-places { color: rgba(255, 255, 255, .84); font-weight: 600; }
.dest-cta {
  display: inline-flex; align-items: center; gap: 8px; width: max-content; margin-top: 14px; padding: 10px 18px;
  border: 1px solid rgba(255, 255, 255, .38); border-radius: 999px; background: rgba(255, 255, 255, .16);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); font-size: .9rem; font-weight: 800; transition: background .2s, color .2s, gap .2s;
}
.dest-card:hover .dest-cta { gap: 12px; background: var(--white); color: var(--ink); }
.dest-card.is-current { box-shadow: 0 0 0 3px var(--sun), 0 30px 60px -28px rgba(8, 52, 61, .6); }
.dest-card.is-current .dest-cta { border-color: transparent; background: var(--sun); color: var(--ink); }

/* ---------- consulta, contacto y pie ---------- */

#mi-reserva { position: relative; overflow: hidden; isolation: isolate; }
#mi-reserva::before, #mi-reserva::after { content: ''; position: absolute; z-index: -1; border-radius: 50%; pointer-events: none; }
#mi-reserva::before { width: 560px; height: 560px; right: -180px; top: -140px; background: radial-gradient(circle, rgba(20, 163, 154, .16), transparent 70%); }
#mi-reserva::after { width: 420px; height: 420px; left: -160px; bottom: -160px; background: radial-gradient(circle, rgba(244, 93, 63, .1), transparent 70%); }
#mi-reserva .wrap { position: relative; }

.section-sand { background: radial-gradient(60% 80% at 0% 0%, rgba(255, 199, 90, .18), transparent 70%), var(--sand-2); }
.contact-icon { transition: transform .35s var(--ease); }
a.contact-card:hover .contact-icon { transform: translateY(-3px) rotate(-6deg) scale(1.06); }
a.contact-card:hover { transform: translateY(-5px); box-shadow: 0 22px 40px -20px rgba(13, 43, 51, .35); }

.site-footer {
  background:
    radial-gradient(60% 120% at 88% 0%, rgba(20, 163, 154, .32), transparent 60%),
    radial-gradient(40% 90% at 0% 100%, rgba(244, 93, 63, .16), transparent 60%),
    var(--ocean-deep);
}

/* ---------- pantalla de destino ---------- */

.gate { isolation: isolate; background: var(--ocean-deep); }
.gate-bg {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 50% at 15% 10%, rgba(20, 163, 154, .4), transparent 70%),
    linear-gradient(180deg, rgba(4, 30, 37, .84), rgba(4, 30, 37, .62) 50%, rgba(4, 30, 37, .9)),
    var(--photo, none) center / cover no-repeat;
  animation: gate-zoom 40s ease-in-out infinite alternate;
}
@keyframes gate-zoom { to { transform: scale(1.08); } }
.gate-art { overflow: visible; }
.gate-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.gate-card:hover .gate-photo { transform: scale(1.07); }
.gate-body { position: relative; z-index: 1; background: var(--paper); }
.gate-flag { z-index: 3; }
.gate-card { animation: fade-up .8s var(--ease) both; }
.gate-card + .gate-card { animation-delay: .12s; }

/* ---------- móvil ---------- */

@media (max-width: 820px) {
  .dest-grid { grid-template-columns: 1fr; gap: 18px; }
  .dest-card { min-height: 320px; border-radius: 28px; }
}

@media (max-width: 640px) {
  .hero { min-height: clamp(620px, 100svh, 820px); }
  .hero-inner { padding: 112px 0 220px; }
  .hero-shade { background: linear-gradient(180deg, rgba(4, 30, 37, .72), rgba(4, 30, 37, .5) 42%, rgba(4, 30, 37, .78)); }
  .hero-actions { margin-top: 24px; }
  .hero-actions .btn { flex: 1 1 auto; }
  .btn-lg { min-height: 50px; padding: 0 22px; }
  .ribbon { padding: 11px 0; margin-bottom: 11px; }
  .ribbon-run { gap: 20px; padding-right: 20px; }
  .ribbon-run span { font-size: 1.12rem; }
  .section-dest { margin-top: -36px; border-radius: 32px 32px 0 0; }
  .section-ocean { padding-bottom: 120px; }
  .dest-body { padding: 22px; }
  .empty-rich { min-height: 320px; border-radius: 26px; }
}

/* ---------- reducir movimiento ---------- */

@media (prefers-reduced-motion: reduce) {
  .hero-sparkles { display: none; }
  .hero-photo img.is-loaded, .gate-bg, .ribbon-track, .step-num::after, .btn-shine::after { animation: none; }
  body:not(.gate-open) .hero h1 > *, body:not(.gate-open) .hero .eyebrow, body:not(.gate-open) .hero-lead,
  body:not(.gate-open) .hero-actions, body:not(.gate-open) .trust, body:not(.gate-open) .chooser, .gate-card { animation: none; }
  .card.tilting, .dest-card.tilting { transform: none; }
}
