/* Conjunto Cerrado Altavista — estilos */

:root {
  --ink: #0e2240;
  --ink-2: #44536a;
  --ink-3: #66748a;
  --bg: #ffffff;
  --bg-soft: #f2f6f0;
  --line: #dfe5dc;

  --green: #1a7a34;
  --green-hover: #146329;
  --green-tint: #e6f2e4;
  --lime: #8dc63f;
  --blue: #1d4fa0;
  --blue-deep: #163f82;
  --sun: #f4a51c;
  --sun-hover: #e09410;
  --night: #0e2240;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgb(14 34 64 / 0.06), 0 2px 6px rgb(14 34 64 / 0.06);
  --shadow-lg: 0 10px 30px -8px rgb(14 34 64 / 0.28), 0 4px 10px -4px rgb(14 34 64 / 0.12);

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --header-h: 76px;
  --gutter: clamp(16px, 4vw, 40px);
  --section-y: clamp(72px, 10vw, 128px);

  color-scheme: light;
  accent-color: var(--green);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
  -webkit-text-size-adjust: 100%;
  scrollbar-color: #b9c4b5 var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

::selection { background: var(--lime); color: var(--night); }

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

h1, h2, h3, h4 { margin: 0; line-height: 1.12; letter-spacing: -0.03em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }

a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }

:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 6px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--night); color: #fff; padding: 10px 16px; border-radius: var(--radius-sm);
  transition: top 160ms var(--ease-out);
}
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: var(--gutter); }

.icon { width: 1.25em; height: 1.25em; flex: none; }

/* ---------- Botones ---------- */

.btn {
  --btn-bg: var(--green);
  --btn-fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55em;
  min-height: 48px; padding: 0 22px;
  border: 1.5px solid transparent; border-radius: 999px;
  background: var(--btn-bg); color: var(--btn-fg);
  font: inherit; font-weight: 700; font-size: 1rem; line-height: 1; letter-spacing: -0.01em;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  user-select: none; -webkit-user-select: none;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms var(--ease-out), box-shadow 160ms ease;
}
.btn:active { transform: scale(0.97); }
.btn .icon { width: 1.15em; height: 1.15em; }
.btn-primary { --btn-bg: var(--green); box-shadow: 0 4px 12px -6px rgb(0 0 0 / 0.35); }
.btn-sun { --btn-bg: var(--sun); --btn-fg: var(--night); box-shadow: 0 6px 18px -8px rgb(0 0 0 / 0.45); }
.btn-ghost { --btn-bg: rgb(255 255 255 / 0.1); --btn-fg: #fff; border-color: rgb(255 255 255 / 0.55); }
.btn-outline { --btn-bg: transparent; --btn-fg: var(--ink); border-color: var(--line); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 0.9375rem; }
.btn-lg { min-height: 54px; padding: 0 26px; font-size: 1.0625rem; }
.btn-block { width: 100%; }

@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { --btn-bg: var(--green-hover); }
  .btn-sun:hover { --btn-bg: var(--sun-hover); }
  .btn-ghost:hover { --btn-bg: rgb(255 255 255 / 0.2); border-color: #fff; }
  .btn-outline:hover { border-color: var(--ink); }
  .btn-lg:hover .icon:last-child:not(:first-child) { transform: translateX(3px); }
}
.btn .icon { transition: transform 200ms var(--ease-out); }

/* ---------- Encabezado ---------- */

.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  height: var(--header-h);
  color: #fff;
  transition: background-color 240ms ease, box-shadow 240ms ease, color 240ms ease;
}
.site-header.is-solid,
.site-header.is-open {
  background: rgb(255 255 255 / 0.97);
  color: var(--ink);
  box-shadow: 0 1px 0 var(--line), 0 6px 20px -12px rgb(14 34 64 / 0.25);
}
.header-row { height: 100%; display: flex; align-items: center; gap: 24px; }

.brand {
  display: block; flex: none;
  background: #fff; border-radius: 12px; padding: 3px 8px;
  box-shadow: var(--shadow-sm);
}
.brand img { width: 78px; height: auto; }
.site-header.is-solid .brand { box-shadow: none; padding-inline: 0; }

.nav { margin-left: auto; }
.nav-list { display: flex; align-items: center; gap: 4px; }
.nav-list a:not(.btn) {
  display: block; padding: 10px 14px; border-radius: 999px;
  font-weight: 600; font-size: 0.9375rem; text-decoration: none;
  transition: background-color 160ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .nav-list a:not(.btn):hover { background: rgb(255 255 255 / 0.14); }
  .site-header.is-solid .nav-list a:not(.btn):hover { background: var(--bg-soft); }
}
.nav-cta-mobile { display: none; }

.menu-toggle {
  display: none; margin-left: auto;
  width: 48px; height: 48px; border-radius: 999px; border: 0;
  background: transparent; color: inherit; cursor: pointer;
  align-items: center; justify-content: center;
}
.menu-toggle .icon { width: 26px; height: 26px; }
.menu-toggle .icon-close { display: none; }
.site-header.is-open .icon-open { display: none; }
.site-header.is-open .icon-close { display: block; }

/* ---------- Hero ---------- */

.hero {
  position: relative; isolation: isolate;
  color: #fff;
  min-height: min(100svh, 980px);
  display: grid; grid-template-rows: 1fr auto;
  background: var(--night);
}
.hero-media { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.hero-media picture { display: contents; }
.hero-media img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 85%;
  animation: hero-settle 1800ms var(--ease-out) both;
}
.hero-scrim {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgb(10 26 52 / 0.84) 0%, rgb(10 26 52 / 0.7) 45%, rgb(10 26 52 / 0.12) 80%),
    linear-gradient(180deg, rgb(10 26 52 / 0.35) 0%, rgb(10 26 52 / 0) 22%, rgb(10 26 52 / 0) 70%, rgb(10 26 52 / 0.55) 100%);
}

.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.85fr);
  gap: clamp(32px, 5vw, 72px); align-items: center;
  padding-top: calc(var(--header-h) + clamp(40px, 7vw, 96px));
  padding-bottom: clamp(40px, 5vw, 64px);
}
.hero h1 {
  font-size: clamp(2.375rem, 1.5rem + 3vw, 3.75rem);
  font-weight: 800;
  max-width: 15ch;
}
.lead {
  margin-top: 22px; max-width: 46ch;
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  color: rgb(255 255 255 / 0.88);
}
.hero-actions { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 12px; }

.hero-facts {
  border-top: 1px solid rgb(255 255 255 / 0.18);
  background: rgb(10 26 52 / 0.35);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.facts { display: grid; grid-template-columns: repeat(4, 1fr); }
.facts li {
  padding: 22px 20px; display: grid; gap: 2px;
  border-left: 1px solid rgb(255 255 255 / 0.16);
}
.facts li:first-child { border-left: 0; padding-left: 0; }
.facts strong { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; }
.facts strong::before {
  content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--sun); margin-right: 10px; vertical-align: 0.18em;
}
.facts span { color: rgb(255 255 255 / 0.78); font-size: 0.9375rem; }

/* ---------- Formulario ---------- */

.lead-form {
  background: #fff; color: var(--ink);
  border-radius: 18px; padding: clamp(22px, 3vw, 32px);
  box-shadow: 0 24px 60px -20px rgb(0 0 0 / 0.55);
  display: grid; gap: 16px;
}
.form-title { font-size: 1.5rem; font-weight: 800; }
.form-sub { color: var(--ink-2); font-size: 0.9375rem; margin-top: -8px; }

.field { display: grid; gap: 6px; border: 0; margin: 0; padding: 0; min-width: 0; }
.field label, .field legend { font-weight: 700; font-size: 0.875rem; padding: 0; }
.field legend { margin-bottom: 8px; }
.field input[type="text"], .field input[type="tel"] {
  width: 100%; min-height: 48px; padding: 0 14px;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; color: var(--ink);
  font: inherit; font-size: 1rem;
  caret-color: var(--green);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.field input::placeholder { color: var(--ink-3); }
.field input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 4px rgb(26 122 52 / 0.16); }
.field input[aria-invalid="true"] { border-color: #c2321f; }
.field-error { color: #b42318; font-size: 0.875rem; font-weight: 600; }

.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice span {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 44px; padding: 0 10px;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  font-weight: 600; font-size: 0.9375rem;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, transform 160ms var(--ease-out);
}
.choice:active span { transform: scale(0.97); }
.choice input:checked + span { border-color: var(--green); background: var(--green-tint); color: var(--green-hover); }
.choice input:focus-visible + span { outline: 3px solid var(--sun); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) {
  .choice:hover span { border-color: #b6c2b2; }
}

[data-submit] { position: relative; margin-top: 4px; }
.spinner {
  position: absolute; width: 20px; height: 20px; border-radius: 50%;
  border: 2.5px solid rgb(255 255 255 / 0.35); border-top-color: #fff;
  opacity: 0; animation: spin 600ms linear infinite paused;
}
[data-submit][aria-busy="true"] .btn-label { opacity: 0; }
[data-submit][aria-busy="true"] .spinner { opacity: 1; animation-play-state: running; }
.btn-label { display: inline-flex; align-items: center; gap: 0.55em; transition: opacity 120ms ease; }
.form-status { font-size: 0.875rem; color: var(--ink-2); min-height: 1.4em; }
.form-status.is-error { color: #b42318; font-weight: 600; }

/* ---------- Secciones ---------- */

.section { padding-block: var(--section-y); }
.section-soft { background: var(--bg-soft); }

.section-head { max-width: 760px; margin-bottom: clamp(40px, 5vw, 64px); }
.section-head h2 { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.25rem); font-weight: 800; }
.section-head p { margin-top: 18px; font-size: 1.125rem; color: var(--ink-2); max-width: 62ch; }
.section-head-left { margin-bottom: 36px; }

/* El conjunto */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); }
.feature { padding: 32px 32px 8px 0; display: grid; gap: 10px; align-content: start; }
.feature + .feature { padding-left: 32px; border-left: 1px solid var(--line); }
.feature { grid-template-columns: auto 1fr; column-gap: 12px; }
.feature-icon { color: var(--green); display: flex; align-items: center; }
.feature-icon .icon { width: 26px; height: 26px; }
.feature h3 { font-size: 1.3125rem; font-weight: 800; align-self: center; }
.feature p { grid-column: 1 / -1; }
.feature p { color: var(--ink-2); max-width: 36ch; }

/* Zonas comunes */
.bento {
  display: grid; gap: 16px;
  grid-template-columns: repeat(6, 1fr);
  grid-template-areas:
    "pis pis pis pis por por"
    "pis pis pis pis por por"
    "soc soc soc jue jue jue";
}
.tile {
  position: relative; overflow: hidden;
  border-radius: 18px; padding: clamp(24px, 3vw, 36px);
  display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
  min-height: 230px;
  box-shadow: var(--shadow-sm);
}
.tile h3 { font-size: clamp(1.375rem, 1.1rem + 0.9vw, 1.875rem); font-weight: 800; }
.tile p { margin-top: 10px; max-width: 40ch; }
.tile-icon { display: block; opacity: 0.95; }
.tile-icon .icon { width: 44px; height: 44px; stroke-width: 1.5; }
.tile-piscinas .tile-icon .icon { width: 64px; height: 64px; }
.tile-piscinas { grid-area: pis; min-height: 420px; }
.tile-piscinas h3 { font-size: clamp(2rem, 1.4rem + 2.2vw, 3.25rem); }
.tile-porteria { grid-area: por; }
.tile-social { grid-area: soc; }
.tile-juegos { grid-area: jue; }

.tile-azul { background: var(--blue); color: #fff; }
.tile-azul p { color: rgb(255 255 255 / 0.86); }
.tile-noche { background: var(--night); color: #fff; }
.tile-noche p { color: rgb(255 255 255 / 0.8); }
.tile-noche .tile-icon { color: var(--lime); }
.tile-verde { background: var(--green); color: #fff; }
.tile-verde p { color: rgb(255 255 255 / 0.88); }
.tile-sol { background: var(--sun); color: var(--night); }
.tile-sol p { color: rgb(14 34 64 / 0.82); }

/* Zona con foto real (/admin/zonas): foto a sangre y velo noche para leer el texto */
.tile-foto { justify-content: flex-end; min-height: 300px; background: var(--night); color: #fff; }
.tile-piscinas.tile-foto { min-height: 420px; }
.tile-foto p { color: rgb(255 255 255 / 0.9); }
.tile-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile-foto::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgb(14 34 64 / 0.9) 0, rgb(14 34 64 / 0.72) 130px, rgb(14 34 64 / 0) 260px);
}
.tile-foto > div { position: relative; z-index: 1; }

/* Residentes */
.section-blue { background: var(--blue); color: #fff; }
.section-blue .section-head p { color: rgb(255 255 255 / 0.85); }
.residentes-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 88px); align-items: start; }

.tramites { display: grid; border-top: 1px solid rgb(255 255 255 / 0.2); }
.tramites li { border-bottom: 1px solid rgb(255 255 255 / 0.2); }
.tramite {
  display: flex; align-items: center; gap: 18px;
  padding: 20px 8px; text-decoration: none;
  border-radius: 12px;
  transition: background-color 160ms ease;
}
.tramite-icon {
  width: 48px; height: 48px; border-radius: 12px; flex: none; display: grid; place-items: center;
  background: rgb(255 255 255 / 0.12); color: #fff;
}
.tramite-text { display: grid; gap: 2px; flex: 1; min-width: 0; }
.tramite-text strong { font-size: 1.125rem; font-weight: 700; letter-spacing: -0.01em; }
.tramite-text span { color: rgb(255 255 255 / 0.78); font-size: 0.9375rem; }
.tramite-arrow { color: var(--sun); transition: transform 200ms var(--ease-out); }
.tramite:active { background: rgb(255 255 255 / 0.08); }
@media (hover: hover) and (pointer: fine) {
  .tramite:hover { background: rgb(255 255 255 / 0.07); }
  .tramite:hover .tramite-arrow { transform: translateX(4px); }
}

.avisos {
  background: #fff; color: var(--ink);
  border-radius: 18px; padding: clamp(24px, 3vw, 32px);
  box-shadow: var(--shadow-lg);
}
.avisos h3 { display: flex; align-items: center; gap: 10px; font-size: 1.25rem; font-weight: 800; margin-bottom: 20px; }
.avisos h3 .icon { color: var(--blue); }
.avisos-list { display: grid; gap: 14px; }
.aviso { padding: 18px; border-radius: 12px; background: var(--bg-soft); }
.aviso-meta { display: flex; align-items: center; gap: 10px; font-size: 0.8125rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.aviso-nivel {
  font-weight: 800; font-size: 0.75rem; letter-spacing: 0.02em;
  padding: 3px 9px; border-radius: 999px; background: #fff; color: var(--ink-2);
}
.aviso h4 { margin-top: 10px; font-size: 1.0625rem; font-weight: 800; letter-spacing: -0.015em; }
.aviso p:last-child { margin-top: 4px; color: var(--ink-2); font-size: 0.9375rem; }
.aviso-importante { background: #fff6e5; box-shadow: inset 0 0 0 1.5px var(--sun); }
.aviso-importante .aviso-nivel { background: var(--sun); color: var(--night); }
.aviso-urgente { background: #fdecea; box-shadow: inset 0 0 0 1.5px #c2321f; }
.aviso-urgente .aviso-nivel { background: #c2321f; color: #fff; }
.avisos-empty { color: var(--ink-2); }

/* Ubicación */
.ubicacion-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 72px); align-items: stretch; }
.address { display: flex; align-items: flex-start; gap: 10px; font-weight: 700; margin-bottom: 20px; }
.address .icon { color: var(--green); margin-top: 0.15em; }
.ubicacion-photo { margin: 40px 0 0; }
.ubicacion-photo img { border-radius: var(--radius); aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.ubicacion-photo figcaption { margin-top: 10px; font-size: 0.875rem; color: var(--ink-3); }
.map { border-radius: 18px; overflow: hidden; background: var(--bg-soft); min-height: 420px; box-shadow: var(--shadow-sm); }
.map iframe { width: 100%; height: 100%; min-height: 420px; border: 0; display: block; }

/* CTA */
.cta { background: var(--green); color: #fff; padding-block: clamp(56px, 7vw, 88px); position: relative; overflow: hidden; }
.cta::before {
  /* El arco del sol del logo */
  content: ""; position: absolute; left: 50%; bottom: -520px; width: 1200px; height: 600px; translate: -50% 0;
  border-radius: 50%; border: 18px solid rgb(244 165 28 / 0.9); border-bottom: 0;
  opacity: 0.22; pointer-events: none;
}
.cta-row { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.cta h2 { font-size: clamp(1.875rem, 1.3rem + 2vw, 2.75rem); font-weight: 800; }
.cta p { margin-top: 10px; color: rgb(255 255 255 / 0.88); font-size: 1.125rem; }

/* Pie */
.footer { background: var(--night); color: rgb(255 255 255 / 0.82); padding-top: 64px; padding-bottom: 32px; font-size: 0.9375rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; align-items: start; }
.footer-brand img { width: 132px; background: #fff; border-radius: 12px; padding: 6px 10px; }
.footer-brand p { margin-top: 16px; max-width: 36ch; }
.footer-links { display: grid; gap: 10px; }
.footer a { text-decoration: none; }
.footer-contact { display: grid; gap: 10px; }
.footer-contact a { display: inline-flex; align-items: center; gap: 8px; color: #fff; font-weight: 700; }
@media (hover: hover) and (pointer: fine) {
  .footer a:hover { text-decoration: underline; }
}
.footer-legal { margin-top: 48px; padding-top: 24px; border-top: 1px solid rgb(255 255 255 / 0.12); display: grid; gap: 8px; font-size: 0.8125rem; color: rgb(255 255 255 / 0.62); }
.footer-legal a { text-decoration: underline; }

.mobile-bar { display: none; }
.hero-cta-wa { display: none; }

.preview-note {
  position: relative; z-index: 60;
  background: var(--sun); color: var(--night);
  padding: 10px var(--gutter); font-size: 0.875rem; text-align: center;
}
.preview-note code { font-size: 0.8125rem; }
body:has(.preview-note) .site-header:not(.is-solid):not(.is-open) { top: var(--note-h, 40px); }

.map { position: relative; }
.map-fallback {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px;
  text-align: center; color: var(--ink-2); padding: 24px;
}
.map-fallback .icon { width: 32px; height: 32px; color: var(--green); }
.map-fallback p { font-weight: 800; color: var(--ink); }
.map-fallback span { font-weight: 500; color: var(--ink-2); }
.map-fallback a { font-weight: 700; color: var(--green); }
.map iframe { position: relative; }

/* ---------- Movimiento: una sola entrada orquestada en el hero ---------- */

.reveal { animation: rise 900ms var(--ease-out) both; animation-delay: calc(120ms + var(--d, 0) * 90ms); }
.d1 { --d: 1; } .d2 { --d: 2; } .d3 { --d: 3; }

@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
@keyframes hero-settle { from { transform: scale(1.06); } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .hero-media img { animation: none; }
  .btn, .choice span, .tramite-arrow { transition: none; }
}

/* ---------- Responsivo ---------- */

@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero h1 { max-width: 16ch; }
  .lead-form { max-width: 520px; }
  .hero-cta-info { display: none; }
  .hero-cta-wa { display: inline-flex; }
  .residentes-grid, .ubicacion-grid { grid-template-columns: 1fr; }
}

@media (max-width: 880px) {
  :root { --header-h: 68px; }
  .header-cta { display: none; }
  .menu-toggle { display: inline-flex; }
  .nav { position: absolute; inset: var(--header-h) 0 auto; margin: 0; }
  .nav-list {
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; color: var(--ink);
    padding: 8px var(--gutter) 20px;
    box-shadow: 0 16px 30px -16px rgb(14 34 64 / 0.35);
    clip-path: inset(0 0 100% 0); visibility: hidden;
    transition: clip-path 260ms var(--ease-out), visibility 0s linear 260ms;
  }
  .site-header.is-open .nav-list { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path 260ms var(--ease-out), visibility 0s; }
  .nav-list a:not(.btn) { padding: 16px 4px; border-radius: 0; border-bottom: 1px solid var(--line); font-size: 1.0625rem; }
  .nav-cta-mobile { display: block; padding-top: 16px; }
  .nav-cta-mobile .btn { width: 100%; }

  .facts { grid-template-columns: 1fr 1fr; }
  .facts li { padding: 16px 16px; border-left: 0; }
  .facts strong { font-size: 1.0625rem; white-space: nowrap; }
  .facts span { font-size: 0.875rem; }
  .facts li:nth-child(odd) { padding-left: 0; }
  .facts li:nth-child(even) { border-left: 1px solid rgb(255 255 255 / 0.16); }
  .facts li:nth-child(n + 3) { border-top: 1px solid rgb(255 255 255 / 0.16); }

  .features { grid-template-columns: 1fr; }
  .feature, .feature + .feature { padding: 28px 0; border-left: 0; }
  .feature + .feature { border-top: 1px solid var(--line); }

  .bento { grid-template-columns: 1fr; grid-template-areas: "pis" "por" "soc" "jue"; }
  .tile, .tile-piscinas { min-height: 0; gap: 28px; }
  .tile-foto { min-height: 300px; }
  .tile-piscinas.tile-foto { min-height: 360px; }

  .cta-row { flex-direction: column; align-items: flex-start; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }

  .mobile-bar {
    display: block; position: fixed; inset: auto 0 0; z-index: 40;
    padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
    background: rgb(255 255 255 / 0.96); box-shadow: 0 -1px 0 var(--line), 0 -8px 24px -12px rgb(14 34 64 / 0.3);
    translate: 0 110%; transition: translate 280ms var(--ease-out);
  }
  .mobile-bar.is-visible { translate: 0 0; }
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
}

@media (max-width: 520px) {
  .hero-actions .btn { flex: 1 1 100%; }
  .brand img { width: 70px; }
  .map, .map iframe { min-height: 340px; }
}

/* ---------- Hero con fotos del conjunto ---------- */

.hero-fotos { grid-template-rows: 1fr auto auto; --foto-ms: 7000ms; }
.hero-media .hero-slide {
  position: absolute; inset: 0; display: block;
  opacity: 0; transition: opacity 1400ms var(--ease-out);
}
.hero-slide.is-active { opacity: 1; z-index: 1; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 55%; }
/* Acercamiento lento mientras la foto está al frente; vuelve a empezar cada vez que entra. */
.hero-slide.is-active img { animation: hero-acercar calc(var(--foto-ms) + 1400ms) linear both; }
.hero-fotos .hero-scrim {
  z-index: 2;
  background:
    linear-gradient(90deg, rgb(10 26 52 / 0.78) 0%, rgb(10 26 52 / 0.5) 42%, rgb(10 26 52 / 0) 72%),
    linear-gradient(180deg, rgb(10 26 52 / 0.45) 0%, rgb(10 26 52 / 0) 24%, rgb(10 26 52 / 0) 62%, rgb(10 26 52 / 0.7) 100%);
}
.hero-fotos.is-pausado .hero-slide.is-active img,
.hero-fotos.is-pausado .hero-tour-item[aria-current="true"] .hero-tour-bar span { animation-play-state: paused; }

/* Recorrido: el nombre de cada lugar con su barra de tiempo. */
.hero-tour {
  display: flex; align-items: flex-end; gap: clamp(12px, 2vw, 24px);
  padding-bottom: 18px;
}
.hero-tour-list { display: flex; gap: clamp(8px, 1.6vw, 20px); flex: 1; min-width: 0; }
.hero-tour-list li { flex: 1; min-width: 0; max-width: 180px; }
.hero-tour-item {
  display: grid; gap: 8px; width: 100%; padding: 8px 0; text-align: left;
  border: 0; background: none; color: rgb(255 255 255 / 0.62); cursor: pointer;
  font: inherit; font-size: 0.875rem; font-weight: 700;
  transition: color 200ms var(--ease-out);
}
.hero-tour-item[aria-current="true"] { color: #fff; }
.hero-tour-titulo { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hero-tour-bar { display: block; height: 3px; border-radius: 999px; background: rgb(255 255 255 / 0.28); overflow: hidden; }
.hero-tour-bar span { display: block; height: 100%; width: 100%; background: var(--sun); transform: scaleX(0); transform-origin: left; }
.hero-tour-item.is-visto .hero-tour-bar span { transform: scaleX(1); background: rgb(255 255 255 / 0.7); }
.hero-tour-item[aria-current="true"] .hero-tour-bar span { animation: hero-progreso var(--foto-ms) linear both; }
.hero-tour-item:focus-visible { outline: 2px solid var(--sun); outline-offset: 4px; border-radius: 4px; }
@media (hover: hover) and (pointer: fine) { .hero-tour-item:hover { color: #fff; } }

.hero-tour-pausa {
  flex: none; display: inline-grid; place-items: center; width: 40px; height: 40px;
  border: 1px solid rgb(255 255 255 / 0.4); border-radius: 999px;
  background: rgb(10 26 52 / 0.35); color: #fff; cursor: pointer;
  transition: background 160ms var(--ease-out);
}
.hero-tour-pausa .icon { width: 16px; height: 16px; fill: currentColor; }
.hero-tour-pausa .icon-play { display: none; }
.hero-tour-pausa[aria-pressed="true"] .icon-pausa { display: none; }
.hero-tour-pausa[aria-pressed="true"] .icon-play { display: block; }
.hero-tour-pausa:focus-visible { outline: 2px solid var(--sun); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .hero-tour-pausa:hover { background: rgb(10 26 52 / 0.6); } }
.hero-tour-solo { padding-bottom: 18px; font-size: 0.875rem; font-weight: 700; color: rgb(255 255 255 / 0.82); }

@keyframes hero-acercar { from { transform: scale(1); } to { transform: scale(1.08); } }
@keyframes hero-progreso { to { transform: scaleX(1); } }

@media (max-width: 880px) {
  .hero-tour-list li { max-width: none; }
  .hero-tour-titulo { font-size: 0.8125rem; }
  .hero-fotos .hero-scrim {
    background: linear-gradient(180deg, rgb(10 26 52 / 0.55) 0%, rgb(10 26 52 / 0.35) 40%, rgb(10 26 52 / 0.55) 70%, rgb(10 26 52 / 0.82) 100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide { transition: none; }
  .hero-slide.is-active img, .hero-tour-item[aria-current="true"] .hero-tour-bar span { animation: none; }
  .hero-tour-item[aria-current="true"] .hero-tour-bar span { transform: scaleX(1); }
}

/* ---------- Franja de avisos importantes y urgentes ---------- */

/* Alto fijo: el encabezado, el hero y los anclajes se corren exactamente lo que ocupa. */
html { --franja-h: 0px; }
html:has(.franja) { --franja-h: 48px; scroll-padding-top: calc(var(--header-h) + var(--franja-h) + 8px); }
body:has(.franja) { padding-top: var(--franja-h); }
body:has(.franja) .site-header { top: var(--franja-h); }
body:has(.franja):has(.preview-note) .site-header:not(.is-solid):not(.is-open) { top: calc(var(--franja-h) + var(--note-h, 40px)); }
body:has(.franja) .hero { min-height: min(calc(100svh - var(--franja-h)), 980px); }

.franja { position: fixed; inset: 0 0 auto; z-index: 70; height: var(--franja-h); }
.franja-aviso { height: 100%; }
.franja-urgente { background: #c2321f; color: #fff; }
.franja-importante { background: var(--sun); color: var(--night); }
.franja-row { height: 100%; display: flex; align-items: center; gap: 12px; font-size: 0.9375rem; line-height: 1.3; }
.franja-texto { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.franja-texto strong { font-weight: 800; }
.franja-mas { flex: none; font-weight: 600; font-size: 0.875rem; }
.franja-ver { flex: none; margin-left: auto; padding: 10px 4px; font-weight: 800; }
.franja-cerrar {
  flex: none; display: inline-grid; place-items: center; width: 44px; height: 44px; margin-right: -12px;
  border: 0; border-radius: var(--radius-sm); background: none; color: inherit; cursor: pointer;
}
.franja :focus-visible { outline: 2px solid currentColor; outline-offset: -4px; }
@media (hover: hover) and (pointer: fine) { .franja-cerrar:hover { background: rgb(0 0 0 / 0.12); } }
.aviso:target { outline: 3px solid var(--sun); outline-offset: 3px; }

@media (max-width: 880px) {
  html:has(.franja) { --franja-h: 56px; }
  .franja-row { gap: 10px; font-size: 0.875rem; }
  .franja-row > .icon, .franja-mas { display: none; }
  .franja-texto { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
}

/* ---------- Volver arriba ---------- */

.subir {
  position: fixed; right: max(20px, env(safe-area-inset-right)); bottom: 24px; z-index: 39;
  display: inline-grid; place-items: center; width: 48px; height: 48px;
  border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--green);
  box-shadow: var(--shadow-lg); cursor: pointer;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out), visibility 0s 180ms;
}
.subir.is-visible { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.subir .icon { width: 22px; height: 22px; }
.subir:active { transform: scale(0.95); }
@media (hover: hover) and (pointer: fine) { .subir:hover { background: var(--green); border-color: var(--green); color: #fff; } }
@media (max-width: 880px) { .subir { right: 16px; bottom: calc(88px + env(safe-area-inset-bottom)); } }
@media (prefers-reduced-motion: reduce) { .subir { transition: none; transform: none; } }
