/* ==========================================================================
   TRELLES 928 — Brochure digital
   Identidad: brochure TRELLES_v3 (FENAM Desarrollos · hall)
   ========================================================================== */

@font-face { font-family: 'Nyght Serif'; src: url('../fonts/nyght-serif-regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Nyght Serif'; src: url('../fonts/nyght-serif-light.woff2') format('woff2'); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: 'Google Sans'; src: url('../fonts/google-sans-var.woff2') format('woff2-variations'), url('../fonts/google-sans-var.woff2') format('woff2'); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('../fonts/inter-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('../fonts/inter-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('../fonts/inter-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('../fonts/inter-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
  /* Paleta del brochure */
  --bg: #ECEBE7;
  --bg-deep: #E2E0DB;
  --ink: #47423F;
  --text: #5F5A57;
  --muted: #96918C;
  --logo: #635D5A;
  --icon: #BCC0C5;
  --paper: #F3F2EF;
  --night: #1F1C1A;
  --line: rgba(71, 66, 63, .16);

  --serif: 'Nyght Serif', 'Times New Roman', serif;
  --sans: 'Google Sans', 'Helvetica Neue', Arial, sans-serif;
  --label: 'Inter', 'Helvetica Neue', Arial, sans-serif;

  --gutter: clamp(20px, 3.4vw, 64px);
  --header-h: 76px;
  --radius: clamp(22px, 2.8vw, 56px);
  --full: 100vh;

  --fs-display: clamp(44px, 7.3vw, 168px);
  --fs-lead: clamp(17px, 1.45vw, 27px);
  --fs-body: clamp(15px, 1.08vw, 19px);
  --fs-label: clamp(11px, .74vw, 13px);
  --fs-num: clamp(38px, 3.4vw, 68px);

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.76, 0, .24, 1);
}
@supports (height: 100svh) { :root { --full: 100svh; } }

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
.js body.is-loading { overflow: hidden; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, figure, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
::selection { background: var(--ink); color: var(--paper); }
:focus-visible { outline: 1.5px solid currentColor; outline-offset: 4px; }

.serif { font-family: var(--serif); font-weight: 400; color: var(--ink); }
.muted { color: var(--muted); }
.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: fixed; top: 12px; left: 12px; z-index: 200;
  padding: 10px 16px; border-radius: 999px;
  background: var(--ink); color: var(--paper);
  font: 500 13px var(--label); text-decoration: none;
  transform: translateY(-160%); transition: transform .4s var(--ease-out);
}
.skip:focus { transform: none; }

/* Tipografía común --------------------------------------------------------- */
.display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--fs-display);
  line-height: 1.02;
  letter-spacing: .005em;
  color: var(--ink);
  text-transform: uppercase;
}
.lead { font-size: var(--fs-lead); line-height: 1.42; color: var(--text); }
.eyebrow {
  font: 500 var(--fs-label)/1.3 var(--label);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.uf-line {
  font: 500 clamp(12px, .95vw, 18px)/1.3 var(--label);
  letter-spacing: .01em;
  color: var(--ink);
  text-transform: uppercase;
}
.uf-line .muted { font-weight: 400; }

/* Recortes animables (GSAP interpola las variables, no el string de clip-path) */
.clip { clip-path: inset(var(--ct, 0%) var(--cr, 0%) var(--cb, 0%) var(--cl, 0%) round var(--crad, 0px)); }

/* Máscaras de SplitText: margen para tildes y descendentes */
.char-mask { padding-block: .16em .06em; margin-block: -.16em -.06em; }
.line-mask { padding-block: .08em; margin-block: -.08em; }

/* ==========================================================================
   Loader
   ========================================================================== */
.loader { display: none; }
.js .loader {
  position: fixed; inset: 0; z-index: 120;
  display: grid; place-items: center;
  background: var(--bg);
}
.loader__logos { display: flex; align-items: center; gap: clamp(44px, 6.4vw, 124px); color: var(--logo); }
.loader__logo { display: block; }
.loader__logo svg { display: block; width: auto; }
.loader__logo--fenam svg { height: clamp(48px, 5vw, 96px); }
.loader__logo--hall svg { height: clamp(44px, 4.6vw, 88px); }
.loader__foot {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: calc(var(--gutter) * .8);
  display: flex; justify-content: space-between; align-items: flex-end;
  font: 500 var(--fs-label)/1 var(--label); letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.loader__count { font-variant-numeric: tabular-nums; color: var(--ink); letter-spacing: .04em; }
.loader__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--line); }
.loader__bar span { display: block; height: 100%; background: var(--ink); transform: scaleX(0); transform-origin: left; }

/* ==========================================================================
   Header
   ========================================================================== */
.header {
  --fg: var(--ink); --fg-inv: var(--paper);
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 0 var(--gutter);
  pointer-events: none;
  transition: transform .8s var(--ease-out);
}
.header > * { pointer-events: auto; }
[data-theme] { transition: color .5s ease; }
[data-theme="light"] { --fg: var(--ink); --fg-inv: var(--paper); color: var(--ink); }
[data-theme="dark"] { --fg: var(--paper); --fg-inv: var(--ink); color: var(--paper); }

.header__brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--fg); }
.header__brand svg { display: block; width: auto; }
.header__brand .logo-fenam { height: 24px; }
.header__brand .logo-hall { height: 21px; }
.header__brand-sep { width: 1px; height: 22px; background: currentColor; opacity: .35; }

.header__nav ul { display: flex; gap: 6px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 17px 9px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--fg) 34%, transparent);
  background: color-mix(in srgb, var(--fg-inv) 14%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font: 500 11.5px/1 var(--label);
  letter-spacing: .07em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--fg);
  white-space: nowrap;
  transition: background .45s ease, color .45s ease, border-color .45s ease;
}
.pill:hover { border-color: var(--fg); }
.pill.is-active { background: var(--fg); color: var(--fg-inv); border-color: var(--fg); }
.pill--solid { background: var(--fg); color: var(--fg-inv); border-color: var(--fg); }
.pill--solid:hover { background: transparent; color: var(--fg); }
.pill svg { width: 15px; height: 15px; transition: transform .5s var(--ease-out); }
.pill:hover svg { transform: translateX(3px); }

.header__menu { display: none; }

/* Menú móvil */
.menu {
  position: fixed; inset: 0; z-index: 55;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 32px;
  padding: calc(var(--header-h) + 24px) var(--gutter) calc(var(--gutter) * 1.4);
  background: var(--ink); color: var(--paper);
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
  transition: clip-path .9s var(--ease-in-out), visibility 0s linear .9s;
}
.menu.is-open { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path .9s var(--ease-in-out), visibility 0s; }
.menu ol { display: grid; gap: 4px; }
.menu a {
  display: flex; align-items: baseline; gap: 14px;
  font: 400 clamp(38px, 11vw, 64px)/1.08 var(--serif); text-transform: uppercase;
  text-decoration: none; color: var(--paper);
}
.menu a span { font: 500 11px var(--label); letter-spacing: .1em; opacity: .55; }
.menu__foot { font: 400 15px/1.6 var(--sans); opacity: .75; }
.menu__foot a { font: inherit; display: inline; text-transform: none; }

/* Progreso lateral */
.progress {
  position: fixed; right: calc(var(--gutter) * .45); top: 50%; z-index: 50;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  transform: translateY(-50%);
  font: 500 10.5px/1 var(--label); letter-spacing: .08em;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  opacity: 0; transition: opacity .6s ease, color .5s ease;
}
.progress.is-ready { opacity: 1; }
.progress__track { position: relative; width: 1px; height: 96px; background: color-mix(in srgb, currentColor 22%, transparent); }
.progress__fill { position: absolute; inset: 0; background: currentColor; transform-origin: top; transform: scaleY(var(--p, 0)); }
.progress__label { writing-mode: vertical-rl; transform: rotate(180deg); text-transform: uppercase; letter-spacing: .16em; opacity: .7; margin-top: 6px; }

/* Cursor contextual */
.cursor { display: none; }
.has-cursor .cursor {
  display: block; position: fixed; top: 0; left: 0; z-index: 110;
  pointer-events: none;
}
.cursor__bubble {
  position: absolute; left: 0; top: 0;
  width: 96px; height: 96px; margin: -48px 0 0 -48px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--ink); color: var(--paper);
  font: 500 10.5px/1 var(--label); letter-spacing: .12em; text-transform: uppercase;
  transform: scale(0);
  transition: transform .55s var(--ease-out), background .3s ease, color .3s ease;
}
.cursor.is-active .cursor__bubble { transform: scale(1); }
.cursor.is-light .cursor__bubble { background: var(--paper); color: var(--ink); }
.has-cursor [data-cursor] { cursor: none; }

/* ==========================================================================
   Portada
   ========================================================================== */
.cover { position: relative; height: var(--full); overflow: hidden; background: var(--bg); }
.cover__head {
  position: absolute; inset: 0; z-index: 2;
  padding: calc(var(--header-h) + 2.4vh) var(--gutter) 0;
}
.cover__meta {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
  font: 500 var(--fs-label)/1.35 var(--label); letter-spacing: .02em; color: var(--text);
}
.cover__meta p:nth-child(2) { text-align: center; }
.cover__meta p:nth-child(3) { text-align: right; }
.cover__title { margin-top: clamp(28px, 7vh, 96px); font-weight: 400; }
.cover__kicker {
  display: block;
  font: 700 clamp(22px, 2.55vw, 50px)/1 var(--label);
  letter-spacing: -.01em; text-transform: uppercase; color: var(--ink);
  margin-bottom: .1em;
}
.cover__name {
  display: block;
  font-family: var(--serif); font-weight: 400;
  font-size: 15vw; /* JS ajusta al ancho exacto */
  line-height: .9;
  color: #77716C;
  white-space: nowrap;
  margin-left: -.035em;
}
.cover__year { display: block; margin-top: .9em; font: 500 var(--fs-label)/1 var(--label); letter-spacing: .04em; color: var(--ink); }

.cover__media {
  position: absolute; inset: 0; z-index: 3;
  overflow: hidden;
  --ct: 58%; --cr: 3.4%; --cb: 3.4%; --cl: 3.4%; --crad: 22px;
}
.cover__curtain { position: absolute; inset: 0; overflow: hidden; background: var(--night); }
.cover__pan {
  position: absolute; left: 0; top: 0; width: 100%;
  height: calc(100vw * 1.125);
  transform-origin: 50% 0;
  will-change: transform;
}
.cover__pan img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
.cover__shade {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(20, 18, 17, .42) 0%, rgba(20, 18, 17, 0) 24%, rgba(20, 18, 17, 0) 70%, rgba(20, 18, 17, .35) 100%);
}
.cover__cue {
  position: absolute; z-index: 4; right: calc(var(--gutter) * 1.4); bottom: calc(var(--gutter) * 1.3);
  display: flex; align-items: center; gap: 12px;
  font: 500 var(--fs-label)/1 var(--label); letter-spacing: .14em; text-transform: uppercase; color: var(--paper);
  pointer-events: none;
}
.cover__cue i { position: relative; display: block; width: 1px; height: 42px; overflow: hidden; background: rgba(243, 242, 239, .3); }
.cover__cue i::after { content: ''; position: absolute; inset: 0; background: var(--paper); animation: cue 2.2s var(--ease-in-out) infinite; }
@keyframes cue { 0% { transform: translateY(-100%); } 55% { transform: translateY(0); } 100% { transform: translateY(100%); } }

/* Hotspots */
.hotspot {
  position: absolute; left: var(--x); top: var(--y);
  display: flex; align-items: center;
  color: var(--paper);
  transform: translate(-9px, -50%);
  text-align: left;
}
.hotspot--left { flex-direction: row-reverse; transform: translate(calc(-100% + 9px), -50%); text-align: right; }
.hotspot__dot { position: relative; flex: none; width: 18px; height: 18px; border-radius: 50%; background: var(--paper); box-shadow: 0 0 0 5px rgba(243, 242, 239, .18); }
.hotspot__dot::after {
  content: ''; position: absolute; inset: -9px; border-radius: 50%;
  border: 1px solid rgba(243, 242, 239, .75);
  animation: ping 2.6s var(--ease-out) infinite;
}
@keyframes ping { 0% { transform: scale(.55); opacity: 1; } 80%, 100% { transform: scale(1.5); opacity: 0; } }
.hotspot__line { flex: none; width: clamp(18px, 2.4vw, 40px); height: 1px; background: rgba(243, 242, 239, .7); }
.hotspot__card {
  display: grid; gap: 3px;
  padding: 11px 15px 10px;
  border-radius: 14px;
  background: rgba(31, 28, 26, .28);
  border: 1px solid rgba(243, 242, 239, .28);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  white-space: nowrap;
}
.hotspot__card strong { font: 500 clamp(12px, .9vw, 15px)/1.2 var(--label); letter-spacing: .01em; }
.hotspot__card small {
  font: 400 clamp(11px, .78vw, 13px)/1.3 var(--label); opacity: .78;
  display: grid; grid-template-rows: 0fr; transition: grid-template-rows .5s var(--ease-out);
}
.hotspot__card small > span { overflow: hidden; }
.hotspot:hover small, .hotspot:focus-visible small, .hotspot.is-open small { grid-template-rows: 1fr; }

/* ==========================================================================
   Manifiesto
   ========================================================================== */
.statement {
  min-height: var(--full);
  display: grid; grid-template-columns: repeat(12, 1fr); align-items: center;
  padding: 18vh var(--gutter);
}
.statement__eyebrow { grid-column: 1 / 4; align-self: start; padding-top: .6em; }
.statement__text {
  grid-column: 5 / 13;
  font: 400 clamp(26px, 3.3vw, 64px)/1.16 var(--sans);
  letter-spacing: -.012em;
  color: var(--ink);
}
.statement__text .serif { letter-spacing: 0; }

/* ==========================================================================
   Ubicación
   ========================================================================== */
.ubicacion {
  min-height: var(--full);
  display: grid; grid-template-columns: repeat(12, 1fr); align-items: center;
  padding: 16vh var(--gutter);
}
.ubicacion__intro { grid-column: 3 / 9; }
.ubicacion__intro .lead { margin-top: clamp(18px, 2.6vh, 34px); max-width: 30em; }
.ubicacion__intro .lead + .lead { margin-top: .2em; }

/* Mapa */
.mapa {
  position: relative;
  height: var(--full); min-height: 620px;
  display: grid; grid-template-columns: 64% 1fr;
}
.mapa__frame {
  position: relative; overflow: hidden;
  background: #EDEDEB;
  touch-action: pan-y;
}
.mapa__canvas {
  position: absolute; left: 0; top: 0;
  transform-origin: 0 0;
  will-change: transform;
}
.mapa__img { width: 100%; height: 100%; user-select: none; -webkit-user-drag: none; }
.mapa__streets { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.mapa__streets text {
  font-family: var(--label); font-weight: 500; font-size: 40px; letter-spacing: 2px;
  fill: #55504C; text-transform: uppercase;
}
.mapa__pin, .mapa__home {
  position: absolute; left: var(--x); top: var(--y);
  width: 0; height: 0;
}
.mapa__pin-dot {
  position: absolute; left: 0; top: 0;
  width: var(--pin, clamp(24px, 1.95vw, 36px)); aspect-ratio: 1;
  display: grid; place-items: center;
  border-radius: 50%;
  background: #3E3A37; color: var(--paper);
  font: 600 calc(var(--pin, clamp(24px, 1.95vw, 36px)) * .46)/1 var(--label);
  transform: translate(-50%, -50%) scale(var(--inv, 1));
  transition: background .4s ease, box-shadow .5s var(--ease-out);
}
.mapa__pin-dot > span { display: block; transition: transform .5s var(--ease-out); }
.mapa__pin:hover .mapa__pin-dot, .mapa__pin.is-active .mapa__pin-dot { background: var(--night); box-shadow: 0 0 0 7px rgba(71, 66, 63, .16), 0 10px 24px rgba(31, 28, 26, .25); }
.mapa__pin.is-active .mapa__pin-dot > span { transform: scale(1.12); }
.mapa__pin-label, .mapa__home-label {
  position: absolute; left: 0; top: 0;
  transform: translate(-50%, calc(-100% - var(--pin, 30px) * .75)) scale(var(--inv, 1));
  transform-origin: 50% 100%;
  white-space: nowrap;
  padding: 8px 13px 7px; border-radius: 999px;
  background: var(--paper); color: var(--ink);
  box-shadow: 0 8px 26px rgba(31, 28, 26, .14);
  font: 500 12px/1 var(--label); letter-spacing: .06em; text-transform: uppercase;
  opacity: 0; pointer-events: none;
  transition: opacity .35s ease;
}
.mapa__pin.is-active .mapa__pin-label { opacity: 1; }
.mapa__home-mark {
  position: absolute; left: 0; top: 0;
  width: calc(var(--pin, 30px) * 1.62); aspect-ratio: 1;
  transform: translate(-50%, -50%) scale(var(--inv, 1));
  display: grid; place-items: center;
  border-radius: 50%; background: var(--paper);
  border: 2px solid #3E3A37; color: #3E3A37;
}
.mapa__home-mark svg { width: 46%; height: auto; }
.mapa__home-mark::before {
  content: ''; position: absolute; inset: -2px; border-radius: 50%;
  border: 1px solid #3E3A37; animation: ping 2.8s var(--ease-out) infinite;
}
.mapa__home-label {
  opacity: 1;
  font: 400 15px/1 var(--serif); letter-spacing: .04em;
  background: var(--ink); color: var(--paper);
  transform: translate(-50%, calc(-100% - var(--pin, 30px) * 1.1)) scale(var(--inv, 1));
}
.mapa__aside {
  display: flex; flex-direction: column; justify-content: center;
  padding: calc(var(--header-h) + 3vh) var(--gutter) 6vh clamp(28px, 3.6vw, 72px);
}
.mapa__heading {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px;
  font: 500 clamp(12px, .95vw, 17px)/1.25 var(--label); letter-spacing: .14em; text-transform: uppercase; color: var(--ink);
  margin-bottom: clamp(18px, 3.4vh, 40px);
}
.mapa__heading .serif { font-size: 1.12em; letter-spacing: .06em; }
.mapa__heading i { font-style: normal; opacity: .6; }
.poi-list { display: grid; gap: 1px; }
.poi-list button {
  position: relative; width: 100%;
  display: flex; align-items: center; gap: 14px;
  padding: clamp(7px, 1.05vh, 12px) 0;
  font: 500 clamp(11.5px, .84vw, 15px)/1.25 var(--label); letter-spacing: .04em; text-transform: uppercase; color: var(--ink);
  text-align: left;
  border-bottom: 1px solid var(--line);
  transition: color .4s ease, padding-left .6s var(--ease-out);
}
.poi-list li:first-child button { border-top: 1px solid var(--line); }
.poi-list__n {
  flex: none; width: 24px; height: 24px; display: grid; place-items: center;
  border-radius: 50%; border: 1px solid currentColor;
  font-size: 10.5px; letter-spacing: 0;
  transition: background .4s ease, color .4s ease;
}
.poi-list__n.is-empty { width: 10px; height: 10px; margin: 0 8px; }
.poi-list button::after {
  content: '→'; margin-left: auto; opacity: 0; transform: translateX(-8px);
  transition: opacity .4s ease, transform .5s var(--ease-out);
}
.poi-list button:hover, .poi-list button.is-active { padding-left: 8px; }
.poi-list button.is-active .poi-list__n, .poi-list button:hover .poi-list__n { background: var(--ink); color: var(--paper); }
.poi-list button.is-active::after, .poi-list button:hover::after { opacity: 1; transform: none; }
.poi-list.has-active button:not(.is-active) { color: var(--muted); }
.mapa__hint { margin-top: clamp(16px, 2.6vh, 30px); font: 400 var(--fs-label)/1.4 var(--label); color: var(--muted); }

/* Diagrama de entorno */
.entorno {
  min-height: var(--full);
  display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 4vw;
  padding: 14vh var(--gutter);
}
.diagram { width: 100%; max-width: 760px; justify-self: center; overflow: visible; }
.dg-ring { fill: none; stroke: rgba(71, 66, 63, .26); stroke-width: 1.6; }
.dg-arc { fill: none; stroke: var(--ink); stroke-width: 3.2; stroke-linecap: round; }
.dg-head { fill: var(--ink); }
.dg-center { font-family: var(--serif); font-size: 35px; letter-spacing: .5px; fill: var(--ink); }
.dg-sub { font-family: var(--label); font-weight: 500; font-size: 12.5px; letter-spacing: 2.6px; fill: var(--muted); }

.dg-icon { color: #7F7974; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; transition: color .5s ease; }
.dg-home__bg { fill: var(--ink); }
.dg-home .dg-icon { color: var(--paper); }
.dg-home__pulse, .dg-node__pulse { fill: none; stroke: var(--ink); stroke-width: 1; opacity: 0; transform-box: fill-box; transform-origin: center; }
.dg-home__pulse { animation: dgPulse 3s var(--ease-out) infinite; }
@keyframes dgPulse { 0% { transform: scale(1); opacity: .5; } 100% { transform: scale(1.75); opacity: 0; } }

.dg-node { cursor: pointer; outline: none; }
.dg-node__face { transform-box: fill-box; transform-origin: center; transition: transform .8s var(--ease-out); }
.dg-node__bg { fill: var(--bg); stroke: rgba(71, 66, 63, .3); stroke-width: 1.3; transition: fill .6s ease, stroke .6s ease; }
.dg-node:hover .dg-node__face { transform: scale(1.06); }
.dg-node:focus-visible .dg-node__bg { stroke: var(--ink); stroke-width: 2; }
.dg-node.is-lit .dg-node__face { transform: scale(1.12); }
.dg-node.is-lit .dg-node__bg { fill: var(--ink); stroke: var(--ink); }
.dg-node.is-lit .dg-icon { color: var(--paper); }
.dg-node.is-lit .dg-node__pulse { animation: dgPulse 2.4s var(--ease-out) infinite; }
.dg-label { font-family: var(--label); font-weight: 500; font-size: 20px; letter-spacing: .6px; fill: var(--muted); transition: fill .45s ease; }
.dg-node.is-active .dg-label { fill: var(--ink); }

.entorno__detail { max-width: 30em; }
.entorno__detail .eyebrow { margin-bottom: clamp(14px, 2.2vh, 26px); }
.entorno__swap { min-height: 15em; }
.entorno__cat { display: flex; align-items: center; gap: clamp(14px, 1.4vw, 24px); font-size: clamp(36px, 4.2vw, 88px); line-height: 1.02; text-transform: uppercase; font-weight: 400; }
.entorno__ico {
  flex: none; width: .9em; height: .9em; padding: .17em;
  border-radius: 50%; background: var(--ink); color: var(--paper);
  fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}
.entorno__places { margin-top: clamp(18px, 3vh, 36px); display: grid; }
.entorno__places li { border-top: 1px solid var(--line); }
.entorno__places li:last-child { border-bottom: 1px solid var(--line); }
.entorno__place {
  width: 100%; display: flex; align-items: center; gap: 14px;
  padding: 14px 0; text-align: left;
  font: 500 clamp(12px, .9vw, 16px)/1.3 var(--label); letter-spacing: .04em; text-transform: uppercase; color: var(--ink);
}
.entorno__place .poi-list__n { width: 26px; height: 26px; }
.entorno__place em { margin-left: auto; font: 400 var(--fs-label) var(--label); letter-spacing: .06em; font-style: normal; color: var(--muted); transition: color .3s ease; }
button.entorno__place:hover em { color: var(--ink); }
.entorno__dots { display: flex; gap: 8px; margin-top: clamp(22px, 3.6vh, 40px); }
.entorno__dots button { width: 34px; height: 3px; border-radius: 2px; background: var(--line); position: relative; overflow: hidden; }
.entorno__dots button span { position: absolute; inset: 0; background: var(--ink); transform: scaleX(0); transform-origin: left; }
.entorno__dots button.is-active span { transform: scaleX(1); }

/* ==========================================================================
   El proyecto
   ========================================================================== */
.proyecto { position: relative; height: var(--full); overflow: hidden; background: var(--bg); }
.proyecto__title {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font: 400 clamp(46px, 8.6vw, 196px)/1 var(--serif);
  letter-spacing: .01em;
  text-transform: uppercase;
  color: var(--ink);
  white-space: nowrap;
  pointer-events: none;
}
.proyecto__window {
  position: absolute; inset: 0;
  background: var(--night);
  --ct: 19%; --cr: 36.5%; --cb: 19%; --cl: 36.5%; --crad: 24px;
}
.proyecto__window img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.32); }
.proyecto__window::after { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 50%, rgba(20, 18, 17, .32), rgba(20, 18, 17, .12) 70%); pointer-events: none; }
.proyecto__window .proyecto__title { z-index: 1; color: var(--paper); }

/* Datos */
.datos {
  position: relative;
  min-height: var(--full);
  display: grid; grid-template-columns: 1fr 31%;
  background: var(--bg);
  overflow-x: clip;
}
.datos__text { align-self: center; padding: 14vh var(--gutter) 14vh 7vw; max-width: 50vw; }
.datos__text .lead + .lead { margin-top: 1.4em; }
.datos__list { margin-top: .2em; }
.datos__list li { position: relative; padding-left: 1.05em; }
.datos__list li::before { content: '•'; position: absolute; left: 0; }

.panel { background: var(--ink); color: var(--paper); border-radius: var(--radius) 0 0 var(--radius); }
.panel .serif { color: var(--paper); }
.datos__panel {
  display: flex; flex-direction: column; justify-content: center; gap: clamp(26px, 5.4vh, 62px);
  padding: 10vh 3vw 10vh clamp(28px, 2.8vw, 56px);
}
.stat__num { font-variant-numeric: tabular-nums; display: flex; align-items: baseline; gap: .22em; font: 400 var(--fs-num)/1 var(--serif); font-variant-numeric: lining-nums; }
.stat__num .unit { font: 600 clamp(15px, 1.25vw, 24px)/1 var(--sans); }
.stat__label { margin-top: .5em; font: 400 clamp(13px, 1vw, 18px)/1.3 var(--sans); opacity: .92; }

/* Marquee */
.marquee {
  overflow: clip;
  padding: clamp(28px, 6vh, 72px) 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.marquee__track { display: flex; width: max-content; will-change: transform; }
.marquee__group { display: flex; align-items: center; }
.marquee__group span { font: 400 clamp(34px, 5vw, 104px)/1 var(--serif); text-transform: uppercase; color: var(--ink); white-space: nowrap; padding: 0 .38em; }
.marquee__group i { width: clamp(10px, 1vw, 18px); aspect-ratio: 1; border-radius: 50%; background: var(--muted); flex: none; }

/* ==========================================================================
   Residencias (páginas apiladas)
   ========================================================================== */
.residencias { position: relative; }
.stack { position: relative; }
.page {
  position: sticky; top: 0;
  height: var(--full); min-height: 560px;
  overflow: hidden;
  background: var(--bg);
}
.st-refresh .page { position: relative; }
.page__inner { position: relative; height: 100%; transform-origin: 50% 35%; }
.page__shade { position: absolute; inset: 0; z-index: 8; background: var(--night); opacity: 0; pointer-events: none; }

/* Página de título */
.page--title .page__inner { display: grid; grid-template-columns: repeat(12, 1fr); align-items: center; padding: 0 var(--gutter); }
/* En el brochure las portadillas arrancan al 27% del ancho */
.page--title .title-block { grid-column: 4 / 13; padding-left: 1.2vw; }
.page--title .display { white-space: nowrap; }
.title-block .uf-line { margin-top: clamp(12px, 2vh, 24px); }
.page__index {
  position: absolute; left: var(--gutter); bottom: calc(var(--gutter) * .8);
  font: 500 var(--fs-label)/1 var(--label); letter-spacing: .14em; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.page__index b { font-weight: 500; color: var(--ink); }

/* Página de planta */
.page--plan .page__inner { display: grid; grid-template-columns: 1fr 31%; }
.plan-area { position: relative; display: grid; place-items: center; padding: calc(var(--header-h) + 7vh) var(--gutter) 6vh; }
.plan-area .uf-line { position: absolute; top: calc(var(--header-h) + 1.6vh); left: 0; right: 0; text-align: center; font-size: clamp(11px, .8vw, 15px); }
.plan {
  position: relative;
  width: min(100%, var(--pw, 44vw), calc(68vh * var(--ar, 1)));
  cursor: zoom-in;
}
.plan img { width: 100%; height: auto; }
.plan__scan { position: absolute; top: -3%; bottom: -3%; left: 0; width: 1px; background: var(--ink); opacity: 0; pointer-events: none; }
.plan__hint {
  position: absolute; left: 50%; bottom: calc(clamp(14px, 2.6vh, 26px) + 66px); transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 10px;
  font: 500 var(--fs-label)/1 var(--label); letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
  white-space: nowrap;
}
.plan__hint svg { width: 14px; height: 14px; }
.loupe {
  position: absolute; left: 0; top: 0; z-index: 3;
  width: clamp(180px, 15vw, 260px); aspect-ratio: 1;
  border-radius: 50%;
  background-color: var(--paper);
  background-repeat: no-repeat;
  border: 1px solid rgba(71, 66, 63, .35);
  box-shadow: 0 24px 60px rgba(31, 28, 26, .22);
  pointer-events: none;
  opacity: 0; transform: translate(-50%, -50%) scale(.6);
  transition: opacity .35s ease, transform .55s var(--ease-out);
}
.loupe.is-on { opacity: 1; transform: translate(-50%, -50%) scale(1); }

.unit-panel {
  display: flex; flex-direction: column;
  padding: calc(var(--header-h) + 8vh) 3vw 5vh clamp(28px, 2.8vw, 56px);
  gap: clamp(22px, 4.2vh, 48px);
}
.unit-panel__label { font: 400 clamp(13px, 1vw, 18px)/1.2 var(--sans); }
.unit-panel__value { margin-top: .25em; font-size: clamp(28px, 2.5vw, 52px); line-height: 1.05; }
.unit-panel__key { margin-top: auto; width: clamp(80px, 8.4vw, 160px); }
.unit-panel__key img { width: 100%; height: auto; }

/* Página de render */
.page--render { background: var(--night); }
.page--render .page__inner { overflow: hidden; }
.render { position: absolute; inset: 0; margin: 0; overflow: hidden; }
.render img { width: 100%; height: 100%; object-fit: cover; will-change: transform; }
.render--pan img { width: auto; min-width: 100%; max-width: none; height: 100%; object-fit: cover; }
.render__caption {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: calc(var(--gutter) * .7); z-index: 2;
  display: flex; justify-content: space-between; align-items: flex-end; gap: 20px;
  color: var(--paper); pointer-events: none;
  font: 500 var(--fs-label)/1.3 var(--label); letter-spacing: .1em; text-transform: uppercase;
}
.render__caption span:last-child { opacity: .8; }
.page--render::after {
  content: ''; position: absolute; inset: auto 0 0 0; height: 28%; z-index: 1; pointer-events: none;
  background: linear-gradient(0deg, rgba(20, 18, 17, .42), transparent);
}

/* Galería horizontal (2 ambientes frente) */
.hgallery { position: relative; height: var(--full); overflow: hidden; background: var(--bg); }
.hgallery__track { display: flex; gap: clamp(10px, 1vw, 18px); height: 100%; width: max-content; will-change: transform; }
.hgallery__item { position: relative; height: 100%; margin: 0; overflow: hidden; background: var(--night); }
.hgallery__item--pano { aspect-ratio: 2800 / 1017; }
.hgallery__item--std { aspect-ratio: 2400 / 1514; }
.hgallery__item img { position: absolute; top: 0; left: -6%; width: 112%; height: 100%; object-fit: cover; }
.hgallery__item::after { content: ''; position: absolute; inset: auto 0 0 0; height: 30%; background: linear-gradient(0deg, rgba(20, 18, 17, .4), transparent); pointer-events: none; }
.hgallery__meta {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: calc(var(--gutter) * .7); z-index: 2;
  display: flex; justify-content: space-between; align-items: center;
  color: var(--paper); pointer-events: none;
  font: 500 var(--fs-label)/1 var(--label); letter-spacing: .1em; text-transform: uppercase;
}
.hgallery__bar { flex: 0 0 min(220px, 22vw); height: 1px; background: rgba(243, 242, 239, .35); position: relative; }
.hgallery__bar span { position: absolute; inset: 0; background: var(--paper); transform-origin: left; transform: scaleX(var(--p, 0)); }

/* Pestañas de tipologías */
.unit-tabs {
  position: fixed; left: 50%; bottom: clamp(14px, 2.6vh, 26px); z-index: 45;
  display: flex; gap: 2px; padding: 5px;
  border-radius: 999px;
  background: rgba(236, 235, 231, .74);
  border: 1px solid rgba(71, 66, 63, .12);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  backdrop-filter: blur(18px) saturate(1.3);
  box-shadow: 0 14px 40px rgba(31, 28, 26, .12);
  transform: translate(-50%, calc(100% + 40px));
  transition: transform .9s var(--ease-out);
}
.unit-tabs.is-visible { transform: translate(-50%, 0); }
.unit-tabs__blob { position: absolute; top: 5px; bottom: 5px; left: 0; z-index: 0; width: 0; opacity: 0; border-radius: 999px; background: var(--ink); transition: transform .7s var(--ease-out), width .7s var(--ease-out), opacity .4s ease; }
.unit-tabs.has-active .unit-tabs__blob { opacity: 1; }
.unit-tabs button {
  position: relative; z-index: 2;
  padding: 11px 16px 10px; border-radius: 999px;
  font: 500 11.5px/1 var(--label); letter-spacing: .05em; text-transform: uppercase; color: var(--ink);
  white-space: nowrap; transition: color .5s ease;
}
.unit-tabs button small { font-size: inherit; opacity: .55; margin-left: 6px; }
.unit-tabs button.is-active { color: var(--paper); }

/* ==========================================================================
   Local comercial
   ========================================================================== */
.local-title { position: relative; height: var(--full); min-height: 520px; display: grid; place-items: center; padding: 0 var(--gutter); text-align: center; }
.local-title .display { font-size: clamp(40px, 6.4vw, 150px); }
.local-title .eyebrow { margin-bottom: clamp(16px, 2.6vh, 30px); }
.local-wipe { position: relative; height: var(--full); overflow: hidden; background: var(--night); }
.local-wipe__img { position: absolute; inset: 0; margin: 0; overflow: hidden; }
.local-wipe__img img { width: 100%; height: 100%; object-fit: cover; }
.local-wipe__img--b { --cl: 100%; }
.local-wipe__divider { position: absolute; top: 0; bottom: 0; left: 100%; z-index: 2; width: 1px; background: var(--paper); pointer-events: none; }
.local-wipe .render__caption { z-index: 3; }

/* ==========================================================================
   Contacto
   ========================================================================== */
.contacto {
  position: relative;
  min-height: var(--full);
  display: grid; grid-template-rows: 1fr auto auto; grid-template-columns: minmax(0, 1fr);
  padding: calc(var(--header-h) + 10vh) var(--gutter) 0;
  overflow: clip;
}
.contacto__main { align-self: center; text-align: center; display: grid; justify-items: center; gap: clamp(18px, 3vh, 34px); }
.contacto__line {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: .2em .5em;
  font: 400 clamp(26px, 3.4vw, 70px)/1.15 var(--sans); letter-spacing: -.015em; color: var(--ink);
}
.contacto__line i { font-style: normal; color: var(--muted); font-weight: 300; }
.link-u { position: relative; text-decoration: none; }
.link-u::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -.06em; height: .045em; min-height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform .7s var(--ease-out);
}
.link-u:hover::after, .link-u:focus-visible::after { transform: scaleX(1); transform-origin: left; }
.contacto__actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.contacto__actions .pill { --fg: var(--ink); --fg-inv: var(--paper); backdrop-filter: none; -webkit-backdrop-filter: none; background: transparent; }
.contacto__actions .pill--solid { background: var(--ink); color: var(--paper); }
.contacto__actions .pill--solid:hover { background: transparent; color: var(--ink); }

.contacto__logos { display: flex; justify-content: center; align-items: center; gap: clamp(44px, 6.4vw, 124px); color: var(--logo); padding: clamp(40px, 9vh, 110px) 0 clamp(30px, 6vh, 70px); }
.contacto__logos .logo-fenam { height: clamp(42px, 4.4vw, 84px); width: auto; }
.contacto__logos .logo-hall { height: clamp(39px, 4.1vw, 78px); width: auto; }

.footer {
  display: grid; grid-template-columns: 1.4fr 1fr auto; gap: 28px; align-items: end;
  padding: 26px 0 30px;
  border-top: 1px solid var(--line);
  font: 400 12px/1.5 var(--label); color: var(--muted);
}
.footer__legal { max-width: 52em; }
.footer__credit { text-align: right; }
.footer__credit a { text-decoration: none; color: var(--ink); }
.footer__top { display: inline-flex; align-items: center; gap: 8px; font: 500 11.5px/1 var(--label); letter-spacing: .1em; text-transform: uppercase; color: var(--ink); }
.footer__top svg { width: 14px; height: 14px; transform: rotate(-90deg); }
.footer__giant {
  position: relative;
  font: 400 15vw/.78 var(--serif); white-space: nowrap; text-align: center;
  color: var(--bg-deep);
  margin: 0 calc(var(--gutter) * -1);
  transform: translateY(16%);
  pointer-events: none; user-select: none;
}

/* ==========================================================================
   Lightbox y visor de plantas
   ========================================================================== */
.lightbox, .planview {
  position: fixed; inset: 0; z-index: 130;
  display: grid; grid-template-rows: auto 1fr auto;
  opacity: 0; visibility: hidden;
  transition: opacity .5s ease, visibility 0s linear .5s;
}
.lightbox.is-open, .planview.is-open { opacity: 1; visibility: visible; transition: opacity .5s ease, visibility 0s; }
.lightbox { background: rgba(24, 22, 20, .97); color: var(--paper); }
.planview { background: var(--bg); color: var(--ink); }
.lb-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 22px var(--gutter);
  font: 500 var(--fs-label)/1.2 var(--label); letter-spacing: .1em; text-transform: uppercase;
}
.lb-bar .pill { --fg: currentColor; color: inherit; backdrop-filter: none; -webkit-backdrop-filter: none; background: transparent; border-color: color-mix(in srgb, currentColor 35%, transparent); }
.lightbox .lb-bar .pill { --fg-inv: var(--ink); }
.lb-count { font-variant-numeric: tabular-nums; }
.lb-stage { position: relative; display: grid; place-items: center; min-height: 0; padding: 0 var(--gutter); overflow: hidden; touch-action: none; }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.lb-nav { display: flex; justify-content: center; gap: 10px; padding: 22px var(--gutter) 26px; }
.lb-btn {
  width: 52px; height: 52px; display: grid; place-items: center;
  border-radius: 50%; border: 1px solid color-mix(in srgb, currentColor 35%, transparent);
  transition: background .4s ease, color .4s ease, border-color .4s ease;
}
.lb-btn:hover { border-color: currentColor; }
.lb-btn svg { width: 18px; height: 18px; }
.lb-btn--prev svg { transform: rotate(180deg); }
.planview .lb-stage { cursor: grab; }
.planview .lb-stage.is-dragging { cursor: grabbing; }
.planview .lb-stage img { max-height: 82%; transform-origin: center; will-change: transform; }
.planview__zoom { font-variant-numeric: tabular-nums; min-width: 4.5em; text-align: center; align-self: center; font: 500 12px var(--label); letter-spacing: .08em; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1180px) {
  .header__nav .pill { padding: 9px 13px 8px; font-size: 10.5px; }
  .unit-tabs button small { display: none; }
}

@media (max-width: 960px) {
  :root { --header-h: 64px; }
  .header__nav, .header__cta { display: none; }
  .header__menu { display: inline-flex; }
  .progress { display: none; }

  .cover__meta { grid-template-columns: 1fr 1fr; }
  .cover__meta p:nth-child(2) { display: none; }

  .statement { grid-template-columns: 1fr; gap: 28px; padding: 16vh var(--gutter); }
  .statement__eyebrow, .statement__text { grid-column: 1; }

  .ubicacion { grid-template-columns: 1fr; padding: 14vh var(--gutter); }
  .ubicacion__intro { grid-column: 1; }

  .mapa { height: auto; min-height: 0; grid-template-columns: 1fr; }
  .mapa__frame { height: 78vh; height: 78svh; min-height: 440px; }
  .mapa__aside { padding: 36px var(--gutter) 64px; }

  .entorno { grid-template-columns: 1fr; padding: 12vh var(--gutter); gap: 40px; }
  .entorno__swap { min-height: 0; }

  .datos { grid-template-columns: 1fr; }
  .datos__text { max-width: none; padding: 14vh var(--gutter) 8vh; }
  .datos__panel { border-radius: var(--radius) var(--radius) 0 0; display: grid; grid-template-columns: 1fr 1fr; padding: 48px var(--gutter) 56px; gap: 36px 20px; }

  .page--title .title-block { grid-column: 1 / 13; padding-left: 0; }
  .page__index { display: none; }
  .page--plan { height: auto; min-height: var(--full); }
  .page--plan .page__inner { grid-template-columns: 1fr; height: auto; min-height: var(--full); }
  .plan-area { padding: calc(var(--header-h) + 60px) var(--gutter) 70px; }
  .page--plan { position: relative; }
  .plan { width: min(100%, var(--pw-m, 80vw), calc(56vh * var(--ar, 1))); }
  .plan__hint { display: none; }
  .unit-panel { border-radius: var(--radius) var(--radius) 0 0; padding: 38px var(--gutter) 40px; display: grid; grid-template-columns: 1fr 1fr; gap: 26px 20px; }
  .unit-panel__head { grid-column: 1 / -1; }
  .unit-panel__key { grid-column: 2; grid-row: 1 / span 3; justify-self: end; align-self: start; margin: 0; width: 96px; }

  .hgallery { height: auto; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .hgallery::-webkit-scrollbar { display: none; }
  .hgallery__track { height: 68vh; height: 68svh; padding: 0 var(--gutter); }
  .hgallery__item { scroll-snap-align: center; border-radius: 14px; }
  .hgallery__meta { position: sticky; left: 0; bottom: auto; padding: 16px var(--gutter) 0; color: var(--ink); width: 100vw; }
  .hgallery__item img { left: 0; width: 100%; }
  .hgallery__bar { background: var(--line); }
  .hgallery__bar span { background: var(--ink); }

  .unit-tabs { left: 12px; right: 12px; transform: translateY(calc(100% + 40px)); overflow-x: auto; scrollbar-width: none; justify-content: flex-start; }
  .unit-tabs.is-visible { transform: none; }
  .unit-tabs::-webkit-scrollbar { display: none; }

  .footer { grid-template-columns: 1fr; gap: 16px; }
  .footer__credit { text-align: left; }
}

@media (max-width: 560px) {
  .cover__meta { font-size: 10.5px; }
  .hotspot__card { padding: 9px 12px 8px; }
  .hotspot__line { width: 14px; }
  .poi-list button { font-size: 12px; }
  .datos__panel { grid-template-columns: 1fr 1fr; }
  .unit-tabs button { padding: 10px 13px 9px; font-size: 10.5px; }
  .contacto__line { flex-direction: column; align-items: center; }
  .contacto__line i { display: none; }
}

/* Movimiento reducido: todo visible, sin pins ni barridos */
.is-reduced .cover { height: auto; }
.is-reduced .cover__head { position: relative; padding-bottom: 6vh; }
.is-reduced .cover__media { position: relative; height: var(--full); clip-path: none; }
.is-reduced .cover__pan { height: 100%; }
.is-reduced .cover__cue { display: none; }
.is-reduced .proyecto__window { clip-path: none; }
.is-reduced .proyecto__window img { transform: none; }
.is-reduced .local-wipe { height: auto; }
.is-reduced .local-wipe__img { position: relative; height: var(--full); }
.is-reduced .local-wipe__img--b { clip-path: none; }
.is-reduced .local-wipe__divider { display: none; }
.is-reduced .hgallery { height: auto; overflow-x: auto; }
.is-reduced .hgallery__track { height: 80vh; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
