/* Hotel Las Brisas — landing
   Marca: TAN Meringue (títulos, como SVG), Montserrat (etiquetas/UI), Poppins (texto). */

:root {
  --verde: #0B3833;
  --verde-oscuro: #082A26;
  --violeta: #79438F;
  --violeta-claro: #B794C9;
  --agua: #5FBFB0;
  --arena: #F5F0E8;
  --espuma: #FBF9F5;
  --bruma: #566966;
  --lila: #ECE3F1;
  --linea: #E4DDD1;

  --f-ui: 'Montserrat', system-ui, sans-serif;
  --f-body: 'Poppins', system-ui, sans-serif;
  --ease-out: cubic-bezier(.2, .7, .2, 1);
  --ease-inout: cubic-bezier(.7, 0, .2, 1);
  --nav-h: 84px;
  --th: clamp(46px, 5.6vw, 74px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--arena);
  color: var(--verde);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, ul, dl { margin: 0; }
ul { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--violeta); outline-offset: 3px; border-radius: 4px; }
body.is-loading { overflow: hidden; }

.container { width: min(1280px, 100% - 48px); margin-inline: auto; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 200;
  padding: 12px 20px; background: var(--verde); color: var(--arena);
  font-family: var(--f-ui); font-weight: 600; border-radius: 999px; text-decoration: none;
}
.skip-link:focus { top: 16px; }

/* ---------- Tipografía base ---------- */
.eyebrow {
  font-family: var(--f-ui); font-size: 13px; font-weight: 600;
  letter-spacing: .32em; text-transform: uppercase; color: var(--violeta);
}
.eyebrow--light { color: var(--agua); }
.title img { width: min(100%, calc(var(--th) * var(--r))); height: auto; }
.title--desc img { width: min(100%, calc(var(--th) * 1.29 * var(--r))); }
.subtitle { font-family: var(--f-ui); font-size: clamp(19px, 2vw, 24px); color: var(--violeta); line-height: 1.4; }
.body { font-weight: 300; max-width: 60ch; }
.link {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  font-family: var(--f-ui); font-size: 13px; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; text-decoration: none; color: var(--violeta);
}
.link::after { content: '→'; transition: transform .3s var(--ease-out); }
.link:hover::after { transform: translateX(4px); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px;
  padding: 0 30px; border-radius: 999px; border: 1px solid transparent;
  font-family: var(--f-ui); font-size: 13px; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; text-decoration: none; white-space: nowrap;
  transition: background-color .3s, color .3s, border-color .3s;
}
.btn--solid { background: var(--verde); color: var(--arena); }
.btn--solid:hover { background: var(--violeta); }
.btn--ghost { border-color: var(--verde); color: var(--verde); }
.btn--ghost:hover { background: var(--verde); color: var(--arena); }
.btn--light { background: var(--arena); color: var(--verde); }
.btn--light:hover { background: var(--violeta-claro); }
.btn--ghost-light { border-color: var(--arena); color: var(--arena); }
.btn--ghost-light:hover { background: var(--arena); color: var(--verde); }

/* ---------- Ondas (las genera main.js) ---------- */
.waves { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.waves svg {
  /* en pantallas angostas las ondas no se comprimen: se recortan a los lados */
  width: max(100%, 1000px); height: 100%; max-width: none;
  margin-left: calc((100% - max(100%, 1000px)) / 2);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
}
.wave { animation: drift var(--dur) linear infinite; animation-direction: var(--dir, normal); }
.wave path {
  fill: none; stroke-width: var(--sw, 1.5); stroke-linecap: round; vector-effect: non-scaling-stroke;
  stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: draw 2.6s var(--delay, 0s) var(--ease-out) forwards;
}
@keyframes drift { to { transform: translateX(-1440px); } }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- Pantalla de carga ---------- */
.loader { display: none; }
.js .loader {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  background: var(--verde); color: var(--arena);
}
.loader__edge {
  position: absolute; left: 0; top: calc(100% - 1px); width: 100%; height: 90px;
  fill: var(--verde);
}
.loader__content {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: clamp(22px, 3vw, 34px);
  padding: 0 24px; transition: opacity .5s, transform .6s var(--ease-out);
}
.loader__mark {
  width: clamp(84px, 10vw, 124px); height: auto; color: var(--violeta-claro);
  opacity: 0; transform: translateY(14px) scale(.9);
  animation: mark-in 1.1s .15s var(--ease-out) forwards;
}
.wing-up, .wing-down, .wing-loop { transform-box: view-box; transform-origin: 48px 68px; }
.loader__mark .wing-up, .mark-flight .wing-up { animation: flap-up 1.5s ease-in-out infinite; }
.loader__mark .wing-down, .mark-flight .wing-down { animation: flap-down 1.5s ease-in-out infinite; }
.loader__mark .wing-loop, .mark-flight .wing-loop { animation: flap-up 1.5s .08s ease-in-out infinite; }
.loader__wordmark {
  width: min(80vw, 660px); height: auto;
  clip-path: inset(0 100% 0 0);
  animation: wipe 1.4s .75s var(--ease-inout) forwards;
}
.loader__place {
  font-family: var(--f-ui); font-size: clamp(11px, 1.2vw, 14px); font-weight: 500;
  letter-spacing: .5em; padding-left: .5em; text-transform: uppercase; color: var(--agua);
  opacity: 0; animation: fade-in 1s 1.7s forwards;
}
.loader.is-leaving .loader__content { opacity: 0; transform: translateY(-16px); }
.mark-flight { position: fixed; z-index: 101; margin: 0; transform-origin: 0 0; pointer-events: none; color: var(--violeta-claro); }

@keyframes mark-in { to { opacity: 1; transform: none; } }
@keyframes flap-up { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-16deg) scale(.94); } }
@keyframes flap-down { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(9deg); } }
@keyframes wipe { to { clip-path: inset(0 0 0 0); } }
@keyframes fade-in { to { opacity: 1; } }

/* ---------- Navegación ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--nav-h);
  transition: background-color .4s, box-shadow .4s, opacity .8s;
}
.js .nav { opacity: 0; }
.js body.is-ready .nav { opacity: 1; }
.nav.is-scrolled {
  background: rgba(245, 240, 232, .9);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(11, 56, 51, .08);
}
.nav__inner {
  width: min(1280px, 100% - 48px); height: 100%; margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.nav__brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-height: 44px; }
.nav__mark { width: 40px; height: 40px; color: var(--violeta); }
.js .nav__mark { opacity: 0; }
.js .nav.mark-landed .nav__mark { opacity: 1; }
.nav__wordmark { width: 150px; height: auto; }
.nav__links { display: flex; align-items: center; gap: clamp(20px, 2.6vw, 40px); font-family: var(--f-ui); font-size: 14px; font-weight: 500; }
.nav__links a:not(.btn) { position: relative; padding: 12px 0; text-decoration: none; }
.nav__links a:not(.btn)::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 4px; height: 2px;
  background: var(--violeta); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease-out);
}
.nav__links a:not(.btn):hover::after, .nav__links a[aria-current="true"]::after { transform: scaleX(1); }
.nav__cta-mobile { display: none; }
.nav__toggle { display: none; }

@media (max-width: 1080px) {
  .nav__cta { display: none; }
  .nav__toggle {
    display: grid; place-content: center; gap: 7px; width: 48px; height: 48px;
    border: 0; border-radius: 999px; background: transparent; cursor: pointer; position: relative; z-index: 2;
  }
  .nav__toggle span { display: block; width: 24px; height: 2px; background: var(--verde); transition: transform .35s var(--ease-out); }
  .nav__toggle[aria-expanded="true"] span:first-child { transform: translateY(4.5px) rotate(45deg); }
  .nav__toggle[aria-expanded="true"] span:last-child { transform: translateY(-4.5px) rotate(-45deg); }
  .nav__links {
    position: fixed; inset: 0; z-index: 1; flex-direction: column; justify-content: center; gap: 8px;
    background: var(--arena); font-size: 22px;
    opacity: 0; visibility: hidden; transition: opacity .35s, visibility 0s .35s;
  }
  .menu-open .nav__links { opacity: 1; visibility: visible; transition: opacity .35s; }
  .menu-open { overflow: hidden; }
  /* backdrop-filter haría que el panel fijo se mida contra la barra */
  .menu-open .nav { -webkit-backdrop-filter: none; backdrop-filter: none; }
  .nav__brand { position: relative; z-index: 2; }
  .nav__cta-mobile { display: inline-flex; margin-top: 24px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; padding-top: var(--nav-h); overflow: hidden;
}
.waves--hero { top: 46%; bottom: 90px; opacity: .7; }
.hero__inner {
  position: relative; flex: 1; width: min(1280px, 100% - 48px); margin-inline: auto;
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; gap: 48px;
  padding: 40px 0 64px;
}
.hero__text { display: flex; flex-direction: column; align-items: flex-start; gap: 22px; }
.hero__title { --th: clamp(56px, 6.6vw, 92px); }
.hero__title img { width: min(100%, calc(var(--th) * var(--r))); height: auto; }
.hero__sub { font-family: var(--f-ui); font-size: clamp(20px, 2vw, 26px); color: var(--violeta); line-height: 1.35; }
.hero__lead { font-size: 18px; font-weight: 300; max-width: 30em; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }
.hero__address { font-size: 14px; color: var(--bruma); }

.hero__media { position: relative; justify-self: end; width: min(440px, 100%); margin-right: 40px; }
.hero__photo { object-fit: cover; }
.hero__photo--main { width: 100%; aspect-ratio: 11 / 14; height: auto; border-radius: 999px 999px 6px 6px; }
.hero__photo--small {
  position: absolute; left: -32%; bottom: -6%; width: 48%; aspect-ratio: 4 / 5; height: auto;
  border-radius: 999px 999px 6px 6px; border: 8px solid var(--arena);
}
.hero__butterfly {
  position: absolute; right: -60px; top: -20px; width: 84px; height: 84px; color: var(--violeta);
  animation: float 6s ease-in-out infinite;
}
@keyframes float { 0%, 100% { transform: translate(0, 0) rotate(-8deg); } 50% { transform: translate(-6px, -12px) rotate(-2deg); } }

.strip {
  position: relative; background: var(--verde); color: var(--arena);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px;
  padding: 34px max(24px, calc((100% - 1280px) / 2));
  font-size: 15px; line-height: 1.4;
}
.strip li { display: flex; align-items: center; gap: 14px; }
.strip svg, .services__list svg, .contact__list svg {
  flex: none; width: 28px; height: 28px; fill: none; stroke: var(--agua);
  stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}

/* Entrada del hero (después de la pantalla de carga) */
.js .enter { opacity: 0; transform: translateY(18px); }
.js .is-ready .enter {
  opacity: 1; transform: none;
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
  transition-delay: calc(var(--d) * 90ms + 250ms);
}
.js .hero__photo--main { clip-path: inset(100% 0 0 0); }
.js .is-ready .hero__photo--main { clip-path: inset(0 0 0 0); transition: clip-path 1.4s .2s var(--ease-inout); }
.js .hero__photo--small, .js .hero__butterfly { opacity: 0; }
.js .is-ready .hero__photo--small { opacity: 1; transition: opacity 1s .9s; }
.js .is-ready .hero__butterfly { opacity: 1; transition: opacity 1s 1.3s; }

@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; gap: 56px; padding: 24px 0 72px; }
  .hero__media { justify-self: center; width: min(340px, 72%); margin: 0 0 0 14%; }
  .hero__butterfly { right: -36px; width: 60px; height: 60px; }
  .waves--hero { top: 52%; }
  .strip { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-block: 28px; }
}
@media (max-width: 480px) {
  .hero__actions .btn { flex: 1 1 100%; }
  .strip { grid-template-columns: 1fr; gap: 16px; }
}

/* ---------- Secciones ---------- */
.section { position: relative; padding: clamp(88px, 11vw, 150px) 0; }
.reveal { transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
.js .reveal { opacity: 0; transform: translateY(26px); }
.js .reveal.is-visible { opacity: 1; transform: none; }

.section__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px 64px; margin-bottom: 56px; }
.section__head > div { display: flex; flex-direction: column; gap: 18px; }
.section__intro { max-width: 520px; color: var(--bruma); }

/* Nosotros */
.about { background: var(--espuma); }
.about__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(48px, 7vw, 110px); align-items: center; }
.about__media img { width: 100%; aspect-ratio: 4 / 5; height: auto; object-fit: cover; border-radius: 6px; }
.about__text { display: flex; flex-direction: column; gap: 20px; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 20px; padding-top: 28px; border-top: 1px solid var(--linea); }
.facts dt { font-family: var(--f-ui); font-size: clamp(26px, 3vw, 36px); font-weight: 500; color: var(--violeta); line-height: 1.1; }
.facts dd { margin: 6px 0 0; font-size: 14px; line-height: 1.5; color: var(--bruma); }

/* Habitaciones */
.rooms__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.room { display: flex; flex-direction: column; gap: 10px; }
.room img { width: 100%; aspect-ratio: 4 / 5; height: auto; object-fit: cover; border-radius: 6px; margin-bottom: 10px; transition: transform .8s var(--ease-out); }
.room:hover img { transform: translateY(-6px); }
.room h3 { font-family: var(--f-ui); font-size: 20px; font-weight: 500; line-height: 1.3; }
.room p { font-size: 15px; font-weight: 300; line-height: 1.6; color: var(--bruma); flex: 1; }
.rooms__grid .room:nth-child(2) { transition-delay: .08s; }
.rooms__grid .room:nth-child(3) { transition-delay: .16s; }

/* Servicios */
.services { background: var(--lila); }
.services__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(48px, 7vw, 110px); align-items: center; }
.services__text { display: flex; flex-direction: column; gap: 22px; }
.services__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 32px; margin-top: 16px; }
.services__list li { display: flex; gap: 16px; align-items: flex-start; }
.services__list svg { stroke: var(--violeta); }
.services__list h3 { font-family: var(--f-ui); font-size: 16px; font-weight: 600; line-height: 1.4; }
.services__list p { font-size: 15px; font-weight: 300; line-height: 1.55; color: var(--bruma); }
.services__media img { width: 100%; aspect-ratio: 4 / 5; height: auto; object-fit: cover; border-radius: 999px 999px 6px 6px; }

/* Ubicación */
.location__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(48px, 6vw, 96px); align-items: center; }
.location__text { display: flex; flex-direction: column; gap: 20px; }
.places { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; font-size: 15px; }
.places li { display: flex; align-items: center; gap: 12px; }
.places li::before { content: ''; flex: none; width: 18px; height: 2px; border-radius: 2px; background: var(--agua); }
.address { display: flex; flex-direction: column; gap: 2px; padding: 20px 24px; background: var(--espuma); border: 1px solid var(--linea); border-radius: 6px; align-self: stretch; }
.address__label { font-family: var(--f-ui); font-size: 12px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--bruma); }
.address__value { font-family: var(--f-ui); font-size: 19px; font-weight: 500; }
.location__map iframe { display: block; width: 100%; aspect-ratio: 7 / 6; height: auto; border: 0; border-radius: 6px; background: var(--linea); }

/* Contacto */
.contact { background: var(--verde); color: var(--arena); overflow: hidden; }
.waves--contact { top: auto; height: 320px; opacity: .55; }
.contact__grid { position: relative; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(48px, 7vw, 110px); align-items: center; }
.contact__text { display: flex; flex-direction: column; gap: 22px; }
.contact .body { color: var(--arena); }
.contact__list { display: flex; flex-direction: column; gap: 14px; font-size: 16px; }
.contact__list li { display: flex; align-items: center; gap: 14px; }
.contact__list a { text-decoration: none; padding: 8px 0; border-bottom: 1px solid transparent; transition: border-color .3s; overflow-wrap: anywhere; }
.contact__list a:hover { border-color: var(--agua); }
.contact__media img { width: 100%; aspect-ratio: 4 / 5; height: auto; object-fit: cover; border-radius: 999px 999px 6px 6px; }

/* Footer */
.footer { background: var(--verde-oscuro); color: var(--arena); padding: 40px 0; font-size: 14px; }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; }
.footer__mark { color: var(--violeta-claro); }
.js .footer__mark { opacity: 1; }
.footer .nav__wordmark { width: 130px; }

@media (max-width: 760px) {
  .rooms__grid { grid-template-columns: 1fr; max-width: 440px; }
}
@media (max-width: 860px) {
  .about__grid, .services__grid, .location__grid, .contact__grid { grid-template-columns: 1fr; }
  .about__media { max-width: 420px; }
  .services__media, .contact__media { max-width: 380px; width: 80%; justify-self: center; }
}
@media (max-width: 560px) {
  .services__list { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; gap: 16px; }
  .places { grid-template-columns: 1fr; }
}

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .wave { animation: none; }
}
