/* ==========================================================
   Latitud Village — estilos
   Paleta: arena, océano profundo, turquesa de cayo, latón
   ========================================================== */
:root {
  --sand: #f4efe6;
  --sand-2: #ebe3d5;
  --paper: #fbf9f4;
  --ink: #0f2629;
  --ink-soft: #4a5d5f;
  --ocean: #0d3a40;
  --heading: #0d3a40;
  --ocean-2: #0a2d32;
  --lagoon: #3fa7a3;
  --brass: #b98a5a;
  --brass-soft: #d9b98f;
  --line: rgba(15, 38, 41, .14);
  --line-light: rgba(255, 255, 255, .22);

  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 48px);
  --radius: 2px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  transition: background-color .6s var(--ease), color .6s var(--ease);
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; }
p { margin: 0 0 1em; }
em { font-style: italic; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--lagoon); outline-offset: 3px; }

.container { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(80px, 11vw, 150px) 0; }

/* ---------- Tipografía ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase;
  color: var(--brass); margin-bottom: 22px;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.eyebrow--light { color: var(--brass-soft); }
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lagoon); box-shadow: 0 0 0 0 rgba(63,167,163,.7); animation: pulse 2.2s infinite; }
.hero .eyebrow::before { display: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(63,167,163,0); } 100% { box-shadow: 0 0 0 0 rgba(63,167,163,0); } }

.display {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(40px, 5.6vw, 76px); line-height: 1.02; letter-spacing: -.01em;
  color: var(--heading);
}
.display em, .hero__title em, .typology h3 em, .banner__quote em { color: var(--brass); font-weight: 400; }
.display em { white-space: nowrap; }
.display--light { color: #fff; }
.display--light em { color: var(--brass-soft); }
.lead { font-size: clamp(19px, 1.6vw, 22px); line-height: 1.55; color: var(--ink); }
.note { font-size: 12.5px; color: var(--ink-soft); letter-spacing: .02em; margin-top: 18px; }
.note--light { color: rgba(255,255,255,.55); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 16px 30px; border: 1px solid transparent; border-radius: var(--radius);
  font-size: 12.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; text-decoration: none;
  transition: background .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease), transform .35s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn--sand { background: var(--sand); color: var(--heading); }
.btn--sand:hover { background: #fff; }
.btn--ghost { border-color: rgba(255,255,255,.55); color: #fff; }
.btn--ghost:hover { background: rgba(255,255,255,.12); border-color: #fff; }
.btn--light { border-color: rgba(255,255,255,.6); color: #fff; padding: 12px 22px; }
.btn--light:hover { background: #fff; color: var(--heading); }
.btn--dark { background: var(--ocean); color: #fff; }
.btn--dark:hover { background: var(--ocean-2); }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .6; pointer-events: none; }

.link-arrow {
  display: inline-flex; gap: 10px; align-items: center;
  font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; text-decoration: none;
  color: var(--heading); border-bottom: 1px solid var(--brass); padding-bottom: 6px;
}
.link-arrow span { transition: transform .3s var(--ease); }
.link-arrow:hover span { transform: translateX(6px); }

.round-btn {
  width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid var(--line); background: transparent; color: var(--heading); font-size: 18px;
  transition: background .3s, color .3s, border-color .3s;
}
.round-btn:hover { background: var(--ocean); color: #fff; border-color: var(--ocean); }

/* ---------- Navegación ---------- */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; color: #fff; transition: background .4s var(--ease), color .4s, box-shadow .4s; }
.nav__inner { max-width: 1440px; margin: 0 auto; padding: 18px var(--gutter); display: flex; align-items: center; gap: 32px; }
.nav.is-solid { background: rgba(251, 249, 244, .94); color: var(--heading); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--line); }
.nav.is-solid .btn--light { border-color: var(--heading); color: var(--heading); }
.nav.is-solid .btn--light:hover { background: var(--ocean); color: #fff; }

.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.brand__mark { width: 36px; height: 36px; }
.brand__word { font-family: var(--serif); font-size: 26px; line-height: .9; letter-spacing: .04em; display: flex; flex-direction: column; }
.brand__word small { font-family: var(--sans); font-size: 9.5px; letter-spacing: .48em; text-transform: uppercase; margin-top: 4px; font-weight: 500; }

.nav__links { display: flex; gap: 34px; margin-left: auto; }
.nav__links a { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; opacity: .85; position: relative; padding: 4px 0; }
.nav__links a::after { content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .35s var(--ease); }
.nav__links a:hover { opacity: 1; }
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }

.nav__toggle { display: none; margin-left: auto; width: 44px; height: 44px; background: none; border: 0; color: inherit; position: relative; }
.nav__toggle span { position: absolute; left: 10px; right: 10px; height: 1.5px; background: currentColor; transition: transform .3s var(--ease), top .3s; }
.nav__toggle span:first-child { top: 17px; }
.nav__toggle span:last-child { top: 26px; }
.nav__toggle[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }

.mobile-menu { background: var(--paper); color: var(--heading); padding: 8px var(--gutter) 28px; display: flex; flex-direction: column; }
.mobile-menu[hidden] { display: none; }
.mobile-menu a:not(.btn) { font-family: var(--serif); font-size: 30px; text-decoration: none; padding: 10px 0; border-bottom: 1px solid var(--line); }
.mobile-menu .btn { margin-top: 22px; background: var(--ocean); color: #fff; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; color: #fff; overflow: hidden; }
.hero__media { position: absolute; inset: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.12); animation: kenburns 22s var(--ease) forwards; }
@keyframes kenburns { to { transform: scale(1); } }
.hero__shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7,30,34,.5) 0%, rgba(7,30,34,.2) 45%, rgba(7,30,34,0) 70%), linear-gradient(180deg, rgba(7,30,34,.55) 0%, rgba(7,30,34,.05) 35%, rgba(7,30,34,.2) 60%, rgba(7,30,34,.78) 100%); }
.hero__content { text-shadow: 0 2px 24px rgba(4,24,28,.35); position: relative; max-width: var(--wrap); width: 100%; margin: 0 auto; padding: 0 var(--gutter) clamp(90px, 13vh, 150px); }
.hero__title { font-family: var(--serif); font-weight: 400; font-size: clamp(52px, 9vw, 132px); line-height: .95; letter-spacing: -.02em; margin-bottom: 28px; }
.hero__title em { color: var(--brass-soft); }
.hero__lead { max-width: 540px; font-size: clamp(16px, 1.3vw, 19px); color: rgba(255,255,255,.88); margin-bottom: 36px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero__content > * { opacity: 0; transform: translateY(24px); animation: rise 1.1s var(--ease) forwards; }
.hero__content > *:nth-child(2) { animation-delay: .15s; }
.hero__content > *:nth-child(3) { animation-delay: .3s; }
.hero__content > *:nth-child(4) { animation-delay: .45s; }
@keyframes rise { to { opacity: 1; transform: none; } }

.hero__coords { position: absolute; right: var(--gutter); top: 50%; transform: translateY(-50%) rotate(90deg); transform-origin: right center; display: flex; align-items: center; gap: 14px; font-size: 11px; letter-spacing: .3em; color: rgba(255,255,255,.75); }
.hero__coords i { width: 60px; height: 1px; background: rgba(255,255,255,.5); }
.hero__scroll { position: absolute; left: 50%; bottom: 28px; width: 1px; height: 56px; background: rgba(255,255,255,.25); overflow: hidden; }
.hero__scroll span { position: absolute; left: 0; top: -50%; width: 1px; height: 50%; background: #fff; animation: drip 2.2s var(--ease) infinite; }
@keyframes drip { to { top: 100%; } }

/* ---------- Intro ---------- */
.intro__grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(40px, 7vw, 110px); align-items: end; }
.intro__copy p:not(.lead) { color: var(--ink-soft); }
.intro__copy .link-arrow { margin-top: 12px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: clamp(60px, 8vw, 110px); border-top: 1px solid var(--line); }
.stat { padding: 30px 24px 0 0; }
.stat + .stat { padding-left: 24px; border-left: 1px solid var(--line); }
.stat strong { display: block; font-family: var(--serif); font-weight: 500; font-size: clamp(28px, 3vw, 42px); color: var(--heading); line-height: 1.1; }
.stat span { font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.intro__image { position: relative; margin: clamp(60px, 8vw, 110px) 0 0; height: clamp(360px, 70vh, 760px); overflow: hidden; }
.intro__image img { width: 100%; height: 118%; object-fit: cover; will-change: transform; }
.intro__image figcaption, .typology__img::after { position: absolute; right: 16px; bottom: 12px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.8); }

/* ---------- Pilares ---------- */
.pillars { background: var(--sand); }
.section-head { max-width: 760px; margin-bottom: clamp(48px, 6vw, 80px); }
.section-head__lead { color: var(--ink-soft); font-size: 18px; margin-top: 24px; max-width: 600px; }
.pillars__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--line); }
.pillar { padding: 40px 32px 20px 0; }
.pillar + .pillar { padding-left: 32px; border-left: 1px solid var(--line); }
.pillar svg { width: 46px; height: 46px; fill: none; stroke: var(--brass); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 26px; }
.pillar h3 { font-family: var(--serif); font-size: 28px; color: var(--heading); margin-bottom: 14px; line-height: 1.15; }
.pillar p { color: var(--ink-soft); font-size: 15px; }

/* ---------- Carruseles ---------- */
.amenities__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 56px; }
.carousel-controls { display: flex; gap: 12px; flex-shrink: 0; }
.carousel {
  display: flex; gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding: 0 max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter)));
  scroll-padding: 0 max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter)));
  scrollbar-width: none;
}
.carousel::-webkit-scrollbar { display: none; }
.card { flex: 0 0 clamp(270px, 30vw, 420px); margin: 0; scroll-snap-align: start; }
.card--wide { flex-basis: clamp(290px, 46vw, 640px); }
.card img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: transform 1.2s var(--ease); }
.card--wide img { aspect-ratio: 16 / 11; }
.card { overflow: hidden; }
.card > img { transform-origin: center; }
.card:hover img { transform: scale(1.04); }
.card figcaption { padding-top: 22px; }
.card h3 { font-family: var(--serif); font-size: 28px; color: var(--heading); margin-bottom: 8px; }
.card p { color: var(--ink-soft); font-size: 15px; max-width: 360px; }
.carousel-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 28px; }
.carousel-foot .note { margin: 0; }

/* ---------- Residencias ---------- */
.residences { background: var(--sand); }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 48px; overflow-x: auto; scrollbar-width: none; }
.tabs button { background: none; border: 0; padding: 16px 22px; font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); position: relative; white-space: nowrap; }
.tabs button::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--brass); transform: scaleX(0); transition: transform .4s var(--ease); }
.tabs button[aria-selected="true"] { color: var(--heading); }
.tabs button[aria-selected="true"]::after { transform: scaleX(1); }

.typology { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(32px, 5vw, 80px); align-items: center; animation: fade .6s var(--ease); }
.typology[hidden] { display: none; }
@keyframes fade { from { opacity: 0; transform: translateY(10px); } }
.typology__img { position: relative; overflow: hidden; }
.typology__img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.typology__img::after { content: "Imagen referencial"; }
.typology h3 { font-family: var(--serif); font-size: clamp(38px, 4vw, 56px); color: var(--heading); line-height: 1; margin-bottom: 20px; }
.typology__info > p:not(.eyebrow) { color: var(--ink-soft); }
.specs { display: grid; grid-template-columns: 1fr 1fr; margin: 30px 0 36px; border-top: 1px solid var(--line); }
.specs div { padding: 16px 0; border-bottom: 1px solid var(--line); }
.specs dt { font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); }
.specs dd { margin: 2px 0 0; font-family: var(--serif); font-size: 30px; color: var(--heading); }

.features { margin-top: clamp(70px, 9vw, 120px); padding: clamp(32px, 4vw, 56px); background: var(--paper); }
.features__title { font-family: var(--serif); font-size: 32px; line-height: 1.15; color: var(--heading); margin-bottom: 28px; }
.features ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px 40px; }
.features li { display: flex; align-items: center; gap: 16px; font-size: 15px; }
.features svg { flex-shrink: 0; width: 28px; height: 28px; fill: none; stroke: var(--brass); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.carousel--interiors { margin-top: clamp(70px, 9vw, 120px); }

/* ---------- Banner ---------- */
.banner { position: relative; height: clamp(420px, 80vh, 820px); overflow: hidden; display: grid; place-items: center; text-align: center; }
.banner img { position: absolute; inset: -10% 0; width: 100%; height: 120%; object-fit: cover; will-change: transform; }
.banner::after { content: ""; position: absolute; inset: 0; background: rgba(7, 30, 34, .35); }
.banner__text { position: relative; z-index: 1; padding: 0 var(--gutter); }
.banner__quote { font-family: var(--serif); font-size: clamp(40px, 6.5vw, 96px); line-height: 1.02; color: #fff; margin: 0; }
.banner__quote em { color: var(--brass-soft); }

/* ---------- Ubicación ---------- */
.location { background: var(--ocean); color: #fff; }
.location__grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(40px, 7vw, 110px); }
.location__lead { color: rgba(255,255,255,.78); font-size: 18px; margin: 28px 0 44px; max-width: 520px; }
.distances { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line-light); }
.distances div { padding: 20px 0; border-bottom: 1px solid var(--line-light); }
.distances div:nth-child(odd) { padding-right: 20px; }
.distances div:nth-child(even) { padding-left: 20px; border-left: 1px solid var(--line-light); }
.distances strong { display: block; font-family: var(--serif); font-weight: 500; font-size: 34px; color: var(--brass-soft); line-height: 1.1; }
.distances span { font-size: 12.5px; letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.7); }

.location__list { align-self: center; }
.location__list details { border-top: 1px solid var(--line-light); }
.location__list details:last-child { border-bottom: 1px solid var(--line-light); }
.location__list summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; padding: 26px 0; font-family: var(--serif); font-size: 30px; }
.location__list summary::-webkit-details-marker { display: none; }
.location__list summary span { font-family: var(--sans); font-size: 22px; font-weight: 300; transition: transform .35s var(--ease); }
.location__list details[open] summary span { transform: rotate(45deg); }
.location__list ul { list-style: none; margin: 0; padding: 0 0 28px; columns: 2; column-gap: 28px; }
.location__list li { padding: 6px 0; color: rgba(255,255,255,.8); font-size: 15px; break-inside: avoid; }
.location__list li::before { content: "—"; color: var(--brass-soft); margin-right: 10px; }

.map { position: relative; margin-top: clamp(60px, 8vw, 100px); }
.map__btn { position: absolute; right: calc(var(--gutter) + 16px); bottom: 16px; z-index: 1; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.map iframe { width: 100%; height: 440px; border: 0; filter: grayscale(.35) contrast(1.05); }
.mosaic { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 16px; margin-top: 16px; }
.mosaic img { width: 100%; height: 300px; object-fit: cover; }

/* ---------- Registro ---------- */
.register__grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(40px, 7vw, 110px); }
.register__aside p:not(.eyebrow) { color: var(--ink-soft); font-size: 17px; margin-top: 24px; max-width: 460px; }
.register__img { margin: 40px 0 0; }
.register__img img { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; }

.form { display: flex; flex-direction: column; gap: 22px; background: var(--sand); padding: clamp(28px, 4vw, 56px); align-self: start; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.form label { display: flex; flex-direction: column; gap: 8px; font-size: 11.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.form input:not([type="checkbox"]), .form select, .form textarea {
  font: 400 16px/1.4 var(--sans); color: var(--ink); letter-spacing: 0; text-transform: none;
  background: transparent; border: 0; border-bottom: 1px solid rgba(15,38,41,.3); border-radius: 0;
  padding: 10px 0; transition: border-color .3s; width: 100%;
}
.form select { appearance: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%230d3a40' stroke-width='1.3'/%3E%3C/svg%3E") no-repeat right 4px center; padding-right: 24px; }
.form textarea { resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-bottom-color: var(--brass); }
.form .is-invalid { border-bottom-color: #b44a3c !important; }
.form .check { flex-direction: row; align-items: flex-start; gap: 12px; text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 400; color: var(--ink-soft); cursor: pointer; }
.form .check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--heading); flex-shrink: 0; }
.form__agency[hidden] { display: none; }
.form .btn { margin-top: 8px; padding: 20px; }
.form__status { margin: 0; font-size: 15px; min-height: 1.5em; }
.form__status.ok { color: #1f7a5a; }
.form__status.err { color: #b44a3c; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form.is-done > *:not(.form__status) { display: none; }
.form.is-done .form__status { font-family: var(--serif); font-size: 30px; line-height: 1.25; color: var(--heading); }

/* ---------- Footer ---------- */
.footer { background: var(--ocean-2); color: rgba(255,255,255,.75); padding: 90px 0 36px; font-size: 15px; }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 60px; border-bottom: 1px solid var(--line-light); }
.brand--footer { color: #fff; }
.footer__tag { font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--brass-soft); margin-top: 22px; }
.footer h4 { font-size: 11.5px; letter-spacing: .2em; text-transform: uppercase; color: #fff; font-weight: 600; margin-bottom: 16px; }
.footer a { text-decoration: none; }
.footer a:hover { color: #fff; }
.footer__social a, .footer__contact a { display: block; }
.footer__legal { display: grid; grid-template-columns: auto 1fr; gap: 40px; padding-top: 28px; font-size: 12.5px; color: rgba(255,255,255,.5); }
.footer__legal p:last-child { text-align: right; }

/* ---------- WhatsApp ---------- */
.wa { position: fixed; right: 22px; bottom: 22px; z-index: 40; width: 58px; height: 58px; border-radius: 50%; background: #25d366; color: #fff; display: grid; place-items: center; box-shadow: 0 10px 30px rgba(0,0,0,.2); transition: transform .3s var(--ease); }
.wa[hidden] { display: none; }
.wa:hover { transform: scale(1.08); }
.wa svg { width: 30px; height: 30px; }

/* ---------- Selector día / noche ---------- */
.theme-switch {
  position: fixed; left: 22px; bottom: 22px; z-index: 40;
  display: flex; gap: 2px; padding: 3px; border-radius: 999px;
  background: rgba(251, 249, 244, .82); border: 1px solid var(--line);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 6px 20px rgba(7, 30, 34, .14);
}
.theme-switch button {
  width: 30px; height: 30px; border: 0; border-radius: 50%; padding: 0;
  display: grid; place-items: center; background: transparent; color: var(--ink-soft);
  transition: background .35s var(--ease), color .35s var(--ease), transform .35s var(--ease);
}
.theme-switch button { position: relative; }
.theme-switch button::before { content: ""; position: absolute; inset: -7px; }
.theme-switch button:hover { color: var(--heading); transform: scale(1.08); }
.theme-switch svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.theme-switch [data-theme-set="dark"] svg { fill: currentColor; stroke-width: 1.2; }
:root[data-theme="light"] .theme-switch [data-theme-set="light"] { background: var(--brass); color: #fff; }
:root[data-theme="dark"] .theme-switch [data-theme-set="dark"] { background: var(--brass); color: #0a1517; }

/* ---------- Hero día / noche ---------- */
.hero__img { position: absolute; inset: 0; transition: opacity 1.4s var(--ease); }
.hero__img--night { opacity: 0; }
.hero__caption {
  position: absolute; right: var(--gutter); bottom: 84px; margin: 0;
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.7);
  transition: opacity 1s var(--ease);
}
.hero__caption--night, :root[data-theme="dark"] .hero__caption--day { display: none; }
:root[data-theme="dark"] .hero__caption--night { display: inline; }
:root[data-theme="dark"] .hero__img--night { opacity: 1; }
:root[data-theme="dark"] .hero__img--day { opacity: 0; }
:root[data-theme="dark"] .hero__shade { background: linear-gradient(90deg, rgba(4,12,24,.62) 0%, rgba(4,12,24,.3) 45%, rgba(4,12,24,0) 70%), linear-gradient(180deg, rgba(4,12,24,.5) 0%, rgba(4,12,24,0) 30%, rgba(4,12,24,.15) 55%, rgba(4,12,24,.85) 100%); }

/* ---------- Paleta nocturna ---------- */
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0a1517;
  --sand: #0f1f22;
  --sand-2: #13272a;
  --ink: #e6e0d5;
  --ink-soft: #9aabab;
  --heading: #f2ece1;
  --ocean: #0e2b30;
  --ocean-2: #060e10;
  --brass: #cfa274;
  --brass-soft: #e0c29b;
  --line: rgba(255, 255, 255, .11);
  --line-light: rgba(255, 255, 255, .16);
}
:root[data-theme="dark"] .nav.is-solid { background: rgba(10, 21, 23, .9); box-shadow: 0 1px 0 var(--line); }
:root[data-theme="dark"] .btn--sand { background: var(--brass-soft); color: #0a1517; }
:root[data-theme="dark"] .btn--sand:hover { background: #f2ece1; }
:root[data-theme="dark"] .btn--light:hover { background: #f2ece1; color: #0a1517; }
:root[data-theme="dark"] .btn--dark,
:root[data-theme="dark"] .mobile-menu .btn { background: var(--brass); color: #0a1517; }
:root[data-theme="dark"] .btn--dark:hover { background: var(--brass-soft); }
:root[data-theme="dark"] .round-btn:hover { background: var(--brass); border-color: var(--brass); color: #0a1517; }
:root[data-theme="dark"] .location { background: var(--ocean); }
:root[data-theme="dark"] .features { background: var(--sand-2); }
:root[data-theme="dark"] .form { background: var(--sand-2); }
:root[data-theme="dark"] .form input:not([type="checkbox"]),
:root[data-theme="dark"] .form select,
:root[data-theme="dark"] .form textarea { border-bottom-color: rgba(255, 255, 255, .25); }
:root[data-theme="dark"] .form select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23e6e0d5' stroke-width='1.3'/%3E%3C/svg%3E"); }
:root[data-theme="dark"] .form select option { background: #13272a; color: #e6e0d5; }
:root[data-theme="dark"] .form__status.ok { color: #6fd0a6; }
:root[data-theme="dark"] .form__status.err { color: #f08a7a; }
:root[data-theme="dark"] .theme-switch { background: rgba(15, 31, 34, .82); box-shadow: 0 6px 20px rgba(0, 0, 0, .35); }
:root[data-theme="dark"] main img:not(.hero__img) { filter: brightness(.86) saturate(.95); }
:root[data-theme="dark"] .map iframe { filter: invert(.9) hue-rotate(180deg) grayscale(.3) contrast(.95); }
.pillars, .residences, .location, .footer, .features, .form, .card h3, .display, .stat strong {
  transition: background-color .6s var(--ease), color .6s var(--ease);
}

/* ---------- Revelado al hacer scroll ---------- */
.reveal { opacity: 0; transform: translateY(36px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.pillars__grid .pillar:nth-child(2) { transition-delay: .1s; }
.pillars__grid .pillar:nth-child(3) { transition-delay: .2s; }
.pillars__grid .pillar:nth-child(4) { transition-delay: .3s; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .nav__links { display: none; }
  .nav__cta { margin-left: auto; }
  .nav__toggle { display: block; margin-left: 0; }
  .pillars__grid { grid-template-columns: 1fr 1fr; }
  .pillar:nth-child(3) { padding-left: 0; border-left: 0; }
  .pillar:nth-child(n+3) { border-top: 1px solid var(--line); }
  .features ul { grid-template-columns: 1fr 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .intro__grid, .typology, .location__grid, .register__grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { padding-left: 0; border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); margin-top: 26px; }
  .hero__coords { display: none; }
  .mosaic { grid-template-columns: 1fr 1fr; }
  .mosaic img:first-child { grid-column: span 2; }
  .mosaic img { height: 220px; }
  .map iframe { height: 340px; }
  .footer__legal { grid-template-columns: 1fr; gap: 10px; }
  .footer__legal p:last-child { text-align: left; }
}
@media (max-width: 600px) {
  body { font-size: 15px; }
  /* Menú a pantalla completa */
  .mobile-menu { min-height: calc(100svh - 80px); padding-bottom: 40px; }
  .mobile-menu a:not(.btn) { padding: 16px 0; }
  /* Pestañas: las tres siempre visibles */
  .tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; overflow: visible; }
  .tabs button { padding: 14px 4px; font-size: 11.5px; letter-spacing: .06em; white-space: normal; line-height: 1.3; min-height: 56px; }
  /* Textos pequeños más legibles */
  .form label, .specs dt, .footer h4, .stat span, .distances span { font-size: 12.5px; }
  .eyebrow { font-size: 12px; letter-spacing: .18em; }
  /* Zonas táctiles cómodas */
  .link-arrow { padding: 12px 0 8px; }
  .form .check { padding: 6px 0; min-height: 44px; align-items: center; }
  .footer__social a, .footer__contact a { padding: 10px 0; }
  .location__list li { padding: 8px 0; }
  /* Espacios más compactos */
  .section { padding: 72px 0; }
  .intro__image { height: 56vh; }
  .features { padding: 28px 20px; }
  .register__img { display: none; }
  .form { padding: 28px 20px; margin: 0 calc(var(--gutter) * -1); }
  .typology h3 { font-size: 40px; }
  .banner { height: 60vh; }
  /* Que el selector flotante no tape el final de la página */
  .footer { padding-bottom: 96px; }
  .hero__content { padding-bottom: 96px; }
  .map { display: flex; flex-direction: column; }
  .map__btn { position: static; order: 2; margin-top: 12px; box-shadow: none; }
  .hero__shade { background: linear-gradient(180deg, rgba(7,30,34,.45) 0%, rgba(7,30,34,.08) 22%, rgba(7,30,34,.5) 48%, rgba(7,30,34,.86) 100%); }
  /* Títulos: que el texto fluya natural en pantallas angostas */
  .display br, .banner__quote br { display: none; }
  .banner__quote { font-size: 38px; }
  .nav__cta { display: none; }
  .nav__toggle { margin-left: auto; }
  .hero__actions .btn { flex: 1 1 100%; }
  .pillars__grid { grid-template-columns: 1fr; }
  .pillar, .pillar + .pillar { padding: 32px 0 12px; border-left: 0; }
  .pillar + .pillar { border-top: 1px solid var(--line); }
  .amenities__head { flex-direction: column; align-items: flex-start; }
  .amenities__head .carousel-controls { display: none; }
  .carousel-foot .carousel-controls { display: none; }
  .features ul { grid-template-columns: 1fr; }
  .form__row { grid-template-columns: 1fr; }
  .location__list ul { columns: 1; }
  .location__list summary { font-size: 26px; }
  .footer__grid { grid-template-columns: 1fr; }
  .stat strong { font-size: 26px; }
  .theme-switch { left: 14px; bottom: 14px; }
  .wa { right: 14px; bottom: 14px; width: 52px; height: 52px; }
  .hero__caption { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
