/* ═══════════════════════════════════════════════════════════════════════════
   CASA ALBA · Cliffside Villas — luminosa, aérea, de revista
   marfil · arena · azul bruma — Fraunces (ital) + Karla
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --bg: #F7F3EB;
  --bg2: #EFE8DB;
  --sand: #E7DCC8;
  --ink: #22303C;
  --muted: #5D6B76;
  --bruma: #7E98A6;
  --bruma-deep: #41586A;
  --gold: #C99D5F;
  --line: rgba(34, 48, 60, 0.14);
  --e: cubic-bezier(0.16, 1, 0.3, 1);
  --serif: "Fraunces", Georgia, serif;
  --sans: "Karla", system-ui, "Segoe UI", sans-serif;
  --wrap: 1220px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--bruma-deep); color: var(--bg); }
:focus-visible { outline: 2px solid var(--bruma-deep); outline-offset: 3px; border-radius: 2px; }
section[id] { scroll-margin-top: 80px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: fixed; left: 14px; top: -60px; z-index: 200;
  background: var(--ink); color: var(--bg);
  padding: 10px 18px; border-radius: 4px; font-size: 14px; transition: top 0.25s ease;
}
.skip:focus-visible { top: 14px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(18px, 4vw, 48px); }
.section { padding: clamp(84px, 12vh, 150px) 0; }

/* ── Tipografía ───────────────────────────────────────────────────────── */
h1, h2, h3 { font-family: var(--serif); font-weight: 400; }
h1 { font-size: clamp(64px, 13vw, 190px); line-height: 0.92; letter-spacing: -0.015em; }
h2 { font-size: clamp(32px, 4.4vw, 58px); line-height: 1.05; max-width: 15em; }
h2 em, h1 .h-it, h3 em { font-style: italic; font-weight: 300; color: var(--bruma-deep); }
.kicker {
  font-size: 12px; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--bruma-deep); font-weight: 600; margin-bottom: 16px;
}
.eyebrow { font-size: clamp(11px, 1.2vw, 13px); letter-spacing: 0.4em; text-transform: uppercase; color: var(--muted); margin-bottom: 22px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 15px 30px; border-radius: 999px; border: 1px solid var(--ink);
  background: var(--ink); color: var(--bg); cursor: pointer;
  font-family: var(--sans); font-size: 13px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  transition: background 0.4s ease, color 0.4s ease, transform 0.4s var(--e);
}
.btn:hover { background: var(--bruma-deep); border-color: var(--bruma-deep); transform: translateY(-2px); }
.lnk {
  font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--bruma-deep);
  border-bottom: 1px solid rgba(65, 88, 106, 0.4); padding-bottom: 2px; transition: border-color 0.3s ease, color 0.3s ease;
}
.lnk:hover { color: var(--ink); border-color: var(--ink); }

/* ── Reveals ──────────────────────────────────────────────────────────── */
.js [data-fade] {
  opacity: 0; transform: translateY(24px);
  transition: opacity 1s ease var(--dl, 0s), transform 1.1s var(--e) var(--dl, 0s);
}
.js [data-fade].on { opacity: 1; transform: none; }

h1 { overflow: hidden; }
.js [data-line] { display: inline-block; animation: lineIn 1.15s var(--e) both; animation-delay: calc(0.42s + var(--dl, 0s)); }
@keyframes lineIn { from { transform: translateY(112%); } to { transform: none; } }

/* ── Revelado por palabra con máscara (+ desenfoque que se resuelve) ──── */
[data-words] .w {
  display: inline-block; overflow: hidden; vertical-align: top;
  padding-bottom: 0.14em; margin-bottom: -0.14em;
}
.js [data-words] .wi {
  display: inline-block; will-change: transform, filter;
  transform: translateY(108%);
  filter: blur(9px);
  transition: transform 0.95s var(--e) calc(var(--i) * 55ms), filter 0.75s ease calc(var(--i) * 55ms);
}
.js [data-words].on .wi { transform: none; filter: blur(0); }
/* en pantallas chicas el blur es caro: se degrada a sólo máscara */
@media (max-width: 700px) {
  .js [data-words] .wi { filter: none; transition: transform 0.85s var(--e) calc(var(--i) * 45ms); }
}

.js [data-lines] span {
  display: block; opacity: 0; transform: translateY(26px); filter: blur(7px);
  transition: opacity 0.9s ease, transform 1s var(--e), filter 0.9s ease;
}
.js [data-lines].on span { opacity: 1; transform: none; filter: none; }
.js [data-lines] span:nth-child(2) { transition-delay: 0.1s; }
.js [data-lines] span:nth-child(3) { transition-delay: 0.2s; }
.js [data-lines] span:nth-child(4) { transition-delay: 0.3s; }
.js [data-lines] span:nth-child(5) { transition-delay: 0.4s; }

.rv { position: relative; overflow: hidden; border-radius: 14px; }
.js .rv { clip-path: inset(0 100% 0 0); transition: clip-path 1.4s var(--e); }
.js .rv.on { clip-path: inset(0 0 0 0); }
.js .rv img { transform: scale(1.12) translateX(-2%); transition: transform 1.8s var(--e); }
.js .rv.on img { transform: none; }

/* ── Navegación ───────────────────────────────────────────────────────── */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 90;
  display: flex; align-items: center; justify-content: space-between; gap: 22px;
  padding: 20px clamp(18px, 3.4vw, 44px);
  border-bottom: 1px solid transparent;
  transition: background 0.5s ease, border-color 0.5s ease, padding 0.5s ease, backdrop-filter 0.5s ease;
}
.nav.scrolled {
  background: rgba(247, 243, 235, 0.86);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--line); padding-block: 12px;
}
.nav-logo { font-family: var(--serif); font-size: 23px; letter-spacing: 0.02em; }
.nav-logo em, .foot-mark em { font-style: italic; color: var(--bruma-deep); }
.nav-links { display: flex; gap: clamp(16px, 2.4vw, 36px); }
.nav-links a {
  font-size: 12.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted);
  position: relative; padding: 4px 0; transition: color 0.3s ease;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px;
  background: var(--bruma-deep); transition: right 0.4s var(--e);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { right: 0; }
.nav-right { display: flex; align-items: center; gap: 14px; }
.nav-tel { font-family: var(--serif); font-style: italic; font-size: 16px; color: var(--bruma-deep); white-space: nowrap; }
.nav-tel:hover { color: var(--ink); }

.burger {
  display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%;
  background: rgba(247, 243, 235, 0.7); cursor: pointer; position: relative; z-index: 96;
}
.burger span { position: absolute; left: 12px; right: 12px; height: 1.5px; background: var(--ink); transition: transform 0.45s var(--e), top 0.45s var(--e); }
.burger span:nth-child(1) { top: 17px; }
.burger span:nth-child(2) { top: 25px; }
.burger[aria-expanded="true"] span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { top: 21px; transform: rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 94; background: rgba(247, 243, 235, 0.97);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  display: flex; flex-direction: column; justify-content: center; gap: 44px;
  padding: 90px clamp(24px, 8vw, 70px) 44px;
  opacity: 0; visibility: hidden; transition: opacity 0.5s ease, visibility 0.5s;
}
.menu.open { opacity: 1; visibility: visible; }
.menu nav { display: flex; flex-direction: column; gap: 8px; }
.menu nav a {
  font-family: var(--serif); font-size: clamp(30px, 7.4vw, 46px); font-style: italic; color: var(--ink);
  transform: translateY(22px); opacity: 0;
  transition: transform 0.7s var(--e) calc(var(--mi) * 60ms), opacity 0.6s ease calc(var(--mi) * 60ms), color 0.3s ease;
}
.menu.open nav a { transform: none; opacity: 1; }
.menu nav a:hover { color: var(--bruma-deep); }
.menu-foot { color: var(--muted); font-size: 14px; display: flex; flex-direction: column; gap: 6px; }
.menu-foot a { color: var(--bruma-deep); font-size: 17px; }

/* ── Hero collage con capas ───────────────────────────────────────────── */
.hero {
  position: relative; min-height: 100svh; min-height: 100dvh;
  display: flex; align-items: center; overflow: hidden;
}
.ly { position: absolute; will-change: transform; }
.ly-sky {
  inset: 0;
  background: linear-gradient(180deg, #F3ECDD 0%, #EFEDE2 38%, #E3E9E9 72%, #D9E3E6 100%);
}
.sun {
  position: absolute; right: 16vw; top: 14vh; width: clamp(140px, 22vw, 320px); aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(238, 199, 138, 0.85), rgba(238, 199, 138, 0.28) 55%, transparent 72%);
  filter: blur(2px);
}
.ly-sea {
  left: clamp(-40px, -3vw, 0px); bottom: 8vh; width: clamp(240px, 34vw, 480px);
  border-radius: 16px; overflow: hidden; box-shadow: 0 30px 60px rgba(34, 48, 60, 0.18);
  rotate: -2deg;
}
.ly-cliff {
  right: clamp(-30px, -2vw, 10px); top: 16vh; width: clamp(230px, 30vw, 460px);
  border-radius: 46% 54% 42% 58% / 55% 45% 55% 45%;
  overflow: hidden; box-shadow: 0 34px 70px rgba(34, 48, 60, 0.2);
  rotate: 2deg;
}
.ly-sea img, .ly-cliff img { width: 100%; height: 100%; object-fit: cover; }
.ly-sea { aspect-ratio: 4 / 3; }
.ly-cliff { aspect-ratio: 4 / 5; }
.ly-sea figcaption, .ly-cliff figcaption {
  position: absolute; left: 14px; bottom: 10px; z-index: 2;
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: #FFFDF6;
  text-shadow: 0 1px 8px rgba(20, 30, 40, 0.55);
}
.ly-haze {
  inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(247, 243, 235, 0) 55%, rgba(247, 243, 235, 0.85) 88%, var(--bg) 100%);
}

/* velo de entrada: se retira solo, sin depender de app.js */
.hero-veil {
  position: absolute; inset: 0; z-index: 5; pointer-events: none;
  background: var(--bg); transform: scaleY(0); transform-origin: top;
}
.js .hero-veil { animation: veil 1.25s var(--e) 0.06s both; }
@keyframes veil { from { transform: scaleY(1); } to { transform: scaleY(0); } }
/* la imagen escala lento mientras el velo sube */
.js .ly-sea img, .js .ly-cliff img { animation: heroZoom 2.6s var(--e) both; }
@keyframes heroZoom { from { transform: scale(1.16); } to { transform: scale(1); } }
/* datos clave del pie del hero, escalonados (CSS puro: sobreviven sin app.js) */
.js .hero-foot [data-hf] { display: inline-block; animation: hfIn 0.9s var(--e) 1s both; }
.js .hero-foot [data-hf]:nth-child(2) { animation-delay: 1.12s; }
.js .hero-foot [data-hf]:nth-child(3) { animation-delay: 1.24s; }
@keyframes hfIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.hero-copy { position: relative; z-index: 3; width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 120px clamp(18px, 4vw, 48px) 140px; }
.hero-sub { margin-top: 30px; max-width: 27em; font-size: clamp(17px, 1.8vw, 21px); color: var(--ink); text-wrap: pretty; }
.hero-sub em { font-family: var(--serif); font-style: italic; color: var(--bruma-deep); }
.hero-cta { margin-top: 38px; display: flex; align-items: center; flex-wrap: wrap; gap: 26px; }
.hero-foot {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
  display: flex; justify-content: space-between; gap: 18px;
  padding: 18px clamp(18px, 4vw, 48px);
  font-size: 11px; letter-spacing: 0.26em; text-transform: uppercase; color: var(--muted);
  border-top: 1px solid var(--line);
}

/* ── Intro editorial ──────────────────────────────────────────────────── */
.ed-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(40px, 6vw, 100px); align-items: center; }
.ed-copy p:not(.kicker) { color: var(--muted); margin-top: 22px; max-width: 32em; }
.ed-copy h2 + p { margin-top: 28px; }
.ed-copy .lnk { display: inline-block; margin-top: 28px; }
.ed-media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.ed-media figcaption { margin-top: 12px; font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }

.stats {
  margin-top: clamp(60px, 9vh, 110px);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  border-block: 1px solid var(--line);
}
.stats div { padding: clamp(24px, 3.4vw, 40px) 22px; border-left: 1px solid var(--line); }
.stats div:first-child { border-left: 0; padding-left: 0; }
.stats b { display: block; font-family: var(--serif); font-weight: 300; font-size: clamp(38px, 4.6vw, 64px); line-height: 1; color: var(--ink); }
.stats span { display: block; margin-top: 8px; font-size: 13.5px; color: var(--muted); letter-spacing: 0.04em; }

/* ── Break editorial ──────────────────────────────────────────────────── */
.break { padding: clamp(40px, 7vh, 90px) 0; }
.break-media { border-radius: 0; overflow: hidden; max-height: 76vh; }
.break-media img { width: 100%; height: min(76vh, 640px); object-fit: cover; will-change: transform; scale: 1.12; }
.break-caption { margin-top: 18px; font-size: 15px; color: var(--muted); }
.break-caption em { font-family: var(--serif); font-style: italic; font-size: 19px; color: var(--ink); }

/* ── Carrusel de villas (drag) ────────────────────────────────────────── */
.villas { background: var(--bg2); overflow: hidden; }
.villas-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: clamp(30px, 5vh, 50px); }
.villas-count { font-family: var(--serif); font-size: clamp(22px, 3vw, 34px); color: var(--muted); font-weight: 300; }
.villas-count b { color: var(--ink); font-weight: 400; }

.car-vp { overflow: hidden; cursor: grab; touch-action: pan-y; }
.car-vp.dragging { cursor: grabbing; }
.car-vp:focus-visible { outline-offset: -3px; }
.car-track {
  display: flex; gap: clamp(18px, 2.6vw, 34px);
  padding: 0 clamp(18px, 6vw, 80px);
  width: max-content; will-change: transform;
}
.car-card { flex: 0 0 auto; width: min(76vw, 380px); user-select: none; }
.car-card figure { position: relative; border-radius: 14px; overflow: hidden; }
.car-card img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover;
  transition: transform 0.9s var(--e), filter 0.6s ease; pointer-events: none;
}
.car-card:hover img { transform: scale(1.05); }
/* máscara de imagen al pasar el cursor: una cortina que barre en diagonal */
.car-card figure::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 34%, rgba(255, 253, 246, 0.32) 50%, transparent 66%);
  transform: translate3d(-110%, 0, 0);
  transition: transform 0.95s var(--e);
}
@media (hover: hover) { .car-card:hover figure::after { transform: translate3d(110%, 0, 0); } }
/* profundidad ligada al arrastre: la fija app.js con --d (0 centro, 1 borde) */
.car.depth .car-card { transition: none; will-change: transform; }
.car-card:has(.chip.off) img { filter: grayscale(0.65) brightness(0.96); }
.chip {
  position: absolute; top: 14px; left: 14px;
  padding: 7px 14px; border-radius: 999px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
  background: rgba(247, 243, 235, 0.92); color: var(--ink);
}
.chip.ok { color: #2E5A43; }
.chip.mid { color: #8A6A2F; }
.chip.off { color: var(--muted); }
.card-txt { padding: 18px 6px 0; }
.card-txt h3 { font-size: clamp(24px, 2.6vw, 32px); }
.card-specs { color: var(--muted); font-size: 14.5px; margin-top: 4px; }
.card-price { font-family: var(--serif); font-style: italic; font-size: 19px; margin-top: 10px; color: var(--bruma-deep); }

.car-ui { display: flex; align-items: center; gap: 30px; margin-top: clamp(26px, 4vh, 40px); }
.car-progress { flex: 1; height: 2px; background: rgba(34, 48, 60, 0.14); border-radius: 2px; position: relative; overflow: hidden; }
.car-progress span { position: absolute; inset: 0; background: var(--bruma-deep); transform: scaleX(0); transform-origin: left; will-change: transform; }
.car-btns { display: flex; gap: 10px; }
.car-btn {
  width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--ink);
  background: none; color: var(--ink); font-size: 19px; cursor: pointer;
  transition: background 0.35s ease, color 0.35s ease, opacity 0.3s ease, transform 0.35s var(--e);
}
.car-btn:hover:not(:disabled) { background: var(--ink); color: var(--bg); transform: translateY(-2px); }
.car-btn:disabled { opacity: 0.3; cursor: default; }
.car-hint { margin-top: 14px; font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }

/* ── Un día en Casa Alba ──────────────────────────────────────────────── */
.day { position: relative; background: var(--bg); }
.day-pin { position: relative; padding: clamp(70px, 10vh, 120px) 0; overflow: hidden; }
.day-wash { position: absolute; inset: 0; z-index: 0; }
.day-wash i { position: absolute; inset: 0; opacity: 0; transition: opacity 1.3s ease; }
.day-wash .w0 { background: linear-gradient(180deg, #F7E5DE, #F3E4CF); }
.day-wash .w1 { background: linear-gradient(180deg, #F5EFDD, #E8EFEA); }
.day-wash .w2 { background: linear-gradient(180deg, #E5F0F2, #F3F0E3); }
.day-wash .w3 { background: linear-gradient(180deg, #F7F0DC, #F0E7D5); }
.day-wash .w4 { background: linear-gradient(180deg, #F3EAD9, #EBDFD2); }
.day-wash .w5 { background: linear-gradient(180deg, #F2DCC8, #E5CFC5); }
.day-wash .w6 { background: linear-gradient(180deg, #232E3B, #1A2431); }
.day.scrub .day-wash i { transition: none; }

/* el sol recorre el cielo con el scroll */
.day-sky { position: absolute; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; }
.day-orb {
  position: absolute; left: 0; top: 0;
  width: clamp(90px, 13vw, 190px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, var(--orb, rgba(240, 205, 150, 0.9)) 0%, rgba(240, 205, 150, 0.22) 52%, transparent 72%);
  transform: translate3d(-50%, -50%, 0);
  opacity: 0; will-change: transform;
}
.day.scrub .day-orb { opacity: 1; }
@media (max-width: 700px) { .day-orb { width: clamp(70px, 22vw, 110px); } }

.day-head, .day-stage { position: relative; z-index: 2; }
.day-head h2 { transition: color 0.9s ease; }
.day-stage { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: clamp(24px, 4vw, 70px); margin-top: clamp(34px, 6vh, 60px); }

.day-rail { position: relative; display: none; flex-direction: column; justify-content: space-between; padding-left: 18px; }
.day-rail::before { content: ""; position: absolute; left: 4px; top: 4px; bottom: 4px; width: 1px; background: rgba(34, 48, 60, 0.22); transition: background 0.9s ease; }
.day-rail li {
  position: relative; font-size: 13px; letter-spacing: 0.14em; color: var(--muted);
  transition: color 0.5s ease, transform 0.5s var(--e), opacity 0.5s ease; opacity: 0.55;
}
.day-rail li::before {
  content: ""; position: absolute; left: -18px; top: 0.5em; width: 9px; height: 9px; border-radius: 50%;
  background: transparent; border: 1px solid var(--muted); transition: background 0.5s ease, border-color 0.5s ease;
}
.day-rail li.lit { opacity: 1; color: var(--ink); }
.day-rail li.lit::before { border-color: var(--gold); background: var(--gold); }
.day-rail li.now { transform: translateX(6px); font-weight: 600; }

.day-entry { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 60px); align-items: center; }
.day-time { font-family: var(--serif); font-weight: 300; font-size: clamp(56px, 8vw, 110px); line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.day-entry h3 { font-size: clamp(24px, 2.8vw, 36px); margin-top: 14px; }
.day-txt { color: var(--muted); margin-top: 12px; max-width: 27em; font-size: 16.5px; }
.day-entry figure { border-radius: 16px; overflow: hidden; box-shadow: 0 26px 60px rgba(34, 48, 60, 0.16); }
.day-entry img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

/* modo mejorado (JS + motion): sticky + crossfade */
.day.enh .day-pin {
  position: sticky; top: 0;
  height: 100svh; height: 100dvh;
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(60px, 9vh, 100px) 0 clamp(30px, 5vh, 60px);
}
/* .wrap lleva margin:0 auto; como hijo de un flex column los márgenes auto
   anulan el stretch y la caja colapsa a fit-content (la etapa quedaba en
   36 px a 360 y en 273 px a 1024, con el texto recortado por el overflow).
   Fijar el ancho hace que los márgenes auto se resuelvan a 0. */
.day.enh .day-pin > .wrap { width: 100%; }
.day.enh .day-rail { display: flex; }
.day.enh .day-entries { position: relative; min-height: clamp(320px, 52vh, 560px); }
.day.enh .day-entry {
  position: absolute; inset: 0; opacity: 0; visibility: hidden;
  transform: translateY(34px);
  transition: opacity 0.8s ease, transform 0.9s var(--e), visibility 0.8s;
}
.day.enh .day-entry.act { opacity: 1; visibility: visible; transform: none; }
/* con scrub activo el rAF escribe opacity/transform en línea: sin transición
   para que la mezcla siga al scroll cuadro a cuadro, no con retardo */
.day.enh.scrub .day-entry { transition: none; will-change: opacity, transform; }
.day.enh.scrub .day-entry figure { will-change: transform; }
/* la tira se recorta: overflow-clip-margin deja respirar la sombra de las
   fotos sin dejar asomar la entrada vecina */
.day.enh.scrub .day-entries { overflow: hidden; overflow: clip; overflow-clip-margin: 30px; }
/* sin el modo mejorado (motion reducido o sin JS) el rail va display:none, así
   que .day-entries caía en la columna de 150 px del grid y las fotos quedaban
   de 49 px de ancho en escritorio. Sin rail, una sola columna. */
.day:not(.enh) .day-stage { grid-template-columns: minmax(0, 1fr); }
.day:not(.enh) .day-entries { display: grid; gap: clamp(50px, 8vh, 80px); }
.day:not(.enh) .day-wash i.w1 { opacity: 1; }

/* noche: el tramo final oscurece la sección */
.day.night .day-head h2, .day.night .day-time, .day.night .day-entry h3 { color: #F2EDE2; }
.day.night .day-txt { color: #B9C2CC; }
.day.night .day-head .kicker { color: #A8BCCB; }
.day.night .day-rail li { color: #8E9AA6; }
.day.night .day-rail li.lit { color: #F2EDE2; }
.day.night .day-rail::before { background: rgba(242, 237, 226, 0.3); }

/* ── El taller ────────────────────────────────────────────────────────── */
.taller { background: var(--bg); }
.taller-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(40px, 6vw, 100px); align-items: center; }
.taller-ph { border-radius: 220px 220px 18px 18px; }
.taller-ph img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; filter: grayscale(1) contrast(1.02) brightness(1.04); }
.taller-ph figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 18px 16px; background: linear-gradient(to top, rgba(34, 48, 60, 0.8), transparent); color: #F2EDE2; font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; }
.taller-quote p { font-family: var(--serif); font-weight: 300; font-size: clamp(30px, 4.2vw, 54px); line-height: 1.16; }
.taller-quote em { font-style: italic; color: var(--bruma-deep); }
.taller-quote cite { display: block; margin-top: 28px; font-style: normal; font-size: 16px; }
.taller-quote cite span { color: var(--muted); font-size: 13.5px; }
.taller-data { margin-top: 30px; display: flex; flex-wrap: wrap; gap: clamp(20px, 3vw, 44px); }
.taller-data li { font-size: 14px; color: var(--muted); max-width: 12em; }
.taller-data b { display: block; font-family: var(--serif); font-weight: 300; font-size: 34px; color: var(--ink); line-height: 1.1; }

/* ── Dossier ──────────────────────────────────────────────────────────── */
.dossier { position: relative; padding: clamp(90px, 14vh, 170px) 0; overflow: hidden; }
.dossier-bg { position: absolute; inset: -10% 0; }
.dossier-bg img { width: 100%; height: 100%; object-fit: cover; opacity: 0.5; will-change: transform; }
.dossier::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, var(--bg), rgba(247, 243, 235, 0.55) 30%, rgba(247, 243, 235, 0.55) 70%, var(--bg)); z-index: 1; }
.dossier .wrap { position: relative; z-index: 2; }
.dossier-card {
  max-width: 640px; margin: 0 auto; text-align: center;
  background: rgba(247, 243, 235, 0.92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--line); border-radius: 22px;
  padding: clamp(34px, 5vw, 60px);
  box-shadow: 0 40px 90px rgba(34, 48, 60, 0.14);
}
.dossier-list { margin-top: 22px; display: grid; gap: 8px; }
.dossier-list li { color: var(--muted); font-size: 15.5px; }
.dossier-list li::before { content: "— "; color: var(--gold); }
.dossier-form { margin-top: 30px; }
.dossier-row { display: flex; gap: 10px; }
.dossier-row input {
  flex: 1; min-width: 0; appearance: none;
  border: 1px solid var(--line); border-radius: 999px; background: #FFFDF8;
  padding: 14px 22px; font-family: var(--sans); font-size: 16px; color: var(--ink);
  transition: border-color 0.3s ease;
}
.dossier-row input:focus { outline: none; border-color: var(--bruma-deep); }
.dossier-row input.err { border-color: #B0532F; }
.form-note { margin-top: 14px; font-size: 12.5px; color: var(--muted); }
.form-ok p { font-size: 17px; color: var(--ink); max-width: 30em; margin: 0 auto; }
.form-ok b { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 22px; color: var(--bruma-deep); }

/* ── Footer ───────────────────────────────────────────────────────────── */
.foot { border-top: 1px solid var(--line); padding: clamp(50px, 8vh, 90px) 0 30px; background: var(--bg2); }
.foot-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(30px, 5vw, 80px); align-items: start; }
.foot-mark { font-family: var(--serif); font-size: clamp(40px, 6vw, 72px); line-height: 1; }
.foot-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.foot h4 { font-size: 11px; letter-spacing: 0.28em; text-transform: uppercase; color: var(--bruma-deep); margin-bottom: 10px; }
.foot p { color: var(--muted); font-size: 14.5px; }
.foot a:hover { color: var(--ink); }
.foot-demo { margin-top: clamp(36px, 6vh, 56px); padding-top: 20px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }

/* ═══ Responsive ══════════════════════════════════════════════════════ */
@media (max-width: 1080px) {
  .nav-links { display: none; }
  .burger { display: block; }
}
@media (max-width: 900px) {
  .ed-grid, .taller-grid, .foot-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stats div { border-left: 0; padding-left: 0; border-bottom: 1px solid var(--line); }
  .stats div:nth-last-child(-n+2) { border-bottom: 0; }
  .day-stage { grid-template-columns: 1fr; }
  .day-rail { display: none !important; }
  .day-entry { grid-template-columns: 1fr; gap: 22px; }
  .day.enh .day-entries { min-height: min(72vh, 620px); }
  .day-entry figure { max-width: 440px; }
  .taller-ph { max-width: 380px; }
  .ly-cliff { top: 10vh; width: clamp(150px, 34vw, 300px); }
  .ly-sea { width: clamp(160px, 40vw, 320px); bottom: 12vh; }
}
@media (max-width: 900px) {
  /* A 360 la etiqueta del acantilado caía justo encima del eyebrow
     (x 228–342, y 222–240) y a 390 sobre x 259–372, y 244–262; además
     sobresalía 6 px del viewport. Son rótulos decorativos: fuera en móvil. */
  .ly-sea figcaption, .ly-cliff figcaption { display: none; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav-tel { display: none; }
  .hero-copy { padding-bottom: 110px; }
  .hero-foot { justify-content: center; gap: 14px; flex-wrap: wrap; }
  .hero-foot span:nth-child(2) { display: none; }
  .ly-sea { bottom: 9vh; rotate: -3deg; }
  .sun { right: 8vw; top: 11vh; }
  .villas-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .car-card { width: 82vw; }
  .dossier-row { flex-direction: column; }
  .dossier-row .btn { width: 100%; }
  .foot-cols { grid-template-columns: 1fr; gap: 20px; }
  .day-time { font-size: clamp(48px, 15vw, 72px); }
}

/* ═══ Reduced motion ═════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-fade], .js [data-lines] span { opacity: 1 !important; transform: none !important; filter: none !important; transition: none !important; }
  .js [data-line] { transform: none !important; animation: none !important; }
  .js [data-words] .wi { transform: none !important; filter: none !important; transition: none !important; }
  .js .hero-veil { animation: none !important; transform: scaleY(0) !important; }
  .js .ly-sea img, .js .ly-cliff img { animation: none !important; transform: none !important; }
  .js .hero-foot [data-hf] { animation: none !important; opacity: 1 !important; transform: none !important; }
  .day-orb { display: none !important; }
  .car-card figure::after { display: none !important; }
  .js .rv { clip-path: none !important; transition: none !important; }
  .js .rv img { transform: none !important; transition: none !important; }
  .ly, .break-media img, .dossier-bg img { transform: none !important; }
  .break-media img { scale: 1; }
  .car-card img, .btn, .car-btn, .menu, .menu nav a { transition-duration: 0.01s !important; }
}

/* ── Defensa de [hidden] ───────────────────────────────────────────────────
   Cualquier regla de autor que declare `display` le gana a la regla
   `[hidden] { display: none }` del navegador, porque tienen la misma
   especificidad y las de autor pesan más. Sin esta línea, un elemento con
   `hidden` se sigue mostrando. Va al final para ganar por orden además de
   por !important. */
[hidden] { display: none !important; }

/* --- alto intrinseco --- */
/* `width`/`height` en el HTML reservan la caja y evitan el salto de layout al
   cargar, pero el atributo `height` cuenta como alto definido y desactiva el
   `aspect-ratio` de arriba. `height: auto` se lo devuelve: la proporción la
   marca el CSS (o, si no hay, la de los propios atributos). */
.ed-media img, .car-card img, .day-entry img, .taller-ph img { height: auto; }
