/* ==========================================================================
   CASA LUMEN · hoja de estilos
   Paleta oscura cálida + latón. Tipografía editorial (serif + sans).
   ========================================================================== */

:root {
  --ink: #0d0c0a;
  --ink-2: #141210;
  --ink-3: #1c1916;
  --paper: #f2ede3;
  --paper-dim: #c9c0b0;
  --paper-faint: rgba(242, 237, 227, 0.55);
  --accent: #c8a46a;
  --accent-soft: #e6cfa8;
  --line: rgba(242, 237, 227, 0.14);
  --line-strong: rgba(242, 237, 227, 0.28);
  --glass: rgba(13, 12, 10, 0.62);
  --glass-strong: rgba(13, 12, 10, 0.86);

  --font-display: "Cormorant Garamond", "Playfair Display", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", "Manrope", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 0.7s;

  --pad: clamp(18px, 3.2vw, 46px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

body {
  overflow: hidden;
  cursor: default;
}

body.is-loading { cursor: progress; }

::selection { background: var(--accent); color: var(--ink); }

button, a { font-family: inherit; }

/* --------------------------------------------------------------------------
   ESCENA
   -------------------------------------------------------------------------- */

.stage {
  position: fixed;
  inset: 0;
  z-index: 1;
}

.stage canvas {
  touch-action: none;
  display: block;
  width: 100% !important;
  height: 100% !important;
  outline: none;
}

body.is-walking .stage canvas { cursor: crosshair; }
body.is-walking .room-panel { display: none; }

.vignette {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 42%, transparent 42%, rgba(13, 12, 10, 0.42) 100%),
    linear-gradient(to bottom, rgba(13, 12, 10, 0.5) 0%, transparent 18%, transparent 62%, rgba(13, 12, 10, 0.72) 100%);
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.65'/%3E%3C/svg%3E");
}

.scrim {
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background:
    linear-gradient(102deg, rgba(13, 12, 10, 0.88) 0%, rgba(13, 12, 10, 0.52) 30%, rgba(13, 12, 10, 0) 60%),
    linear-gradient(to top, rgba(13, 12, 10, 0.78) 0%, rgba(13, 12, 10, 0.1) 26%, transparent 46%);
  transition: opacity 0.9s var(--ease);
}

body.tour-active .scrim { opacity: 0; }
body.is-night .scrim { opacity: 0.55; }

/* --------------------------------------------------------------------------
   PRELOADER
   -------------------------------------------------------------------------- */

.preloader {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: var(--ink);
  transition: opacity 1s var(--ease), visibility 1s;
}

.preloader.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-inner {
  width: min(360px, 72vw);
  text-align: center;
}

.preloader-brand {
  margin: 0 0 26px;
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.42em;
  color: var(--paper-dim);
  text-transform: uppercase;
}

.preloader-line {
  height: 1px;
  background: rgba(242, 237, 227, 0.16);
  overflow: hidden;
}

.preloader-line span {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.5s var(--ease);
}

.preloader-label {
  margin: 16px 0 0;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--paper-faint);
}

/* --------------------------------------------------------------------------
   BARRA SUPERIOR
   -------------------------------------------------------------------------- */

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px var(--pad);
  transition: background 0.6s var(--ease), border-color 0.6s var(--ease);
  border-bottom: 1px solid transparent;
}

body.is-scrolled .topbar,
body.tour-active .topbar {
  background: linear-gradient(to bottom, rgba(13, 12, 10, 0.78), rgba(13, 12, 10, 0));
  border-color: transparent;
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  text-decoration: none;
  color: var(--paper);
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(200, 164, 106, 0.55);
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 21px;
  line-height: 1;
  letter-spacing: 0.02em;
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
}

.brand:hover .brand-mark { background: var(--accent); color: var(--ink); }

.brand-text { display: flex; flex-direction: column; gap: 3px; }

.brand-text strong {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.32em;
}

.brand-text em {
  font-style: normal;
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--paper-faint);
}

.topnav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.topnav button,
.topnav a {
  appearance: none;
  background: none;
  border: 0;
  padding: 10px 15px;
  color: var(--paper-dim);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.3s var(--ease);
  position: relative;
}

.topnav button::after,
.topnav a::after {
  content: "";
  position: absolute;
  left: 15px;
  right: 15px;
  bottom: 4px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}

.topnav button:hover,
.topnav a:hover { color: var(--paper); }
.topnav button:hover::after,
.topnav a:hover::after { transform: scaleX(1); }

.topnav-cta {
  border: 1px solid var(--line-strong) !important;
  color: var(--paper) !important;
  padding: 11px 20px !important;
  margin-left: 10px;
  transition: background 0.4s var(--ease), color 0.4s var(--ease), border-color 0.4s var(--ease);
}

.topnav-cta::after { display: none; }
.topnav-cta:hover {
  background: var(--accent);
  border-color: var(--accent) !important;
  color: var(--ink) !important;
}

.topnav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  width: 44px;
  height: 40px;
  cursor: pointer;
  position: relative;
}

.topnav-toggle span {
  position: absolute;
  left: 12px;
  right: 12px;
  height: 1px;
  background: var(--paper);
  transition: transform 0.3s var(--ease), opacity 0.3s;
}

.topnav-toggle span:first-child { top: 16px; }
.topnav-toggle span:last-child { bottom: 16px; }

/* --------------------------------------------------------------------------
   HERO
   -------------------------------------------------------------------------- */

.hero {
  position: fixed;
  left: var(--pad);
  bottom: clamp(120px, 16vh, 168px);
  z-index: 20;
  width: min(680px, 48vw);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease), filter 0.8s var(--ease);
}

body.tour-active .hero,
body.panel-open .hero {
  opacity: 0;
  transform: translateY(-18px);
  pointer-events: none;
  filter: blur(4px);
}

.eyebrow {
  margin: 0 0 14px;
  font-size: 10px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(56px, 8.4vw, 126px);
  line-height: 0.92;
  letter-spacing: -0.025em;
  color: var(--paper);
}

.hero-location {
  margin: 14px 0 0;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--paper-dim);
}

.hero-summary {
  margin: 22px 0 0;
  max-width: 46ch;
  font-size: 15px;
  line-height: 1.65;
  color: rgba(242, 237, 227, 0.72);
  font-weight: 300;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 15px 26px;
  border: 1px solid transparent;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.4s var(--ease), color 0.4s var(--ease), border-color 0.4s var(--ease), transform 0.4s var(--ease);
}

.btn-primary {
  background: var(--accent);
  color: var(--ink);
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-soft);
  border-color: var(--accent-soft);
  transform: translateY(-1px);
}

.btn-ghost {
  background: rgba(242, 237, 227, 0.04);
  border-color: var(--line-strong);
  color: var(--paper);
  backdrop-filter: blur(10px);
}

.btn-ghost:hover { background: rgba(242, 237, 227, 0.1); border-color: var(--paper-dim); }

.kpis {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 42px 0 0;
  padding: 20px 0 0;
  border-top: 1px solid var(--line);
  max-width: 620px;
}

.kpis li { padding-right: 16px; }

.kpis strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1;
  color: var(--paper);
}

.kpis strong span {
  font-size: 0.5em;
  letter-spacing: 0.04em;
  color: var(--accent);
  margin-left: 3px;
}

.kpis small {
  display: block;
  margin-top: 7px;
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--paper-faint);
  line-height: 1.5;
}

.hero-hint {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 34px 0 0;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--paper-faint);
}

.mouse {
  width: 16px;
  height: 24px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  position: relative;
  flex: none;
}

.mouse::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 5px;
  width: 2px;
  height: 5px;
  background: var(--accent);
  border-radius: 2px;
  transform: translateX(-50%);
  animation: scrollHint 1.8s infinite var(--ease);
}

@keyframes scrollHint {
  0% { opacity: 0; transform: translate(-50%, 0); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, 7px); }
}

/* --------------------------------------------------------------------------
   PANEL DE AMBIENTE
   -------------------------------------------------------------------------- */

.room-panel {
  position: fixed;
  right: var(--pad);
  top: 50%;
  transform: translate(28px, -50%);
  z-index: 30;
  width: min(340px, 30vw);
  padding: 28px 26px 26px;
  background: var(--glass);
  border: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(1.1);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease), visibility 0.6s;
}

.room-panel.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(0, -50%);
}

.room-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.room-index {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--accent);
}

.room-close,
.ficha-close {
  appearance: none;
  background: none;
  border: 0;
  color: var(--paper-dim);
  font-size: 11px;
  letter-spacing: 0.12em;
  cursor: pointer;
  padding: 6px 0;
  transition: color 0.3s;
}

.room-close:hover,
.ficha-close:hover { color: var(--accent); }

.room-panel h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 34px;
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.room-meta {
  margin: 10px 0 0;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.room-desc {
  margin: 16px 0 0;
  font-size: 13.5px;
  line-height: 1.7;
  color: rgba(242, 237, 227, 0.72);
}

.room-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.room-tags span {
  font-size: 10px;
  letter-spacing: 0.08em;
  padding: 5px 9px;
  border: 1px solid var(--line);
  color: var(--paper-dim);
}

.room-systems {
  margin-top: 14px;
  display: grid;
  gap: 5px;
}

.room-systems span {
  font-size: 11px;
  color: var(--paper-faint);
  display: flex;
  gap: 8px;
  align-items: baseline;
}

.room-systems span::before {
  content: "";
  width: 4px;
  height: 4px;
  background: var(--accent);
  flex: none;
  transform: translateY(-1px) rotate(45deg);
}

/* --------------------------------------------------------------------------
   HOTSPOTS
   -------------------------------------------------------------------------- */

.hotspots {
  position: fixed;
  inset: 0;
  z-index: 25;
  pointer-events: none;
}

.hotspot {
  position: absolute;
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  background: rgba(13, 12, 10, 0.55);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 9px;
  display: grid;
  place-items: center;
  cursor: pointer;
  pointer-events: auto;
  transition: transform 0.3s var(--ease), background 0.3s, color 0.3s;
  backdrop-filter: blur(4px);
}

.hotspot::after {
  content: "";
  position: absolute;
  inset: -7px;
  border: 1px solid rgba(200, 164, 106, 0.24);
  border-radius: 50%;
  animation: hotspotPulse 3s infinite;
}

.hotspot:hover,
.hotspot.is-active {
  background: var(--accent);
  color: var(--ink);
  transform: scale(1.12);
}

.hotspot.is-hidden { display: none; }

@keyframes hotspotPulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.18); opacity: 0; }
}

.hotspot-card {
  position: fixed;
  z-index: 35;
  width: 268px;
  padding: 18px 18px 16px;
  background: var(--glass-strong);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(16px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), visibility 0.35s;
  pointer-events: none;
}

.hotspot-card.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.hotspot-kicker {
  margin: 0 0 8px;
  font-size: 9px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
}

.hotspot-card h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 24px;
  line-height: 1.1;
}

.hotspot-card p {
  margin: 0;
  font-size: 12px;
  line-height: 1.65;
  color: var(--paper-dim);
}

/* --------------------------------------------------------------------------
   BARRA DE RECORRIDO
   -------------------------------------------------------------------------- */

.tourbar {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 35;
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 40px);
  padding: 12px 16px;
  background: var(--glass);
  border: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(1.1);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease), visibility 0.7s;
}

body.tour-active .tourbar {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.tourbar-group { display: flex; align-items: center; gap: 10px; }

.icon-btn {
  appearance: none;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: none;
  border: 1px solid var(--line);
  color: var(--paper);
  cursor: pointer;
  transition: background 0.3s, border-color 0.3s, color 0.3s;
}

.icon-btn:hover { background: rgba(242, 237, 227, 0.08); border-color: var(--line-strong); }

.stop-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 116px;
  padding: 0 4px;
}

.stop-meta span {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--accent);
}

.stop-meta strong {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--paper);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dots {
  display: flex;
  align-items: center;
  gap: 7px;
}

.dots button {
  appearance: none;
  width: 7px;
  height: 7px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(242, 237, 227, 0.35);
  background: transparent;
  cursor: pointer;
  transition: background 0.3s, border-color 0.3s, transform 0.3s;
}

.dots button:hover { border-color: var(--accent); }

.dots button.is-active {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.35);
}

.tool-btn {
  appearance: none;
  background: none;
  border: 1px solid transparent;
  padding: 9px 12px;
  color: var(--paper-dim);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.3s, border-color 0.3s, background 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.tool-btn:hover { color: var(--paper); border-color: var(--line); }

.tool-btn[aria-pressed="true"] {
  color: var(--accent);
  border-color: rgba(200, 164, 106, 0.45);
  background: rgba(200, 164, 106, 0.08);
}

.tool-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.6;
}

body.is-walking .tool-dot { opacity: 1; animation: blink 1.6s infinite; }

@keyframes blink { 50% { opacity: 0.15; } }

/* --------------------------------------------------------------------------
   HINT
   -------------------------------------------------------------------------- */

.hint {
  pointer-events: none;
  position: fixed;
  left: 50%;
  bottom: 108px;
  transform: translateX(-50%) translateY(10px);
  z-index: 36;
  padding: 12px 20px;
  background: var(--glass-strong);
  border: 1px solid var(--line);
  backdrop-filter: blur(12px);
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease), visibility 0.4s;
}

.hint.is-visible { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }

.hint-mobile { display: none; }

.hint p { margin: 2px 0; font-size: 11px; letter-spacing: 0.06em; color: var(--paper-dim); }
.hint strong { color: var(--paper); letter-spacing: 0.14em; text-transform: uppercase; font-size: 10px; }

kbd {
  font-family: var(--font-mono);
  font-size: 10px;
  border: 1px solid var(--line-strong);
  padding: 1px 5px;
  color: var(--paper);
}

/* --------------------------------------------------------------------------
   FICHA TÉCNICA
   -------------------------------------------------------------------------- */

.ficha {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: var(--ink);
  color: var(--paper);
  overflow-y: auto;
  overscroll-behavior: contain;
  opacity: 0;
  visibility: hidden;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease), visibility 0.6s;
}

.ficha.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.ficha-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: clamp(80px, 10vh, 120px) var(--pad) 110px;
}

.ficha-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
  padding-bottom: 34px;
  border-bottom: 1px solid var(--line);
}

.ficha-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(44px, 6vw, 84px);
  line-height: 0.95;
  letter-spacing: -0.02em;
}

.ficha-sub {
  margin: 12px 0 0;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--paper-faint);
}

.ficha-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(30px, 5vw, 80px);
  margin-top: 46px;
}

.ficha-col { display: flex; flex-direction: column; gap: 42px; }

.ficha-block h3 {
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 28px;
  letter-spacing: -0.01em;
}

.ficha-block p {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.75;
  color: rgba(242, 237, 227, 0.78);
}

.ficha-block .muted { color: var(--paper-faint); font-size: 13px; }

.block-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.block-head h3 { margin: 0; }

.scale-note {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--paper-faint);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.data-table tr { border-bottom: 1px solid rgba(242, 237, 227, 0.09); }

.data-table th,
.data-table td {
  text-align: left;
  padding: 10px 0;
  vertical-align: top;
  font-weight: 400;
}

.data-table th {
  width: 34%;
  color: var(--paper-faint);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding-right: 18px;
}

.data-table td { color: rgba(242, 237, 227, 0.88); }

/* Planta / corte */
.plan-wrap,
.section-wrap {
  background: #f7f2e7;
  border: 1px solid rgba(0, 0, 0, 0.08);
  padding: 14px;
}

.plan-wrap--upper { margin-top: 14px; }

.plan-wrap svg,
.section-wrap svg { display: block; width: 100%; height: auto; }

.materials-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}

.materials-list li {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(242, 237, 227, 0.09);
}

.material-swatch {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(242, 237, 227, 0.18);
}

.materials-list strong {
  display: block;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.02em;
}

.materials-list small {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  color: var(--paper-faint);
}

.materials-list em {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--accent);
  text-align: right;
  max-width: 130px;
}

.ficha-cta {
  padding: 28px;
  border: 1px solid rgba(200, 164, 106, 0.35);
  background: linear-gradient(140deg, rgba(200, 164, 106, 0.12), rgba(200, 164, 106, 0.02));
}

.ficha-cta h3 { font-size: 26px; }

.credit-line {
  margin: 20px 0 0 !important;
  font-size: 10px !important;
  letter-spacing: 0.06em;
  color: var(--paper-faint) !important;
  line-height: 1.9 !important;
}

.credit-line a { color: var(--paper-dim); text-decoration: none; border-bottom: 1px solid var(--line); }

/* --------------------------------------------------------------------------
   MODAL
   -------------------------------------------------------------------------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: var(--pad);
  background: rgba(8, 7, 6, 0.82);
  backdrop-filter: blur(14px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s var(--ease), visibility 0.45s;
}

.modal.is-open { opacity: 1; visibility: visible; }

.modal-inner {
  width: min(1120px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  background: var(--ink);
  border: 1px solid var(--line);
  padding: 30px;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.modal-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 36px;
}

.modal-body { display: grid; gap: 16px; }

.modal-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.modal-dl {
  border: 1px solid var(--line);
  color: var(--paper-dim);
}

.modal-dl:hover { border-color: var(--accent); color: var(--accent); }

.small { font-size: 11px !important; }

.fade {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: #0b0a09;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.21s ease;
}

.fade.is-on { opacity: 1; }

/* --------------------------------------------------------------------------
   TOAST
   -------------------------------------------------------------------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 120px;
  transform: translate(-50%, 12px);
  z-index: 80;
  padding: 12px 20px;
  background: var(--accent);
  color: var(--ink);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s, transform 0.35s, visibility 0.35s;
}

.toast.is-visible { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* --------------------------------------------------------------------------
   SVG DE PLANOS
   -------------------------------------------------------------------------- */

.plan-svg .wall { fill: #2a2620; }
.plan-svg .room { fill: #f4efe4; stroke: #b7ae9d; stroke-width: 0.6; }
.plan-svg .room--wet { fill: #e6e0d2; }
.plan-svg .room--out { fill: #dcd4c4; }
.plan-svg .label { font-family: var(--font-sans); font-size: 7.6px; fill: #2a2620; letter-spacing: 0.06em; }
.plan-svg .label-small { font-family: var(--font-sans); font-size: 5.6px; fill: #6d6455; }
.plan-svg .dim { stroke: #8d8371; stroke-width: 0.4; }
.plan-svg .grid { stroke: rgba(42, 38, 32, 0.12); stroke-width: 0.3; }
.plan-svg .accent { fill: #c8a46a; }
.plan-svg .north { fill: #2a2620; }

.section-svg .concrete { fill: #cfc7b7; stroke: #2a2620; stroke-width: 0.5; }
.section-svg .glass { fill: #d8e2e2; stroke: #2a2620; stroke-width: 0.5; }
.section-svg .ground { fill: #c2b8a4; }
.section-svg .dim { stroke: #6d6455; stroke-width: 0.4; fill: none; }
.section-svg .label { font-family: var(--font-sans); font-size: 5.4px; fill: #2a2620; }
.section-svg .label-small { font-family: var(--font-sans); font-size: 4.4px; fill: #6d6455; }

/* --------------------------------------------------------------------------
   RESPONSIVE
   -------------------------------------------------------------------------- */

@media (max-width: 1080px) {
  .hero { width: min(600px, 62vw); }
  .room-panel { width: min(320px, 40vw); }
  .tourbar { gap: 16px; }
  .tool-btn { padding: 8px 8px; letter-spacing: 0.1em; }
}

@media (max-width: 860px) {
  .hint-desktop { display: none; }
  .hint-mobile { display: block; }
  .topnav { display: none; }
  .topnav.is-open {
    display: flex;
    position: fixed;
    inset: 64px var(--pad) auto;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px;
    background: var(--glass-strong);
    border: 1px solid var(--line);
    backdrop-filter: blur(20px);
  }
  .topnav.is-open button,
  .topnav.is-open a { padding: 14px; text-align: left; }
  .topnav.is-open .topnav-cta { margin-left: 0; margin-top: 6px; text-align: center; }
  .topnav-toggle { display: block; }

  .hero {
    bottom: auto;
    top: 11vh;
    left: var(--pad);
    right: var(--pad);
    width: auto;
    padding: 18px 18px 16px;
    background: rgba(13, 12, 10, 0.42);
    border: 1px solid var(--line);
    backdrop-filter: blur(16px) saturate(1.1);
  }
  .hero h1 { font-size: clamp(38px, 10.5vw, 52px); }
  .hero-location { font-size: 10px; letter-spacing: 0.12em; }
  .hero-summary {
    font-size: 12px;
    line-height: 1.58;
    max-width: 100%;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .hero-actions { gap: 8px; margin-top: 18px; }
  .hero-actions .btn { padding: 13px 18px; font-size: 11px; }
  .kpis { grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 18px; padding-top: 14px; }
  .kpis li { padding-right: 10px; }
  .kpis li:nth-child(2n) { padding-right: 10px; }
  .kpis strong { font-size: 19px; }
  .kpis strong span { font-size: 0.46em; }
  .kpis small { font-size: 7.5px; letter-spacing: 0.12em; margin-top: 6px; }
  .hero-hint { display: none; }
  .scrim {
    background:
      linear-gradient(to bottom, rgba(13, 12, 10, 0.55) 0%, rgba(13, 12, 10, 0.25) 26%, rgba(13, 12, 10, 0.05) 55%, rgba(13, 12, 10, 0.85) 100%);
  }

  .room-panel {
    left: var(--pad);
    right: var(--pad);
    top: auto;
    bottom: 132px;
    width: auto;
    max-height: 44vh;
    overflow-y: auto;
    transform: translateY(18px);
    padding: 18px 18px 16px;
  }
  .room-panel.is-visible { transform: translateY(0); }
  .room-panel h2 { font-size: 26px; }
  .room-desc { font-size: 12px; line-height: 1.6; margin-top: 10px; }
  .room-meta { font-size: 9px; margin-top: 6px; }
  .room-tags { margin-top: 12px; padding-top: 12px; }
  .room-tags span { font-size: 9px; padding: 4px 7px; }
  .room-systems span { font-size: 10px; }

  .tourbar {
    left: 10px;
    right: 10px;
    bottom: 12px;
    transform: none;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 12px;
    padding: 10px 12px;
  }
  .dots { order: 3; width: 100%; justify-content: center; }
  .tourbar-tools .tool-btn:not(#mode-btn):not(#plan-btn) { display: none; }

  .ficha-grid { grid-template-columns: 1fr; }
  .ficha-head { flex-direction: column; }
  .ficha-inner { padding-top: 84px; }
}

@media (max-width: 520px) {
  :root { --pad: 18px; }
  .brand-text em { display: none; }
  .hero { top: 18vh; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .hero-location { font-size: 11px; }
  .stop-meta { min-width: 92px; }
  .tool-btn { font-size: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}


.modal-body .plan-wrap { background: #e9e3d6; }
.modal-body .plan-wrap svg {
  width: 100%;
  height: auto;
  display: block;
}


/* --------------------------------------------------------------------------
   EL ESTUDIO
   -------------------------------------------------------------------------- */

.studio .ficha-inner { max-width: 1180px; }
.studio .ficha-block { margin-top: 54px; }
.studio .ficha-block h3 { margin-bottom: 22px; }

.studio-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: clamp(26px, 4vw, 64px);
  margin-top: 46px;
  align-items: start;
}

.studio-lead {
  margin: 0 0 22px !important;
  font-family: var(--font-display);
  font-size: clamp(26px, 2.8vw, 38px);
  line-height: 1.32;
  color: var(--paper) !important;
}

.studio-about p {
  margin: 0 0 18px;
  font-size: 15.5px;
  line-height: 1.8;
  color: rgba(242, 237, 227, 0.74);
}

.studio-stats {
  list-style: none;
  margin: 0;
  padding: 0 0 0 28px;
  border-left: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px 18px;
}

.studio-stats strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(34px, 3.4vw, 50px);
  line-height: 1;
  color: var(--paper);
}

.studio-stats span {
  display: block;
  margin-top: 9px;
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--paper-faint);
  line-height: 1.5;
}

.studio-services {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.service {
  background: var(--ink);
  padding: 26px 24px;
}

.service-index {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--accent);
}

.service h4 {
  margin: 12px 0 8px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 24px;
  line-height: 1.15;
}

.service p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--paper-dim);
}

.studio-process {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px;
}

.studio-process li {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.process-step {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--accent);
}

.studio-process h4 {
  margin: 9px 0 7px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.2;
}

.studio-process p {
  margin: 0;
  font-size: 13px;
  line-height: 1.65;
  color: var(--paper-faint);
}

@media (max-width: 860px) {
  .studio-grid { grid-template-columns: 1fr; }
  .studio-stats { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); padding-top: 20px; }
  .studio-services { grid-template-columns: 1fr; }
  .studio-process { grid-template-columns: 1fr 1fr; }
  .studio .ficha-head h2 { font-size: clamp(34px, 9vw, 52px); }
}
