/* ==========================================================
   Casa Vacía Estudio
   ========================================================== */

:root {
  --bg: #0c0806;
  --bg-2: #150d09;
  --ink: #ecdcc6;
  --ink-soft: #cdb89e;
  --muted: #9a8470;
  --copper: #c48a5c;
  --amber: #f3a54c;
  --line: rgba(236, 220, 198, 0.16);

  --font-display: 'Cinzel', 'Trajan Pro', Georgia, serif;
  --font-body: 'Cormorant Garamond', Georgia, serif;

  /* Posición de la ventana encendida dentro de la imagen de la casa (en %) */
  --wx: 49.25%;
  --wy: 35.9%;

  --gutter: clamp(16px, 4.5vw, 60px);
  --maxw: 1080px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(16px, 0.9vw + 11px, 18px);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.is-outside { overflow: hidden; }

img { display: block; max-width: 100%; }

a { color: inherit; }

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

::selection { background: var(--copper); color: var(--bg); }

:focus-visible { outline: 1px solid var(--copper); outline-offset: 4px; }

/* ---------- Grano de película (todo el sitio) ---------- */
.grain {
  position: fixed;
  inset: -50%;
  z-index: 90;
  pointer-events: none;
  opacity: 0.09;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 .9 0 0 0 0 .8 0 0 0 1.2 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 0.9s steps(6) infinite;
}

@keyframes grain {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-4%, 3%); }
  40%  { transform: translate(3%, -5%); }
  60%  { transform: translate(-6%, -2%); }
  80%  { transform: translate(5%, 4%); }
  100% { transform: translate(0, 0); }
}

/* ==========================================================
   UMBRAL (home, afuera de la casa)
   ========================================================== */

.threshold {
  position: fixed;
  inset: 0;
  z-index: 50;
  overflow: hidden;
  background: #070504;
}

/* La escena conserva la proporción 3:2 de la imagen y cubre la pantalla */
.scene-wrap {
  position: absolute;
  left: 50%;
  top: 50%;
  width: max(100vw, 150vh);
  height: max(100vh, 66.667vw);
  transform: translate(-50%, -50%);
}

.scene-parallax,
.scene-zoom {
  position: absolute;
  inset: 0;
  will-change: transform;
}

.scene-zoom { transform-origin: var(--wx) var(--wy); }

.scene-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}

.window-glow {
  position: absolute;
  left: var(--wx);
  top: var(--wy);
  width: 14%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 196, 110, 0.55) 0%, rgba(243, 165, 76, 0.22) 22%, rgba(243, 165, 76, 0) 60%);
  mix-blend-mode: screen;
  pointer-events: none;
  animation: flicker 5s infinite;
}

@keyframes flicker {
  0%, 100% { opacity: 0.85; }
  8%  { opacity: 0.7; }
  10% { opacity: 0.95; }
  34% { opacity: 0.8; }
  36% { opacity: 0.55; }
  38% { opacity: 0.9; }
  62% { opacity: 1; }
  80% { opacity: 0.75; }
}

.window-hit {
  position: absolute;
  left: var(--wx);
  top: var(--wy);
  width: 5.5%;
  height: 8.5%;
  transform: translate(-50%, -50%);
  cursor: pointer;
}

/* Niebla: dos capas que derivan a distinta velocidad */
.fog {
  position: absolute;
  left: -30%;
  right: -30%;
  pointer-events: none;
  will-change: transform;
}

.fog--back {
  top: 42%;
  height: 40%;
  opacity: 0.45;
  background:
    radial-gradient(40% 50% at 25% 60%, rgba(190, 160, 130, 0.28), transparent 70%),
    radial-gradient(35% 45% at 70% 50%, rgba(190, 160, 130, 0.22), transparent 70%);
  filter: blur(18px);
  animation: drift 60s linear infinite alternate;
}

.fog--front {
  bottom: -8%;
  height: 45%;
  opacity: 0.55;
  background:
    radial-gradient(45% 55% at 35% 70%, rgba(170, 140, 110, 0.3), transparent 70%),
    radial-gradient(40% 50% at 80% 80%, rgba(170, 140, 110, 0.25), transparent 70%);
  filter: blur(26px);
  animation: drift 38s linear infinite alternate-reverse;
}

@keyframes drift {
  from { translate: -6% 0; }
  to   { translate: 6% 0; }
}

.dust {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 40%, transparent 45%, rgba(5, 3, 2, 0.75) 100%),
    linear-gradient(to bottom, rgba(5, 3, 2, 0.35), transparent 22%, transparent 55%, rgba(5, 3, 2, 0.85));
}

.threshold__content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(28px, 7vh, 100px);
  margin: 0 auto;
  width: min(92vw, 640px);
  text-align: center;
}

.threshold__logo {
  margin: 0 auto;
  width: min(70vw, 360px, 46vh);
}

.threshold__logo img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 2px 18px rgba(0, 0, 0, 0.7));
}

.threshold__tagline {
  margin: 1.1em 0 1.8em;
  font-style: italic;
  font-weight: 300;
  color: var(--ink-soft);
  font-size: clamp(15px, 1vw + 10px, 19px);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.9);
}

.enter-btn {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  padding: 14px 8px;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--ink);
  transition: color 0.5s, text-shadow 0.5s;
}

.enter-btn__label { padding-left: 0.42em; }

.enter-btn__line {
  display: block;
  width: 44px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
  transition: width 0.6s cubic-bezier(.2, .7, .2, 1), opacity 0.6s;
}

.enter-btn:hover,
.enter-btn:focus-visible {
  color: #ffd8a4;
  text-shadow: 0 0 18px rgba(243, 165, 76, 0.8);
}

.enter-btn:hover .enter-btn__line,
.enter-btn:focus-visible .enter-btn__line { width: 72px; opacity: 1; }

/* Telón negro para el fundido entre afuera y adentro */
.curtain {
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
  opacity: 0;
  background: #000;
}

/* ==========================================================
   SITIO (adentro de la casa)
   ========================================================== */

.site[hidden] { display: none; }

.interior-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(90% 70% at 50% 0%, rgba(243, 165, 76, 0.10), transparent 60%),
    linear-gradient(rgba(12, 8, 6, 0.55), rgba(12, 8, 6, 0.8)),
    url("../assets/img/textura-fondo.webp") center / cover no-repeat,
    var(--bg);
}

/* ---------- Navegación ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px var(--gutter);
  transition: background 0.5s, padding 0.5s, backdrop-filter 0.5s;
}

.nav.is-scrolled {
  padding-top: 14px;
  padding-bottom: 14px;
  background: rgba(12, 8, 6, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav__brand img { width: 124px; height: auto; }

.nav__links { display: flex; gap: clamp(20px, 2.6vw, 40px); }

.nav__links a {
  position: relative;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-soft);
  transition: color 0.3s;
}

.nav__links a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0.28em;
  bottom: -6px;
  height: 1px;
  background: var(--copper);
  transform: scaleX(0);
  transition: transform 0.4s;
}

.nav__links a:hover,
.nav__links a.is-current { color: var(--ink); }

.nav__links a:hover::after,
.nav__links a.is-current::after { transform: scaleX(1); }

.nav__burger { display: none; width: 44px; height: 44px; position: relative; }

.nav__burger span {
  position: absolute;
  left: 10px;
  right: 10px;
  height: 1px;
  background: var(--ink);
  transition: transform 0.4s, top 0.4s;
}

.nav__burger span:nth-child(1) { top: 18px; }
.nav__burger span:nth-child(2) { top: 26px; }

.nav.is-open .nav__burger span:nth-child(1) { top: 22px; transform: rotate(45deg); }
.nav.is-open .nav__burger span:nth-child(2) { top: 22px; transform: rotate(-45deg); }

@media (max-width: 980px) {
  .nav__burger { display: block; z-index: 2; }
  .nav__brand { z-index: 2; }
  .nav__brand img { width: 128px; }

  .nav__links {
    position: fixed;
    inset: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 34px;
    background: rgba(10, 6, 4, 0.97);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s, visibility 0.4s;
  }

  .nav__links a { font-size: 16px; }

  .nav.is-open .nav__links { opacity: 1; visibility: visible; }
}

/* ---------- Tipografía y rótulos ---------- */
section { position: relative; }

/* Cada habitación ocupa la pantalla; solo una está a la vista */
.room {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: clamp(92px, 12vh, 124px) var(--gutter) 0;
  overflow: hidden;
}

.room[hidden] { display: none; }

/* centra el contenido de los cuartos cortos sin cortar el de los largos */
.room::before,
.room::after {
  content: '';
  flex: 1 1 0;
}

.room > :not(.room__light):not(.room__bg):not(.contact__bg) { position: relative; }

.eyebrow {
  margin: 0 0 28px;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--copper);
}

/* Rótulo con líneas a los lados, como el "— ESTUDIO —" del logo */
.section-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  margin: 0 auto clamp(36px, 4.5vw, 60px);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(12px, 0.4vw + 10px, 14px);
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--ink);
  text-align: center;
}

.section-label span { padding-left: 0.42em; }

.section-label::before,
.section-label::after {
  content: '';
  flex: 0 1 90px;
  height: 1px;
  background: linear-gradient(to var(--dir, right), transparent, var(--copper));
}

.section-label::after { --dir: left; }

/* ---------- Hero interior ---------- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(24px, 5vh, 64px) 0 clamp(48px, 7vh, 80px);
}

.hero__title {
  margin: 0;
  max-width: 22ch;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(28px, 4.2vw, 60px);
  line-height: 1.12;
  letter-spacing: 0.02em;
}

.hero__title em {
  display: inline-block;
  margin-top: 0.15em;
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 300;
  font-size: 1.08em;
  letter-spacing: 0;
  color: var(--ink-soft);
}

/* ---------- Marquee (festivales y aliados) ---------- */
/* el carrusel ocupa todo el ancho, más allá del margen de la habitación */
.laurels,
.allies { margin: 0 calc(-1 * var(--gutter)); }

.laurels { margin-bottom: clamp(48px, 7vh, 80px); }

.marquee {
  --gap: clamp(28px, 3.2vw, 56px);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}

.marquee__track {
  display: flex;
  align-items: center;
  gap: var(--gap);
  width: max-content;
  padding-right: var(--gap);
  animation: marquee var(--duration, 50s) linear infinite;
}

.marquee--reverse .marquee__track { animation-direction: reverse; }

.marquee:hover .marquee__track { animation-play-state: paused; }

@keyframes marquee {
  to { transform: translateX(-50%); }
}

.laurel {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  opacity: 0.72;
  transition: opacity 0.4s;
}

.laurel:hover { opacity: 1; }

.laurel__logo {
  height: clamp(44px, 3.8vw, 64px);
  width: auto;
  max-width: 220px;
  object-fit: contain;
}

.laurel__mark {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: clamp(44px, 3.8vw, 64px);
}

.laurel__mark svg { width: 20px; height: 50px; color: var(--copper); flex: none; }
.laurel__mark svg:last-child { transform: scaleX(-1); }

.laurel__name {
  max-width: 17ch;
  font-family: var(--font-display);
  font-size: 14px;
  line-height: 1.3;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.laurel__caption {
  font-size: 14px;
  font-style: italic;
  color: var(--muted);
  white-space: nowrap;
}

.ally {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 170px;
  height: 78px;
  border: 1px dashed var(--line);
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
}

.ally img {
  max-height: 54px;
  max-width: 156px;
  opacity: 0.75;
  transition: opacity 0.4s;
}

.ally:hover img { opacity: 1; }

.ally:has(img) { border: 0; }

/* ---------- Proyectos ---------- */
.project-list,
.studio { width: 100%; max-width: var(--maxw); margin: 0 auto; }

.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
  margin-bottom: clamp(40px, 5vw, 72px);
}

.filter {
  padding: 6px 2px;
  font-size: 16px;
  font-style: italic;
  color: var(--muted);
  border-bottom: 1px solid transparent;
  transition: color 0.3s, border-color 0.3s;
}

.filter:hover { color: var(--ink); }
.filter.is-active { color: var(--ink); border-color: var(--copper); }

.project-list { display: flex; flex-direction: column; gap: clamp(64px, 8.5vw, 116px); }

.project {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: center;
}

.project:nth-child(even) .project__media { order: 2; }

.project.is-hidden { display: none; }

.project__media {
  position: relative;
  width: 100%;
  max-width: 420px;
  justify-self: center;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--bg-2);
  border: 1px solid var(--line);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.9);
}

.project__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.4s cubic-bezier(.2, .7, .2, 1), filter 1s;
  filter: saturate(0.85);
}

/* Con afiche: el marco toma la proporción real de la imagen */
.project__media:has(img) { aspect-ratio: auto; }
.project__media:has(img) img { position: relative; height: auto; }

.project:hover .project__media img { transform: scale(1.04); filter: saturate(1); }

/* Placa de título mientras no haya afiche */
.project__card {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 24px;
  text-align: center;
  background:
    radial-gradient(70% 55% at 50% 45%, rgba(243, 165, 76, 0.12), transparent 70%),
    linear-gradient(rgba(12, 8, 6, 0.35), rgba(12, 8, 6, 0.75)),
    url("../assets/img/textura-fondo.webp") center / cover;
}

.project__card-title {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.2vw, 44px);
  letter-spacing: 0.12em;
  line-height: 1.1;
  text-transform: uppercase;
}

.project__card-note {
  font-size: 15px;
  font-style: italic;
  color: var(--muted);
}

.project__index {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.3em;
  color: var(--copper);
}

.project__title {
  margin: 10px 0 8px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(28px, 3.4vw, 48px);
  line-height: 1.05;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.project__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  margin-bottom: 26px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.status::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--copper);
}

.status--desarrollo::before { background: var(--amber); box-shadow: 0 0 10px var(--amber); }
.status--distribucion::before { background: var(--copper); }
.status--finalizado::before { background: transparent; border: 1px solid var(--ink-soft); }

.project__format { font-style: italic; color: var(--muted); }

.project__synopsis {
  margin: 0 0 30px;
  max-width: 58ch;
  color: var(--ink-soft);
}

.project__route-title {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
}

.project__route {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.project__route li {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}

.project__tagline {
  margin: -6px 0 22px;
  font-size: clamp(17px, 0.8vw + 11px, 21px);
  font-style: italic;
  font-weight: 300;
  color: var(--copper);
}

.project__director {
  margin: 0 0 18px;
  font-size: 16px;
  color: var(--ink-soft);
}

.project__director span {
  margin-right: 8px;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--muted);
}

@media (max-width: 820px) {
  .project { grid-template-columns: 1fr; }
  .project:nth-child(even) .project__media { order: 0; }
  .project__media { max-width: 340px; }
}

/* ---------- Estudio ---------- */
.studio { max-width: calc(var(--maxw) + 2 * var(--gutter)); margin: 0 auto; }

.studio__grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(28px, 6vw, 96px);
  align-items: start;
}

.studio__lead {
  margin: 0;
  font-size: clamp(20px, 1.4vw + 11px, 28px);
  font-weight: 300;
  line-height: 1.35;
}

.studio__body p { margin: 0 0 1em; color: var(--ink-soft); }

.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: clamp(44px, 6vw, 84px) 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.pillars li {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 28px 24px 0 0;
  font-family: var(--font-display);
  font-size: clamp(14px, 0.6vw + 11px, 17px);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.pillars span {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 18px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--copper);
}

@media (max-width: 820px) {
  .studio__grid,
  .pillars { grid-template-columns: 1fr; }
  .pillars li { padding: 22px 0; border-bottom: 1px solid var(--line); }
}

/* ---------- Próximamente: ConclaveLab ---------- */
.lab { display: flex; justify-content: center; }

.lab__frame {
  position: relative;
  width: min(100%, 700px);
  padding: clamp(28px, 5vh, 52px) clamp(20px, 4vw, 60px);
  text-align: center;
  border: 1px solid var(--line);
  background:
    radial-gradient(60% 70% at 50% 0%, rgba(243, 165, 76, 0.12), transparent 70%),
    rgba(10, 6, 4, 0.38);
  backdrop-filter: blur(1.5px);
  -webkit-backdrop-filter: blur(1.5px);
}

/* esquinas tipo marco antiguo */
.lab__corner {
  position: absolute;
  width: 26px;
  height: 26px;
  border-color: var(--copper);
  border-style: solid;
  border-width: 0;
}

.lab__corner--tl { top: -1px; left: -1px; border-top-width: 1px; border-left-width: 1px; }
.lab__corner--tr { top: -1px; right: -1px; border-top-width: 1px; border-right-width: 1px; }
.lab__corner--bl { bottom: -1px; left: -1px; border-bottom-width: 1px; border-left-width: 1px; }
.lab__corner--br { bottom: -1px; right: -1px; border-bottom-width: 1px; border-right-width: 1px; }

.lab__title {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(32px, min(4.6vw, 7vh), 60px);
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  /* brillo lento que recorre las letras, como una vela */
  background: linear-gradient(100deg, var(--ink) 0%, var(--ink) 40%, #ffd9a0 50%, var(--ink) 60%, var(--ink) 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  animation: candle 7s ease-in-out infinite;
}

.lab__title span { color: var(--copper); -webkit-text-fill-color: var(--copper); }

@keyframes candle {
  0%, 100% { background-position: 100% 0; }
  50% { background-position: 0% 0; }
}

.lab__lead {
  margin: 0 0 8px;
  font-size: clamp(18px, 0.9vw + 11px, 22px);
  font-weight: 300;
  font-style: italic;
}

.lab__frame .eyebrow { margin-bottom: 16px; }

.lab__text {
  margin: 0 auto 24px;
  max-width: 46ch;
  color: var(--ink-soft);
}

.lab__cta {
  display: inline-block;
  padding: 14px 28px;
  border: 1px solid var(--copper);
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.4s, color 0.4s;
}

.lab__cta:hover { background: var(--copper); color: var(--bg); }

/* ---------- Equipo ---------- */
.team__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: clamp(24px, 4vw, 64px);
  max-width: 620px;
  margin: 0 auto;
}

.member { margin: 0; text-align: center; }

.member__photo {
  position: relative;
  aspect-ratio: 3 / 4;
  margin-bottom: 20px;
  overflow: hidden;
  background: var(--bg-2);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-style: italic;
  font-size: 15px;
}

.member__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) sepia(0.3) contrast(1.05) brightness(0.82);
  transition: filter 0.8s;
}

/* viñeta para que fotos con fondos distintos se vean parejas */
.member__photo::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(90% 75% at 50% 40%, transparent 45%, rgba(12, 8, 6, 0.55) 100%);
}

.member:hover .member__photo img { filter: grayscale(0.2) sepia(0.15) brightness(0.9); }

.member__name {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 17px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.member__role { margin: 0; font-style: italic; color: var(--muted); }

/* ---------- Contacto ---------- */
.contact { text-align: center; }

.contact__bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(var(--bg) 0%, rgba(12, 8, 6, 0.35) 30%, rgba(12, 8, 6, 0.45) 70%, var(--bg) 100%),
    url("../assets/img/paisaje-luna.webp") center / cover no-repeat;
}

.contact__inner { position: relative; }

.contact__lead {
  margin: 0 0 36px;
  font-size: clamp(19px, 1.2vw + 11px, 26px);
  font-weight: 300;
  line-height: 1.4;
}

.contact__lead em { color: var(--ink-soft); }

.contact__mail {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(16px, 2vw, 28px);
  letter-spacing: 0.06em;
  text-decoration: none;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--copper);
  overflow-wrap: anywhere;
  transition: color 0.3s, text-shadow 0.3s;
}

.contact__mail:hover { color: #ffd8a4; text-shadow: 0 0 18px rgba(243, 165, 76, 0.6); }

.contact__links {
  display: flex;
  justify-content: center;
  gap: 36px;
  margin-top: 40px;
}

.contact__links a {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-soft);
}

.contact__links a:hover { color: var(--ink); }

/* ---------- Footer ---------- */
.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 28px var(--gutter);
  border-top: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--bg);
}

.footer__exit { letter-spacing: inherit; text-transform: inherit; color: var(--ink-soft); }
.footer__exit:hover { color: var(--amber); }

/* ---------- Ver películas y tráileres ---------- */
.project__plays {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  margin: 0 0 30px;
}

.project__play {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  padding: 12px 22px 12px 14px;
  border: 1px solid var(--copper);
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  transition: background 0.4s, color 0.4s, box-shadow 0.4s;
}

.project__play-icon {
  width: 30px;
  height: 30px;
  border: 1px solid currentColor;
  border-radius: 50%;
  position: relative;
}

.project__play-icon::after {
  content: '';
  position: absolute;
  left: 11px;
  top: 8px;
  border-style: solid;
  border-width: 7px 0 7px 11px;
  border-color: transparent transparent transparent currentColor;
}

.project__play:hover,
.project__play:focus-visible {
  background: var(--copper);
  color: var(--bg);
  box-shadow: 0 0 30px rgba(243, 165, 76, 0.3);
}

.player {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px var(--gutter) 32px;
}

.player[hidden] { display: none; }

.player__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 2, 1, 0.92);
}

.player__screen {
  position: relative;
  width: min(100%, 1100px, (100svh - 120px) * 16 / 9);
  box-shadow: 0 0 120px rgba(220, 225, 235, 0.08);
}

.player__ratio { aspect-ratio: 16 / 9; background: #000; }

.player__ratio iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.player__close {
  position: absolute;
  top: 18px;
  right: var(--gutter);
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.player__close::after { content: '  ✕'; }
.player__close:hover { color: var(--amber); }

body.is-playing .sound { opacity: 0; pointer-events: none; }

.lab__mail {
  display: block;
  margin-top: 16px;
  font-size: 16px;
  font-style: italic;
  color: var(--muted);
  text-decoration: none;
}

.lab__mail:hover { color: var(--ink); }

/* ---------- Botón de sonido ---------- */
.sound {
  position: fixed;
  left: clamp(14px, 2vw, 28px);
  bottom: clamp(14px, 2vw, 24px);
  z-index: 95;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(12, 8, 6, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-soft);
  transition: border-color 0.4s, color 0.4s;
}

.sound:hover { border-color: rgba(196, 138, 92, 0.6); color: var(--ink); }

.sound__bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
}

.sound__bars i {
  width: 2px;
  height: 3px;
  background: var(--copper);
  transition: height 0.4s;
}

.sound.is-on .sound__bars i { animation: bars 1.1s ease-in-out infinite alternate; }
.sound.is-on .sound__bars i:nth-child(2) { animation-delay: -0.4s; }
.sound.is-on .sound__bars i:nth-child(3) { animation-delay: -0.8s; }
.sound.is-on .sound__bars i:nth-child(4) { animation-delay: -0.2s; }

@keyframes bars {
  from { height: 3px; }
  to   { height: 12px; }
}

/* ==========================================================
   HABITACIONES
   ========================================================== */

/* Encabezado: número de habitación, nombre del cuarto y para qué sirve */
.room-head {
  margin: 0 auto clamp(22px, 4vh, 44px);
  text-align: center;
}

.room-head__num {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--copper);
}

.room-head__name {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1.05;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.room-head__sub {
  margin: 12px 0 0;
  font-size: clamp(17px, 0.8vw + 12px, 21px);
  font-style: italic;
  font-weight: 300;
  color: var(--ink-soft);
}

/* Fotografía de fondo del cuarto: ocupa la primera pantalla y se funde con la textura */
.room__bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: max(100svh, 640px);
  pointer-events: none;
  background:
    linear-gradient(rgba(12, 8, 6, 0.35), rgba(12, 8, 6, 0.55) 60%, rgba(12, 8, 6, 0.8)),
    var(--bg) center / cover no-repeat;
  -webkit-mask-image: linear-gradient(#000 60%, transparent);
          mask-image: linear-gradient(#000 60%, transparent);
  animation: drift-in 40s ease-in-out infinite alternate;
}

@keyframes drift-in {
  from { transform: scale(1); }
  to   { transform: scale(1.06); }
}

/* Luz propia de cada cuarto */
.room__light {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

[data-room="recibidor"] .room__light {
  background: radial-gradient(60% 45% at 50% 0%, rgba(243, 165, 76, 0.16), transparent 70%);
}

/* sala de proyección: la foto ya tiene el haz: solo hacemos titilar la lámpara del proyector y la pantalla */
[data-room="proyectos"] .room__light {
  height: max(100svh, 640px);
  background:
    radial-gradient(10% 14% at 10% 50%, rgba(255, 220, 160, 0.22), transparent 70%),
    radial-gradient(22% 30% at 86% 42%, rgba(255, 230, 190, 0.12), transparent 70%);
  mix-blend-mode: screen;
  animation: projector 4s infinite;
}

@keyframes projector {
  0%, 100% { opacity: 1; }
  20% { opacity: 0.85; }
  22% { opacity: 1; }
  57% { opacity: 0.9; }
  59% { opacity: 0.7; }
  61% { opacity: 1; }
}

/* el estudio: una lámpara de escritorio a un costado */
[data-room="estudio"] .room__light {
  background: radial-gradient(45% 55% at 0% 30%, rgba(243, 165, 76, 0.16), transparent 70%);
}

/* el sótano: casi a oscuras, apenas la luz que entra por el ventiluz */
[data-room="conclavelab"] .room__light {
  background:
    linear-gradient(170deg, transparent 35%, rgba(4, 2, 1, 0.5)),
    radial-gradient(14% 20% at 7% 14%, rgba(240, 220, 190, 0.16), transparent 70%);
}

/* la galería: los apliques de la pared titilan apenas */
[data-room="equipo"] .room__light {
  background:
    radial-gradient(9% 13% at 21% 34%, rgba(255, 215, 150, 0.2), transparent 70%),
    radial-gradient(5% 8% at 44% 45%, rgba(255, 215, 150, 0.16), transparent 70%);
  mix-blend-mode: screen;
  animation: flicker 7s infinite;
}

/* el comedor: la vela en el centro de la mesa */
[data-room="aliados"] .room__light {
  background: radial-gradient(14% 20% at 49% 56%, rgba(255, 190, 110, 0.24), transparent 70%);
  mix-blend-mode: screen;
  animation: flicker 6s infinite;
}

/* en los cuartos con foto, la luz se ubica sobre la primera pantalla */
.room__bg ~ .room__light {
  bottom: auto;
  height: max(100svh, 640px);
}

/* Puertas del recibidor */
.doors__grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(12px, 1.6vw, 24px);
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
}

.door {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  text-decoration: none;
}

.door__frame {
  position: relative;
  width: 100%;
  max-width: 120px;
  aspect-ratio: 1 / 1.7;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 999px 999px 0 0;
  background: linear-gradient(rgba(20, 13, 9, 0.6), rgba(8, 5, 3, 0.9));
  transition: border-color 0.5s, box-shadow 0.5s;
}

.door__num {
  position: absolute;
  top: 26%;
  left: 0;
  right: 0;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.2em;
  color: var(--muted);
  transition: color 0.5s;
}

/* la luz que se filtra por debajo de la puerta */
.door__gap {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: -1px;
  height: 2px;
  background: var(--amber);
  opacity: 0.25;
  box-shadow: 0 0 10px 1px rgba(243, 165, 76, 0.5);
  transition: opacity 0.5s, box-shadow 0.5s;
}

.door__name {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.35;
}

.door__label {
  font-size: 15px;
  font-style: italic;
  color: var(--muted);
}

.door:hover .door__frame,
.door:focus-visible .door__frame {
  border-color: rgba(196, 138, 92, 0.6);
  box-shadow: inset 0 -40px 50px -30px rgba(243, 165, 76, 0.35);
}

.door:hover .door__gap,
.door:focus-visible .door__gap { opacity: 1; box-shadow: 0 0 22px 4px rgba(243, 165, 76, 0.65); }

.door:hover .door__num { color: var(--ink); }

@media (max-width: 820px) {
  .doors__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 32px; }
}

/* Al pie de cada habitación: volver / siguiente */
.room__nav {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  max-width: var(--maxw);
  margin: clamp(28px, 5vh, 52px) auto 0;
  padding: 0 0 28px;
}

.room__go {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.3s;
}

.room__go small {
  font-family: var(--font-body);
  font-size: 15px;
  font-style: italic;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
}

.room__go--next { margin-left: auto; text-align: right; }
.room__go:hover { color: var(--amber); }

/* ==========================================================
   CELULAR (pantallas verticales)
   ========================================================== */

/* La casa de la portada: en vertical la mostramos entera, arriba, y el texto debajo */
@media (max-aspect-ratio: 3 / 4) {
  .scene-wrap {
    top: 40%;
    width: 250vw;
    height: 166.67vw;
    -webkit-mask-image: linear-gradient(transparent, #000 14%, #000 78%, transparent);
            mask-image: linear-gradient(transparent, #000 14%, #000 78%, transparent);
  }

  .threshold__content { bottom: clamp(72px, 11vh, 120px); }

  /* las fotos de los cuartos se encuadran sobre lo más lindo de cada una */
  [data-room="recibidor"] .room__bg   { background-position: center, 22% center; }
  [data-room="proyectos"] .room__bg   { background-position: center, 18% center; }
  [data-room="estudio"] .room__bg     { background-position: center, 20% center; }
  [data-room="conclavelab"] .room__bg { background-position: center, 14% center; }
  [data-room="equipo"] .room__bg      { background-position: center, 24% center; }
  [data-room="aliados"] .room__bg     { background-position: center, 50% center; }

  /* los brillos animados están ubicados para la foto en horizontal: en vertical no coinciden */
  .room__bg ~ .room__light { display: none; }
}

@media (max-width: 600px) {
  /* rótulos con menos separación entre letras para que no se partan tanto */
  .eyebrow,
  .room-head__num { letter-spacing: 0.22em; }

  .section-label { gap: 14px; letter-spacing: 0.3em; }
  .section-label span { padding-left: 0.3em; }
  .section-label::before,
  .section-label::after { flex-basis: 40px; }

  /* puertas más chicas: entran las seis en dos filas sin ocupar toda la pantalla */
  .doors__grid { gap: 22px 10px; }
  .door__frame { max-width: 74px; margin-bottom: 8px; }
  .door__num { font-size: 11px; }
  .door__name { font-size: 10.5px; letter-spacing: 0.1em; }
  .door__label { font-size: 14px; }

  /* afiches más chicos y centrados */
  .project-list { gap: 72px; }
  .project__media { max-width: min(64vw, 260px); }
  .project__play { padding: 10px 16px 10px 10px; font-size: 11px; gap: 10px; }
  .project__play-icon { width: 26px; height: 26px; }
  .project__play-icon::after { left: 9px; top: 6px; border-width: 6px 0 6px 10px; }

  /* equipo: los dos retratos lado a lado */
  .team__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .member__name { font-size: 14px; letter-spacing: 0.1em; }
  .member__role { font-size: 15px; }

  /* botón de sonido: solo el ícono, para no tapar el contenido */
  .sound { padding: 0; width: 42px; height: 42px; justify-content: center; }
  .sound__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .room__go { font-size: 12px; letter-spacing: 0.12em; }
  .room__go small { font-size: 14px; }
}

/* ---------- Aparición al hacer scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1.2s cubic-bezier(.2, .7, .2, 1), transform 1.2s cubic-bezier(.2, .7, .2, 1);
}

.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .grain, .fog, .window-glow, .lab__title, .room__light, .room__bg { animation: none; }
  .marquee__track { animation-duration: 240s; }
  .reveal { transition: opacity 0.6s; transform: none; }
}
