/* ==========================================================================
   Buenos Aires Studio — landing
   ========================================================================== */

@font-face { font-family: "Neue Montreal"; src: url("../fonts/NeueMontreal-Light.otf") format("opentype"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Neue Montreal"; src: url("../fonts/NeueMontreal-Regular.otf") format("opentype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Neue Montreal"; src: url("../fonts/NeueMontreal-Medium.otf") format("opentype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Neue Montreal"; src: url("../fonts/NeueMontreal-Bold.otf") format("opentype"); font-weight: 700; font-display: swap; }

:root {
  --white: #ffffff;
  --ink: #0a0a0a;
  --green: #03322a;
  --marfil: #f1ece2;
  --marfil-text: #ebe3d4;

  --pad: clamp(16px, 4.5vw, 72px);
  --fs-small: 12px;
  --fs-body: clamp(15px, 1.1vw, 18px);
  --fs-hero: clamp(64px, 10.4vw, 240px);
  --fs-block: clamp(26px, 4.4vw, 88px);
  --fs-big: clamp(26px, 3.6vw, 68px);

  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: "Neue Montreal", "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  font-size: var(--fs-body);
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; width: 100%; height: auto; }
figure { margin: 0; }
p { margin: 0; }
a { color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
::selection { background: var(--green); color: var(--marfil); }

.label {
  font-size: var(--fs-small);
  text-transform: uppercase;
  letter-spacing: .02em;
  margin-bottom: 1.2em;
}

/* --------------------------------------------------------------------------
   Portada (intro): fachada que se dibuja + panel negro que sube
   -------------------------------------------------------------------------- */
html.is-locked, html.is-locked body { overflow: hidden; }

.intro {
  position: fixed; left: 0; right: 0; top: 0; z-index: 100;
  height: 200vh; height: 200lvh;          /* portada + panel negro debajo */
  transition: transform 1.7s cubic-bezier(.77, 0, .18, 1);
  will-change: transform;
}
.intro.is-gone { transform: translateY(-100%); }
.intro__stage {
  position: relative; height: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: clamp(14px, 2.5vh, 28px);
  background: var(--marfil); color: var(--green);
}
.intro__curtain { height: 50%; background: var(--ink); }
.intro__caption { font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .08em; }
.intro__more {
  position: absolute; left: 50%; bottom: clamp(18px, 4vh, 40px);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font: inherit; font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .08em;
  color: inherit; background: none; border: 0; padding: 8px; cursor: pointer; white-space: nowrap;
  opacity: 0; pointer-events: none;
  transform: translate(-50%, 10px);
  transition: opacity .6s var(--ease) .9s, transform .6s var(--ease) .9s;
}
.intro__more span { font-size: 16px; animation: nudge 1.6s var(--ease) infinite; }
.intro.is-back .intro__more { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
@keyframes nudge { 0%, 100% { transform: none; } 50% { transform: translateY(6px); } }

/* Dibujo de la fachada (portada y variante C) */
.facade { display: block; overflow: visible; }
.intro .facade { height: min(66vh, 780px); width: auto; max-width: calc(100vw - 2 * var(--pad)); }
.facade .s, .facade .g {
  fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1; stroke-dashoffset: 1;
}
.facade .s { stroke-width: 1.5; }
.facade .g { stroke-width: .8; stroke-opacity: .28; }
.facade .txt {
  fill: currentColor; opacity: 0;
  font-family: "Neue Montreal", sans-serif; font-weight: 500; letter-spacing: .08em;
}
.facade .engraved { font-weight: 400; letter-spacing: .18em; }
.facade.is-drawing .s, .facade.is-drawing .g {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset var(--t) cubic-bezier(.6, .1, .3, 1) var(--d);
}
.facade.is-drawing .txt { opacity: 1; transition: opacity .8s ease var(--d); }
.facade.is-drawn .s, .facade.is-drawn .g { stroke-dashoffset: 0; }
.facade.is-drawn .txt { opacity: 1; }

/* --------------------------------------------------------------------------
   Header (difference = legible sobre blanco, negro y fotos)
   -------------------------------------------------------------------------- */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 18px var(--pad);
  font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .07em;
  color: var(--white); mix-blend-mode: difference;
  transform: translateY(-110%);
  transition: transform .8s var(--ease);
}
.header.is-visible { transform: none; }
.header a { text-decoration: none; }
.header__brand { display: block; }
.header__brand img { height: clamp(20px, 1.8vw, 28px); width: auto; }
.header__nav { display: flex; gap: 34px; }
.header__nav a { position: relative; }
.header__nav a::after, .links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform .5s var(--ease);
}
.header__nav a:hover::after, .links a:hover::after { transform: scaleX(1); transform-origin: left; }
.header__meta { justify-self: end; }

/* --------------------------------------------------------------------------
   1. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100svh;
  padding: calc(var(--pad) * .8) var(--pad);
  display: flex; flex-direction: column; justify-content: center;
}
.hero__main { margin: 0 0 clamp(8px, 2svh, 28px); }
.hero__address { position: absolute; left: var(--pad); top: calc(var(--pad) * .8); }
.hero__place { position: absolute; left: var(--pad); bottom: calc(var(--pad) * .5); }
.hero__address, .hero__place, .hero__note {
  font-size: clamp(16px, 1.6vw, 28px); text-transform: uppercase; letter-spacing: -.01em;
}
.hero__brand {
  font-weight: 700; text-transform: uppercase; letter-spacing: -.03em;
  font-size: min(clamp(30px, 4.3vw, 84px), 7.1svh); line-height: .9;
  color: var(--marfil-text);
}
.hero__title {
  position: relative; z-index: 2;
  display: inline-flex; flex-direction: column; align-self: flex-start;
  margin: .08em 0 0;
  font-weight: 500; font-size: min(var(--fs-hero), 18svh); line-height: .86;
  text-transform: uppercase; letter-spacing: -.035em;
  color: var(--white); mix-blend-mode: difference;
}
.hero__title .line { display: block; }
.hero__title .line--split { display: flex; justify-content: space-between; }
.bracket { display: inline-flex; align-items: center; }
.bracket__gap { display: inline-flex; align-items: flex-end; width: .72em; height: .7em; justify-content: center; }
.caret { width: .07em; height: .62em; background: currentColor; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.hero__place { }
.hero__note {
  position: absolute; right: var(--pad); bottom: calc(var(--pad) * .5);
  font-size: var(--fs-small);
}
.hero__photo {
  position: absolute; z-index: 1;
  --w: min(clamp(220px, 27vw, 520px), 66svh);
  right: calc(var(--pad) + 4vw); top: calc(50% - var(--w) * 2 / 3);
  width: var(--w);
}
.hero__photo img { aspect-ratio: 3 / 4; object-fit: cover; }

/* Variante B: titular stencil en SVG */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.title-svg { display: block; height: min(calc(var(--fs-hero) * 3.8), 63svh); width: auto; overflow: visible; }
/* Primero se dibuja el contorno, después se rellena */
.title-svg .p {
  fill: currentColor; fill-opacity: 0;
  stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round;
  stroke-dasharray: 1; stroke-dashoffset: 1;
}
body:not(.is-loading) .title-svg .p {
  stroke-dashoffset: 0; fill-opacity: 1;
  transition: stroke-dashoffset 1.7s cubic-bezier(.6, .1, .3, 1), fill-opacity .9s var(--ease);
  transition-delay: calc(.15s + var(--i) * .07s), calc(1.5s + var(--i) * .05s);
}

/* --------------------------------------------------------------------------
   2. Manifiesto (bloque justificado estilo lidiaconde)
   -------------------------------------------------------------------------- */
.manifesto {
  position: relative;
  min-height: 100svh;
  padding: 18vh var(--pad) var(--pad);
  display: flex; flex-direction: column;
}
.manifesto__text, .contact__text {
  position: relative; z-index: 2;
  font-size: var(--fs-block); line-height: 1.02; letter-spacing: -.01em;
  text-transform: uppercase;
  text-align: justify; text-align-last: left; hyphens: none;
  color: var(--white); mix-blend-mode: difference;
}
.manifesto__photo {
  position: relative; z-index: 1;
  align-self: flex-end;
  width: clamp(260px, 42vw, 820px);
  margin-top: calc(var(--fs-block) * -2.2);
  margin-right: 8vw;
}
.links {
  position: absolute; left: var(--pad); bottom: var(--pad); z-index: 3;
  font-size: var(--fs-small); text-transform: uppercase; line-height: 1.5;
}
.links a { position: relative; text-decoration: none; }

/* --------------------------------------------------------------------------
   3. El espacio (etiqueta chica + respuesta grande, estilo Emele)
   -------------------------------------------------------------------------- */
.space {
  padding: 22vh var(--pad) 18vh;
  text-align: center;
}
.section-title {
  margin: 0 0 12vh;
  font-weight: 500; font-size: var(--fs-hero); line-height: .86;
  text-transform: uppercase; letter-spacing: -.035em;
}
.row { max-width: 1400px; margin: 0 auto 10vh; }
.row:last-child { margin-bottom: 0; }
.big {
  font-weight: 500; font-size: var(--fs-big); line-height: 1;
  text-transform: uppercase; letter-spacing: -.02em;
}

/* --------------------------------------------------------------------------
   4. Galería
   -------------------------------------------------------------------------- */
.gallery {
  display: grid; grid-template-columns: repeat(12, 1fr);
  column-gap: var(--pad); row-gap: 14vh;
  padding: 6vh var(--pad) 20vh;
  align-items: start;
}
.g figcaption { margin-top: 10px; font-size: var(--fs-small); text-transform: uppercase; }

.g { overflow: hidden; }
.g--1 { grid-column: 1 / 8; }
.g--2 { grid-column: 9 / 13; margin-top: 24vh; }
.g--3 { grid-column: 2 / 6; }
.g--4 { grid-column: 7 / 12; margin-top: 16vh; }

/* --------------------------------------------------------------------------
   5. La casa
   -------------------------------------------------------------------------- */
.house {
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--pad);
  align-items: end;
  padding: 0 var(--pad) 22vh;
}
.house__photo { grid-column: 1 / 7; }
.house__info { grid-column: 8 / 13; padding-bottom: 2vh; }
.house__name {
  font-weight: 500; font-size: var(--fs-big); line-height: .95;
  text-transform: uppercase; letter-spacing: -.02em; margin-bottom: .6em;
}
.house__text { max-width: 30em; margin-bottom: 2.4em; }
.house__map {
  display: inline-block; font-size: var(--fs-small); text-transform: uppercase;
  text-underline-offset: 3px;
}

/* --------------------------------------------------------------------------
   6. Contacto (invertido)
   -------------------------------------------------------------------------- */
.contact {
  position: relative;
  min-height: 100svh;
  padding: 18vh var(--pad) var(--pad);
  background: var(--ink); color: var(--white);
  display: flex; flex-direction: column;
  isolation: isolate;
}
.contact__text a { text-decoration-thickness: .06em; text-underline-offset: .12em; }
.contact__text a:hover { text-decoration-thickness: .12em; }
.contact__photo {
  position: relative; z-index: 1;
  align-self: flex-end;
  width: clamp(220px, 26vw, 480px);
  margin-top: calc(var(--fs-block) * -1.6);
  margin-right: 12vw;
}
.contact__photo img { aspect-ratio: 3 / 4; object-fit: cover; }

/* --------------------------------------------------------------------------
   7. Cierre
   -------------------------------------------------------------------------- */
.footer {
  background: var(--marfil); color: var(--green);
  padding: var(--pad) var(--pad) 0;
  overflow: hidden;
}
.footer__meta {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: var(--fs-small); text-transform: uppercase;
}
.footer__meta a { text-decoration: none; }
/* Logo horizontal tipografiado (nítido a cualquier tamaño) */
.logo-h { margin-top: 12vh; padding-bottom: calc(var(--pad) * .6); }
.logo-h__inner { display: inline-block; font-weight: 700; text-transform: uppercase; line-height: .8; white-space: nowrap; }
.logo-h__main { font-size: 11vw; letter-spacing: -.03em; } /* main.js ajusta al ancho exacto */
.logo-h__top {
  display: flex; justify-content: space-between;
  font-size: .43em; letter-spacing: -.01em; font-weight: 500;
  margin-bottom: .12em;
}

/* --------------------------------------------------------------------------
   Texto que se "escribe" con el scroll
   -------------------------------------------------------------------------- */
.w { opacity: .14; transition: opacity .25s linear; }
.w.on { opacity: 1; }

/* --------------------------------------------------------------------------
   Variante B: el fondo se alterna blanco / negro según la sección en pantalla
   -------------------------------------------------------------------------- */
.v-b { transition: background-color .9s var(--ease), color .9s var(--ease); }
.v-b.is-dark { background: var(--ink); color: var(--white); }
.v-b .contact { background: transparent; }

/* --------------------------------------------------------------------------
   Fotos: entran desenfocadas y hacen foco
   -------------------------------------------------------------------------- */
figure.reveal { opacity: 1; transform: none; }
figure.reveal, .hero__photo { overflow: hidden; }
figure.reveal img, .hero__photo img {
  opacity: 0; filter: blur(22px); transform: scale(1.08);
  transition: opacity 1.2s var(--ease), filter 1.8s var(--ease), transform 2.2s var(--ease);
}
figure.reveal.is-in img { opacity: 1; filter: blur(0); transform: none; }
body:not(.is-loading) .hero__photo img { opacity: 1; filter: blur(0); transform: none; transition-delay: .55s; }
.g.is-in:hover img { transform: scale(1.02); transition: transform 1.2s var(--ease); }

/* --------------------------------------------------------------------------
   Reveal on scroll
   -------------------------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  figure.reveal img, .hero__photo img { opacity: 1; filter: none; transform: none; transition: none; }
  .title-svg .p { fill-opacity: 1; stroke-dashoffset: 0; transition: none; }
  .intro { transition: opacity .6s ease; }
  .intro.is-gone { transform: translateY(-100%); opacity: 0; }
  .facade .s, .facade .g { stroke-dashoffset: 0; }
  .facade .txt { opacity: 1; }
  .intro__more span { animation: none; }
  .caret { animation: none; }
}

/* --------------------------------------------------------------------------
   Mobile / tablet
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .header { grid-template-columns: 1fr auto; }
  .header__meta, .header__nav { display: none; }
  .intro__stage { gap: 14px; padding-bottom: 60px; }
  .intro .facade { width: 100%; height: auto; max-height: 66vh; }

  :root { --fs-hero: 14vw; --fs-block: 7.4vw; --fs-big: 8.4vw; }
  .title-svg { width: 100%; height: auto; }
  .hero__address, .hero__place { position: static; }
  .hero__main { margin: 40px 0 28px; }
  .manifesto__text, .contact__text { text-align: left; }

  .hero__photo {
    position: relative; right: auto; top: auto;
    align-self: flex-end; width: 58%;
    margin-top: -10vw; margin-right: 0;
  }


  .manifesto, .contact { padding-top: 14vh; padding-bottom: calc(var(--pad) + 90px); }
  .manifesto__photo { width: 78%; margin-right: 0; margin-top: -6vw; }
  .contact__photo { width: 56%; margin-right: 0; margin-top: -4vw; }

  .space { padding: 14vh var(--pad); }
  .section-title { margin-bottom: 8vh; }

  .gallery { grid-template-columns: repeat(6, 1fr); row-gap: 8vh; padding-bottom: 14vh; }
  .g--1 { grid-column: 1 / -1; }
  .g--2 { grid-column: 3 / -1; margin-top: 0; }
  .g--3 { grid-column: 1 / 5; }
  .g--4 { grid-column: 2 / -1; margin-top: 0; }

  .house { grid-template-columns: 1fr; row-gap: 40px; padding-bottom: 14vh; }
  .house__photo, .house__info { grid-column: 1 / -1; }
}
