/* Torre Agua Marina — luxury real estate landing */
:root {
  --blue-deep: #143EA4;
  --blue-bright: #2AA1FF;
  --blue-soft: #72B2E2;
  --blue-navy: #113E9B;
  --white: #FFFFFF;
  --sand: #E8DCC2;
  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body: "Montserrat", system-ui, sans-serif;
  --header-h: 4.5rem;
  --radius: 2px;
  --shadow-soft: 0 10px 30px rgba(17, 62, 155, 0.12);
  --transition: 0.28s ease;
  --max: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(0.95rem, 0.9rem + 0.25vw, 1.05rem);
  line-height: 1.65;
  color: var(--blue-navy);
  background: var(--white);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--blue-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color var(--transition), background var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

a:hover {
  color: var(--blue-bright);
}

:focus-visible {
  outline: 2px solid var(--blue-bright);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 1000;
  background: var(--blue-deep);
  color: var(--white);
  padding: 0.75rem 1rem;
}

.skip-link:focus {
  top: 1rem;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.section {
  padding: clamp(3.5rem, 6vw, 6.5rem) 0;
  scroll-margin-top: calc(var(--header-h) + 0.75rem);
}

.section__header {
  max-width: 40rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.section__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.85rem, 1.4rem + 1.8vw, 3rem);
  line-height: 1.15;
  color: var(--blue-navy);
  margin: 0.35rem 0 0.75rem;
}

.section__lead {
  margin: 0;
  color: var(--blue-deep);
  max-width: 36rem;
  font-size: clamp(0.95rem, 0.9rem + 0.2vw, 1.05rem);
}

.section__header--wide,
.section__header--wide .section__lead {
  max-width: none;
}

.section__header--wide .section__lead + .section__lead {
  margin-top: 0.5rem;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--blue-soft);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.85rem 1.35rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: clamp(0.8rem, 0.75rem + 0.2vw, 0.92rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.btn--primary {
  background: var(--blue-deep);
  color: var(--white);
}

.btn--primary:hover {
  background: var(--blue-navy);
  color: var(--white);
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  color: var(--blue-deep);
  border-color: var(--blue-soft);
}

.btn--ghost:hover {
  border-color: var(--blue-deep);
  color: var(--blue-navy);
}

.btn--reservas {
  background: var(--blue-bright);
  color: var(--white);
  border-color: var(--blue-bright);
  box-shadow: 0 8px 20px rgba(42, 161, 255, 0.28);
}

.btn--reservas:hover {
  background: var(--blue-soft);
  border-color: var(--blue-soft);
  color: var(--blue-navy);
}

.icon-external {
  flex-shrink: 0;
  opacity: 0.85;
}

/* Header / Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.nav {
  width: min(100% - 1.5rem, 1240px);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav__logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 1.2rem + 0.6vw, 1.7rem);
  font-weight: 600;
  color: var(--blue-navy);
  text-decoration: none;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand__logo {
  height: 2.75rem;
  width: auto;
  max-width: 9rem;
  object-fit: contain;
  flex-shrink: 0;
}

.nav__logo--footer .brand__logo {
  height: 4rem;
  max-width: 12rem;
}

.nav__toggle {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  background: transparent;
  padding: 0.6rem;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 0.35rem;
}

.nav__toggle-bar {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--blue-navy);
  transition: transform var(--transition), opacity var(--transition);
}

.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav__menu {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.15rem 0.35rem;
}

.nav__link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.45rem 0.55rem;
  color: var(--blue-navy);
  text-decoration: none;
  font-size: clamp(0.68rem, 0.62rem + 0.28vw, 0.82rem);
  font-weight: 500;
  letter-spacing: 0.01em;
  border-radius: var(--radius);
  white-space: nowrap;
}

.nav__link:hover,
.nav__link[aria-current="true"] {
  color: var(--blue-bright);
}

.nav__link--reservas {
  background: var(--blue-bright);
  color: var(--white) !important;
  padding: 0.5rem 0.85rem;
  box-shadow: 0 6px 16px rgba(42, 161, 255, 0.25);
}

.nav__link--reservas:hover {
  background: var(--blue-soft);
  color: var(--blue-navy) !important;
}

.lang-switcher {
  display: inline-flex;
  gap: 0.2rem;
  padding: 0.2rem;
  border: 1px solid var(--blue-soft);
  border-radius: var(--radius);
}

.lang-btn {
  border: 0;
  background: transparent;
  color: var(--blue-navy);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.35rem 0.5rem;
  cursor: pointer;
  border-radius: var(--radius);
}

.lang-btn[aria-pressed="true"],
.lang-btn[aria-current="true"] {
  background: var(--sand);
  color: var(--blue-navy);
}

@media (max-width: 1200px) {
  .nav__toggle {
    display: flex;
    z-index: 120;
  }

  .nav__menu {
    position: absolute;
    top: calc(100% - 0.25rem);
    right: 0.75rem;
    width: min(16rem, calc(100vw - 1.5rem));
    max-height: calc(100dvh - var(--header-h) - 1rem);
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    padding: 0.6rem;
    gap: 0.6rem;
    border-radius: 8px;
    box-shadow: 0 16px 40px rgba(17, 62, 155, 0.22);
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-0.5rem);
    transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
  }

  .nav__menu.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nav__links {
    flex-direction: column;
    align-items: stretch;
    gap: 0.1rem;
  }

  .nav__link {
    display: flex;
    color: var(--blue-navy);
    font-size: 0.88rem;
    padding: 0.45rem 0.75rem;
  }

  .nav__link:hover,
  .nav__link[aria-current="true"] {
    color: var(--blue-bright);
    background: rgba(114, 178, 226, 0.12);
  }

  .nav__link--reservas {
    justify-content: center;
    margin-block: 0.25rem;
  }

  .lang-switcher {
    border-color: var(--blue-soft);
    align-self: center;
  }

  .lang-btn {
    color: var(--blue-navy);
  }

  body.nav-open {
    overflow: hidden;
  }

  body.nav-open::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(17, 62, 155, 0.2);
    z-index: 90;
  }
}

/* Hero */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100dvh - var(--header-h));
  display: grid;
  place-items: center;
  color: var(--white);
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background: url("../assets/img/hero/Inicio.jpg.jpeg") center / cover no-repeat;
  transform: scale(1.02);
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(17, 62, 155, 0.72) 0%, rgba(20, 62, 164, 0.45) 20%, rgba(17, 62, 155, 0.78) 60%);
}

.hero__content {
  position: relative;
  z-index: 1;
  width: min(100% - 2rem, 44rem);
  text-align: center;
  padding: 6rem 0 5rem;
}

.hero__brand {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 1.6rem + 3vw, 4.2rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  margin: 0 0 0.75rem;
  color: var(--white);
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 1.1rem + 1.5vw, 2.35rem);
  font-weight: 500;
  line-height: 1.2;
  margin: 0 0 1rem;
  color: var(--white);
}

.hero__subtitle {
  margin: 0 auto 1.75rem;
  max-width: 34rem;
  font-weight: 300;
  font-size: clamp(0.95rem, 0.88rem + 0.3vw, 1.1rem);
  color: rgba(255, 255, 255, 0.92);
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
}

.hero__scroll {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  width: 1.75rem;
  height: 2.75rem;
  border: 2px solid rgba(255, 255, 255, 0.7);
  border-radius: 1rem;
  display: grid;
  place-items: start center;
  padding-top: 0.4rem;
}

.hero__scroll-mouse {
  width: 0.3rem;
  height: 0.55rem;
  border-radius: 1rem;
  background: var(--sand);
  animation: scrollPulse 1.6s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(0.55rem); opacity: 0.35; }
}

/* Nosotros */
.section--nosotros {
  background: linear-gradient(180deg, var(--white) 0%, rgba(232, 220, 194, 0.28) 100%);
}

.nosotros__grid {
  display: grid;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: start;
}

@media (min-width: 900px) {
  .nosotros__grid {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

.nosotros__block + .nosotros__block {
  margin-top: 1.5rem;
}

.nosotros__block h3 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  margin: 0 0 0.4rem;
  color: var(--blue-deep);
}

.nosotros__block p {
  margin: 0;
}

.valores {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

.nosotros__valores {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
}

.valores__list {
  margin: 0;
  padding-left: 1.15rem;
  display: grid;
  gap: 0.65rem;
}

.valores__list strong {
  font-weight: 700;
  color: var(--blue-deep);
}

.nosotros__gallery {
  display: grid;
  gap: 0.85rem;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
}

@media (min-width: 640px) {
  .nosotros__gallery {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }
}

.nosotros__gallery figure {
  margin: 0;
  overflow: hidden;
  background: var(--sand);
  box-shadow: var(--shadow-soft);
}

.nosotros__gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.nosotros__gallery figure:hover img {
  transform: scale(1.04);
}

.nosotros__media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  box-shadow: var(--shadow-soft);
}

/* Ubicación */
.ubicacion__grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 900px) {
  .ubicacion__grid {
    grid-template-columns: 1.2fr 0.8fr;
    align-items: center;
  }
}

.ubicacion__map {
  aspect-ratio: 16 / 11;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  background: var(--sand);
}

.ubicacion__map iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.info-list {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.info-list strong {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue-soft);
  margin-bottom: 0.2rem;
}

.info-list a {
  text-decoration: none;
  font-weight: 500;
}

/* Torre / Gallery */
.torre__layout {
  display: grid;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: start;
  margin-bottom: 2.5rem;
}

@media (min-width: 900px) {
  .torre__layout {
    grid-template-columns: 1.2fr 0.8fr;
  }
}

.torre__intro {
  display: grid;
  gap: 1rem;
}

.torre__intro p {
  margin: 0;
}

.torre__media {
  margin: 0;
  overflow: hidden;
  background: var(--sand);
  box-shadow: var(--shadow-soft);
}

.torre__media img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

@media (max-width: 899px) {
  .torre__media {
    max-width: 26rem;
  }
}

.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

@media (min-width: 800px) {
  .gallery {
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
  }
}

.gallery__item {
  border: 0;
  padding: 0;
  background: var(--sand);
  cursor: zoom-in;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

.gallery__item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-soft);
}

.gallery__item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.gallery__item:hover img {
  transform: scale(1.04);
}

.torre__cta {
  margin-top: 2rem;
}

/* Amenidades */
.section--amenidades {
  background: var(--blue-navy);
  color: var(--white);
}

.section--amenidades .section__title,
.section--amenidades .eyebrow {
  color: var(--sand);
}

.section--amenidades .section__lead {
  color: rgba(255, 255, 255, 0.85);
}

.amenidades__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
}

@media (min-width: 700px) {
  .amenidades__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1000px) {
  .amenidades__grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.1rem;
  }
}

.amenidad {
  display: grid;
  gap: 0.75rem;
  justify-items: start;
  padding: 1.25rem 1rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(114, 178, 226, 0.25);
  transition: background var(--transition), transform var(--transition), border-color var(--transition);
}

.amenidad:hover {
  background: rgba(42, 161, 255, 0.16);
  border-color: var(--blue-bright);
  transform: translateY(-4px);
}

.amenidad__icon {
  width: 2.25rem;
  height: 2.25rem;
  color: var(--blue-soft);
}

.amenidad h3 {
  margin: 0;
  font-family: var(--font-body);
  font-size: clamp(0.78rem, 0.72rem + 0.25vw, 0.92rem);
  font-weight: 500;
  line-height: 1.35;
  color: var(--white);
}

.amenidades__foto {
  margin-top: clamp(2rem, 4vw, 3rem);
  border: 1px solid rgba(114, 178, 226, 0.35);
  background: rgba(255, 255, 255, 0.06);
}

.amenidades__foto summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  color: var(--sand);
  transition: background var(--transition);
}

.amenidades__foto summary::-webkit-details-marker {
  display: none;
}

.amenidades__foto summary:hover {
  background: rgba(42, 161, 255, 0.16);
}

.amenidades__chevron {
  flex-shrink: 0;
  transition: transform var(--transition);
}

.amenidades__foto[open] .amenidades__chevron {
  transform: rotate(180deg);
}

.amenidades__foto figure {
  margin: 0;
  padding: 0 1.25rem 1.25rem;
}

.amenidades__foto img {
  width: 100%;
  aspect-ratio: 2 / 1;
  object-fit: fill;
}

/* Contacto */
.section--contacto {
  background: linear-gradient(180deg, rgba(114, 178, 226, 0.12), var(--white));
}

.contacto__grid {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 900px) {
  .contacto__grid {
    grid-template-columns: 1.2fr 0.8fr;
  }
}

.contact-form {
  display: grid;
  gap: 1rem;
}

.form-field {
  display: grid;
  gap: 0.35rem;
}

.form-field label {
  font-size: 0.85rem;
  font-weight: 600;
}

.form-field input,
.form-field textarea {
  width: 100%;
  border: 1px solid var(--blue-soft);
  border-radius: var(--radius);
  padding: 0.85rem 0.95rem;
  font: inherit;
  color: var(--blue-navy);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--blue-bright);
  box-shadow: 0 0 0 3px rgba(42, 161, 255, 0.2);
  outline: none;
}

.form-error {
  min-height: 1.1em;
  color: #113E9B;
  font-size: 0.8rem;
  font-weight: 500;
}

.form-status {
  margin: 0.25rem 0 0;
  font-weight: 500;
  min-height: 1.4em;
}

.form-status.is-success {
  color: var(--blue-deep);
}

.form-status.is-error {
  color: var(--blue-navy);
}

.hp-field {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.social {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.social__link {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border: 1px solid var(--blue-soft);
  color: var(--blue-deep);
  border-radius: 50%;
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}

.social__link:hover {
  background: var(--blue-bright);
  color: var(--white);
  border-color: var(--blue-bright);
}

/* Footer */
.site-footer {
  background: var(--blue-soft);
  color: rgba(255, 255, 255, 0.88);
  padding: 3rem 0 2rem;
}

.site-footer .nav__logo {
  color: var(--white);
}

.footer__grid {
  display: grid;
  gap: 1.75rem;
}

@media (min-width: 800px) {
  .footer__grid {
    grid-template-columns: 1.1fr 1fr 1fr;
    align-items: start;
  }
}

.footer__brand p {
  margin: 0.5rem 0 0;
  max-width: 16rem;
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  align-items: flex-start;
}

.footer__links a {
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  font-size: 0.92rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.footer__links a:hover {
  color: var(--sand);
}

.footer__legal {
  font-size: 0.85rem;
}

.footer__legal a {
  color: var(--sand);
}

.footer__legal p {
  margin: 0 0 0.5rem;
}

/* Lightbox */
.lightbox[hidden] {
  display: none !important;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
}

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 62, 155, 0.82);
}

.lightbox__dialog {
  position: relative;
  z-index: 1;
  width: min(92vw, 960px);
  max-height: 90vh;
}

.lightbox__img {
  width: 100%;
  max-height: 80vh;
  object-fit: contain;
  background: var(--blue-navy);
}

.lightbox__close,
.lightbox__prev,
.lightbox__next {
  position: absolute;
  border: 0;
  background: var(--white);
  color: var(--blue-navy);
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  display: grid;
  place-items: center;
}

.lightbox__close {
  top: -0.5rem;
  right: -0.5rem;
}

.lightbox__prev,
.lightbox__next {
  top: 50%;
  transform: translateY(-50%);
}

.lightbox__prev { left: 0.5rem; }
.lightbox__next { right: 0.5rem; }

/* Reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(1.25rem);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .hero__scroll-mouse { animation: none; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
