/* Viviendas del Futuro — hoja de estilos común. Tokens documentados en DESIGN.md */

@font-face { font-family: 'DM Serif Display'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/dm-serif-display-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'DM Serif Display'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/dm-serif-display-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'DM Serif Display'; font-style: italic; font-weight: 400; font-display: swap; src: url('../fonts/dm-serif-display-italic-latin.woff2') format('woff2'); }
@font-face { font-family: 'Work Sans'; font-style: normal; font-weight: 400 600; font-display: swap; src: url('../fonts/work-sans-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Work Sans'; font-style: normal; font-weight: 400 600; font-display: swap; src: url('../fonts/work-sans-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  color-scheme: light;
  --paper: #f6f2ec;
  --paper-2: #ebe4d9;
  --line: #e3dcd1;
  --line-strong: #cfc6b8;
  --ink: #1f2a24;
  --ink-soft: #4a4239;
  --ink-mute: #6b6358;
  --accent: #b5552f;
  --accent-hover: #9a4526;
  --accent-on-dark: #e0a07f;
  --accent-text: #9a4526;
  --brand-sub: #8a5a00;
  --on-accent: #ffffff;
  --blue: #03557f;
  --yellow: #f5a511;
  --field: #1f2a24;
  --field-ink: #f6f2ec;
  --field-soft: #d6cfc4;
  --field-line: rgba(246, 242, 236, 0.22);
  --input-bg: #ffffff;
  --ok-bg: #dfe9dc; --ok-ink: #2f5a34;
  --warn-bg: #f5e2c8; --warn-ink: #8a4f10;
  --error: #b3261e;

  --serif: 'DM Serif Display', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --sans: 'Work Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;

  --fs-display: clamp(64px, 12vw, 196px);
  --fs-h2: clamp(40px, 4.6vw, 68px);
  --fs-h3: clamp(26px, 2.4vw, 34px);
  --fs-lead: clamp(18px, 1.5vw, 21px);
  --fs-body: 17px;
  --fs-small: 14px;

  --margin: clamp(16px, 4vw, 48px);
  --maxw: 1280px;
  --section: clamp(80px, 11vw, 160px);
  --radius: 4px;
  --header-h: 76px;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #141b17; --paper-2: #1b2420; --line: #2c3830; --line-strong: #3b4a41;
    --ink: #f1ece4; --ink-soft: #d6cfc4; --ink-mute: #a9a196;
    --accent: #d9774f; --accent-hover: #e58c66; --on-accent: #1a1410;
    --blue: #2b7fae; --field: #0f1512; --input-bg: #10161300;
    --ok-bg: #22352a; --ok-ink: #b9dcb8; --warn-bg: #3a2c17; --warn-ink: #f2c98d; --error: #ff8a80;
    --accent-text: #e58c66; --brand-sub: #f5a511;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #141b17; --paper-2: #1b2420; --line: #2c3830; --line-strong: #3b4a41;
  --ink: #f1ece4; --ink-soft: #d6cfc4; --ink-mute: #a9a196;
  --accent: #d9774f; --accent-hover: #e58c66; --on-accent: #1a1410;
  --blue: #2b7fae; --field: #0f1512; --input-bg: #10161300;
  --ok-bg: #22352a; --ok-ink: #b9dcb8; --warn-bg: #3a2c17; --warn-ink: #f2c98d; --error: #ff8a80;
  --accent-text: #e58c66; --brand-sub: #f5a511;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px));
}
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: var(--fs-body); line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  font-variant-numeric: lining-nums;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
h2 { font-size: var(--fs-h2); line-height: 1.02; }
h3 { font-size: var(--fs-h3); line-height: 1.1; }
p { margin: 0; text-wrap: pretty; }
em { font-style: italic; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
input, textarea, select, button { font: inherit; color: inherit; }
button, a, [role="button"], summary { touch-action: manipulation; }
button, .btn, [role="tab"] { -webkit-user-select: none; user-select: none; }
html { scrollbar-color: var(--line-strong) var(--paper); }

.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: var(--radius); }
.skip:focus { top: 12px; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--margin); }
.section { padding-block: var(--section); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lead { font-size: var(--fs-lead); line-height: 1.55; color: var(--ink-soft); max-width: 52ch; }
.muted { color: var(--ink-mute); }
.small { font-size: var(--fs-small); }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 28px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 500; font-size: 16px; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease, transform 140ms var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-ghost { border-color: currentColor; background: transparent; }
.btn-light { background: var(--paper); color: var(--ink); }
.btn .arrow { transition: transform 200ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: var(--accent-hover); }
  .btn-ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
  .on-photo .btn-ghost:hover, .on-dark .btn-ghost:hover { background: var(--field-ink); color: #1f2a24; border-color: var(--field-ink); }
  .btn:hover .arrow { transform: translateX(4px); }
  a.link:hover { color: var(--accent); }
}
.link { color: var(--accent-text); font-weight: 500; text-decoration: none; display: inline-flex; gap: 8px; align-items: center; min-height: 44px; }
.on-dark .link { color: var(--accent-on-dark); }

/* Cabecera */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 40;
  padding-top: env(safe-area-inset-top, 0px);
  color: #f6f2ec;
  transition: background-color 260ms ease, color 260ms ease, box-shadow 260ms ease;
}
.site-header .bar { max-width: none; height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.site-header.is-solid, .site-header.is-open { background: var(--paper); color: var(--ink); box-shadow: 0 1px 0 var(--line); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { height: 46px; width: auto; }
.brand-words { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; line-height: 1; font-weight: 600; }
.brand-words .n { font-size: 19px; letter-spacing: 0.01em; color: currentColor; }
.brand-words .g { font-size: 13px; color: var(--yellow); }
.site-header.is-solid .brand-words .n, .site-header.is-open .brand-words .n { color: var(--blue); }
.site-header.is-solid .brand-words .g, .site-header.is-open .brand-words .g { color: var(--brand-sub); }
.nav { display: flex; align-items: center; gap: clamp(16px, 2.2vw, 30px); font-size: 15px; }
.nav a { text-decoration: none; padding-block: 10px; position: relative; }
.nav a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform 240ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .nav a:not(.btn):hover::after { transform: scaleX(1); } }
.nav .btn { min-height: 44px; padding: 0 20px; font-size: 15px; background: var(--field-ink); color: #1f2a24; }
.site-header.is-solid .nav .btn { background: var(--ink); color: var(--paper); }
.menu-btn { display: none; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid currentColor; background: transparent; cursor: pointer; font-weight: 500; }
.site-header.on-light { color: var(--ink); }

@media (max-width: 900px) {
  .nav { display: none; }
  .menu-btn { display: inline-flex; align-items: center; }
  .site-header.is-open .nav {
    display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
    position: fixed; inset: calc(var(--header-h) + env(safe-area-inset-top, 0px)) 0 0; background: var(--paper);
    padding: 24px var(--margin) calc(32px + env(safe-area-inset-bottom, 0px)); overflow-y: auto;
  }
  .site-header.is-open .nav a:not(.btn) { font-family: var(--serif); font-size: clamp(34px, 9vw, 48px); line-height: 1.15; padding-block: 6px; }
  .site-header.is-open .nav .btn { margin-top: 20px; background: var(--accent); color: var(--on-accent); min-height: 52px; font-size: 16px; }
  .brand img { height: 40px; }
  .brand-words .n { font-size: 17px; }
}

/* Portada a sangre (todas las páginas) */
.hero {
  position: relative; min-height: 100svh; color: #f6f2ec; overflow: hidden;
  display: grid; grid-template-rows: auto 1fr auto; isolation: isolate;
  background: #1f2a24;
}
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.7) saturate(0.92); }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 70% 55% at 0% 0%, rgba(20, 26, 22, 0.62), rgba(20, 26, 22, 0) 70%),
    radial-gradient(ellipse 75% 60% at 100% 100%, rgba(20, 26, 22, 0.66), rgba(20, 26, 22, 0) 72%),
    linear-gradient(90deg, rgba(20, 26, 22, 0) 22%, rgba(20, 26, 22, 0.42) 30%, rgba(20, 26, 22, 0.42) 62%, rgba(20, 26, 22, 0) 78%),
    linear-gradient(180deg, rgba(20, 26, 22, 0.4) 0%, rgba(20, 26, 22, 0) 22%);
}
.hero h1 { display: grid; grid-row: 1 / 4; grid-column: 1; grid-template-rows: subgrid; margin: 0; }
.hero-mid { grid-column: 1; position: relative; z-index: 1; }
@supports not (grid-template-rows: subgrid) { .hero h1 { display: contents; } }
.hero .line { display: block; overflow: hidden; font-family: var(--serif); font-size: var(--fs-display); line-height: 0.86; letter-spacing: -0.025em; padding-bottom: 0.06em; }
.hero .line > span { display: block; }
.hero .l1 { grid-row: 1; align-self: start; padding: calc(var(--header-h) + env(safe-area-inset-top, 0px) + clamp(20px, 4vh, 48px)) var(--margin) 0; }
.hero .l2 { grid-row: 3; align-self: end; padding: 0 var(--margin) clamp(16px, 3vh, 28px); padding-left: 28vw; }
.hero-mid { grid-row: 2; align-self: center; padding: 28px var(--margin); padding-left: max(var(--margin), 30vw); display: flex; flex-direction: column; gap: 22px; max-width: calc(30vw + 60ch); }
.hero-mid p { font-size: clamp(17px, 1.4vw, 20px); line-height: 1.5; max-width: 44ch; }
.hero-mid .actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tag { display: inline-flex; align-items: center; min-height: 32px; padding: 0 14px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.tag-ok { background: var(--ok-bg); color: var(--ok-ink); }
.tag-warn { background: var(--warn-bg); color: var(--warn-ink); }
.tag-paper { background: #f6f2ec; color: #1f2a24; }
.hero .crumb { font-size: 14px; color: rgba(246, 242, 236, 0.85); text-decoration: none; }
@media (max-width: 760px) {
  .hero .line { font-size: clamp(56px, 17vw, 120px); }
  .hero .l1 { padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px) + 20px); }
  .hero .l2 { padding-left: var(--margin); text-align: right; padding-bottom: 20px; }
  .hero::before { background: linear-gradient(180deg, rgba(20, 26, 22, 0.5) 0%, rgba(20, 26, 22, 0.15) 30%, rgba(20, 26, 22, 0.55) 55%, rgba(20, 26, 22, 0.82) 100%); }
  .hero-mid { padding-left: var(--margin); max-width: none; align-self: end; padding-bottom: 20px; gap: 18px; }
  .hero-mid p { font-size: 16px; }
  .hero-mid .actions { gap: 10px; }
  .hero-mid .actions .btn { flex: 1 1 auto; }
}

/* Reveal del titular (momento firma): solo CSS, empieza en el primer fotograma y termina antes de 1,2 s */
.hero .line > span { animation: vf-rise 820ms var(--ease-out) both; }
.hero .l2 > span { animation-delay: 90ms; }
.hero .hero-mid { animation: vf-fade 600ms var(--ease-out) 320ms both; }
@keyframes vf-rise { from { transform: translateY(105%); } }
@keyframes vf-fade { from { opacity: 0; transform: translateY(14px); } }

/* Entradas por sección */
.js [data-reveal] { opacity: 0; transform: translateY(24px); }
.js [data-reveal].is-in { opacity: 1; transform: none; transition: opacity 800ms var(--ease-out), transform 800ms var(--ease-out); transition-delay: var(--d, 0ms); }
.js [data-reveal="clip"] { opacity: 1; transform: none; clip-path: inset(12% 0 0 0); }
.js [data-reveal="clip"] img { transform: scale(1.08); }
.js [data-reveal="clip"].is-in { clip-path: inset(0 0 0 0); transition: clip-path 1100ms var(--ease-out); }
.js [data-reveal="clip"].is-in img { transform: none; transition: transform 1400ms var(--ease-out); }

/* Franja de datos */
.facts { border-bottom: 1px solid var(--line); }
.facts .wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 20px 32px; padding-block: 30px; }
.fact { display: flex; align-items: baseline; gap: 12px; }
.fact b { font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 3.2vw, 44px); line-height: 1; }
.fact span { color: var(--ink-soft); font-size: 15px; }

/* Encabezado de sección */
.sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px 48px; flex-wrap: wrap; margin-bottom: clamp(40px, 5vw, 72px); }
.sec-head h2 { max-width: 16ch; }
.sec-head p { max-width: 44ch; color: var(--ink-soft); font-size: var(--fs-lead); line-height: 1.5; }
.on-dark { background: var(--field); color: var(--field-ink); }
.on-dark .sec-head p, .on-dark .lead { color: var(--field-soft); }

/* Formularios */
.form-panel { background: var(--paper); padding: clamp(24px, 4vw, 48px); border-radius: var(--radius); align-self: start; }
.form { display: flex; flex-direction: column; gap: 18px; }
.form h3 { margin-bottom: 4px; }
.field { display: flex; flex-direction: column; gap: 8px; font-size: 14px; font-weight: 500; }
.field input, .field select, .field textarea {
  min-height: 52px; padding: 13px 16px; border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--input-bg); font-size: 16px; font-weight: 400; color: var(--ink); caret-color: var(--accent);
  transition: border-color 160ms ease, box-shadow 160ms ease; width: 100%;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.field input:user-invalid, .field textarea:user-invalid { border-color: var(--error); }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.5; color: var(--ink-soft); }
.check input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--accent); flex: none; }
.hp { position: absolute !important; left: -9999px; }
.form .btn[disabled] { opacity: 0.6; cursor: wait; }
.form-error { color: var(--error); font-size: 15px; line-height: 1.5; }
.form-ok { display: flex; flex-direction: column; gap: 16px; padding-block: 24px; }
.form-ok[hidden], .form[hidden] { display: none; }
details.legal { font-size: 13px; line-height: 1.55; color: var(--ink-soft); border-top: 1px solid var(--line); padding-top: 14px; }
details.legal summary { cursor: pointer; font-weight: 500; color: var(--ink); min-height: 32px; }
details.legal p + p { margin-top: 8px; }

/* Bloque de contacto (form + datos) */
.contact { background: var(--paper-2); }
.contact .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); gap: clamp(40px, 6vw, 96px); }
.contact-info { display: flex; flex-direction: column; gap: 36px; }
.contact-info dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 26px; margin: 0; }
.contact-info dt { font-size: 13px; letter-spacing: 0.06em; color: var(--ink-mute); margin-bottom: 6px; }
.contact-info dd { margin: 0; line-height: 1.55; }
.contact-info .big { font-family: var(--serif); font-size: 28px; text-decoration: none; }

/* Lightbox */
dialog.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100dvh; margin: 0; }
dialog.lightbox::backdrop { background: rgba(14, 19, 16, 0.92); }
dialog.lightbox[open] { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; animation: lb-in 260ms var(--ease-out); }
dialog.lightbox img { max-width: 100%; max-height: calc(100dvh - 120px); object-fit: contain; border-radius: 2px; background: #fff; }
dialog.lightbox p { color: #d6cfc4; font-size: 14px; text-align: center; max-width: 70ch; }
dialog.lightbox .close { position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); right: 12px; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid rgba(246, 242, 236, 0.6); background: transparent; color: #f6f2ec; cursor: pointer; }
@keyframes lb-in { from { opacity: 0; transform: scale(0.98); } }
.zoom { cursor: zoom-in; }

/* Pie */
.footer { display: grid; grid-template-columns: 1fr 1fr; min-height: 100svh; background: var(--field); color: var(--field-ink); }
.footer-photo { position: relative; min-height: 50svh; }
.footer-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.footer-body { display: flex; flex-direction: column; gap: 56px; padding: clamp(48px, 7vw, 88px) var(--margin) calc(28px + env(safe-area-inset-bottom, 0px)) clamp(32px, 6vw, 96px); }
.footer-brand { display: inline-flex; align-items: center; gap: 12px; align-self: flex-start; background: #f6f2ec; color: #03557f; border-radius: var(--radius); padding: 8px 14px; text-decoration: none; }
.footer-brand img { height: 40px; width: auto; }
.footer-brand .n { color: #03557f; font-size: 17px; }
.footer-brand .g { color: #8a5a00; }
.footer-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-menu a { font-family: var(--serif); font-size: clamp(32px, 3.2vw, 52px); line-height: 1.1; text-decoration: none; display: inline-block; transition: transform 260ms var(--ease-out), color 200ms ease; }
@media (hover: hover) and (pointer: fine) {
  .footer-menu:hover a { color: rgba(246, 242, 236, 0.45); }
  .footer-menu a:hover { color: var(--field-ink); transform: translateX(12px); }
}
.footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 28px; font-size: 15px; line-height: 1.6; color: var(--field-soft); }
.footer-cols b { display: block; color: var(--field-ink); font-weight: 500; margin-bottom: 6px; }
.footer-cols a { color: var(--field-ink); }
.footer-legal { margin-top: auto; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 13px; color: var(--field-soft); }
.footer-legal a { color: var(--field-soft); }
@media (max-width: 900px) {
  .footer { grid-template-columns: 1fr; min-height: 0; }
  .footer-body { padding-left: var(--margin); gap: 40px; }
  .footer-menu a { font-size: clamp(30px, 8vw, 44px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; transition-delay: 0ms !important; }
  .js [data-reveal], .js [data-reveal="clip"], .hero .line > span, .hero .hero-mid { opacity: 1 !important; transform: none !important; clip-path: none !important; animation: none !important; }
}

/* ───────── Inicio ───────── */

/* Proyectos: tarjetas que cruzan una foto fija */
.showcase { position: relative; background: #1f2a24; color: #f6f2ec; }
.showcase-stage { position: relative; overflow: hidden; }
.showcase-bg { position: absolute; inset: 0; }
.showcase-bg img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.5) saturate(0.85); }
.showcase-head { position: relative; padding: calc(var(--header-h) + 32px) var(--margin) 0; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 40px; flex-wrap: wrap; max-width: var(--maxw); margin: 0 auto; }
.showcase-head h2 { max-width: 20ch; }
.showcase-head p { max-width: 36ch; color: #e7e1d7; }
.track { position: relative; display: flex; gap: 40px; padding: 48px var(--margin) 72px; }
.pcard { flex: none; width: min(720px, 60vw); display: grid; grid-template-rows: 1fr auto; background: #f6f2ec; color: #1f2a24; text-decoration: none; overflow: hidden; }
.pcard-img { position: relative; overflow: hidden; aspect-ratio: 16 / 10; }
.pcard-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 900ms var(--ease-out); }
.pcard-img .tag { position: absolute; top: 18px; left: 18px; }
.pcard-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 28px; align-items: end; padding: 26px 28px 28px; color: #f6f2ec; }
.pcard-panel h3 { font-size: clamp(32px, 3vw, 48px); line-height: 1; }
.pcard-panel .city { display: block; font-family: var(--sans); font-size: 15px; margin-top: 10px; opacity: 0.85; }
.pcard-panel p { font-size: 15px; line-height: 1.5; }
.pcard-panel .go { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid rgba(246, 242, 236, 0.3); padding-top: 14px; font-size: 15px; }
.pcard-panel .go b { font-weight: 500; }
.p-blue .pcard-panel { background: #03557f; }
.p-terra .pcard-panel { background: #9a4526; }
.p-ink .pcard-panel { background: #2c3830; }
.pcard.p-ink { background: #2c3830; }
.pcard-empty { display: flex; flex-direction: column; justify-content: center; gap: 22px; padding: clamp(28px, 4vw, 56px); color: #f6f2ec; }
.pcard-empty h3 { font-size: clamp(32px, 3vw, 48px); line-height: 1.05; max-width: 14ch; }
.pcard-empty p { max-width: 40ch; color: #d6cfc4; }
@media (hover: hover) and (pointer: fine) { a.pcard:hover .pcard-img img { transform: scale(1.04); } }
@media (min-width: 901px) and (prefers-reduced-motion: no-preference) {
  .js .showcase.is-pinned { height: 220svh; }
  .js .showcase.is-pinned .showcase-stage { position: sticky; top: 0; height: 100svh; display: flex; flex-direction: column; }
  .js .showcase.is-pinned .track { flex: 1; align-items: center; padding-block: 28px 40px; will-change: transform; }
  .js .showcase.is-pinned .pcard { height: min(540px, calc(100svh - var(--header-h) - 270px)); }
  .js .showcase.is-pinned .pcard-img { aspect-ratio: auto; }
}
@media (max-width: 900px) {
  .track { flex-direction: column; gap: 24px; padding: 32px var(--margin) 56px; }
  .pcard { width: 100%; }
  .pcard-img { aspect-ratio: 4 / 3; }
  .pcard-panel { grid-template-columns: 1fr; }
}

/* Testimonios sobre foto */
.voices { position: relative; min-height: 92svh; color: #f6f2ec; display: flex; align-items: flex-end; overflow: hidden; background: #1f2a24; }
.voices-bg { position: absolute; inset: 0; }
.voices-bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(0.5); opacity: 0; transition: opacity 900ms ease; }
.voices-bg img.is-on { opacity: 1; }
.voices .wrap { position: relative; width: 100%; padding-block: clamp(96px, 12vw, 160px) clamp(48px, 7vw, 80px); display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 40px; align-items: end; }
.voices h2 { font-size: clamp(22px, 2vw, 28px); font-family: var(--sans); font-weight: 500; letter-spacing: 0; margin-bottom: 28px; color: #e7e1d7; }
.quote { margin: 0; }
.quote blockquote { margin: 0; font-family: var(--serif); font-size: clamp(26px, 2.5vw, 36px); line-height: 1.22; max-width: 30ch; }
.quote figcaption { margin-top: 26px; font-size: 16px; color: #e7e1d7; }
.quote figcaption b { color: #f6f2ec; font-weight: 600; }
.js .quote:not(.is-on) { display: none; }
.js .quote.is-on { animation: q-in 700ms var(--ease-out); }
@keyframes q-in { from { opacity: 0; transform: translateY(12px); filter: blur(4px); } }
.who { display: flex; flex-direction: column; gap: 6px; }
.who-label { font-size: 14px; color: #e7e1d7; margin-bottom: 8px; }
.who button { text-align: left; background: none; border: 0; border-top: 1px solid rgba(246, 242, 236, 0.3); color: rgba(246, 242, 236, 0.86); padding: 14px 0; min-height: 52px; cursor: pointer; display: flex; justify-content: space-between; gap: 12px; font-size: 16px; transition: color 200ms ease; }
.who button span:last-child { font-size: 14px; }
.who button[aria-selected="true"] { color: #f6f2ec; border-top-color: #f6f2ec; }
.no-js .who { display: none; }
@media (max-width: 900px) {
  .voices .wrap { grid-template-columns: 1fr; }
  .quote blockquote { font-size: clamp(22px, 6vw, 26px); }
}

/* Quiénes somos */
.about-top { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 24px 64px; align-items: end; margin-bottom: clamp(48px, 6vw, 80px); }
.about-top h2 em { color: var(--accent-text); font-style: normal; }
.about-top .lead { max-width: 46ch; }
.mosaic { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 16px; align-items: start; }
.mosaic-main { position: relative; margin: 0; }
.mosaic-main img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius); }
.mosaic-note { position: absolute; top: 0; left: 0; width: min(380px, 48%); background: var(--paper); padding: 22px 24px 26px; border-bottom-right-radius: var(--radius); }
.mosaic-note p { font-family: var(--serif); font-size: clamp(20px, 1.8vw, 26px); line-height: 1.3; color: var(--ink); }
.mosaic-main figcaption, .mosaic-side figcaption { font-size: 14px; color: var(--ink-mute); margin-top: 10px; }
.mosaic-side { margin: 0; }
.mosaic-side .tile { background: var(--blue); border-radius: var(--radius); padding: 16px; }
.mosaic-side img { width: 100%; aspect-ratio: 1; object-fit: cover; object-position: 60% 30%; border-radius: 2px; }
.mosaic-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 16px; margin: 26px 0 0; }
.mosaic-facts div { border-top: 1px solid var(--line-strong); padding-top: 12px; }
.mosaic-facts dt { font-size: 14px; color: var(--ink-mute); }
.mosaic-facts dd { margin: 4px 0 0; font-family: var(--serif); font-size: 30px; line-height: 1.1; }
.about-text { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 24px 64px; margin-top: clamp(48px, 6vw, 80px); }
.about-text .cols { max-width: 62ch; color: var(--ink-soft); font-size: 18px; line-height: 1.65; }
.about-text .cols p + p { margin-top: 18px; }
.about-text h3 { font-size: clamp(24px, 2vw, 30px); }
@media (max-width: 900px) {
  .about-top, .mosaic, .about-text { grid-template-columns: 1fr; }
  .mosaic-note { position: static; width: auto; padding: 18px 0 0; }
  .mosaic-side .tile { padding: 12px; }
  .mosaic-side img { aspect-ratio: 3 / 2; }
}

/* Registro de edificios */
.register h2 { max-width: 20ch; text-indent: 3vw; }
.register-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px clamp(32px, 5vw, 80px); margin-top: clamp(48px, 7vw, 96px); align-items: start; }
.register-preview { position: sticky; top: calc(var(--header-h) + 24px); margin: 0; }
.register-preview .frame { position: relative; aspect-ratio: 4 / 5; background: var(--paper-2); border-radius: var(--radius); overflow: hidden; }
.register-preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.03); transition: opacity 420ms ease, transform 900ms var(--ease-out); }
.register-preview img.is-on { opacity: 1; transform: none; }
.register-preview figcaption { display: flex; justify-content: space-between; gap: 12px; margin-top: 12px; font-size: 15px; }
.register-preview figcaption b { font-family: var(--serif); font-weight: 400; font-size: 24px; }
.register-hint { font-size: 14px; color: var(--ink-mute); margin-bottom: 18px; }
.decade + .decade { margin-top: 44px; }
.decade h3 { font-family: var(--sans); font-size: 14px; font-weight: 500; color: var(--ink-mute); letter-spacing: 0.02em; margin-bottom: 6px; }
.rows { list-style: none; margin: 0; padding: 0; }
.row { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; gap: 16px; align-items: center; border-bottom: 1px solid var(--line); }
.row > * { padding-block: 13px; }
.row .y { font-family: var(--serif); font-size: 22px; color: var(--accent); font-variant-numeric: tabular-nums; }
.row .nm { font-weight: 500; }
.row .ct { color: var(--ink-soft); text-align: right; font-size: 15px; }
.row button { all: unset; display: contents; cursor: pointer; }
.row.has-img { cursor: pointer; transition: background-color 200ms ease; }
.row.has-img .nm::after { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--yellow); margin-left: 10px; vertical-align: middle; }
.row.is-on { background: var(--paper-2); }
.row.is-on .nm { color: var(--accent); }
.row .thumb { display: none; }
@media (max-width: 900px) {
  .register h2 { text-indent: 0; }
  .register-grid { grid-template-columns: 1fr; }
  .register-preview { display: none; }
  .row { grid-template-columns: 60px minmax(0, 1fr) auto; }
  .row .ct { grid-column: 2; grid-row: 2; text-align: left; padding-top: 0; font-size: 14px; }
  .row .nm { padding-bottom: 2px; }
  .row .thumb { display: block; grid-column: 3; grid-row: 1 / span 2; width: 84px; height: 62px; object-fit: cover; border-radius: 2px; padding: 0; }
  .row > .y { grid-row: 1 / span 2; }
}

/* Reconocimientos */
.awards-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 48px 24px; }
.award { display: flex; flex-direction: column; gap: 16px; margin: 0; }
.award img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--radius); background: #2c3830; }
.award .yr { font-family: var(--serif); font-size: 22px; color: var(--accent-on-dark); }
.award h3 { font-size: 24px; line-height: 1.15; }
.award .by { font-size: 13px; letter-spacing: 0.04em; color: #c9c2b6; }
.award p { font-size: 15px; line-height: 1.6; color: var(--field-soft); }
@media (max-width: 1000px) { .awards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .awards-grid { grid-template-columns: 1fr; } .award img { aspect-ratio: 4 / 3; } }

/* Visita: tarjeta sobre la foto */
.visit { position: relative; min-height: 100svh; overflow: hidden; background: #1f2a24; }
.visit > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.visit-card { position: relative; margin: 0 var(--margin) 0 auto; top: calc(var(--header-h) + 40px); width: min(400px, 100%); background: var(--paper); color: var(--ink); border-radius: 8px; padding: 32px; display: flex; flex-direction: column; gap: 18px; margin-bottom: 120px; }
.visit-card h2 { font-size: 34px; }
.hours { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; font-variant-numeric: tabular-nums; font-size: 15px; margin: 0; }
.hours dt { color: var(--ink-soft); }
.hours dd { margin: 0; text-align: right; }
.visit-card .tel { font-family: var(--serif); font-size: 30px; text-decoration: none; line-height: 1; }
.visit-card .btn { width: 100%; }
@media (max-width: 760px) {
  .visit { min-height: 0; padding-top: 70svh; background: var(--paper-2); }
  .visit > img { height: 70svh; bottom: auto; }
  .visit-card { top: auto; margin: -80px var(--margin) 0; width: auto; padding: 24px; }
}

/* ───────── Torre Oeste ───────── */
.spaces { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 clamp(24px, 3vw, 48px); }
.space { display: flex; flex-direction: column; gap: 18px; border-top: 2px solid var(--ink); padding-top: 26px; }
.space h3 { font-size: clamp(34px, 3.4vw, 52px); line-height: 1; }
.space p { color: var(--ink-soft); }
.space dl { margin: auto 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; border-top: 1px solid var(--line); padding-top: 14px; font-size: 15px; }
.space dt { color: var(--ink-mute); font-size: 14px; }
.space dd { margin: 2px 0 0; font-weight: 500; }
.space .btn { align-self: flex-start; }
@media (max-width: 900px) { .spaces { grid-template-columns: 1fr; gap: 48px; } }

.gallery-torre { padding-bottom: var(--section); }
.g-wide { margin: 0; overflow: hidden; }
.g-wide img { width: 100%; height: min(86svh, 900px); object-fit: cover; object-position: 50% 30%; }
.g-title { margin: clamp(56px, 7vw, 96px) 0 clamp(32px, 4vw, 56px); }
.g-pair { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 24px; align-items: end; }
.g-pair figure { margin: 0; overflow: hidden; }
.g-pair figure:first-child img { aspect-ratio: 4 / 3; }
.g-pair figure:last-child img { aspect-ratio: 3 / 4; }
.g-pair img { width: 100%; object-fit: cover; border-radius: var(--radius); }
.g-pair figcaption { font-size: 15px; color: var(--field-soft); margin-top: 10px; }
@media (max-width: 760px) { .g-pair { grid-template-columns: 1fr; } .g-pair figure:last-child img { aspect-ratio: 4 / 3; } }

.plan-btn { all: unset; display: block; cursor: zoom-in; width: 100%; border-radius: var(--radius); }
.plan-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.plan-btn img { width: 100%; background: #fff; border: 1px solid var(--line); border-radius: 2px; transition: transform 400ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .plan-btn:hover img { transform: scale(1.015); } }
.plans-torre { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.plans-torre figure { margin: 0; display: flex; flex-direction: column; gap: 14px; }
.plans-torre img { aspect-ratio: 4 / 3; object-fit: contain; padding: 16px; }
.plans-torre figcaption { display: flex; flex-direction: column; gap: 4px; }
.plans-torre figcaption b { font-family: var(--serif); font-weight: 400; font-size: 26px; }
.plans-torre figcaption span { color: var(--ink-soft); font-size: 15px; }
@media (max-width: 760px) { .plans-torre { grid-template-columns: 1fr; } }

.place { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: center; background: var(--paper-2); }
.place-photo { overflow: hidden; align-self: stretch; }
.place-photo img { width: 100%; height: 100%; min-height: 60svh; object-fit: cover; }
.place-text h2 { font-size: clamp(36px, 3.4vw, 52px); }
.place-text { padding: clamp(48px, 7vw, 96px) var(--margin); display: flex; flex-direction: column; gap: 22px; }
@media (max-width: 900px) { .place { grid-template-columns: 1fr; } .place-photo img { min-height: 0; aspect-ratio: 4 / 3; } }

/* ───────── Edificio Lope ───────── */
.story { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px clamp(40px, 6vw, 96px); align-items: start; }
.story-head { position: sticky; top: calc(var(--header-h) + 32px); display: flex; flex-direction: column; gap: 28px; }
.story-quote { font-family: var(--serif); font-size: clamp(22px, 2vw, 28px); line-height: 1.3; color: var(--accent-text); }
.story-body { display: flex; flex-direction: column; gap: 16px; color: var(--ink-soft); line-height: 1.7; max-width: 64ch; }
.story-body strong { color: var(--ink); }
.story-body h3 { font-size: clamp(24px, 2vw, 30px); color: var(--ink); margin-top: 28px; }
.amen { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 24px; }
.amen li { padding: 12px 0 12px 22px; border-bottom: 1px solid var(--line); position: relative; }
.amen li::before { content: ""; position: absolute; left: 0; top: 22px; width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); }
@media (max-width: 900px) { .story { grid-template-columns: 1fr; } .story-head { position: static; } }

.plans-sec { background: var(--paper-2); }
.floor-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 36px; position: sticky; top: calc(var(--header-h) + env(safe-area-inset-top, 0px)); z-index: 5; background: var(--paper-2); padding-block: 12px; }
.floor-tabs [role="tab"] { display: inline-flex; gap: 10px; align-items: center; min-height: 48px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer; font-size: 15px; transition: background-color 200ms ease, color 200ms ease; }
.floor-tabs [role="tab"] b { font-weight: 500; opacity: 0.8; }
.floor-tabs [role="tab"][aria-selected="true"] { background: var(--ink); color: var(--paper); }
@media (hover: hover) and (pointer: fine) { .floor-tabs [role="tab"]:hover:not([aria-selected="true"]) { background: color-mix(in srgb, var(--ink) 8%, transparent); } }
.units { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 24px; }
.units[hidden] { display: none; }
.units:not([hidden]) { animation: q-in 500ms var(--ease-out); }
.unit { background: var(--paper); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.unit-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.unit-head h3 { font-size: 30px; }
.unit-head p { font-size: 14px; color: var(--ink-mute); margin-top: 4px; }
.unit-plans { display: grid; gap: 12px; }
.unit-plans.n2 { grid-template-columns: 1fr 1fr; }
.unit-plans figure { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.unit-plans img { aspect-ratio: 1; object-fit: contain; }
.unit-plans figcaption, .unit-sample figcaption { font-size: 13px; color: var(--ink-mute); }
.specs { margin: 0; font-size: 14px; }
.specs div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); color: var(--ink-soft); }
.specs dd { margin: 0; white-space: nowrap; font-variant-numeric: tabular-nums; }
.specs .tot { color: var(--ink); font-weight: 600; font-size: 15px; border-bottom-color: var(--ink); }
.unit-desc { font-size: 15px; line-height: 1.55; color: var(--ink-soft); }
.unit-sample { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.plan-btn.photo img { aspect-ratio: 16 / 9; object-fit: cover; border: 0; background: var(--line); }
.unit .link { margin-top: auto; }

.infos { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(32px, 4vw, 56px) 24px; }
.inf { margin: 0; display: flex; flex-direction: column; gap: 12px; overflow: hidden; }
.inf figcaption { font-size: 15px; line-height: 1.5; color: var(--ink-soft); max-width: 60ch; }
.inf-0 { grid-column: 1 / -1; }
.inf-0 .plan-btn.photo img { aspect-ratio: 21 / 10; }
.inf-1 { grid-column: 1 / span 7; }
.inf-2 { grid-column: 8 / span 5; align-self: end; }
.inf-2 .plan-btn.photo img { aspect-ratio: 4 / 3; }
.inf-3 { grid-column: 3 / span 10; }
.inf-1 .plan-btn.photo img, .inf-3 .plan-btn.photo img { aspect-ratio: 3 / 2; }
@media (max-width: 760px) { .infos > * { grid-column: 1 / -1 !important; } .inf .plan-btn.photo img { aspect-ratio: 4 / 3 !important; } }

.quals { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px clamp(24px, 4vw, 64px); }
.quals div { border-top: 1px solid var(--field-line); padding-top: 22px; }
.quals dt { font-family: var(--serif); font-size: clamp(24px, 2.2vw, 32px); line-height: 1.1; margin-bottom: 12px; }
.quals dd { margin: 0; color: var(--field-soft); line-height: 1.6; }
@media (max-width: 900px) { .quals { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .quals { grid-template-columns: 1fr; } }

.where { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: 48px clamp(40px, 6vw, 96px); align-items: start; }
.tag-outline { border: 1px solid var(--ink); font-weight: 500; font-size: 14px; min-height: 40px; }
.promise { background: #03557f; color: #f6f2ec; border-radius: var(--radius); padding: clamp(28px, 4vw, 52px); display: flex; flex-direction: column; gap: 24px; }
.promise-big { font-family: var(--serif); font-size: clamp(24px, 2.6vw, 38px); line-height: 1.15; }
.promise p:last-child { font-size: 15px; line-height: 1.6; color: #dbe6ee; border-top: 1px solid rgba(246, 242, 236, 0.3); padding-top: 18px; }
@media (max-width: 900px) { .where { grid-template-columns: 1fr; } }

/* Página de gracias */
.thanks { min-height: 100svh; display: grid; place-items: center; padding: calc(var(--header-h) + 40px) var(--margin) 60px; }
.thanks > div { max-width: 640px; display: flex; flex-direction: column; gap: 24px; align-items: flex-start; }
body:not(:has(.hero)) .site-header { background: var(--paper); color: var(--ink); box-shadow: 0 1px 0 var(--line); }
body:not(:has(.hero)) .site-header .brand-words .n { color: var(--blue); }
.row a.nm { text-decoration: none; color: inherit; }
@media (hover: hover) and (pointer: fine) { .row.has-img:hover .nm { color: var(--accent); } }

/* Láminas de planos y paneles de infografías: siempre enteros, sin recortar */
.unit-plans, .unit-plans.n2 { grid-template-columns: 1fr; }
.unit-plans img { aspect-ratio: auto; object-fit: initial; background: #16191b; border: 0; }
.plan-btn.photo img { aspect-ratio: auto !important; object-fit: initial; }
.infos { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.inf-0, .inf-1, .inf-2, .inf-3 { grid-column: auto; align-self: start; }
.inf-0 { grid-column: 1 / -1; }
.fact b { white-space: nowrap; }

/* ───────── v2: canales de contacto ───────── */
.channels { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.channel { display: flex; flex-direction: column; gap: 4px; padding: 20px 22px; background: var(--paper); border-radius: var(--radius); text-decoration: none; transition: background-color 200ms ease, transform 160ms var(--ease-out); }
.channel:active { transform: scale(0.98); }
.ch-k { font-size: 14px; color: var(--ink-mute); }
.ch-v { font-family: var(--serif); font-size: 24px; line-height: 1.2; overflow-wrap: anywhere; }
.ch-n { font-size: 14px; color: var(--ink-soft); }
.ch-a { margin-top: 10px; color: var(--accent-text); font-weight: 500; font-size: 15px; }
@media (hover: hover) and (pointer: fine) { .channel:hover { background: var(--input-bg); } .channel:hover .ch-a span { display: inline-block; transform: translateX(4px); transition: transform 200ms var(--ease-out); } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .channel:hover { background: var(--line); } }

/* ───────── v2: registro plegable en móvil ───────── */
.reg-more { display: none; margin-top: 28px; }
@media (max-width: 900px) {
  .js .register .reg-more { display: inline-flex; }
  .js .register:not(.is-open) .row.more, .js .register:not(.is-open) .decade.more { display: none; }
}

/* ───────── v2: listado de viviendas (Lope) ───────── */
.floor-sum { margin: 0 0 28px; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px 32px; }
.floor-sum dt { font-size: 14px; color: var(--ink-mute); }
.floor-sum dd { margin: 2px 0 0; font-family: var(--serif); font-size: clamp(22px, 2vw, 28px); line-height: 1.15; }
.ulist { background: var(--paper); border-radius: var(--radius); padding: 6px 24px; }
.uhead, .urow > summary { display: grid; grid-template-columns: minmax(180px, 2.2fr) 0.9fr 1fr 1fr 1.5fr 1fr 96px; gap: 16px; align-items: center; }
.uhead { font-size: 13px; color: var(--ink-mute); padding: 14px 0 10px; border-bottom: 1px solid var(--line-strong); }
.urow { border-bottom: 1px solid var(--line); }
.urow:last-child { border-bottom: 0; }
.urow > summary { list-style: none; cursor: pointer; padding: 14px 0; min-height: 64px; border-radius: 2px; }
.urow > summary::-webkit-details-marker { display: none; }
.u-name b { display: block; font-family: var(--serif); font-weight: 400; font-size: 22px; line-height: 1.15; }
.u-name small { font-size: 13px; color: var(--ink-mute); }
.u-c { font-variant-numeric: tabular-nums; font-size: 15px; }
.u-open { justify-self: end; color: var(--accent-text); font-weight: 500; font-size: 15px; display: inline-flex; align-items: center; gap: 6px; }
.u-open::after { content: ""; width: 8px; height: 8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translate(-2px, -2px); transition: transform 240ms var(--ease-out); }
.urow[open] .u-open::after { transform: rotate(-135deg) translate(-2px, -2px); }
.u-open .c, .urow[open] .u-open .o { display: none; }
.urow[open] .u-open .c { display: inline; }
@media (hover: hover) and (pointer: fine) { .urow > summary:hover .u-name b { color: var(--accent-text); } }
.u-detail { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 28px; padding: 6px 0 32px; }
.urow[open] .u-detail { animation: q-in 420ms var(--ease-out); }
.u-side { display: flex; flex-direction: column; gap: 18px; }
.u-side .btn { align-self: flex-start; }
.unit-plans { align-content: start; }
@media (max-width: 900px) {
  .uhead { display: none; }
  .ulist { padding: 4px 16px; }
  .urow > summary { grid-template-columns: 1fr auto; gap: 6px 12px; }
  .u-name { grid-column: 1; grid-row: 1; }
  .u-st { grid-column: 2; grid-row: 1; justify-self: end; }
  .u-c { grid-column: 1 / -1; font-size: 14px; color: var(--ink-soft); display: inline; }
  .urow > summary { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 14px; }
  .u-name { flex: 1 1 60%; }
  .u-st { flex: 0 0 auto; }
  .u-c::before { content: attr(data-l) ": "; color: var(--ink-mute); }
  .u-name ~ .u-c:first-of-type { margin-top: 2px; }
  .u-open { flex-basis: 100%; justify-content: flex-start; padding-top: 4px; }
  .u-detail { grid-template-columns: 1fr; }
}
@media (max-width: 760px) { .floor-tabs { position: static; } }
.units { display: block; }
.u-ext { white-space: nowrap; }
.u-ext small { display: block; font-size: 13px; color: var(--ink-mute); white-space: normal; }
@media (max-width: 900px) { .u-ext small { display: inline; margin-left: 6px; } }
