/* ============================================================
   BLUSSAND-TOSCO · SISTEMA DE DISEÑO
   Paleta extraída de la identidad del estudio:
   negro profundo / blanco cálido / naranja quemado (logo B/T)
   Materialidad: hormigón, piedra, madera.
   ============================================================ */

:root {
  --bg: #0d0c0a;
  --bg-2: #15130f;
  --ink: #efe9df;
  --ink-dim: #97907f;
  --accent: #e1531e;
  --accent-soft: #f0825a;
  --paper: #efe9df;          /* sección clara, papel cálido */
  --paper-ink: #14120e;
  --line: rgba(239, 233, 223, 0.14);
  --line-dark: rgba(20, 18, 14, 0.16);

  --font: "Archivo", system-ui, -apple-system, sans-serif;

  --pad: clamp(1.25rem, 4vw, 4rem);
  --ease: cubic-bezier(0.65, 0.05, 0, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: auto; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body[data-loading] { overflow: hidden; }

img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--accent); color: #fff; }

/* ============ FOCO VISIBLE (accesibilidad por teclado) ============
   El cursor nativo está oculto en desktop, así que el foco DEBE verse.
   Solo aparece con navegación por teclado, nunca con click. */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}
.vision-card:focus-visible,
.work-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 6px;
}
/* las tarjetas son role="button": el cursor de mano lo da el custom,
   pero garantizamos el puntero correcto si el custom no carga */
.vision-card, .work-card { cursor: pointer; }

/* En desktop ocultamos el cursor nativo: lo reemplaza el custom */
@media (hover: hover) and (pointer: fine) {
  body.has-cursor, body.has-cursor a, body.has-cursor button { cursor: none; }
}

/* ============ PRELOADER ============ */
.preloader {
  position: fixed; inset: 0; z-index: 200;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
}
.preloader__inner {
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
}

/* --- escena: mini cuadrilla construyendo la casa B/T --- */
.preloader__scene {
  width: clamp(300px, 62vw, 580px);
  height: auto;
  overflow: visible;
}
#loaderScene .draw,
#loaderScene .limb,
#loaderScene #plCable {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#loaderScene .limb { stroke-width: 1.8; }
#loaderScene #plCable { stroke: var(--ink-dim); stroke-dasharray: 3 3; }
#loaderScene .skin { fill: var(--bg); stroke: var(--ink); stroke-width: 1.8; }
#loaderScene .hat { fill: var(--accent); stroke: none; }
#loaderScene .tool { fill: var(--accent); stroke: none; }
#loaderScene .accent-dot { fill: var(--accent); }
#loaderScene .plank { stroke: var(--accent-soft); stroke-width: 3.4; stroke-linecap: round; }
#loaderScene .blueprint { fill: none; stroke: var(--accent-soft); stroke-width: 1.6; }
#plSignBox { fill: var(--bg); stroke: var(--ink); stroke-width: 2; }
#plSignText {
  font-family: var(--font);
  font-weight: 900;
  font-size: 17px;
  letter-spacing: -0.03em;
  fill: var(--ink);
}
#plSignText .slash { fill: var(--accent); }

.preloader__caption {
  margin-top: 1.6rem;
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.34em; text-transform: uppercase;
  color: var(--ink);
}
.preloader__caption span {
  display: block; margin-top: 0.3rem;
  font-weight: 400; letter-spacing: 0.5em; color: var(--ink-dim);
}
.preloader__count {
  margin-top: 1rem;
  font-variant-numeric: tabular-nums;
  font-size: 0.85rem;
  letter-spacing: 0.35em;
  color: var(--ink-dim);
}
.preloader__bar {
  position: absolute; left: 0; bottom: 0;
  width: 100%; height: 2px; background: var(--line);
}
.preloader__bar span {
  display: block; height: 100%; width: 0%;
  background: var(--accent);
}

/* ============ CURSOR ============ */
.cursor {
  position: fixed; top: 0; left: 0; z-index: 300;
  pointer-events: none;
  display: none;
}
body.has-cursor .cursor { display: block; }
.cursor__dot {
  position: absolute; top: -3px; left: -3px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
}
.cursor__ring {
  position: absolute; top: -18px; left: -18px;
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid rgba(239, 233, 223, 0.5);
  transition: transform 0.45s var(--ease-out), opacity 0.3s, background 0.3s, border-color 0.3s;
}
.cursor__label {
  position: absolute; top: 0; left: 0;
  transform: translate(-50%, -50%) scale(0);
  width: 84px; height: 84px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.22em;
  transition: transform 0.45s var(--ease-out);
}
.cursor.is-hover .cursor__ring { transform: scale(1.6); border-color: var(--accent); }
.cursor.is-view .cursor__ring,
.cursor.is-view .cursor__dot { opacity: 0; }
.cursor.is-view .cursor__label { transform: translate(-50%, -50%) scale(1); }
.cursor.is-down .cursor__ring { transform: scale(0.8); }

/* ============ HEADER ============ */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.4rem var(--pad);
  mix-blend-mode: difference;
  opacity: 0;
}
.header__logo { display: flex; align-items: center; gap: 0.8rem; }
.header__logo-mark {
  font-weight: 900; font-size: 1.5rem; letter-spacing: -0.05em;
  color: #fff;
}
.header__logo-mark span { color: var(--accent-soft); }
.header__logo-text {
  font-size: 0.62rem; line-height: 1.3; text-transform: uppercase;
  letter-spacing: 0.28em; font-weight: 700; color: #fff;
}
.header__logo-text em { font-style: normal; font-weight: 400; letter-spacing: 0.42em; opacity: 0.7; }
.header__nav { display: flex; gap: clamp(1rem, 3vw, 2.6rem); }
.header__link {
  position: relative; overflow: hidden; display: block;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: #fff; padding: 0.2rem 0;
}
.header__link span { display: block; position: relative; transition: transform 0.5s var(--ease); }
.header__link span::after {
  content: attr(data-text);
  position: absolute; top: 100%; left: 0;
  color: var(--accent-soft);
}
.header__link:hover span { transform: translateY(-100%); }
.header__link--cta::before {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px; background: var(--accent-soft);
}

/* ============ HERO ============ */
.hero {
  position: relative; height: 100svh; min-height: 620px;
  display: flex; align-items: flex-end;
  overflow: hidden;
}
.hero__media { position: absolute; inset: 0; }
.hero__video {
  width: 100%; height: 115%; object-fit: cover;
  will-change: transform;
}
.hero__veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(13,12,10,0.55) 0%, rgba(13,12,10,0.15) 40%, rgba(13,12,10,0.88) 100%);
}
.hero__content {
  position: relative; z-index: 2;
  width: 100%;
  padding: 0 var(--pad) clamp(4rem, 9vh, 7rem);
}
.hero__kicker {
  overflow: hidden;
  font-size: 0.75rem; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--ink-dim); margin-bottom: 1.6rem;
}
.hero__kicker span { display: inline-block; }
.hero__title {
  font-weight: 900;
  font-stretch: 115%;
  font-size: clamp(2.6rem, 9.5vw, 9rem);
  line-height: 0.92;
  letter-spacing: -0.025em;
  text-transform: uppercase;
}
.hero__title .line { display: block; overflow: hidden; }
.hero__title .line > span { display: block; will-change: transform; }
.hero__title .line:nth-child(2) > span { color: transparent; -webkit-text-stroke: 1.5px var(--ink); }
.hero__title .line:nth-child(3) > span { color: var(--accent); }
.hero__sub {
  margin-top: 1.8rem; max-width: 34ch;
  color: var(--ink-dim); font-size: clamp(0.9rem, 1.4vw, 1.05rem);
}
.hero__scrollhint {
  position: absolute; right: var(--pad); bottom: clamp(4rem, 9vh, 7rem);
  z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 0.8rem;
  font-size: 0.68rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--ink-dim);
  writing-mode: vertical-rl;
}
.hero__scrollhint i {
  width: 1px; height: 64px; background: var(--line);
  position: relative; overflow: hidden;
}
.hero__scrollhint i::after {
  content: ""; position: absolute; left: 0; top: -50%;
  width: 100%; height: 50%; background: var(--accent);
  animation: scrollhint 1.8s var(--ease) infinite;
}
@keyframes scrollhint { to { top: 110%; } }

/* ============ TÍTULOS DE SECCIÓN ============ */
.section-title {
  display: flex; align-items: baseline; gap: 1.2rem; flex-wrap: wrap;
  font-weight: 900; font-stretch: 112%;
  font-size: clamp(2rem, 5.4vw, 4.4rem);
  line-height: 1; letter-spacing: -0.02em; text-transform: uppercase;
}
.section-title__num {
  font-size: 0.85rem; font-weight: 600; letter-spacing: 0.2em;
  color: var(--accent); font-stretch: 100%;
}
.section-title em {
  font-style: normal; font-weight: 400; font-stretch: 100%;
  font-size: 0.9rem; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--ink-dim);
}
.section-title--dark em { color: rgba(20, 18, 14, 0.55); }

/* ============ MANIFIESTO ============ */
.manifesto {
  padding: clamp(7rem, 16vh, 12rem) var(--pad);
  max-width: 1500px;
}
.manifesto__eyebrow {
  font-size: 0.78rem; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 2.4rem;
}
.manifesto__text {
  font-size: clamp(1.5rem, 3.6vw, 3.1rem);
  font-weight: 600; line-height: 1.22; letter-spacing: -0.01em;
  max-width: 26ch;
}
.manifesto__text .w { opacity: 0.12; }
.stats {
  margin-top: clamp(4rem, 9vh, 7rem);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0 1rem;
  border-top: 1px solid var(--line);
}
.stat {
  padding: 2rem 1.5rem 0 0;
  border-right: 1px solid var(--line);
  padding-left: 1.5rem;
}
.stat:first-child { padding-left: 0; }
.stat:last-child { border-right: 0; }
.stat__value {
  font-weight: 900; font-stretch: 112%;
  font-size: clamp(1.9rem, 3.6vw, 3.4rem);
  line-height: 1; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.stat__value sup { font-size: 0.5em; color: var(--accent); }
.stat__label {
  margin-top: 0.6rem; font-size: 0.75rem; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--ink-dim);
}

/* ============ VISIONES · horizontal ============ */
.visions { position: relative; }
.visions__pin {
  height: 100svh; min-height: 600px;
  display: flex; flex-direction: column; justify-content: center;
  overflow: hidden;
  background: var(--bg-2);
}
.visions__head {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 0 var(--pad); margin-bottom: clamp(1.5rem, 4vh, 3rem);
}
.visions__progress {
  font-variant-numeric: tabular-nums;
  font-size: 0.8rem; letter-spacing: 0.2em; color: var(--ink-dim);
}
.visions__progress #visionsCurrent { color: var(--accent); }
.visions__track {
  display: flex; gap: clamp(1.2rem, 3vw, 3rem);
  padding: 0 var(--pad);
  width: max-content;
  will-change: transform;
}
.vision-card {
  position: relative;
  width: clamp(280px, 38vw, 560px);
  flex-shrink: 0;
}
.vision-card__media {
  position: relative; overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--bg);
}
.vision-card__media img {
  width: 115%; height: 100%; object-fit: cover;
  will-change: transform;
  transition: scale 0.8s var(--ease-out);
  scale: 1;
}
.vision-card:hover .vision-card__media img { scale: 1.06; }
.vision-card__media::after {
  content: ""; position: absolute; inset: 0;
  background: var(--bg);
  transform-origin: right;
  transition: transform 1.1s var(--ease);
}
.vision-card.is-in .vision-card__media::after { transform: scaleX(0); }
.vision-card__meta {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-top: 1rem; border-top: 1px solid transparent;
}
.vision-card__title {
  font-weight: 800; font-stretch: 110%; text-transform: uppercase;
  font-size: clamp(1rem, 1.7vw, 1.4rem); letter-spacing: -0.01em;
}
.vision-card__loc {
  font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink-dim); text-align: right;
}
.vision-card__loc b { color: var(--accent); font-weight: 600; }
.vision-card__index {
  position: absolute; top: 0.8rem; left: 0.9rem; z-index: 2;
  font-size: 0.7rem; letter-spacing: 0.18em; color: rgba(255,255,255,0.85);
  background: rgba(13,12,10,0.45); padding: 0.3rem 0.6rem;
  backdrop-filter: blur(6px);
}

/* ============ OBRAS · grilla editorial (sección clara) ============ */
.works {
  background: var(--paper); color: var(--paper-ink);
  padding: clamp(6rem, 14vh, 10rem) var(--pad) clamp(7rem, 16vh, 12rem);
}
.works__head { margin-bottom: clamp(3rem, 8vh, 6rem); }
.works__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(3rem, 8vh, 6rem) clamp(1.2rem, 2.5vw, 2.5rem);
}
.work-card { position: relative; }
/* ritmo editorial: anchos y offsets alternados generados por nth-child */
.work-card:nth-child(6n + 1) { grid-column: 1 / span 7; }
.work-card:nth-child(6n + 2) { grid-column: 9 / span 4; margin-top: clamp(3rem, 10vh, 8rem); }
.work-card:nth-child(6n + 3) { grid-column: 2 / span 5; }
.work-card:nth-child(6n + 4) { grid-column: 8 / span 5; margin-top: clamp(-4rem, -6vh, -2rem); }
.work-card:nth-child(6n + 5) { grid-column: 1 / span 6; }
.work-card:nth-child(6n)     { grid-column: 8 / span 5; margin-top: clamp(2rem, 8vh, 6rem); }
.work-card__media {
  position: relative; overflow: hidden;
  background: var(--paper-ink);
}
.work-card__media img {
  width: 100%; height: 100%; object-fit: cover;
  will-change: transform;
}
.work-card__veil {
  position: absolute; inset: 0; z-index: 2;
  background: var(--paper);
  transform-origin: bottom;
}
.work-card__tag {
  position: absolute; top: 1rem; right: 1rem; z-index: 3;
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase;
  background: var(--accent); color: #fff;
  padding: 0.4rem 0.7rem;
  opacity: 0; transform: translateY(-6px);
  transition: opacity 0.4s, transform 0.4s var(--ease-out);
}
.work-card:hover .work-card__tag { opacity: 1; transform: none; }
.work-card__meta {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-top: 1.1rem; border-top: 1px solid var(--line-dark); margin-top: 1.1rem;
}
.work-card__title {
  font-weight: 800; font-stretch: 110%; text-transform: uppercase;
  font-size: clamp(1.1rem, 2vw, 1.6rem); letter-spacing: -0.01em;
}
.work-card__loc {
  font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(20,18,14,0.55);
}

/* ============ ESTUDIO ============ */
.studio { padding: clamp(6rem, 14vh, 10rem) 0 0; overflow: hidden; }
.studio__head { padding: 0 var(--pad); margin-bottom: clamp(3rem, 7vh, 5rem); }
.studio__body {
  display: grid; grid-template-columns: 7fr 5fr;
  gap: clamp(2rem, 4vw, 4rem);
  padding: 0 var(--pad);
  align-items: start;
}
.studio__media { overflow: hidden; position: relative; }
.studio__media img { width: 100%; filter: grayscale(1) contrast(1.05); will-change: transform; }
.studio__media--small { max-width: 420px; margin-top: 2.5rem; }
.studio__lead {
  font-size: clamp(1.15rem, 2vw, 1.6rem); line-height: 1.4; font-weight: 500;
  max-width: 38ch;
}
.studio__founders {
  list-style: none; margin-top: 2.2rem;
  border-top: 1px solid var(--line);
}
.studio__founders li {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 1rem 0; border-bottom: 1px solid var(--line);
  font-weight: 700; font-stretch: 108%; text-transform: uppercase;
  font-size: clamp(1rem, 1.6vw, 1.3rem);
}
.studio__founders li span {
  font-weight: 400; font-stretch: 100%; text-transform: uppercase;
  font-size: 0.68rem; letter-spacing: 0.24em; color: var(--ink-dim);
}

/* reveal genérico de imágenes (la máscara la anima GSAP con clip-path) */
.reveal-img { position: relative; }

/* ============ MARQUEE PAÍSES ============ */
.marquee {
  margin-top: clamp(5rem, 12vh, 9rem);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden; padding: 1.6rem 0;
}
.marquee__inner {
  display: flex; gap: 3rem; width: max-content;
  animation: marquee 36s linear infinite;
}
.marquee:hover .marquee__inner { animation-play-state: paused; }
.marquee__item {
  font-weight: 800; font-stretch: 112%; text-transform: uppercase;
  font-size: clamp(1.4rem, 3vw, 2.4rem); letter-spacing: -0.01em;
  white-space: nowrap; color: var(--ink);
  display: flex; align-items: center; gap: 3rem;
}
.marquee__item i {
  font-style: normal; color: var(--accent); font-size: 0.6em;
}
.marquee__item:nth-child(even) { color: transparent; -webkit-text-stroke: 1px var(--ink-dim); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ============ CONTACTO ============ */
.contact {
  padding: clamp(7rem, 16vh, 12rem) var(--pad) 2.5rem;
  text-align: left;
}
.contact__eyebrow {
  font-size: 0.78rem; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 2rem;
}
.contact__cta { display: inline-block; }
.contact__cta-line {
  display: block;
  font-weight: 900; font-stretch: 115%; text-transform: uppercase;
  font-size: clamp(3rem, 11vw, 10rem);
  line-height: 0.95; letter-spacing: -0.03em;
  color: transparent; -webkit-text-stroke: 1.5px var(--ink);
  transition: color 0.6s var(--ease), -webkit-text-stroke-color 0.6s;
}
.contact__cta-line i { font-style: normal; color: var(--accent); -webkit-text-stroke: 0; }
.contact__cta:hover .contact__cta-line { color: var(--ink); -webkit-text-stroke-color: transparent; }
.contact__meta {
  margin-top: clamp(4rem, 9vh, 7rem);
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem;
  border-top: 1px solid var(--line); padding-top: 2rem;
}
.contact__meta h4 {
  font-size: 0.68rem; letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--ink-dim); margin-bottom: 0.6rem; font-weight: 600;
}
.contact__meta p { font-size: 0.95rem; }
.contact__bottom {
  margin-top: 4rem;
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 1.5rem; flex-wrap: wrap;
}
.contact__legal {
  font-size: 0.7rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--ink-dim);
}
.contact__credit {
  display: inline-block;
  font-size: 0.7rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--ink-dim);
  transition: color 0.35s var(--ease-out);
}
.contact__credit b { font-weight: 800; color: var(--ink); transition: color 0.35s; }
.contact__credit span { color: var(--accent); display: inline-block; transition: transform 0.35s var(--ease-out); }
.contact__credit:hover { color: var(--ink); }
.contact__credit:hover b { color: var(--accent); }
.contact__credit:hover span { transform: translate(2px, -2px); }

/* ============ CORTINA DE TRANSICIÓN ============ */
.curtain { position: fixed; inset: 0; z-index: 150; pointer-events: none; }
.curtain__panel {
  position: absolute; inset: 0;
  visibility: hidden; /* GSAP las posiciona y muestra solo durante la transición */
}
.curtain__panel--accent { background: var(--accent); }
.curtain__panel--dark { background: var(--bg-2); }

/* ============ VISTA DE PROYECTO ============ */
.project-view {
  position: fixed; inset: 0; z-index: 140;
  background: var(--bg-2);
  visibility: hidden;
}
.project-view.is-open { visibility: visible; }
.project-view__scroller {
  height: 100%; overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.project-view__scroller::-webkit-scrollbar { display: none; }
.project-view__close {
  position: fixed; top: 1.4rem; right: var(--pad); z-index: 10;
  width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(13,12,10,0.5); backdrop-filter: blur(8px);
}
.project-view__close span {
  position: absolute; top: 50%; left: 50%;
  width: 18px; height: 1.5px; background: var(--ink);
  transition: background 0.3s;
}
.project-view__close span:first-child { transform: translate(-50%, -50%) rotate(45deg); }
.project-view__close span:last-child { transform: translate(-50%, -50%) rotate(-45deg); }
.project-view__close:hover span { background: var(--accent); }

.pv-hero { position: relative; height: 86svh; overflow: hidden; }
.pv-hero img { width: 100%; height: 115%; object-fit: cover; will-change: transform; }
.pv-hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(13,12,10,0.3), transparent 35%, rgba(13,12,10,0.85));
}
.pv-hero__title {
  position: absolute; left: var(--pad); bottom: 2.5rem; z-index: 2;
  font-weight: 900; font-stretch: 115%; text-transform: uppercase;
  font-size: clamp(2.6rem, 8vw, 7rem); line-height: 0.95; letter-spacing: -0.025em;
}
.pv-hero__title .line { display: block; overflow: hidden; }
.pv-hero__title .line > span { display: block; }
.pv-body { padding: clamp(3rem, 7vh, 5rem) var(--pad) 6rem; }
.pv-meta {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 1.6rem 0; margin-bottom: clamp(2.5rem, 6vh, 4rem);
}
.pv-meta div h5 {
  font-size: 0.65rem; letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--ink-dim); font-weight: 600; margin-bottom: 0.4rem;
}
.pv-meta div p { font-weight: 700; font-stretch: 108%; text-transform: uppercase; font-size: 0.95rem; }
.pv-meta div p.accent { color: var(--accent); }
.pv-desc {
  font-size: clamp(1.3rem, 2.6vw, 2.1rem); font-weight: 500; line-height: 1.35;
  max-width: 30ch; margin-bottom: clamp(3rem, 8vh, 5rem);
}
.pv-gallery { display: grid; gap: clamp(1.5rem, 4vh, 3rem); }
.pv-gallery figure { overflow: hidden; }
.pv-gallery figure:nth-child(odd) { width: min(100%, 1100px); }
.pv-gallery figure:nth-child(even) { width: min(100%, 760px); margin-left: auto; }
.pv-gallery img { width: 100%; will-change: transform; }
.project-view__nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: flex; justify-content: space-between;
  padding: 1.2rem var(--pad);
  background: linear-gradient(0deg, rgba(13,12,10,0.85), transparent);
}
.project-view__navbtn {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink); padding: 0.6rem 0;
  transition: color 0.3s;
}
.project-view__navbtn:hover { color: var(--accent); }

/* ============ PANEL ADMIN ============ */
.header__admin {
  width: 26px; height: 26px; border-radius: 50%;
  display: inline-grid; place-items: center;
  font-size: 0.85rem; line-height: 1;
  color: rgba(255, 255, 255, 0.4);
  border: 1px solid transparent;
  transition: color 0.3s, border-color 0.3s;
}
.header__admin:hover { color: var(--accent-soft); border-color: var(--accent-soft); }

/* ============ SECCIÓN DESTACADA · RECORRIDO VIRTUAL ============ */
.tour-feature {
  position: relative; min-height: 92svh;
  display: flex; align-items: flex-end;
  overflow: hidden; background: var(--bg);
}
.tour-feature[hidden] { display: none; }
.tour-feature__media { position: absolute; inset: 0; }
.tour-feature__media img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.1); will-change: transform;
}
.tour-feature__veil {
  position: absolute; inset: 0;
  background: linear-gradient(180deg,
    rgba(13,12,10,0.62) 0%, rgba(13,12,10,0.25) 38%, rgba(13,12,10,0.93) 100%);
}
.tour-feature__content {
  position: relative; z-index: 2; width: 100%;
  padding: clamp(5rem, 12vh, 9rem) var(--pad) clamp(4rem, 9vh, 7rem);
}
.tour-feature__eyebrow {
  font-size: 0.78rem; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--accent-soft); margin-bottom: 1.6rem;
}
.tour-feature .section-title { color: #fff; }
.tour-feature__lead {
  margin-top: 1.6rem; max-width: 46ch;
  font-size: clamp(1rem, 1.6vw, 1.25rem); line-height: 1.5;
  color: rgba(239,233,223,0.82);
}
.tour-feature__lead b { color: #fff; font-weight: 700; }
.tour-feature__rooms {
  list-style: none; display: flex; flex-wrap: wrap; gap: 0.6rem;
  margin-top: 1.9rem;
}
.tour-feature__rooms li {
  border: 1px solid rgba(239,233,223,0.22); border-radius: 999px;
  padding: 0.5rem 0.95rem;
  font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(239,233,223,0.78);
}
.tour-feature__cta {
  margin-top: 2.5rem;
  display: inline-flex; align-items: center; gap: 1rem;
  padding: 1.05rem 1.9rem; border-radius: 999px;
  background: var(--accent); color: #fff;
  font-weight: 800; font-size: 0.85rem; letter-spacing: 0.16em; text-transform: uppercase;
  transition: transform 0.45s var(--ease-out), background 0.4s, box-shadow 0.45s var(--ease-out);
}
.tour-feature__cta:hover {
  transform: translateY(-3px);
  background: var(--accent-soft);
  box-shadow: 0 16px 40px -12px rgba(225,83,30,0.6);
}
.tour-feature__cta-icon {
  display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: #fff; color: var(--accent); font-size: 0.8rem;
  transition: transform 0.45s var(--ease-out);
}
.tour-feature__cta:hover .tour-feature__cta-icon { transform: scale(1.12); }

/* ============ RECORRIDO VIRTUAL (overlay full-screen) ============ */
.tour {
  position: fixed; inset: 0; z-index: 170;
  background: #000;
  opacity: 0; visibility: hidden;
  transition: opacity 0.6s var(--ease-out), visibility 0.6s;
}
.tour.is-open { opacity: 1; visibility: visible; }

/* --- escena: dos capas que hacen crossfade + Ken Burns --- */
.tour__stage { position: absolute; inset: 0; overflow: hidden; }
.tour__layer {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 1s var(--ease-out);
  will-change: opacity, transform;
}
.tour__layer.is-active {
  opacity: 1;
  animation: tourKenBurns 14s ease-out forwards;
}
@keyframes tourKenBurns {
  from { transform: scale(1.04) translate(0, 0); }
  to   { transform: scale(1.16) translate(var(--kb-x, -1.5%), var(--kb-y, -1%)); }
}
.tour__veil {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(13,12,10,0.55) 0%, rgba(13,12,10,0) 28%, rgba(13,12,10,0) 62%, rgba(13,12,10,0.85) 100%);
}

/* --- hotspots sobre la imagen --- */
.tour__hotspots { position: absolute; inset: 0; }
.tour__hotspot {
  position: absolute; transform: translate(-50%, -50%);
  width: 30px; height: 30px;
  display: grid; place-items: center;
}
.tour__hotspot::before {
  content: ""; width: 11px; height: 11px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 0 4px rgba(255,255,255,0.28);
  transition: transform 0.3s var(--ease-out), background 0.3s;
}
.tour__hotspot:hover::before { transform: scale(1.25); background: var(--accent-soft); }
.tour__hotspot-ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.7);
  animation: tourPulse 2.4s var(--ease-out) infinite;
}
@keyframes tourPulse {
  0%   { transform: scale(0.7); opacity: 0.9; }
  70%  { transform: scale(1.9); opacity: 0; }
  100% { transform: scale(1.9); opacity: 0; }
}
.tour__hotspot-label {
  position: absolute; bottom: calc(100% + 8px); left: 50%;
  transform: translateX(-50%) translateY(6px);
  white-space: nowrap;
  background: rgba(13,12,10,0.78); backdrop-filter: blur(8px);
  color: #fff; padding: 0.45rem 0.8rem; border-radius: 999px;
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s, transform 0.3s var(--ease-out);
}
.tour__hotspot:hover .tour__hotspot-label,
.tour__hotspot:focus-visible .tour__hotspot-label {
  opacity: 1; transform: translateX(-50%) translateY(0);
}
.tour__hotspot:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 50%; }

/* --- barra superior: nombre del ambiente + cerrar --- */
.tour__bar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 3;
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: clamp(1.4rem, 4vh, 2.4rem) var(--pad);
}
.tour__eyebrow {
  font-size: 0.66rem; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--accent-soft); margin-bottom: 0.6rem;
}
.tour__name {
  font-weight: 900; font-stretch: 112%; text-transform: uppercase;
  font-size: clamp(1.8rem, 4.5vw, 3.4rem); line-height: 0.95; letter-spacing: -0.02em;
  color: #fff;
}
.tour__sub {
  margin-top: 0.5rem; font-size: 0.8rem; letter-spacing: 0.04em;
  color: rgba(239,233,223,0.72); max-width: 30ch;
}
.tour__close {
  flex-shrink: 0; position: relative;
  width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(13,12,10,0.4); backdrop-filter: blur(8px);
  transition: border-color 0.3s, background 0.3s;
}
.tour__close:hover { border-color: var(--accent); background: rgba(13,12,10,0.6); }
.tour__close span {
  position: absolute; top: 50%; left: 50%;
  width: 18px; height: 1.5px; background: #fff; transition: background 0.3s;
}
.tour__close span:first-child { transform: translate(-50%, -50%) rotate(45deg); }
.tour__close span:last-child  { transform: translate(-50%, -50%) rotate(-45deg); }
.tour__close:hover span { background: var(--accent); }

/* --- minimapa de planta --- */
.tour__plan {
  position: absolute; left: var(--pad); bottom: clamp(5rem, 12vh, 7rem); z-index: 3;
  width: clamp(116px, 13vw, 170px);
  background: rgba(13,12,10,0.42); backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.12); border-radius: 12px;
  padding: 0.7rem 0.7rem 0.5rem;
}
.tour__plan-svg { width: 100%; height: auto; display: block; overflow: visible; }
.tour__plan-frame { fill: none; stroke: rgba(255,255,255,0.14); stroke-width: 0.8; }
.tour__edges line { stroke: rgba(255,255,255,0.28); stroke-width: 1; stroke-dasharray: 2 2.5; }
.tour__node { cursor: pointer; }
.tour__node-hit { fill: transparent; }
.tour__node-dot {
  fill: rgba(255,255,255,0.55);
  transition: fill 0.3s, r 0.3s;
}
.tour__node:hover .tour__node-dot { fill: #fff; }
.tour__node.is-active .tour__node-dot { fill: var(--accent); r: 5; }
.tour__node.is-active .tour__node-hit {
  fill: none; stroke: var(--accent); stroke-width: 1.2;
  animation: tourNodePulse 2.2s var(--ease-out) infinite;
}
@keyframes tourNodePulse { 0% { r: 4; opacity: 1; } 100% { r: 11; opacity: 0; } }
.tour__node:focus-visible { outline: none; }
.tour__node:focus-visible .tour__node-dot { fill: var(--accent); r: 5; }
.tour__plan-label {
  margin-top: 0.4rem; text-align: center;
  font-size: 0.56rem; letter-spacing: 0.28em; text-transform: uppercase;
  color: rgba(239,233,223,0.6);
}

/* --- navegación inferior --- */
.tour__nav {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: clamp(1.1rem, 3vh, 1.6rem) var(--pad);
  background: linear-gradient(0deg, rgba(0,0,0,0.6), transparent);
}
.tour__navbtn {
  font-size: 0.76rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
  color: #fff; padding: 0.5rem 0; transition: color 0.3s;
}
.tour__navbtn:hover { color: var(--accent-soft); }
.tour__dots { display: flex; gap: 0.6rem; }
.tour__dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,0.32);
  transition: background 0.3s, transform 0.3s var(--ease-out);
}
.tour__dot:hover { background: rgba(255,255,255,0.65); }
.tour__dot.is-active { background: var(--accent); transform: scale(1.4); }
.tour__counter {
  position: absolute; right: var(--pad); bottom: clamp(5rem, 12vh, 7rem); z-index: 3;
  font-variant-numeric: tabular-nums;
  font-size: 0.78rem; letter-spacing: 0.22em; color: rgba(239,233,223,0.75);
}
.tour__counter::first-line { color: var(--accent); }

/* ============ HAMBURGER ============ */
.header__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  width: 40px; height: 40px;
  flex-shrink: 0;
  background: none; border: 0; cursor: pointer;
}
.header__burger span {
  display: block;
  width: 22px; height: 1.5px;
  background: #fff;
  transform-origin: center;
  transition: transform 0.45s var(--ease), opacity 0.3s;
}
.header__burger.is-open span:first-child { transform: translateY(3.75px) rotate(45deg); }
.header__burger.is-open span:last-child  { transform: translateY(-3.75px) rotate(-45deg); }

/* ============ MENÚ OVERLAY (mobile) ============ */
.nav-overlay {
  position: fixed; inset: 0; z-index: 90;
  background: var(--bg);
  transform: translateY(-100%);
  visibility: hidden;
  overflow: hidden;
}
.nav-overlay__watermark {
  position: absolute;
  right: -0.04em; bottom: -0.12em;
  font-size: 62vw;
  font-weight: 900; font-stretch: 115%;
  font-family: var(--font);
  letter-spacing: -0.05em; line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(239,233,223,0.05);
  pointer-events: none; user-select: none;
}
.nav-overlay__inner {
  position: relative; z-index: 1;
  display: flex; flex-direction: column;
  height: 100%;
  padding: clamp(5.5rem, 16vh, 8rem) var(--pad) clamp(2.5rem, 7vh, 4rem);
}
.nav-overlay__list {
  display: flex; flex-direction: column;
  flex: 1; justify-content: center;
}
.nav-overlay__item {
  display: flex; align-items: baseline; gap: 1rem;
  padding: 0.65rem 0;
  font-weight: 900; font-stretch: 113%;
  font-size: clamp(2.2rem, 9.5vw, 3.8rem);
  line-height: 1; letter-spacing: -0.025em; text-transform: uppercase;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  transition: color 0.3s var(--ease-out), padding-left 0.4s var(--ease-out);
}
.nav-overlay__item:first-child { border-top: 1px solid var(--line); }
.nav-overlay__item:hover { color: var(--accent); padding-left: 0.5rem; }
.nav-overlay__num {
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.2em;
  color: var(--accent); font-stretch: 100%; flex-shrink: 0;
  transition: color 0.3s;
  transform: translateY(-0.15em);
}
.nav-overlay__item--cta .nav-overlay__num { color: var(--ink-dim); }
.nav-overlay__footer {
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
}
.nav-overlay__admin {
  display: inline-flex; align-items: center; gap: 0.7rem;
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--ink-dim);
  transition: color 0.35s var(--ease-out);
}
.nav-overlay__admin:hover { color: var(--ink); }
.nav-overlay__arrow {
  color: var(--accent); display: inline-block;
  transition: transform 0.35s var(--ease-out);
}
.nav-overlay__admin:hover .nav-overlay__arrow { transform: translate(2px, -2px); }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .studio__body { grid-template-columns: 1fr; }
  .hero__scrollhint { display: none; }
}
@media (max-width: 768px) {
  .header { padding: 1.1rem 1.25rem; gap: 0.8rem; }
  .header__logo-text { display: none; }
  .header__logo-mark { font-size: 1.2rem; }
  .header__nav { display: none; }
  .header__burger { display: flex; }
  .hero__title { font-size: clamp(1.7rem, 8.2vw, 3rem); font-stretch: 105%; }
  .contact__cta-line { font-size: clamp(2.2rem, 10vw, 4rem); }
  /* Visiones: scroll horizontal nativo con snap en mobile */
  .visions__pin { height: auto; min-height: 0; padding: 5rem 0; }
  .visions__track {
    width: auto; overflow-x: auto; padding-bottom: 1rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  .vision-card { width: 78vw; scroll-snap-align: start; }
  /* Obras: una columna */
  .work-card { grid-column: 1 / -1 !important; margin-top: 0 !important; }
  .contact__meta { grid-template-columns: 1fr; }

  /* Sección destacada del recorrido */
  .tour-feature { min-height: 88svh; }
  .tour-feature__lead { font-size: 0.95rem; }
  .tour-feature__cta { width: 100%; justify-content: center; }

  /* Recorrido virtual: layout compacto y dedos cómodos */
  .tour__bar { padding: 1.2rem 1.25rem; }
  .tour__sub { display: none; }
  .tour__close { width: 44px; height: 44px; }
  .tour__hotspot { width: 40px; height: 40px; }            /* target táctil mayor */
  .tour__hotspot-label { font-size: 0.6rem; }
  /* el plano SVG se oculta en mobile; bastan hotspots + puntos + flechas */
  .tour__plan { display: none; }
  .tour__counter { right: 1.25rem; bottom: auto; top: 1.5rem; }
  .tour__nav { padding: 1rem 1.25rem; gap: 0.6rem; }
  .tour__navbtn { font-size: 0.68rem; letter-spacing: 0.12em; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
