/* ==========================================================================
   PLANO · estilos
   Noche cálida, latón y travertino. La maqueta 3D es la pieza principal: va a
   sangre, sobre un fondo de estudio, y el resto de la página la acompaña.
   1. Variables (colores y tipografía: cámbialos aquí)
   2. Base           6. Portada          10. Obra nueva
   3. Cabecera/menú  7. Tarjetas         11. Agencia
   4. Pie            8. Listado          12. Formularios
   5. Piezas comunes 9. Ficha            13. Visor de la maqueta
   ========================================================================== */

/* 1. VARIABLES ------------------------------------------------------------- */
:root {
  --bg: #100f0d;             /* fondo: noche cálida */
  --bg-2: #181613;           /* paneles */
  --bg-3: #211e1a;           /* fondos de las maquetas en tarjetas */
  --fg: #ede6da;             /* texto: travertino */
  --fg-2: #cfc5b6;
  --muted: #a5998a;          /* texto secundario (AA sobre --bg) */
  --line: rgba(237, 230, 218, .12);
  --line-2: rgba(237, 230, 218, .26);
  --gold: #c9a46a;           /* acento: latón */
  --gold-2: #dfc08b;
  --gold-ink: #18120a;       /* texto sobre latón */
  --glass: rgba(22, 20, 17, .74);
  --error: #f2a18b;
  --sky-dusk: #1c2540;       /* fondo de la maqueta en la hora azul */

  --f-display: 'Bodoni Moda', Didot, 'Bodoni 72', 'Times New Roman', Georgia, serif;
  --f-sans: 'Jost', Futura, 'Century Gothic', ui-sans-serif, system-ui, sans-serif;

  --gut: clamp(18px, 4vw, 72px);
  --maxw: 1720px;
  --top-h: 76px;
  --ease: cubic-bezier(.22, .8, .12, 1);
  --ease-io: cubic-bezier(.7, 0, .2, 1);
  color-scheme: dark;
}
/* Bandas claras (contacto, formularios y la agencia en una línea) */
.light {
  --bg: #ece5d9; --bg-2: #e3dbcd; --bg-3: #d8cfbf;
  --fg: #1a1611; --fg-2: #3b342b; --muted: #61574a;
  --line: rgba(26, 22, 17, .14); --line-2: rgba(26, 22, 17, .32);
  --gold: #7a5622; --gold-2: #5e4118; --gold-ink: #f5efe4;
  --error: #9b2f1a;
  color: var(--fg); color-scheme: light;
}

/* 2. BASE ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--top-h) + 16px); background: #100f0d; overflow-x: clip; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--f-sans); font-weight: 400; font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
body.menu-open, body.has-immersive { overflow: hidden; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .22em; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
em { font-style: italic; }
:focus-visible { outline: 1px solid var(--gold); outline-offset: 4px; }
::selection { background: var(--gold); color: var(--gold-ink); }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gut); }
/* Rótulo: versalitas espaciadas de la Jost */
.lbl { font-family: var(--f-sans); font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; line-height: 1.5; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 600; background: var(--gold); color: var(--gold-ink); padding: 10px 16px; font-size: 14px; text-decoration: none; }
.skip:focus { top: 12px; }
main, .foot, .top { position: relative; z-index: 1; }

/* Banda a todo el ancho con su propio fondo (el contenido sigue en la rejilla) */
.band { position: relative; isolation: isolate; }
.band::before { content: ''; position: absolute; top: 0; bottom: 0; left: calc(50% - 50vw); right: calc(50% - 50vw); background: var(--bg); z-index: -1; }
.sec.band { padding-bottom: clamp(80px, 11vw, 170px); margin-top: clamp(80px, 11vw, 170px); }

/* Titulares: Cormorant ligera, grande, con la cursiva en latón */
.display { font-family: var(--f-display); font-weight: 400; font-size: clamp(3.4rem, 10vw, 11rem); line-height: .88; letter-spacing: -.02em; }
.sec-title { font-family: var(--f-display); font-weight: 400; font-size: clamp(2.6rem, 6.2vw, 6.8rem); line-height: .94; letter-spacing: -.015em; }
.display em, .sec-title em, .plan-title em { color: var(--gold); font-weight: 400; }
.sec-lead { font-size: clamp(1.08rem, 1.5vw, 1.3rem); line-height: 1.55; max-width: 44ch; color: var(--fg-2); font-weight: 400; }

/* Rótulo de sección: latón con una raya corta delante */
.kicker { display: flex; align-items: center; gap: 14px; color: var(--gold); font-weight: 500; }
.kicker::before { content: ''; width: 34px; height: 1px; background: currentColor; flex: none; }
.kicker .k-n { color: var(--fg); }
.kicker .k-n::after { content: '\00b7'; margin-left: 12px; color: var(--muted); }
h2.kicker { font-weight: 500; }

.sec { padding-top: clamp(96px, 13vw, 200px); }
.sec-head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 26px; align-items: end; margin-bottom: clamp(44px, 6vw, 96px); }
.sec-head .kicker { grid-column: 1 / -1; }
.sec-head .sec-title { grid-column: 1 / span 9; }
.sec-head .sec-lead { grid-column: 1 / span 6; }
.sec-head .link-arrow { grid-column: 10 / -1; justify-self: end; }

.link-arrow { display: inline-flex; gap: 12px; align-items: center; text-decoration: none; padding: 6px 0; white-space: nowrap; position: relative; }
.link-arrow::before { content: ''; position: absolute; left: 0; right: 28px; bottom: 0; height: 1px; background: currentColor; opacity: .35; transform-origin: 0 50%; transition: transform .5s var(--ease), opacity .3s; }
.link-arrow::after { content: '\2192'; font-family: var(--f-sans); font-weight: 400; transition: transform .4s var(--ease); color: var(--gold); }
.link-arrow:hover::before { opacity: 1; }
.link-arrow:hover::after { transform: translateX(6px); }

/* Botones: rectos, filete fino; al pasar, el latón entra de izquierda a derecha */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 28px;
  border: 1px solid var(--line-2); background: transparent; color: var(--fg); border-radius: 0;
  font-family: var(--f-sans); font-size: 12.5px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; text-decoration: none;
  background-image: linear-gradient(var(--gold), var(--gold)); background-repeat: no-repeat; background-size: 0% 100%; background-position: 0 0;
  transition: background-size .55s var(--ease), color .35s, border-color .35s;
}
.btn:hover { background-size: 100% 100%; color: var(--gold-ink); border-color: var(--gold); }
.btn-gold, .btn-solid { background-color: var(--gold); border-color: var(--gold); color: var(--gold-ink); background-image: linear-gradient(var(--gold-2), var(--gold-2)); }
.btn-gold:hover, .btn-solid:hover { color: var(--gold-ink); border-color: var(--gold-2); }
.btn-line { border-color: var(--line-2); }
.btn-paper { border-color: var(--fg); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn-text { background: none; border: 0; padding: 8px 0; text-decoration: underline; text-underline-offset: .35em; color: var(--fg-2); }
.btn-text:hover { color: var(--gold); }

/* Revelado al entrar en pantalla: el texto sube desde una máscara */
.rv { transition: opacity 1s var(--ease), transform 1.1s var(--ease), clip-path 1.3s var(--ease); transition-delay: var(--d, 0s); }
@media (prefers-reduced-motion: no-preference) {
  .rv:not(.in) { opacity: 0; transform: translateY(28px); }
  .sec-title.rv:not(.in), .display.rv:not(.in) { clip-path: inset(0 0 100% 0); transform: translateY(48px); opacity: 1; }
  .sec-title.rv.in, .display.rv.in { clip-path: inset(-12% -5% -30% -5%); }
}

/* Transición entre páginas (navegadores que la admiten) */
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root) { animation: vt-out .45s var(--ease-io) both; }
  ::view-transition-new(root) { animation: vt-in .6s var(--ease) both; }
}
@keyframes vt-out { to { opacity: 0; transform: translateY(-12px); } }
@keyframes vt-in { from { opacity: 0; } }

/* Aviso */
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 650; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--gold); color: var(--gold-ink); padding: 13px 20px; font-size: 12.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; transition: opacity .3s, transform .4s var(--ease); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Pantalla de carga: el nombre, una raya de latón que avanza y el porcentaje */
.loader { position: fixed; inset: 0; z-index: 700; background: #100f0d; color: #ede6da; display: grid; place-items: center; transition: opacity .8s var(--ease), visibility 0s linear .8s; animation: loader-safety 0s linear 14s forwards; }
.loader.done { opacity: 0; visibility: hidden; }
.loader.gone { display: none; }
@keyframes loader-safety { to { opacity: 0; visibility: hidden; } }
.loader-in { width: min(420px, calc(100% - 2 * var(--gut))); display: grid; justify-items: center; text-align: center; }
.loader-brand { font-family: var(--f-display); font-style: italic; font-weight: 400; font-size: clamp(4.4rem, 14vw, 8rem); line-height: .9; letter-spacing: -.01em; }
.loader-txt { color: #a5998a; margin: 18px 0 26px; }
.loader-bar { width: 100%; height: 1px; background: rgba(237, 230, 218, .18); position: relative; overflow: hidden; }
.loader-bar span { position: absolute; inset: 0; background: #c9a46a; transform-origin: 0 50%; transform: scaleX(0); }
.loader-num { margin-top: 14px; color: #a5998a; }
@media (prefers-reduced-motion: no-preference) { .loader-brand { animation: loader-breathe 2.4s var(--ease) infinite alternate; } }
@keyframes loader-breathe { from { opacity: .55; } to { opacity: 1; } }

/* 3. CABECERA Y MENÚ ---------------------------------------------------------- */
.top { position: fixed; top: 0; left: 0; right: 0; z-index: 100; height: var(--top-h); transition: background-color .4s, border-color .4s, backdrop-filter .4s; border-bottom: 1px solid transparent; }
.top.scrolled { background: rgba(16, 15, 13, .78); -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2); border-bottom-color: var(--line); }
.top-in { max-width: var(--maxw); margin: 0 auto; height: 100%; padding: 0 var(--gut); display: flex; align-items: center; gap: 34px; }
.brand { display: flex; align-items: baseline; gap: 16px; text-decoration: none; margin-right: auto; min-width: 0; }
.brand-name { font-family: var(--f-display); font-style: italic; font-weight: 400; font-size: 36px; line-height: 1; letter-spacing: -.01em; }
.brand-tag { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11px; }
.nav { display: flex; gap: 34px; }
.nav a { font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; text-decoration: none; position: relative; padding: 8px 0; color: var(--fg-2); transition: color .3s; }
.nav a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--gold); transform: scaleX(0); transform-origin: 100% 50%; transition: transform .5s var(--ease); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--fg); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: 0 50%; }
.tools { display: flex; align-items: center; gap: 14px; }
.lang { display: flex; gap: 2px; }
.lang button { background: none; border: 0; padding: 8px 8px; min-width: 40px; min-height: 40px; font-size: 12px; font-weight: 500; letter-spacing: .14em; color: var(--muted); position: relative; }
.lang button::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: 6px; height: 1px; background: var(--gold); transform: scaleX(0); transition: transform .4s var(--ease); }
.lang button[aria-pressed="true"] { color: var(--fg); }
.lang button[aria-pressed="true"]::after { transform: scaleX(1); }
.menu-btn { display: none; align-items: center; gap: 12px; background: none; border: 1px solid var(--line-2); min-height: 44px; padding: 0 16px; font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; }
.menu-ico { width: 18px; height: 7px; border-top: 1px solid currentColor; border-bottom: 1px solid currentColor; }

.menu { position: fixed; inset: 0; z-index: 200; background: #100f0d; overflow-y: auto; }
.menu-in { min-height: 100%; display: flex; flex-direction: column; padding: 14px var(--gut) 28px; }
.menu-top { display: flex; justify-content: space-between; align-items: center; height: 48px; }
.menu-close { background: none; border: 1px solid var(--line-2); min-height: 44px; padding: 0 16px; }
.menu-nav { display: flex; flex-direction: column; margin: 56px 0 auto; }
.menu-nav a { display: block; padding: 10px 0; text-decoration: none; font-family: var(--f-display); font-weight: 400; font-size: clamp(2.8rem, 13vw, 4.6rem); line-height: 1.02; }
.menu-nav a[aria-current="page"] { color: var(--gold); font-style: italic; }
.menu-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; padding-top: 28px; border-top: 1px solid var(--line); color: var(--fg-2); }
.menu-foot a { text-transform: none; letter-spacing: .04em; }
@media (prefers-reduced-motion: no-preference) {
  .menu-nav a { transition: opacity .6s var(--ease), transform .7s var(--ease); }
  .menu:not(.open) .menu-nav a { opacity: 0; transform: translateY(24px); }
  .menu.open .menu-nav a:nth-child(2) { transition-delay: .05s; }
  .menu.open .menu-nav a:nth-child(3) { transition-delay: .1s; }
  .menu.open .menu-nav a:nth-child(4) { transition-delay: .15s; }
  .menu.open .menu-nav a:nth-child(5) { transition-delay: .2s; }
}

/* 4. PIE ------------------------------------------------------------------- */
.foot { margin-top: clamp(110px, 14vw, 220px); background: #0b0a09; color: var(--fg); }
.light + .foot, main:has(> .band:last-child) + .foot { margin-top: 0; }
.foot-in { padding-top: clamp(56px, 7vw, 100px); padding-bottom: 32px; }
.foot-word { font-family: var(--f-display); font-style: italic; font-weight: 400; font-size: clamp(6rem, 26vw, 28rem); line-height: .78; letter-spacing: -.03em; margin: 0 0 56px -.04em; color: var(--gold); opacity: .92; }
.foot-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; padding: 32px 0 44px; border-top: 1px solid var(--line); }
.foot-h { font-weight: 500; color: var(--muted); margin-bottom: 16px; }
.foot-col { color: var(--fg-2); }
.foot-col p + p { margin-top: 6px; }
.foot-links li + li { margin-top: 6px; }
.foot-links a, .foot-col a { text-decoration: none; }
.foot-links a:hover, .foot-col a:hover { color: var(--gold); }
.foot-base { display: flex; flex-wrap: wrap; gap: 10px 32px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); text-transform: none; letter-spacing: .04em; font-weight: 400; }
.foot-base a { color: var(--fg); }
.foot-base a[href="#top"] { margin-left: auto; }

/* 5. PIEZAS COMUNES ---------------------------------------------------------- */
.page-head { padding-top: calc(var(--top-h) + clamp(56px, 9vw, 140px)); padding-bottom: clamp(36px, 5vw, 64px); display: grid; gap: 26px; }
.count { color: var(--muted); }
.back { display: inline-flex; gap: 10px; text-decoration: none; color: var(--muted); padding: 10px 0; transition: color .3s; }
.back:hover { color: var(--gold); }

/* Favorito: un rombo de latón que se rellena */
.fav { display: inline-flex; align-items: center; gap: 10px; background: rgba(16, 15, 13, .55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border: 1px solid var(--line-2); color: var(--fg); min-height: 40px; padding: 0 14px; font-size: 11.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; transition: border-color .3s, color .3s; }
.light .fav { background: transparent; }
.fav-mark { width: 9px; height: 9px; border: 1px solid currentColor; transform: rotate(45deg); transition: background-color .3s; }
.fav[aria-pressed="true"] { border-color: var(--gold); color: var(--gold); }
.fav[aria-pressed="true"] .fav-mark { background: currentColor; }
.fav:hover { border-color: var(--gold); }

/* Datos en línea (m² · dormitorios · baños) */
.specs { display: flex; flex-wrap: wrap; gap: 4px 0; color: var(--fg-2); font-size: 14.5px; font-weight: 400; letter-spacing: .02em; }
.specs li + li::before { content: ''; display: inline-block; width: 4px; height: 4px; margin: 0 12px 3px; background: var(--gold); transform: rotate(45deg); }

/* 6. PORTADA --------------------------------------------------------------- */
/* La maqueta ocupa toda la pantalla, sobre un fondo de estudio; con el scroll se
   abre por plantas y acaba en la hora azul (--dusk lo pone home.js) */
.hero { position: relative; height: 460vh; height: 460svh; }
.hero-pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: radial-gradient(120% 90% at 62% 58%, #262019 0%, #15120f 48%, #0b0a09 100%); }
.hero-pin::before { content: ''; position: absolute; inset: 0; background: radial-gradient(110% 90% at 62% 40%, #33416a 0%, #1c2540 46%, #0b0e19 100%); opacity: var(--dusk, 0); transition: opacity .3s linear; pointer-events: none; }
.hero .hero-stage { position: absolute; inset: 0; z-index: 1; }
.hero-stage .viewer-stage { position: absolute; inset: 0; }
.hero-text { position: absolute; z-index: 2; left: var(--gut); top: calc(var(--top-h) + 3vh); bottom: 5vh; width: min(500px, 31vw); display: flex; flex-direction: column; transition: opacity .6s var(--ease), transform .8s var(--ease), visibility 0s linear 0s; }
.hero-ref { color: var(--gold); }
.steps { display: grid; flex: 1; align-content: center; min-height: 0; }
.step { grid-area: 1 / 1; align-self: center; transition: opacity .8s var(--ease), transform .9s var(--ease), filter .8s var(--ease); }
.step:not(.is-on) { opacity: 0; transform: translateY(34px); filter: blur(6px); pointer-events: none; }
.step.is-on { transition-delay: .14s; }
.step .display { font-size: clamp(3.2rem, 5.6vw, 7.4rem); }
.step h2 { font-family: var(--f-display); font-weight: 400; font-size: clamp(3rem, 5.2vw, 6.6rem); line-height: .9; letter-spacing: -.015em; }
.step-n { display: block; margin-bottom: 18px; color: var(--gold); }
.step-text { margin-top: 26px; font-size: clamp(1.05rem, 1.3vw, 1.25rem); font-weight: 400; line-height: 1.6; max-width: 36ch; color: var(--fg-2); }
.hero-foot { display: grid; gap: 26px; }
.hero-ticks { display: flex; max-width: 380px; position: relative; padding-top: 14px; font-size: 11.5px; letter-spacing: .14em; }
.hero-ticks::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--line-2); }
.hero-ticks::after { content: ''; position: absolute; left: 0; top: 0; height: 1px; width: calc(var(--p, 0) * 100%); background: var(--gold); }
.hero-ticks li { flex: 1; color: var(--muted); transition: color .4s; }
.hero-ticks li.is-on { color: var(--fg); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (prefers-reduced-motion: no-preference) {
  .hero.at-end #hero-explore { animation: glow 2.6s var(--ease) infinite; }
}
@keyframes glow { 50% { box-shadow: 0 0 0 8px rgba(201, 164, 106, .12); } }
.hero-scroll { position: absolute; z-index: 2; left: 50%; bottom: 26px; transform: translateX(-50%); color: var(--muted); display: grid; justify-items: center; gap: 12px; transition: opacity .5s; }
.hero-scroll::after { content: ''; width: 1px; height: 42px; background: linear-gradient(var(--gold), transparent); }
@media (prefers-reduced-motion: no-preference) { .hero-scroll::after { animation: drop 2.2s var(--ease) infinite; transform-origin: 50% 0; } }
@keyframes drop { 0% { transform: scaleY(0); } 60% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }
.hero.scrolled .hero-scroll { opacity: 0; }
.hero-legend { position: absolute; z-index: 3; right: var(--gut); top: calc(var(--top-h) + 3vh); width: 330px; max-width: calc(100% - 2 * var(--gut)); background: var(--glass); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border: 1px solid var(--line); transition: opacity .5s var(--ease); }
.hero-legend summary { cursor: pointer; padding: 14px 16px; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; color: var(--fg-2); }
.hero-legend summary::-webkit-details-marker { display: none; }
.hero-legend summary::after { content: '+'; font-size: 18px; font-weight: 400; color: var(--gold); }
.hero-legend[open] summary::after { content: '\2212'; }
.hero-legend-in { padding: 0 16px 14px; max-height: calc(100svh - var(--top-h) - 30vh); overflow-y: auto; }
.hero .hero-floors { display: none; }
.hero .viewer-ui { position: absolute; z-index: 4; left: 0; right: 0; bottom: 28px; }

/* Modo exploración: fuera los textos, entran las plantas y los mandos */

/* Portada sin animación (movimiento reducido o sin WebGL): todo a la vista */
.hero.is-static { height: auto; }
.hero.is-static .hero-pin { position: relative; height: auto; overflow: visible; display: grid; padding-top: var(--top-h); }
.hero.is-static .hero-pin::before { display: none; }
.hero.is-static .hero-text { position: relative; inset: auto; width: auto; max-width: var(--maxw); padding: 6vh var(--gut) 0; transform: none; opacity: 1; visibility: visible; }
.hero.is-static .steps { display: block; }
.hero.is-static .step { opacity: 1; transform: none; filter: none; padding: 28px 0; border-bottom: 1px solid var(--line); pointer-events: auto; }
.hero.is-static .hero-ticks, .hero.is-static .hero-scroll { display: none; }
.hero.is-static .hero-foot { padding: 28px 0; }
.hero.is-static .hero-stage { position: relative; inset: auto; order: 2; }
.hero.is-static .hero-stage.is-3d { height: min(86svh, 960px); }
.hero.is-static .hero-stage.is-2d .viewer-stage { position: relative; padding: 4vh var(--gut); }
.hero.is-static .hero-legend { position: relative; inset: auto; width: auto; margin: 20px var(--gut) 0; max-width: none; }
.hero.is-static .hero-stage.is-3d .hero-legend { position: absolute; right: var(--gut); top: 24px; margin: 0; width: 330px; }


/* Destacados: filas editoriales alternas, la maqueta a lo grande */
.feats { display: grid; gap: clamp(80px, 11vw, 180px); }
.feat { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: center; }
.feat-art { grid-column: 1 / span 7; position: relative; }
.feat-info { grid-column: 9 / -1; display: grid; gap: 20px; }
.feat:nth-child(even) .feat-art { grid-column: 6 / -1; grid-row: 1; }
.feat:nth-child(even) .feat-info { grid-column: 1 / span 4; grid-row: 1; }
.feat-n { color: var(--gold); display: flex; justify-content: space-between; gap: 12px; }
.feat-n span + span { color: var(--muted); }
.feat-title { font-family: var(--f-display); font-weight: 400; font-size: clamp(2.4rem, 3.8vw, 4.2rem); line-height: .96; letter-spacing: -.01em; }
.feat-title a { text-decoration: none; background-image: linear-gradient(var(--gold), var(--gold)); background-size: 0 1px; background-repeat: no-repeat; background-position: 0 92%; transition: background-size .6s var(--ease); }
.feat-title a:hover { background-size: 100% 1px; }
.feat-sum { color: var(--fg-2); max-width: 38ch; font-weight: 400; }
.feat-price { font-family: var(--f-display); font-size: clamp(2.1rem, 3vw, 3.1rem); line-height: 1; font-weight: 400; }
.feat-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 18px; border-top: 1px solid var(--line); }

/* La agencia en una línea (banda clara) */
.agency-line { display: grid; gap: 34px; }
.agl-text { font-family: var(--f-display); font-weight: 400; font-size: clamp(2.2rem, 4.6vw, 5.2rem); line-height: 1.05; letter-spacing: -.01em; max-width: 24ch; text-indent: 12%; }
.agency-line .link-arrow { justify-self: start; }

/* Banda de obra nueva: más oscura, con las tipologías en sus maquetas */
.dev-band { background: #0b0a09; padding: clamp(90px, 12vw, 180px) 0; }
.devb-facts { display: flex; flex-wrap: wrap; gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 64px; }
.devb-facts > div { flex: 1 1 180px; padding: 22px 22px 22px 0; }
.devb-facts > div + div { padding-left: 22px; border-left: 1px solid var(--line); }
.devb-facts dt { font-size: 11.5px; font-weight: 500; text-transform: uppercase; letter-spacing: .16em; color: var(--muted); }
.devb-facts dd { font-family: var(--f-display); font-weight: 400; font-size: clamp(1.9rem, 2.9vw, 3rem); line-height: 1.1; margin-top: 8px; }
.devb-types { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-bottom: 64px; }
.devb-type canvas, .devb-type svg { width: 100%; height: auto; aspect-ratio: 4 / 3; }
.devb-type .art { background: radial-gradient(90% 80% at 50% 62%, #2a241d, #141210); overflow: hidden; }
.devb-type .art > canvas { transition: transform 1.2s var(--ease); }
.devb-type:hover .art > canvas { transform: scale(1.04); }
.devb-type .art > svg { padding: 7%; }
.devb-type .pl-cotas { display: none; }
.devb-type p { display: flex; justify-content: space-between; gap: 12px; padding-top: 16px; }
.devb-type .t-name { font-family: var(--f-display); font-weight: 400; font-size: 1.9rem; line-height: 1.05; }
.devb-type .t-meta { color: var(--muted); text-align: right; white-space: pre-line; }
.devb-works { margin-bottom: 52px; }
.mini-works { display: grid; grid-template-columns: repeat(var(--n, 6), minmax(0, 1fr)); gap: 6px; }
.mini-works li { height: 2px; background: var(--line-2); position: relative; overflow: hidden; }
.mini-works li.done { background: var(--gold); }
.mini-works li.current::after { content: ''; position: absolute; inset: 0; width: calc(var(--p) * 1%); background: var(--gold); }
.mini-works-cap { display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; color: var(--muted); }

/* Contacto */
.contact-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 44px; }
.contact-side { grid-column: 1 / span 4; display: grid; gap: 30px; align-content: start; }
.contact-lead { font-size: 1.2rem; font-weight: 400; line-height: 1.55; color: var(--fg-2); max-width: 32ch; }
.contact-direct { display: grid; gap: 8px; }
.big-link { font-family: var(--f-display); font-weight: 400; font-size: clamp(1.8rem, 2.5vw, 2.6rem); line-height: 1.12; text-decoration: none; overflow-wrap: anywhere; }
.big-link:hover { color: var(--gold); }
.form-wrap { grid-column: 6 / -1; }

/* 7. TARJETAS (listado y similares) ------------------------------------------ */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(24px, 3.4vw, 64px); row-gap: clamp(64px, 8vw, 120px); }
.cards > li:nth-child(even) { transform: translateY(clamp(0px, 9vw, 150px)); }
.cards.cards-2 > li:nth-child(even) { transform: none; }
.cards:has(> li:nth-child(even)) { padding-bottom: clamp(0px, 9vw, 150px); }
.cards.cards-2 { padding-bottom: 0; }
.card { display: grid; gap: 14px; position: relative; }
.card-art { position: relative; background: radial-gradient(90% 85% at 50% 64%, #2b251e 0%, #17140f 70%, #110f0c 100%); aspect-ratio: 4 / 3; overflow: hidden; margin-bottom: 8px; }
.card-art::after { content: ''; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px rgba(201, 164, 106, 0); pointer-events: none; transition: box-shadow .6s var(--ease); }
.card-art > canvas, .card-art > img, .card-art > .art-plan { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transition: opacity .7s var(--ease), transform 1.4s var(--ease); }
.card-art > img { object-fit: cover; }
.card-art > .art-plan { opacity: 0; padding: 7%; }
.card-art > .art-plan svg { width: 100%; height: 100%; }
.card-art .card-op { position: absolute; left: 14px; top: 14px; z-index: 2; color: var(--gold); padding: 7px 0; }
.card-art .card-op::before { content: ''; display: inline-block; width: 18px; height: 1px; background: currentColor; vertical-align: middle; margin-right: 10px; }
.card-art .card-op.rent { color: var(--fg); }
.card .fav { position: absolute; right: 14px; top: 14px; z-index: 3; }
.card-art .card-ref { position: absolute; left: 14px; bottom: 12px; z-index: 2; color: var(--muted); }
@media (hover: hover) {
  .card:hover .card-art > canvas, .card:hover .card-art > img { opacity: 0; transform: scale(1.05); }
  .card:hover .card-art > .art-plan { opacity: 1; }
  .card:hover .card-art::after { box-shadow: inset 0 0 0 1px rgba(201, 164, 106, .55); }
}
.card-top { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); }
.card-top span:first-child { color: var(--gold); }
.card-title { font-family: var(--f-display); font-weight: 400; font-size: clamp(2rem, 2.8vw, 2.9rem); line-height: 1; letter-spacing: -.01em; }
.card-title a { text-decoration: none; }
.card-title a::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.card-title a:focus-visible { outline: none; }
.card:has(.card-title a:focus-visible) .card-art { outline: 1px solid var(--gold); outline-offset: 4px; }
.card-foot { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; padding-top: 14px; border-top: 1px solid var(--line); }
.card-foot .lbl { color: var(--muted); transition: color .3s, letter-spacing .5s var(--ease); }
.card:hover .card-foot .lbl { color: var(--gold); letter-spacing: .22em; }
.card-price { font-family: var(--f-display); font-weight: 400; font-size: 2rem; line-height: 1; white-space: nowrap; }
.art-plan .pl-cotas { display: none; }
.card-art > .art-plan.only { opacity: 1; }

/* 8. LISTADO -------------------------------------------------------------- */
.list-wrap { display: grid; gap: 30px; }
.filters-toggle { display: none; justify-self: start; }
.filters { display: grid; grid-template-columns: auto repeat(6, minmax(0, 1fr)); align-items: end; gap: 20px 18px; padding: 24px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.filters fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.f-lab { display: block; color: var(--muted); margin-bottom: 8px; padding: 0; }
.f-field select { width: 100%; }
.seg { display: flex; border: 1px solid var(--line-2); }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg label { padding: 0 16px; min-height: 46px; display: flex; align-items: center; cursor: pointer; font-size: 14px; white-space: nowrap; color: var(--fg-2); transition: background-color .3s, color .3s; }
.seg label + input + label, .seg input + label ~ label { border-left: 1px solid var(--line-2); }
.seg input:checked + label { background: var(--gold); color: var(--gold-ink); }
.seg input:focus-visible + label { outline: 1px solid var(--gold); outline-offset: 3px; position: relative; z-index: 1; }
.f-check { display: flex; align-items: center; gap: 10px; min-height: 46px; grid-column: 1; }
.f-check input { width: 18px; height: 18px; accent-color: var(--gold); margin: 0; }
#f-clear { grid-column: -2 / -1; justify-self: end; }
.share-note { color: var(--muted); margin-top: -10px; text-transform: none; letter-spacing: .02em; font-weight: 400; }
.empty { padding: 56px 0; display: grid; gap: 20px; justify-items: start; border-top: 1px solid var(--line); }
.empty-title { font-family: var(--f-display); font-weight: 400; font-size: clamp(2.4rem, 4.6vw, 4.8rem); line-height: 1; max-width: 18ch; }
.empty-text { max-width: 52ch; color: var(--fg-2); font-weight: 400; }

/* 9. FICHA --------------------------------------------------------------------- */
.prop { padding-top: calc(var(--top-h) + 20px); }
.prop-head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 22px; padding: clamp(24px, 4vw, 56px) 0 clamp(36px, 4vw, 60px); align-items: end; }
.prop-head .kicker { grid-column: 1 / -1; }
.prop-title { grid-column: 1 / span 9; font-size: clamp(3.2rem, 8vw, 9.4rem); }
.prop-sum { grid-column: 1 / span 6; font-size: 1.2rem; font-weight: 400; color: var(--fg-2); max-width: 42ch; }
.prop-price { grid-column: 8 / -1; display: flex; align-items: center; justify-content: flex-end; gap: 20px; flex-wrap: wrap; }
.price-big { font-family: var(--f-display); font-weight: 400; font-size: clamp(2.6rem, 4.8vw, 5rem); line-height: 1; white-space: nowrap; }

.plan-sec { padding-top: 0; }
.plan-head { display: flex; justify-content: space-between; align-items: end; gap: 12px 28px; flex-wrap: wrap; padding-bottom: 22px; }
.plan-title { font-family: var(--f-display); font-weight: 400; font-size: clamp(1.9rem, 3vw, 3.2rem); line-height: 1; }
.plan-head .viewer-hint { max-width: 52ch; }

.gallery { padding-top: clamp(80px, 10vw, 150px); }
.gal-main { position: relative; background: radial-gradient(90% 85% at 50% 62%, #29231c 0%, #15120e 72%); aspect-ratio: 16 / 9; overflow: hidden; }
.gal-main > * { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.gal-main > img { object-fit: cover; }
.gal-main > .gal-plan { padding: 3% 6%; display: block; }
.gal-main > .gal-plan svg { width: 100%; height: 100%; }
.gal-main .gal-cap { position: absolute; inset: auto auto 14px 16px; width: auto; height: auto; color: var(--muted); }
@media (prefers-reduced-motion: no-preference) { .gal-main > .gal-in { animation: gal-in .9s var(--ease); } }
@keyframes gal-in { from { opacity: 0; transform: scale(1.02); } }
.gal-bar { display: flex; align-items: center; gap: 14px; margin-top: 16px; flex-wrap: wrap; }
.gal-btn { background: none; border: 1px solid var(--line-2); width: 48px; height: 48px; font-size: 16px; transition: border-color .3s, color .3s; }
.gal-btn:hover { border-color: var(--gold); color: var(--gold); }
.gal-count { min-width: 64px; text-align: center; color: var(--fg-2); }
.gal-thumbs { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.gal-thumbs button { width: 88px; aspect-ratio: 4 / 3; padding: 0; background: var(--bg-3); border: 1px solid var(--line); position: relative; overflow: hidden; opacity: .62; transition: opacity .3s, border-color .3s; }
.gal-thumbs button:hover { opacity: 1; }
.gal-thumbs button > * { width: 100%; height: 100%; object-fit: contain; }
.gal-thumbs button[aria-pressed="true"] { border-color: var(--gold); opacity: 1; }
.gal-thumbs .pl-text, .gal-thumbs .pl-cotas { display: none; }

.prop-cols { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 56px; padding-top: clamp(80px, 10vw, 150px); }
.facts-sec { grid-column: 1 / span 5; }
.about-sec { grid-column: 7 / -1; }
.facts-sec .kicker, .about-sec .kicker, .loc-sec .kicker, .similar .kicker { margin-bottom: 30px; }
.facts { border-top: 1px solid var(--line); }
.facts > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: baseline; padding: 15px 0; border-bottom: 1px solid var(--line); }
.facts dt { font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.facts dt small { display: block; font-size: 12px; text-transform: none; letter-spacing: .02em; font-weight: 400; }
.facts dd { text-align: right; font-size: 1.05rem; }
.energy { display: inline-flex; gap: 2px; vertical-align: middle; }
.energy span { width: 22px; height: 24px; display: grid; place-items: center; font-size: 12px; color: var(--muted); border: 1px solid transparent; }
.energy span.on { background: var(--gold); color: var(--gold-ink); }
.prop-desc { display: grid; gap: 18px; font-size: 1.12rem; font-weight: 400; line-height: 1.7; max-width: 62ch; color: var(--fg-2); }
.prop-desc p:first-child { font-family: var(--f-display); font-weight: 400; font-size: clamp(1.7rem, 2.4vw, 2.4rem); line-height: 1.2; color: var(--fg); }
.sub-h { font-weight: 500; color: var(--muted); margin: 44px 0 14px; }
.features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.features li { padding: 12px 16px 12px 0; border-bottom: 1px solid var(--line); font-weight: 400; }

.loc-sec { padding-top: clamp(80px, 10vw, 150px); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; }
.loc-sec .kicker { grid-column: 1 / -1; }
.loc { grid-column: 1 / span 8; display: grid; gap: 20px; }
.loc-street { font-family: var(--f-display); font-weight: 400; font-size: clamp(2.4rem, 4.6vw, 4.8rem); line-height: 1; letter-spacing: -.01em; }
.loc-text { font-size: 1.15rem; font-weight: 400; max-width: 56ch; color: var(--fg-2); }
.loc-near { border-top: 1px solid var(--line); text-transform: none; letter-spacing: .02em; font-size: 14px; font-weight: 400; counter-reset: near; }
.loc-near li { padding: 11px 0; border-bottom: 1px solid var(--line); display: flex; gap: 16px; }
.loc-near li::before { content: counter(near, decimal-leading-zero); counter-increment: near; color: var(--gold); }
.loc-note { color: var(--muted); text-transform: none; letter-spacing: .02em; font-weight: 400; }
.visit-ref { color: var(--muted); }
.similar { padding-top: clamp(80px, 10vw, 150px); }
.notfound { padding-top: calc(var(--top-h) + 12vw); display: grid; gap: 28px; justify-items: start; }
.notfound .display { font-size: clamp(2.8rem, 7vw, 7rem); max-width: 16ch; }

/* 10. OBRA NUEVA --------------------------------------------------------------- */
.dev-facts { margin: 20px 0 0; }
.dev-desc { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px clamp(20px, 4vw, 64px); font-size: 1.12rem; font-weight: 400; line-height: 1.7; padding-top: clamp(28px, 4vw, 56px); color: var(--fg-2); }
.dev-desc p:first-child { font-family: var(--f-display); font-weight: 400; font-size: clamp(1.7rem, 2.5vw, 2.5rem); line-height: 1.2; color: var(--fg); }
.type-tabs { display: flex; flex-wrap: wrap; gap: 6px 28px; margin-bottom: 40px; }
.type-tabs button { background: none; border: 0; padding: 6px 0; font-family: var(--f-display); font-weight: 400; font-size: clamp(1.6rem, 2.4vw, 2.3rem); color: var(--muted); position: relative; transition: color .3s; }
.type-tabs button::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--gold); transform: scaleX(0); transform-origin: 0 50%; transition: transform .5s var(--ease); }
.type-tabs button:hover { color: var(--fg); }
.type-tabs button[aria-pressed="true"] { color: var(--fg); font-style: italic; }
.type-tabs button[aria-pressed="true"]::after { transform: scaleX(1); }
.type-info { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 16px; align-items: end; margin-bottom: 30px; }
.type-name { grid-column: 1 / span 5; font-family: var(--f-display); font-weight: 400; font-size: clamp(2.6rem, 4.6vw, 4.8rem); line-height: .95; }
.type-note { grid-column: 1 / span 5; color: var(--muted); }
.type-data { grid-column: 7 / -1; grid-row: 1 / span 2; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 24px; border-top: 1px solid var(--line); }
.type-data > div { padding: 14px 0 0; display: flex; flex-direction: column; }
@media (max-width: 600px), (min-width: 961px) and (max-width: 1280px) { .type-data { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.type-data dd { margin-top: auto; }
.type-data .unit { margin-left: .25em; font-family: var(--f-sans); font-size: .58em; letter-spacing: .04em; color: var(--fg-2); }
.type-data dt { font-size: 11.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.type-data dd { font-family: var(--f-display); font-weight: 400; font-size: 2rem; line-height: 1.15; }
.type-panel > .viewer-hint { margin-bottom: 16px; }
.qualities { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.quality { padding: 28px 22px 28px 0; }
.quality + .quality { padding-left: 22px; border-left: 1px solid var(--line); }
.quality h3 { font-family: var(--f-display); font-weight: 400; font-size: 2rem; line-height: 1.05; margin: 14px 0 20px; }
.quality li { padding: 10px 0; border-top: 1px solid var(--line); font-size: .98rem; font-weight: 400; line-height: 1.5; color: var(--fg-2); }
.quality .q-n { color: var(--gold); }
.works { display: grid; grid-template-columns: repeat(var(--n, 6), minmax(0, 1fr)); position: relative; }
.works li { position: relative; padding: 36px 16px 0 0; }
.works li::before { content: ''; position: absolute; left: 0; right: 0; top: 10px; height: 1px; background: var(--line-2); }
.works li::after { content: ''; position: absolute; left: 0; top: 5px; width: 11px; height: 11px; border: 1px solid var(--fg-2); background: var(--bg); transform: rotate(45deg); }
.works li.done::before { background: var(--gold); }
.works li.done::after { background: var(--gold); border-color: var(--gold); }
.works li.current::before { background: linear-gradient(to right, var(--gold) calc(var(--p) * 1%), var(--line-2) calc(var(--p) * 1%)); }
.works li.current::after { background: var(--bg); border-color: var(--gold); box-shadow: 0 0 0 4px rgba(201, 164, 106, .18); }
.w-name { font-family: var(--f-display); font-weight: 400; font-size: 1.7rem; line-height: 1.05; margin-bottom: 8px; }
.w-date { color: var(--muted); }
.w-state { margin-top: 10px; display: inline-block; color: var(--fg-2); }
.works li.current .w-state { color: var(--gold); }

/* 11. AGENCIA -------------------------------------------------------------------- */
.ag-head .display { font-size: clamp(5.4rem, 22vw, 24rem); line-height: .8; font-style: italic; }
.ag-intro { font-family: var(--f-display); font-weight: 400; font-size: clamp(1.9rem, 3.6vw, 4rem); line-height: 1.1; max-width: 26ch; margin-top: 26px; }
.ag-since { color: var(--gold); }
.ag-text { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px clamp(20px, 4vw, 64px); font-size: 1.12rem; font-weight: 400; line-height: 1.7; padding-top: clamp(28px, 4vw, 56px); border-top: 1px solid var(--line); color: var(--fg-2); }
.team { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 3vw, 48px); }
.person { display: grid; gap: 14px; align-content: start; }
.portrait { background: var(--bg-3); aspect-ratio: 4 / 5; overflow: hidden; }
.portrait svg, .portrait img { width: 100%; height: 100%; object-fit: cover; }
.person h3 { font-family: var(--f-display); font-weight: 400; font-size: 2.4rem; line-height: 1; }
.person .role { color: var(--gold); margin-top: 6px; }
.person .bio { color: var(--fg-2); font-weight: 400; }
.person .p-meta { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); }
.person .p-meta a { text-transform: none; letter-spacing: .02em; color: var(--fg); }
.method li { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; padding: 32px 0; border-top: 1px solid var(--line); align-items: baseline; }
.method li:last-child { border-bottom: 1px solid var(--line); }
.m-n { grid-column: 1 / span 2; font-family: var(--f-display); font-style: italic; font-weight: 400; font-size: clamp(3rem, 5vw, 5.4rem); line-height: .8; color: var(--gold); }
.m-t { grid-column: 3 / span 4; font-family: var(--f-display); font-weight: 400; font-size: clamp(1.9rem, 2.8vw, 3rem); line-height: 1; }
.m-p { grid-column: 8 / -1; font-size: 1.08rem; font-weight: 400; color: var(--fg-2); max-width: 46ch; }
.ag-contact { grid-column: 1 / span 4; display: grid; gap: 0; align-content: start; border-top: 1px solid var(--line); }
.ag-contact > div { padding: 15px 0; border-bottom: 1px solid var(--line); }
.ag-contact dt { color: var(--muted); margin-bottom: 4px; }
.ag-contact a { overflow-wrap: anywhere; }

/* 12. FORMULARIOS --------------------------------------------------------------- */
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 24px; }
.field { display: grid; gap: 8px; align-content: start; min-width: 0; }
.field-wide { grid-column: 1 / -1; }
.field label { font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-2); }
.field .opt { color: var(--muted); text-transform: none; letter-spacing: .02em; font-weight: 400; }
.field input:not([type="checkbox"]), .field select, .field textarea, .f-field select {
  width: 100%; min-height: 50px; padding: 12px 2px; border: 0; border-bottom: 1px solid var(--line-2); border-radius: 0;
  background: transparent; font-size: 16px; line-height: 1.4; appearance: none; -webkit-appearance: none; transition: border-color .3s;
}
.f-field select { padding: 10px 34px 10px 12px; background-color: var(--bg-2); border: 1px solid var(--line); }
.field select option, .f-field select option { background: var(--bg-2); color: var(--fg); }
.field input:hover, .field select:hover, .field textarea:hover { border-bottom-color: var(--fg-2); }
.field select, .f-field select { padding-right: 36px; background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%); background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible, .f-field select:focus-visible { outline: none; border-bottom: 1px solid var(--gold); box-shadow: 0 1px 0 0 var(--gold); }
.f-field select:focus-visible { border-color: var(--gold); }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-bottom: 2px solid var(--error); }
.err { color: var(--error); font-size: 14px; }
.err::before { content: '\2014\00a0'; }
.field-check { grid-template-columns: auto minmax(0, 1fr); align-items: start; column-gap: 12px; }
.field-check input { width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--gold); }
.field-check label { text-transform: none; font-size: 15px; letter-spacing: .01em; font-weight: 400; color: var(--fg-2); }
.field-check .err { grid-column: 2; }
.field-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.form-msg { color: var(--error); font-size: 15px; }
.btn.is-sending span::after { content: '...'; }
.ok { display: grid; gap: 18px; justify-items: start; padding: 36px 0; border-top: 1px solid var(--line); }
.ok-title { font-family: var(--f-display); font-style: italic; font-weight: 400; font-size: clamp(3.4rem, 6.4vw, 6.6rem); line-height: .9; }
.ok-title:focus { outline: none; }
.ok-demo { color: var(--muted); text-transform: none; letter-spacing: .02em; font-weight: 400; }

/* 13. VISOR DE LA MAQUETA ------------------------------------------------------ */
.viewer { position: relative; }
.viewer-hint { color: var(--muted); text-transform: none; letter-spacing: .02em; font-weight: 400; font-size: 13.5px; }
.viewer-stage { overflow: hidden; }
/* el halo de luz que sigue al zócalo (plan3d.js pone --gx y --gy) */
.is-3d .viewer-stage { background: radial-gradient(42% 36% at var(--gx, 55%) var(--gy, 64%), rgba(214, 178, 122, .16), rgba(214, 178, 122, 0) 100%); }
.plan3d-canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: pan-y; }
.is-live .plan3d-canvas { cursor: grab; }
.is-live.is-dragging .plan3d-canvas, .is-dragging .plan3d-canvas { cursor: grabbing; }
.plan3d-canvas.is-pointing { cursor: pointer; }
.viewer-stage:focus-visible { outline: 1px solid var(--gold); outline-offset: -6px; }

/* Ficha y obra nueva: la maqueta a sangre, con las piezas encima */
.viewer-full { height: min(90svh, 1000px); min-height: 540px; background: radial-gradient(110% 95% at 55% 60%, #262019 0%, #15120f 52%, #0b0a09 100%); }
.viewer-full .viewer-stage { position: absolute; inset: 0; }
.bleed { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }
.viewer-full .viewer-floors { position: absolute; z-index: 3; left: var(--gut); top: 50%; transform: translateY(-50%); }
.viewer-full .sun-ctl { position: absolute; z-index: 3; left: var(--gut); bottom: 26px; }
.viewer-full .viewer-side { position: absolute; z-index: 3; right: var(--gut); top: 26px; bottom: 26px; width: 320px; display: flex; flex-direction: column; background: var(--glass); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border: 1px solid var(--line); padding: 18px 18px 14px; }
.viewer-full .viewer-legend { overflow-y: auto; min-height: 0; flex: 1; padding-right: 4px; }
.viewer-full .viewer-ui { position: absolute; z-index: 4; left: 0; right: 0; bottom: 24px; }

/* Pantalla completa: la misma maqueta, fija sobre todo */
.viewer-full.is-immersive { position: fixed; inset: 0; z-index: 500; height: 100vh; height: 100svh; min-height: 0; margin: 0; }
.viewer-full.is-immersive .plan3d-canvas { touch-action: none; }
body.has-immersive main, body.has-immersive .prop { z-index: auto; }
body.has-immersive .top { visibility: hidden; }

/* Selector de planta: de arriba abajo, como en un ascensor */
.viewer-floors { display: flex; flex-direction: column; gap: 2px; }
.viewer-floors[hidden] { display: none; }
.ftab { display: grid; grid-template-columns: 52px auto; align-items: baseline; text-align: left; gap: 10px; background: none; border: 0; padding: 9px 16px 9px 0; min-height: 44px; color: var(--muted); position: relative; transition: color .3s, padding .5s var(--ease); }
.ftab::before { content: ''; position: absolute; left: -14px; top: 50%; width: 6px; height: 6px; background: var(--gold); transform: translateY(-50%) rotate(45deg) scale(0); transition: transform .4s var(--ease); }
.ftab-lv { font-size: 11.5px; font-weight: 500; letter-spacing: .12em; }
.ftab-name { font-family: var(--f-display); font-weight: 400; font-size: 1.55rem; line-height: 1.05; white-space: nowrap; }
.ftab:only-child, .ftab:not(:has(.ftab-lv)) { grid-template-columns: auto; padding-left: 62px; }
.ftab:hover { color: var(--fg); }
.ftab[aria-pressed="true"] { color: var(--fg); padding-left: 0; }
.ftab[aria-pressed="true"] .ftab-lv { color: var(--gold); }
.ftab[aria-pressed="true"] .ftab-name { font-style: italic; }
.ftab[aria-pressed="true"]::before { transform: translateY(-50%) rotate(45deg) scale(1); }
.ftab:not(:has(.ftab-lv))[aria-pressed="true"] { padding-left: 62px; }

/* Mandos de la cámara: una barra de vidrio oscuro con iconos de línea */
.viewer-ui { display: grid; justify-items: center; gap: 12px; pointer-events: none; }
.xp-ctl { display: flex; align-items: center; gap: 2px; padding: 5px; background: var(--glass); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border: 1px solid var(--line); border-radius: 999px; pointer-events: auto; }
.xp-btn { width: 44px; height: 44px; display: grid; place-items: center; background: none; border: 0; border-radius: 50%; color: var(--fg-2); transition: background-color .3s, color .3s; }
.xp-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.xp-btn:hover { background: rgba(237, 230, 218, .08); color: var(--fg); }
.xp-btn[aria-pressed="true"] { background: var(--gold); color: #18120a; }
.xp-btn:disabled { opacity: .35; cursor: default; background: none; }
.xp-btn:focus-visible { outline: 1px solid var(--gold); outline-offset: 2px; }
.xp-top, .xp-full, .xp-exit { margin-left: 6px; position: relative; }
.xp-top::before { content: ''; position: absolute; left: -4px; top: 12px; bottom: 12px; width: 1px; background: var(--line-2); }
.xp-hint { position: absolute; left: 50%; bottom: calc(100% + 12px); width: max-content; max-width: min(92vw, 560px); translate: -50% 0; text-align: center; padding: 10px 18px; background: var(--glass); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border: 1px solid var(--line); color: var(--fg); font-size: 13.5px; letter-spacing: .02em; opacity: 0; transform: translateY(8px); transition: opacity .5s var(--ease), transform .6s var(--ease); }
.xp-hint.on { opacity: 1; transform: none; }
.xp-hint:empty { display: none; }

/* Etiqueta de estancia sobre la maqueta */
.room-tag { position: absolute; left: 0; top: 0; z-index: 4; pointer-events: none; display: grid; grid-template-columns: auto auto; column-gap: 12px; align-items: baseline; padding: 10px 14px 11px; background: var(--glass); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border: 1px solid var(--line-2); color: var(--fg); white-space: nowrap; opacity: 0; translate: -50% calc(-100% - 16px); transition: opacity .25s, background-color .3s; }
.room-tag::after { content: ''; position: absolute; left: 50%; bottom: -16px; width: 1px; height: 16px; background: var(--gold); }
.room-tag.on { opacity: 1; }
.room-tag.pinned { background: var(--gold); color: #18120a; border-color: var(--gold); }
.tag-num { grid-column: 1 / -1; font-size: 11px; font-weight: 500; letter-spacing: .14em; color: var(--gold); }
.room-tag.pinned .tag-num { color: #3a2a12; }
.tag-name { font-family: var(--f-display); font-weight: 400; font-size: 1.6rem; line-height: 1.05; }
.tag-area { font-size: 13px; letter-spacing: .04em; }
.level-tag { position: absolute; left: 0; top: 0; z-index: 3; pointer-events: none; font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; color: var(--muted); opacity: 0; translate: calc(-100% - 12px) -50%; transition: opacity .4s, color .4s; padding-right: 30px; }
.level-tag::after { content: ''; position: absolute; right: 0; top: 50%; width: 22px; height: 1px; background: var(--line-2); transition: background-color .4s; }
.level-tag.on { opacity: 1; }
.lv-name { margin-left: 1.1em; }
.level-tag.is-cur { color: var(--fg); }
.level-tag.is-cur::after { background: var(--gold); }
/* Móvil: las cotas van en una franja propia a la izquierda de la maqueta (plan3d.js
   le deja sitio); solo la planta que se está contando enseña su nombre */
.has-rail .level-tag { translate: 0 -.7em; padding: 0 0 0 8px; display: flex; flex-direction: column; gap: 2px; width: 58px; font-size: 10px; letter-spacing: .1em; }
.has-rail .level-tag::after { right: auto; top: .7em; left: calc(100% + 2px); width: 8px; }
.has-rail .lv-name { display: none; margin: 0; white-space: normal; font-size: 9.5px; line-height: 1.2; }
.has-rail .level-tag.is-cur .lv-name { display: block; }

/* Hora del día: un deslizador fino con su etiqueta y la hora */
.sun-ctl { display: flex; align-items: center; gap: 14px; padding: 8px 16px; background: var(--glass); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border: 1px solid var(--line); }
.sun-ctl[hidden] { display: none; }
.sun-lab { color: var(--muted); }
.sun-out { min-width: 5ch; font-variant-numeric: tabular-nums; font-size: 14px; color: var(--gold); }
.sun-range { -webkit-appearance: none; appearance: none; width: 160px; height: 32px; margin: 0; background: transparent; cursor: pointer; }
.sun-range::-webkit-slider-runnable-track { height: 1px; background: linear-gradient(to right, #8e7a5a, #e9d3a6 45%, #d88c5a 80%, #4b5a86); }
.sun-range::-moz-range-track { height: 1px; background: linear-gradient(to right, #8e7a5a, #e9d3a6 45%, #d88c5a 80%, #4b5a86); }
.sun-range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 14px; height: 14px; margin-top: -7px; border: 1px solid var(--gold); border-radius: 50%; background: var(--bg); }
.sun-range::-moz-range-thumb { width: 12px; height: 12px; border: 1px solid var(--gold); border-radius: 50%; background: var(--bg); }
.sun-range:focus-visible { outline: 1px solid var(--gold); outline-offset: 4px; }
.sun-range:hover::-webkit-slider-thumb { background: var(--gold); }

/* Cuadro de superficies */
.lg-title { font-weight: 500; color: var(--gold); margin-bottom: 12px; }
.viewer-side { display: flex; flex-direction: column; min-width: 0; }
.lg-floor + .lg-floor { margin-top: 20px; }
.lg-head { display: flex; justify-content: space-between; gap: 10px; font-size: 11.5px; font-weight: 500; text-transform: uppercase; letter-spacing: .14em; padding-bottom: 9px; border-bottom: 1px solid var(--line-2); color: var(--fg-2); }
.lg-list li { border-bottom: 1px solid var(--line); }
.lg-room { width: 100%; display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 10px; align-items: baseline; background: none; border: 0; padding: 9px 6px 9px 0; text-align: left; font-size: 15px; transition: background-color .2s, padding .3s var(--ease), color .2s; }
.lg-num { font-size: 11px; letter-spacing: .06em; color: var(--muted); }
.lg-area { font-size: 13px; white-space: nowrap; color: var(--fg-2); }
.lg-room.is-out .lg-name { font-style: italic; }
.lg-room:hover, .lg-room.is-hover { background: rgba(201, 164, 106, .12); padding-left: 8px; }
.lg-room[aria-pressed="true"] { background: var(--gold); color: var(--gold-ink); padding-left: 8px; }
.lg-room[aria-pressed="true"] .lg-num, .lg-room[aria-pressed="true"] .lg-area { color: var(--gold-ink); }
.lg-total { margin-top: 14px; border-top: 1px solid var(--line-2); }
.lg-total > div { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.lg-total dt { font-size: 11.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.lg-total dd { font-size: 14px; }
.lg-head .lg-farea { text-transform: none; letter-spacing: .02em; }

/* Plano 2D (SVG): sin WebGL, en la galería y al pasar por las tarjetas */
.plan2d { display: grid; gap: 24px; height: 100%; padding: 4%; place-items: center; }
.viewer-full .plan2d { position: absolute; inset: 0; padding: 4% calc(var(--gut) + 340px) 6% calc(var(--gut) + 200px); }
.plan2d-multi { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); align-items: start; }
.plan2d-fig { width: 100%; height: 100%; display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 8px; }
.plan2d-fig svg { width: 100%; height: 100%; }
.plan2d-cap { font-size: 11.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; text-align: center; color: var(--muted); }
.plan2d-note { position: absolute; left: var(--gut); bottom: 14px; font-size: 12.5px; color: var(--muted); }
.hero.is-static .plan2d { padding: 0; }
.hero.is-static .plan2d-note { position: static; margin-top: 12px; }
.plan-svg { overflow: visible; }
.pl-fill { fill: #2a251f; stroke: none; }
.t-living .pl-fill, .t-bedroom .pl-fill { fill: #2f2820; }
.t-bath .pl-fill { fill: #26262a; }
.t-hall .pl-fill { fill: #2b261f; }
.t-terrace .pl-fill { fill: #1d1a16; }
.pl-hatch { stroke: #5a4c3a; stroke-width: .018; }
.pl-room { cursor: default; }
.pl-room.is-hover .pl-fill, .pl-room.is-hover .pl-hatchfill { fill: #4a3e2c; }
.pl-room.is-sel .pl-fill, .pl-room.is-sel .pl-hatchfill { fill: #7a5f36; }
.pl-wall { fill: #ede6da; }
.pl-parapet { fill: #8d8272; }
.pl-win { fill: #151310; stroke: #ede6da; stroke-width: .02; }
.pl-glass { stroke: #c9a46a; stroke-width: .015; }
.pl-leaf { stroke: #ede6da; stroke-width: .03; }
.pl-swing { fill: none; stroke: #a5998a; stroke-width: .012; stroke-dasharray: .06 .05; }
.pl-text text { text-anchor: middle; fill: #ede6da; }
.pl-num { font-family: var(--f-sans); fill: #c9a46a; }
.pl-name { font-family: var(--f-display); font-weight: 500; }
.pl-area { font-family: var(--f-sans); fill: #cfc5b6; }
.pl-cotas line { stroke: #a5998a; stroke-width: .015; }
.pl-cotas .pl-ext { stroke: #6f665a; stroke-width: .01; }
.pl-cota { font-family: var(--f-sans); text-anchor: middle; fill: #cfc5b6; }
.pl-scale-a { fill: #ede6da; }
.pl-scale-b { fill: none; stroke: #ede6da; stroke-width: .015; }
.pl-scale-t { font-family: var(--f-sans); fill: #a5998a; text-anchor: middle; }

/* RESPONSIVE ------------------------------------------------------------------ */
@media (max-width: 1280px) {
  .filters { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .f-op { grid-column: 1 / span 2; }
  .f-check { grid-column: auto; }
  .qualities { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quality:nth-child(3) { padding-left: 0; border-left: 0; }
  .quality:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 1199px) {
  .hero-legend:not([open]) { width: auto; }
}
@media (max-width: 1100px) {
  .feat-info { grid-column: 8 / -1; }
  .feat:nth-child(even) .feat-info { grid-column: 1 / span 5; }
  .viewer-full .viewer-side { width: 290px; }
}
@media (max-width: 960px) {
  :root { --top-h: 64px; }
  .nav, .top .lang { display: none; }
  .menu-btn { display: inline-flex; }
  .brand-name { font-size: 30px; }
  .hero { height: 400vh; height: 400svh; }
  .hero-text { top: auto; left: var(--gut); right: var(--gut); bottom: 18px; width: auto; display: block; padding-top: 28px; background: linear-gradient(to top, rgba(11, 10, 9, .92) 55%, rgba(11, 10, 9, 0)); margin: 0 calc(-1 * var(--gut)); padding-left: var(--gut); padding-right: var(--gut); }
  .hero-ref { margin-bottom: 4px; }
  .steps { display: grid; align-content: end; }
  .step .display { font-size: clamp(2.7rem, 11vw, 4.8rem); }
  .step h2 { font-size: clamp(2.5rem, 10vw, 4.2rem); }
  .step-n { margin-bottom: 8px; }
  .step-text { margin-top: 10px; font-size: 1rem; max-width: 40ch; }
  .hero-foot { margin-top: 18px; gap: 16px; }
  .hero-actions .btn { min-height: 46px; padding: 0 18px; flex: 1; }
  .hero-scroll { display: none; }
  .hero-legend { top: calc(var(--top-h) + 8px); right: var(--gut); width: auto; max-width: calc(100% - 2 * var(--gut)); }
  .hero-legend[open] { left: var(--gut); }
  .hero-legend-in { max-height: 48svh; }
  .hero.is-static .hero-text { background: none; margin: 0; }
  .hero.is-static .hero-stage.is-3d .hero-legend { position: relative; top: auto; right: auto; width: auto; margin: 0 var(--gut); }
  .hero.is-static .hero-stage.is-3d { height: auto; }
  .hero.is-static .hero-stage.is-3d .viewer-stage { position: relative; height: 74svh; }
  .hero.is-static .hero-stage.is-3d .viewer-ui { top: calc(74svh - 70px); bottom: auto; }
  .sec-head .sec-title, .sec-head .sec-lead { grid-column: 1 / -1; }
  .sec-head .link-arrow { grid-column: 1 / -1; justify-self: start; }
  .feat { row-gap: 26px; }
  .feat .feat-art, .feat:nth-child(even) .feat-art, .feat .feat-info, .feat:nth-child(even) .feat-info { grid-column: 1 / -1; grid-row: auto; }
  .agl-text { text-indent: 0; }
  .devb-types { grid-template-columns: minmax(0, 1fr); }
  .contact-side, .form-wrap, .ag-contact { grid-column: 1 / -1; }
  .foot-cols { grid-template-columns: minmax(0, 1fr); }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .cards > li:nth-child(even) { transform: none; }
  .cards:has(> li:nth-child(even)) { padding-bottom: 0; }
  .filters-toggle { display: inline-flex; }
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters[hidden] { display: none; }
  .f-op { grid-column: 1 / -1; }
  .seg { width: 100%; }
  .seg label { flex: 1; justify-content: center; }
  #f-clear { grid-column: 2; }
  .prop-title, .prop-sum, .prop-price { grid-column: 1 / -1; }
  .prop-price { justify-content: space-between; }
  .facts-sec, .about-sec, .loc { grid-column: 1 / -1; }
  .gal-main { aspect-ratio: 4 / 3; }
  .gal-thumbs { margin-left: 0; width: 100%; }
  .dev-desc, .ag-text { grid-template-columns: minmax(0, 1fr); }
  .type-name, .type-note, .type-data { grid-column: 1 / -1; grid-row: auto; }
  .works { grid-template-columns: minmax(0, 1fr); }
  .works li { padding: 0 0 28px 34px; }
  .works li::before { left: 5px; right: auto; top: 14px; bottom: 0; width: 1px; height: auto; }
  .works li.current::before { background: linear-gradient(to bottom, var(--gold) calc(var(--p) * 1%), var(--line-2) calc(var(--p) * 1%)); }
  .works li::after { top: 2px; left: 0; }
  .team { grid-template-columns: minmax(0, 1fr); }
  .portrait { aspect-ratio: 16 / 11; }
  .method li { row-gap: 10px; }
  .m-n { grid-column: 1 / span 3; }
  .m-t, .m-p { grid-column: 4 / -1; }
  /* La maqueta de la ficha y de la obra nueva: el lienzo arriba, la hora y el
     cuadro de superficies debajo */
  .viewer-full { height: auto; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); --stage-h: 74svh; }
  .viewer-full .viewer-stage { position: relative; inset: auto; height: var(--stage-h); grid-row: 1; }
  .viewer-full .viewer-floors { top: 12px; left: 0; right: 0; transform: none; flex-direction: row; justify-content: center; flex-wrap: wrap; gap: 0 16px; padding: 0 var(--gut); }
  .viewer-full .ftab { grid-template-columns: auto; padding: 6px 0; min-height: 40px; }
  .viewer-full .ftab-lv { display: none; }
  .viewer-full .ftab-name { font-size: 1.3rem; }
  .viewer-full .ftab:not(:has(.ftab-lv)), .viewer-full .ftab:not(:has(.ftab-lv))[aria-pressed="true"] { padding-left: 0; }
  .viewer-full .ftab::before { left: 50%; top: auto; bottom: -2px; transform: translateX(-50%) rotate(45deg) scale(0); }
  .viewer-full .ftab[aria-pressed="true"]::before { transform: translateX(-50%) rotate(45deg) scale(1); }
  .viewer-full .viewer-ui { top: calc(var(--stage-h) - 70px); bottom: auto; }
  .viewer-full .sun-ctl { position: relative; left: auto; bottom: auto; grid-row: 2; justify-self: start; margin: 14px var(--gut) 0; }
  .viewer-full .viewer-side { position: relative; inset: auto; width: auto; grid-row: 3; margin: 18px var(--gut) 0; background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; border: 0; padding: 0; }
  .viewer-full .plan2d { position: absolute; padding: 64px var(--gut) 40px; }
  .viewer-full.is-immersive { display: block; height: 100svh; }
  .viewer-full.is-immersive .viewer-stage { position: absolute; inset: 0; height: auto; }
  .viewer-full.is-immersive .viewer-ui { top: auto; bottom: 18px; }
  .viewer-full.is-immersive .viewer-side, .viewer-full.is-immersive .sun-ctl { display: none; }
  .viewer-full.is-immersive .viewer-floors { top: 18px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .brand-tag { display: none; }
  .form { grid-template-columns: minmax(0, 1fr); }
  .filters { grid-template-columns: minmax(0, 1fr); }
  #f-clear { grid-column: 1; justify-self: start; }
  .features { grid-template-columns: minmax(0, 1fr); }
  .qualities { grid-template-columns: minmax(0, 1fr); }
  .quality, .quality + .quality { padding: 24px 0; border-left: 0; }
  .quality + .quality { border-top: 1px solid var(--line); }
  .devb-facts > div + div { padding-left: 0; border-left: 0; }
  .devb-facts > div { flex-basis: 100%; border-bottom: 1px solid var(--line); }
  .foot-base a[href="#top"] { margin-left: 0; }
  .gal-thumbs button { width: 66px; }
  .m-n, .m-t, .m-p { grid-column: 1 / -1; }
  .xp-btn { width: 40px; height: 40px; }
  .xp-ctl { gap: 0; padding: 4px; }
  .xp-top, .xp-full, .xp-exit { margin-left: 2px; }
  .sun-range { width: 130px; }
  .viewer-full { --stage-h: 70svh; }
}
@media (max-width: 380px) {
  .xp-btn { width: 36px; height: 36px; }
  .xp-btn svg { width: 18px; height: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; transition-delay: 0s !important; }
}

/* Cifras y nombres de tamaño medio: tamaño óptico más bajo para que los trazos
   finos de la Bodoni no se pierdan (el símbolo del euro, sobre todo) */
.price-big, .card-price, .feat-price, .devb-facts dd, .type-data dd, .big-link, .tag-name, .ftab-name, .w-name, .t-name { font-variation-settings: 'opsz' 20; }
.top.scrolled { background: rgba(16, 15, 13, .94); }
@media (max-width: 960px) {
  .hero-actions .btn { letter-spacing: .12em; padding: 0 12px; white-space: nowrap; font-size: 11.5px; }
}

/* Entrada de la portada al quitarse la pantalla de carga */
@media (prefers-reduced-motion: no-preference) {
  .hero-ref, .hero-foot { transition: opacity 1s var(--ease) .7s, transform 1.2s var(--ease) .7s; }
  .is-loading .hero-ref, .is-loading .hero-foot, .is-loading .hero-text .step.is-on { opacity: 0; transform: translateY(30px); }
  .is-loading .hero-text .step.is-on { filter: blur(8px); }
  body:not(.is-loading) .hero-text .step.is-on { transition-delay: .5s; }
  body:not(.is-loading) .hero.scrolled .hero-text .step.is-on { transition-delay: .14s; }
}

/* Bodoni con tamaño óptico bajo: a tamaños grandes el eje automático dejaba los trazos finos casi invisibles */
.display, .sec-title, .step h2, .feat-title, .agl-text, .card-title, .empty-title, .menu-nav a, .loader-brand, .brand-name, .foot-word, .plan-title, .prop-desc p:first-child, .loc-street, .dev-desc p:first-child, .type-tabs button, .type-name, .quality h3, .ag-intro, .person h3, .m-n, .m-t, .ok-title, .pl-name { font-variation-settings: 'opsz' 14; font-weight: 500; }
.display em, .sec-title em, .plan-title em { font-weight: 500; }
.price-big, .card-price, .feat-price, .devb-facts dd, .type-data dd, .big-link, .tag-name, .ftab-name, .w-name, .t-name { font-variation-settings: 'opsz' 11; font-weight: 500; }
/* el doble toque en flechas y botones no amplía la página */
a, button, label, summary, [role="button"] { touch-action: manipulation; }
/* en móvil la etiqueta de la estancia no tapa la planta que se está mirando */
@media (max-width: 600px) {
  .room-tag { padding: 7px 10px; gap: 2px 8px; }
  .tag-num { font-size: 10px; }
  .tag-name { font-size: 1.05rem; }
  .tag-area { font-size: 11.5px; }
}

/* brújula (gira con la maqueta) y play del recorrido del sol */
.sun-north { width: 34px; height: 34px; flex: none; rotate: var(--north, 0deg); }
.sun-north circle { fill: none; stroke: var(--line-2); }
.sun-north .nd-n { fill: var(--gold); }
.sun-north .nd-s { fill: var(--muted); opacity: .55; }
.sun-north .nd-l { fill: var(--gold); font-family: var(--f-sans); font-size: 7.5px; font-weight: 500; }
.sun-play { display: grid; place-items: center; flex: none; width: 36px; height: 36px; padding: 0; border: 1px solid var(--line-2); border-radius: 50%; background: none; color: var(--gold); cursor: pointer; transition: border-color .3s, background-color .3s; }
.sun-play svg { width: 14px; height: 14px; fill: currentColor; }
.sun-play:hover { border-color: var(--gold); }
.sun-play:focus-visible { outline: 1px solid var(--gold); outline-offset: 3px; }
.sun-play .i-pause, .sun-play[aria-pressed="true"] .i-play { display: none; }
.sun-play[aria-pressed="true"] .i-pause { display: inline; }
.sun-play[hidden] { display: none; }
@media (max-width: 600px) {
  .viewer-full .sun-ctl { justify-self: stretch; gap: 12px; padding: 8px 14px; }
  .sun-lab { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .sun-range { flex: 1; width: auto; min-width: 0; }
}

/* en la portada del móvil el cuadro de superficies taparía la maqueta: está completo en la ficha */
@media (max-width: 960px) { .hero-legend { display: none; } }
