/* ==========================================================================
   Juan Cruz Peralta — Arquitecto
   Paleta: papel / hormigón / grafito + acento corten
   ========================================================================== */

:root {
  --paper: #ECEAE5;
  --paper-2: #E2DFD8;
  --paper-3: #D6D2C9;
  --ink: #141413;
  --ink-2: #252422;
  --stone: #7D7970;
  --line: rgba(20, 20, 19, .12);
  --line-strong: rgba(20, 20, 19, .32);
  --line-dark: rgba(236, 234, 229, .14);
  --accent: #B04F27;

  --sans: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  --gutter: clamp(16px, 3vw, 40px);
  --header-h: 72px;
  --ease: cubic-bezier(.76, 0, .24, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, video, canvas, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4, p, dl, dd, figure, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
::selection { background: var(--ink); color: var(--paper); }

.mono {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .06em;
  text-transform: uppercase;
  line-height: 1.4;
}
.serif { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; }
.muted { color: var(--stone); }
.center { display: flex; justify-content: center; margin-top: clamp(48px, 6vw, 88px); }
.label { color: var(--stone); display: inline-block; }
.dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); margin-right: 8px; vertical-align: 1px;
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .25; } }

/* ---------- Grilla de fondo (líneas de plano) ---------- */
.gridlines {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  display: grid; grid-template-columns: repeat(4, 1fr) 0;
  padding: 0 var(--gutter);
}
.gridlines span { border-left: 1px solid var(--line); opacity: .55; }
main, .footer { position: relative; z-index: 1; }

/* ---------- Header ---------- */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  height: var(--header-h);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 0 var(--gutter);
  color: #fff; mix-blend-mode: difference;
  transition: transform .6s var(--ease);
}
.header.is-hidden { transform: translateY(-100%); }
.logo {
  font-size: 16px; font-weight: 500; letter-spacing: -.02em; white-space: nowrap;
  justify-self: start;
}
.nav { display: flex; gap: clamp(16px, 2.4vw, 36px); }
.nav__link { position: relative; font-size: 14px; display: inline-flex; gap: 6px; align-items: baseline; }
.nav__link .mono { font-size: 9px; opacity: .55; }
.nav__link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform .5s var(--ease);
}
.nav__link:hover::after, .nav__link.is-active::after { transform: scaleX(1); transform-origin: left; }
.header__meta { justify-self: end; display: flex; align-items: center; }
.header__meta .dot { background: #fff; }
.burger { display: none; width: 36px; height: 36px; justify-self: end; position: relative; }
.burger span { position: absolute; left: 6px; right: 6px; height: 1.5px; background: currentColor; transition: transform .5s var(--ease); }
.burger span:first-child { top: 14px; }
.burger span:last-child { top: 21px; }
body.menu-open .burger span:first-child { transform: translateY(3.5px) rotate(45deg); }
body.menu-open .burger span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 55; background: var(--ink); color: var(--paper);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: calc(var(--header-h) + 40px) var(--gutter) 32px;
  clip-path: inset(0 0 100% 0); transition: clip-path .8s var(--ease);
}
body.menu-open .menu { clip-path: inset(0 0 0 0); }
.menu__nav { display: flex; flex-direction: column; }
.menu__link {
  font-size: clamp(40px, 11vw, 72px); font-weight: 500; letter-spacing: -.04em; line-height: 1.1;
  border-bottom: 1px solid var(--line-dark); padding: 8px 0;
  display: flex; gap: 14px; align-items: baseline;
  transform: translateY(30px); opacity: 0; transition: transform .8s var(--ease-out), opacity .8s;
}
.menu__link .mono { font-size: 11px; color: var(--stone); }
body.menu-open .menu__link { transform: none; opacity: 1; }
body.menu-open .menu__link:nth-child(2) { transition-delay: .06s; }
body.menu-open .menu__link:nth-child(3) { transition-delay: .12s; }
body.menu-open .menu__link:nth-child(4) { transition-delay: .18s; }
body.menu-open .menu__link:nth-child(5) { transition-delay: .24s; }
.menu__foot { display: flex; justify-content: space-between; color: var(--stone); gap: 16px; flex-wrap: wrap; }

/* ---------- Loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 100; background: var(--ink); color: var(--paper);
  display: flex; align-items: center; justify-content: center;
  transition: clip-path 1.1s var(--ease);
  clip-path: inset(0 0 0 0);
}
.loader.is-done { clip-path: inset(0 0 100% 0); }
.loader.is-skip { display: none; }
.loader__grid {
  position: absolute; inset: 0; display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 0 var(--gutter);
}
.loader__grid span { border-left: 1px solid var(--line-dark); transform: scaleY(0); transform-origin: top; animation: growY 1.2s var(--ease) forwards; }
.loader__grid span:nth-child(2) { animation-delay: .08s; }
.loader__grid span:nth-child(3) { animation-delay: .16s; }
.loader__grid span:nth-child(4) { animation-delay: .24s; }
@keyframes growY { to { transform: scaleY(1); } }
.loader__name { overflow: hidden; font-size: 18px; font-weight: 500; letter-spacing: -.02em; }
.loader__name span { display: block; transform: translateY(100%); animation: up .9s .3s var(--ease-out) forwards; }
@keyframes up { to { transform: none; } }
.loader__count {
  position: absolute; right: var(--gutter); bottom: 24px; display: flex; align-items: baseline; gap: 6px;
}
.loader__num { font-family: var(--sans); font-size: clamp(56px, 10vw, 140px); font-weight: 300; letter-spacing: -.05em; line-height: .8; font-variant-numeric: tabular-nums; text-transform: none; }

/* ---------- Transición entre páginas ---------- */
.transition {
  position: fixed; inset: 0; z-index: 90; background: var(--ink); pointer-events: none;
  transform: translateY(100%);
}
body.is-leaving .transition { transform: translateY(0); transition: transform .65s var(--ease); }
body.is-entering .transition { transform: translateY(0); }
body.is-entered .transition { transform: translateY(-100%); transition: transform .8s var(--ease); }

/* ---------- Cursor ---------- */
.cursor {
  position: fixed; top: 0; left: 0; z-index: 95; pointer-events: none;
  width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%;
  background: #fff; mix-blend-mode: difference;
  display: grid; place-items: center;
  transition: width .45s var(--ease-out), height .45s var(--ease-out), margin .45s var(--ease-out), opacity .3s;
  opacity: 0;
}
.cursor.is-visible { opacity: 1; }
.cursor.is-hover { width: 44px; height: 44px; margin: -22px 0 0 -22px; }
.cursor.is-label { width: 96px; height: 96px; margin: -48px 0 0 -48px; mix-blend-mode: normal; background: var(--ink); }
.cursor__label { color: var(--paper); opacity: 0; transition: opacity .3s; font-size: 10px; }
.cursor.is-label .cursor__label { opacity: 1; }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* ---------- Reveal ---------- */
[data-reveal] { opacity: 0; transform: translateY(36px); transition: opacity 1s var(--ease-out), transform 1.2s var(--ease-out); }
[data-reveal].is-in { opacity: 1; transform: none; }
/* El recorte va en los hijos: un contenedor recortado al 100% no dispara el IntersectionObserver */
[data-reveal="clip"] { opacity: 1; transform: none; background: transparent !important; }
[data-reveal="clip"] > * { clip-path: inset(100% 0 0 0); transition: clip-path 1.4s var(--ease); }
[data-reveal="clip"] img { transform: scale(1.25); transition: transform 1.8s var(--ease), clip-path 1.4s var(--ease); }
[data-reveal="clip"].is-in > * { clip-path: inset(0 0 0 0); }
[data-reveal="clip"].is-in img { transform: scale(1); }
[data-reveal="clip"].is-in img[data-parallax] { transform: none; }
.hero__tag, .hero__disciplines, .hero__scroll, .hero__badge, .hero__meta { opacity: 0; transform: translateY(16px); }
body.is-ready .hero__tag, body.is-ready .hero__disciplines, body.is-ready .hero__scroll,
body.is-ready .hero__badge, body.is-ready .hero__meta { opacity: 1; transform: none; transition: opacity 1s .7s, transform 1.2s .7s var(--ease-out); }

/* ---------- Botones y links ---------- */
.btn {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; gap: 14px;
  padding: 18px 28px; border: 1px solid var(--ink); border-radius: 999px;
  font-size: 15px; font-weight: 500; letter-spacing: -.01em;
  transition: color .5s var(--ease);
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--ink);
  transform: translateY(101%); transition: transform .55s var(--ease); border-radius: inherit;
}
.btn:hover { color: var(--paper); }
.btn:hover::before { transform: none; }
.btn__arrow { transition: transform .5s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(5px); }
.btn--dark { background: var(--ink); color: var(--paper); }
.btn--dark::before { background: var(--accent); }
.btn--ghost { border-color: var(--line-strong); }
.btn[disabled] { opacity: .5; pointer-events: none; }

.link-line { position: relative; display: inline-block; width: fit-content; }
.link-line::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: currentColor;
  transform-origin: right; transition: transform .5s var(--ease);
}
.link-line:hover::after { transform: scaleX(0); }
.back { display: inline-block; margin-bottom: 32px; color: var(--stone); transition: color .3s; }
.back:hover { color: var(--ink); }

/* ---------- Secciones ---------- */
.section { padding: clamp(96px, 13vw, 200px) var(--gutter); }
.section--tight { padding-top: 0; }
.section__head {
  display: grid; grid-template-columns: repeat(4, 1fr); align-items: end; gap: 0 var(--gutter);
  margin-bottom: clamp(40px, 6vw, 88px);
}
.section__head .label { grid-column: 1; align-self: start; padding-top: 1.1em; }
.section__title {
  grid-column: 2 / -1;
  font-size: clamp(44px, 7vw, 120px); font-weight: 500; letter-spacing: -.045em; line-height: .92;
}

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  padding: calc(var(--header-h) + 24px) var(--gutter) 32px;
  display: flex; flex-direction: column; justify-content: space-between; overflow: hidden;
}
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero__meta, .hero__title, .hero__bottom, .hero__badge { position: relative; z-index: 1; }
.hero__meta { display: grid; grid-template-columns: repeat(4, 1fr); color: var(--stone); }
.hero__meta span:last-child { grid-column: 4; }
.hero__title {
  font-size: clamp(64px, 15.2vw, 270px); font-weight: 500; letter-spacing: -.06em; line-height: .84;
  margin: auto 0 clamp(24px, 4vw, 56px); margin-left: -.04em;
}
.hero__line { display: block; overflow: hidden; padding-bottom: .04em; white-space: nowrap; }
.hero__line:nth-child(2) { padding-left: 25%; }
.char { display: inline-block; transform: translateY(105%); }
body.is-ready .char { transform: none; transition: transform 1.2s var(--ease-out); transition-delay: calc(var(--i) * 35ms + .1s); }
.hero__bottom {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gutter); align-items: end;
  border-top: 1px solid var(--line-strong); padding-top: 20px;
}
.hero__tag { grid-column: 1 / span 2; font-size: clamp(17px, 1.5vw, 22px); line-height: 1.35; letter-spacing: -.015em; max-width: 34ch; }
.hero__disciplines { color: var(--stone); display: grid; gap: 4px; }
.hero__scroll { justify-self: end; display: flex; align-items: center; gap: 12px; }
.hero__scroll-line { width: 1px; height: 44px; background: var(--line-strong); position: relative; overflow: hidden; }
.hero__scroll-line::after {
  content: ""; position: absolute; left: 0; top: 0; width: 1px; height: 40%; background: var(--ink);
  animation: scrollLine 2s var(--ease) infinite;
}
@keyframes scrollLine { from { transform: translateY(-100%); } to { transform: translateY(260%); } }
.hero__badge {
  position: absolute; top: calc(var(--header-h) + 64px); right: var(--gutter);
  padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: 999px; background: rgba(236, 234, 229, .7);
  backdrop-filter: blur(6px);
}

/* ---------- Perfil ---------- */
.about__statement {
  font-size: clamp(28px, 4.3vw, 70px); font-weight: 400; letter-spacing: -.035em; line-height: 1.06;
  max-width: 19em; margin-left: 25%; margin-bottom: clamp(72px, 10vw, 160px);
}
.about__statement .w { opacity: .14; transition: opacity .25s linear; }
.about__statement .w.is-on { opacity: 1; }
.about__grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gutter); align-items: start; }
.about__photo { grid-column: 1 / span 5; position: relative; }
.about__photo > img, .about__mono { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--paper-2); }
.about__photo { overflow: hidden; }
.about__photo figcaption { margin-top: 12px; color: var(--stone); }
.about__mono {
  display: grid; place-items: center;
  background-color: var(--paper-2);
  background-image: repeating-linear-gradient(-45deg, transparent 0 14px, var(--line) 14px 15px);
}
.about__mono span { font-family: var(--serif); font-style: italic; font-size: clamp(90px, 13vw, 200px); letter-spacing: -.04em; line-height: 1; }
.about__text { grid-column: 7 / span 6; padding-top: 8px; }
.about__text .prose p { font-size: clamp(17px, 1.3vw, 20px); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gutter); margin-top: 64px; }
.stats__item { border-top: 1px solid var(--line-strong); padding-top: 14px; }
.stats dt { color: var(--stone); min-height: 2.8em; }
.stats dd { font-size: clamp(44px, 5vw, 80px); font-weight: 400; letter-spacing: -.05em; line-height: 1; font-variant-numeric: tabular-nums; }

/* ---------- Servicios ---------- */
.services__list { border-bottom: 1px solid var(--line-strong); }
.services__row {
  display: grid; grid-template-columns: 1fr 2fr 1fr 40px; gap: var(--gutter); align-items: center;
  border-top: 1px solid var(--line-strong); padding: clamp(20px, 2.6vw, 36px) 0;
  position: relative;
}
.services__row::before {
  content: ""; position: absolute; inset: 0; background: var(--ink); z-index: -1;
  transform: scaleY(0); transform-origin: bottom; transition: transform .6s var(--ease);
}
.services__num { color: var(--stone); transition: color .4s; }
.services__name { font-size: clamp(26px, 3.4vw, 54px); font-weight: 500; letter-spacing: -.04em; line-height: 1; transition: transform .6s var(--ease), color .4s; }
.services__desc { color: var(--stone); font-size: 15px; max-width: 34ch; opacity: .0; transform: translateY(8px); transition: opacity .5s, transform .6s var(--ease-out); }
.services__plus { width: 16px; height: 16px; position: relative; justify-self: end; transition: transform .6s var(--ease); }
.services__plus::before, .services__plus::after { content: ""; position: absolute; background: currentColor; }
.services__plus::before { left: 0; right: 0; top: 7.5px; height: 1px; }
.services__plus::after { top: 0; bottom: 0; left: 7.5px; width: 1px; }
.services__list { isolation: isolate; }
@media (hover: hover) {
  .services__row:hover { color: var(--paper); }
  .services__row:hover::before { transform: scaleY(1); }
  .services__row:hover .services__name { transform: translateX(16px); }
  .services__row:hover .services__num { color: var(--accent); }
  .services__row:hover .services__desc { opacity: 1; transform: none; color: rgba(236, 234, 229, .7); }
  .services__row:hover .services__plus { transform: rotate(45deg); }
}
@media (hover: none) { .services__desc { opacity: 1; transform: none; } }

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); padding: 22px 0; position: relative; z-index: 1; background: var(--paper); }
.marquee__track { display: flex; width: max-content; animation: marquee 45s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__group { display: flex; align-items: center; gap: 36px; padding-right: 36px; }
.marquee__group span { font-size: clamp(32px, 4.6vw, 72px); font-weight: 400; letter-spacing: -.04em; white-space: nowrap; line-height: 1.1; }
.marquee__group span:nth-of-type(even) { font-family: var(--serif); font-style: italic; }
.marquee__group i { font-style: normal; color: var(--accent); font-size: 20px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- En curso (scroll horizontal) ---------- */
.ongoing { background: var(--ink); color: var(--paper); position: relative; z-index: 1; }
.ongoing__sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: flex; flex-direction: column; justify-content: center; padding: var(--header-h) 0 40px; }
.ongoing__head { padding: 0 var(--gutter); margin-bottom: clamp(28px, 4vw, 56px); }
.ongoing__head .section__title { grid-column: 2 / span 2; }
.ongoing__count { grid-column: 4; justify-self: end; color: var(--stone); padding-bottom: .6em; }
.ongoing__track { display: flex; gap: clamp(20px, 2.5vw, 40px); padding: 0 var(--gutter); will-change: transform; }
.ocard { flex: 0 0 clamp(290px, 36vw, 560px); display: block; }
.ocard__img { position: relative; aspect-ratio: 16 / 11; overflow: hidden; background: var(--ink-2); }
.ocard__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out); filter: grayscale(.25); }
.ocard:hover .ocard__img img { transform: scale(1.05); filter: none; }
.ocard__stage { position: absolute; left: 14px; top: 14px; background: var(--paper); color: var(--ink); padding: 6px 10px; }
.ocard__body { padding-top: 18px; display: grid; gap: 6px; }
.ocard__idx { color: var(--stone); }
.ocard h3 { font-size: clamp(24px, 2.4vw, 36px); font-weight: 500; letter-spacing: -.035em; line-height: 1.05; }
.progress { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; margin-top: 12px; }
.progress__bar { height: 1px; background: var(--line-dark); position: relative; overflow: hidden; }
.progress__bar span { position: absolute; inset: 0; background: var(--accent); transform-origin: left; transform: scaleX(0); transition: transform 1.6s var(--ease); }
.progress.is-in .progress__bar span, .is-in .progress__bar span { transform: scaleX(calc(var(--p) / 100)); }
.progress__val { font-variant-numeric: tabular-nums; }
.progress--lg { grid-template-columns: auto 1fr auto; margin-top: 32px; }
.progress--lg .progress__bar { background: var(--line-strong); height: 2px; }

/* ---------- Proyectos (home) ---------- */
.spotlight { display: block; margin-bottom: clamp(72px, 9vw, 140px); }
.spotlight__img { aspect-ratio: 16 / 9; overflow: hidden; background: var(--paper-2); }
.spotlight__img img { width: 100%; height: 115%; object-fit: cover; }
.spotlight__info { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gutter); padding-top: 20px; align-items: start; }
.spotlight__info .mono { color: var(--stone); padding-top: .9em; }
.spotlight__info h3 { grid-column: 2 / span 2; font-size: clamp(32px, 4.2vw, 68px); font-weight: 500; letter-spacing: -.045em; line-height: .98; }
.spotlight__info p { color: var(--stone); font-size: 15px; }

.index { border-bottom: 1px solid var(--line-strong); }
.index__head, .index__row {
  display: grid; grid-template-columns: 1fr 2fr 1fr 1fr 80px; gap: var(--gutter); align-items: baseline;
}
.index__head { color: var(--stone); padding-bottom: 12px; }
.index__row { border-top: 1px solid var(--line-strong); padding: clamp(18px, 2vw, 28px) 0; transition: opacity .4s, color .4s; }
.index__row > span:last-child { justify-self: end; }
.index__head > span:last-child { justify-self: end; }
.index__title { font-size: clamp(24px, 2.8vw, 44px); font-weight: 500; letter-spacing: -.04em; line-height: 1; transition: transform .6s var(--ease); }
@media (hover: hover) {
  .index:hover .index__row { opacity: .3; }
  .index .index__row:hover { opacity: 1; }
  .index__row:hover .index__title { transform: translateX(14px); }
}

.hover-preview {
  position: fixed; top: 0; left: 0; z-index: 40; pointer-events: none;
  width: clamp(260px, 24vw, 400px); aspect-ratio: 4 / 3;
}
.hover-preview__inner {
  width: 100%; height: 100%; background-size: cover; background-position: center; background-color: var(--paper-3);
  clip-path: inset(50% 50% 50% 50%); transition: clip-path .6s var(--ease);
}
.hover-preview.is-on .hover-preview__inner { clip-path: inset(0 0 0 0); }
@media (hover: none) { .hover-preview { display: none; } }

/* ---------- Tarjetas (blog) ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gutter); }
.cards--2 { grid-template-columns: repeat(2, 1fr); }
.card { display: block; }
.card__img { aspect-ratio: 4 / 3; overflow: hidden; background: var(--paper-2); margin-bottom: 16px; }
.card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out); }
.card:hover .card__img img { transform: scale(1.06); }
.card__meta { display: flex; justify-content: space-between; color: var(--stone); border-top: 1px solid var(--line-strong); padding-top: 10px; margin-bottom: 12px; }
.card__title { font-size: clamp(22px, 2vw, 30px); font-weight: 500; letter-spacing: -.03em; line-height: 1.08; margin-bottom: 8px; }
.card__excerpt { font-size: 15px; }

/* ---------- Contacto ---------- */
.contact { padding: clamp(96px, 12vw, 180px) var(--gutter); background: var(--paper-2); position: relative; z-index: 1; }
.contact__inner { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gutter); }
.contact__head { grid-column: 1 / span 6; display: flex; flex-direction: column; gap: 28px; }
.contact__title { font-size: clamp(48px, 7vw, 124px); font-weight: 500; letter-spacing: -.05em; line-height: .9; }
.contact__info { display: flex; flex-direction: column; gap: 10px; font-size: clamp(18px, 1.6vw, 24px); margin-top: auto; }
.form { grid-column: 8 / span 5; display: flex; flex-direction: column; gap: 28px; padding-top: 8px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.field { position: relative; }
.field input, .field textarea {
  width: 100%; border: 0; border-bottom: 1px solid var(--line-strong); background: transparent;
  font: inherit; font-size: 18px; color: var(--ink); padding: 26px 0 10px; border-radius: 0; outline: none; resize: vertical;
  transition: border-color .3s;
}
.field textarea { min-height: 120px; }
.field label {
  position: absolute; left: 0; top: 26px; color: var(--stone); font-size: 18px; pointer-events: none;
  transform-origin: left top; transition: transform .45s var(--ease-out), color .3s;
}
.field input:focus, .field textarea:focus { border-color: var(--ink); }
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label { transform: translateY(-24px) scale(.72); color: var(--ink); }
.field::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease); }
.field:focus-within::after { transform: scaleX(1); }
.field.is-error input, .field.is-error textarea { border-color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: 999px; transition: background .3s, color .3s, border-color .3s; }
.chip:hover { border-color: var(--ink); }
.chip.is-on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.form__foot { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.form__status { color: var(--stone); max-width: 32ch; }
.form__status.is-ok { color: var(--ink); }
.form__status.is-error { color: var(--accent); }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: var(--paper); padding: clamp(64px, 8vw, 120px) var(--gutter) 24px; overflow: hidden; }
.footer__top { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gutter); }
.footer__col { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; font-size: 15px; }
.footer__col .label { margin-bottom: 8px; }
.footer__col--end { align-items: flex-end; justify-content: flex-start; }
.footer__name {
  font-size: 12.6vw; font-weight: 500; letter-spacing: -.065em; line-height: .78; white-space: nowrap;
  margin: clamp(64px, 10vw, 160px) 0 24px -.04em;
}
.footer__bottom { display: flex; justify-content: space-between; gap: 16px; color: var(--stone); border-top: 1px solid var(--line-dark); padding-top: 16px; flex-wrap: wrap; }

/* ---------- Páginas internas ---------- */
.page-hero { padding: calc(var(--header-h) + clamp(80px, 12vw, 160px)) var(--gutter) clamp(48px, 6vw, 88px); }
.page-hero__title { font-size: clamp(64px, 13vw, 230px); font-weight: 500; letter-spacing: -.06em; line-height: .86; margin: 18px 0 0 -.04em; }
.page-hero--center { min-height: 80vh; display: flex; flex-direction: column; justify-content: center; gap: 24px; align-items: flex-start; }
.filters { display: flex; gap: 8px; margin-top: 40px; flex-wrap: wrap; }
.filter { padding: 10px 16px; border: 1px solid var(--line-strong); border-radius: 999px; transition: background .3s, color .3s; }
.filter sup { font-size: 9px; margin-left: 2px; }
.filter.is-active, .filter:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.grid-projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(48px, 6vw, 96px) var(--gutter); }
.pcard { display: block; }
.pcard.is-hidden { display: none; }
.pcard__img { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--paper-2); }
.pcard__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease-out); }
.pcard:hover .pcard__img img { transform: scale(1.05); }
.pcard .tag { position: absolute; left: 14px; top: 14px; background: var(--paper); padding: 7px 11px; }
.pcard__info { display: grid; grid-template-columns: 48px 1fr auto; align-items: baseline; gap: 12px; border-top: 1px solid var(--line-strong); margin-top: 16px; padding-top: 12px; }
.pcard__info h2 { font-size: clamp(24px, 2.4vw, 38px); font-weight: 500; letter-spacing: -.04em; line-height: 1.05; }
.pcard__sub { padding-left: 60px; margin-top: 4px; font-size: 15px; }
@media (min-width: 901px) { .grid-projects .pcard:nth-child(even) { margin-top: 140px; } }

/* Proyecto */
.project__head { padding: calc(var(--header-h) + clamp(64px, 9vw, 130px)) var(--gutter) clamp(40px, 5vw, 72px); }
.project__title { font-size: clamp(52px, 10vw, 180px); font-weight: 500; letter-spacing: -.06em; line-height: .88; margin-left: -.04em; }
.project__lead { font-size: clamp(20px, 2vw, 30px); letter-spacing: -.02em; line-height: 1.25; max-width: 30ch; margin: 32px 0 0 50%; }
.project__cover { height: min(92vh, 56vw); overflow: hidden; background: var(--paper-2); }
.project__cover img { width: 100%; height: 118%; object-fit: cover; }
.project__layout { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gutter); padding: clamp(64px, 9vw, 140px) var(--gutter); }
.project__meta { grid-column: 1 / span 4; align-self: start; position: sticky; top: calc(var(--header-h) + 24px); }
.project__meta dl > div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; border-top: 1px solid var(--line-strong); padding: 12px 0; }
.project__meta dl > div:last-child { border-bottom: 1px solid var(--line-strong); }
.project__meta dt { color: var(--stone); padding-top: .25em; }
.project__body { grid-column: 6 / span 7; }
.project__video { margin: 0 var(--gutter) clamp(64px, 8vw, 120px); aspect-ratio: 16 / 9; background: var(--ink); }
.project__video iframe { width: 100%; height: 100%; border: 0; }
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gutter); padding: 0 var(--gutter); }
.gallery__item { overflow: hidden; }
.gallery__item--wide { grid-column: 1 / -1; }
.gallery__item img, .gallery__item video { width: 100%; height: auto; background: var(--paper-2); cursor: zoom-in; }
.gallery__item video { cursor: auto; }
.gallery__item figcaption { color: var(--stone); padding-top: 10px; }

.next {
  display: block; position: relative; margin-top: clamp(96px, 12vw, 180px); padding: clamp(64px, 8vw, 120px) var(--gutter);
  border-top: 1px solid var(--line-strong); overflow: hidden;
}
.next__title { display: block; font-size: clamp(52px, 10vw, 180px); font-weight: 500; letter-spacing: -.06em; line-height: .9; margin-top: 16px; position: relative; z-index: 1; transition: transform .8s var(--ease); }
.next__img { position: absolute; right: var(--gutter); top: 50%; width: clamp(200px, 26vw, 420px); aspect-ratio: 4 / 3; transform: translateY(-50%); clip-path: inset(0 0 0 100%); transition: clip-path .9s var(--ease); }
.next__img img { width: 100%; height: 100%; object-fit: cover; }
.next:hover .next__img { clip-path: inset(0 0 0 0); }
.next:hover .next__title { transform: translateX(16px); }

/* Blog */
.posts { border-bottom: 1px solid var(--line-strong); }
.post-row { display: grid; grid-template-columns: 1fr 2fr 1fr; gap: var(--gutter); border-top: 1px solid var(--line-strong); padding: clamp(24px, 3vw, 40px) 0; align-items: start; transition: opacity .4s; }
.post-row__title { font-size: clamp(26px, 3.2vw, 50px); font-weight: 500; letter-spacing: -.04em; line-height: 1; margin-bottom: 12px; transition: transform .6s var(--ease); }
.post-row__cat { justify-self: end; color: var(--stone); }
@media (hover: hover) {
  .posts:hover .post-row { opacity: .35; }
  .posts .post-row:hover { opacity: 1; }
  .post-row:hover .post-row__title { transform: translateX(12px); }
}

.article__head { padding: calc(var(--header-h) + clamp(64px, 9vw, 120px)) var(--gutter) clamp(40px, 5vw, 64px); max-width: 1100px; margin: 0 auto; }
.article__meta { display: flex; gap: 24px; flex-wrap: wrap; color: var(--stone); margin-bottom: 24px; }
.article__title { font-size: clamp(44px, 7vw, 110px); font-weight: 500; letter-spacing: -.05em; line-height: .92; }
.article__lead { font-size: clamp(20px, 1.8vw, 26px); letter-spacing: -.015em; line-height: 1.3; color: var(--stone); margin-top: 28px; max-width: 36ch; }
.article__cover { margin: 0 var(--gutter); height: min(80vh, 50vw); overflow: hidden; background: var(--paper-2); }
.article__cover img { width: 100%; height: 115%; object-fit: cover; }
.article__body { max-width: 720px; margin: 0 auto; padding: clamp(56px, 7vw, 110px) var(--gutter) 40px; box-sizing: content-box; }
.article__share { max-width: 720px; margin: 0 auto 40px; padding: 20px var(--gutter) 0; box-sizing: content-box; display: flex; gap: 20px; flex-wrap: wrap; color: var(--stone); border-top: 1px solid var(--line-strong); }
.article__share a, .article__share button { color: var(--ink); text-transform: inherit; letter-spacing: inherit; font: inherit; }
.article__share a:hover, .article__share button:hover { color: var(--accent); }

/* Prosa */
.prose { font-size: 18px; line-height: 1.65; }
.prose > * + * { margin-top: 1.1em; }
.prose h2, .prose h3, .prose h4 { font-size: clamp(24px, 2.2vw, 32px); font-weight: 500; letter-spacing: -.03em; line-height: 1.15; margin-top: 1.8em; }
.prose h2:first-child { margin-top: 0; }
.prose a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose a:hover { color: var(--accent); }
.prose blockquote { margin: 1.8em 0; padding-left: 24px; border-left: 2px solid var(--accent); font-family: var(--serif); font-style: italic; font-size: clamp(26px, 2.6vw, 38px); line-height: 1.15; letter-spacing: -.01em; }
.prose ul, .prose ol { padding-left: 0; }
.prose ul li, .prose ol li { position: relative; padding: 10px 0 10px 36px; border-top: 1px solid var(--line); }
.prose ul li:last-child, .prose ol li:last-child { border-bottom: 1px solid var(--line); }
.prose ul li::before { content: "—"; position: absolute; left: 0; color: var(--accent); }
.prose ol { counter-reset: n; }
.prose ol li { counter-increment: n; }
.prose ol li::before { content: counter(n, decimal-leading-zero); position: absolute; left: 0; font-family: var(--mono); font-size: 11px; top: 15px; color: var(--accent); }
.prose figure img { width: 100%; }
.prose figcaption { font-family: var(--mono); font-size: 11px; text-transform: uppercase; color: var(--stone); margin-top: 8px; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 80; background: rgba(20, 20, 19, .96); display: grid; place-items: center; opacity: 0; pointer-events: none; transition: opacity .4s; }
.lightbox.is-open { opacity: 1; pointer-events: auto; }
.lightbox img { max-width: 88vw; max-height: 84vh; object-fit: contain; }
.lightbox__close { position: absolute; top: 24px; right: var(--gutter); color: var(--paper); }
.lightbox__nav { position: absolute; top: 50%; transform: translateY(-50%); color: var(--paper); font-size: 28px; padding: 20px; }
.lightbox__prev { left: 8px; }
.lightbox__next { right: 8px; }
.lightbox__count { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); color: var(--stone); }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 70; transform: translate(-50%, 140%); background: var(--ink); color: var(--paper); padding: 14px 20px; font-size: 14px; border-radius: 999px; transition: transform .6s var(--ease); max-width: calc(100vw - 32px); }
.toast.is-visible { transform: translate(-50%, 0); }
.toast--error { background: var(--accent); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .nav { gap: 18px; }
  .nav__link .mono { display: none; }
}
@media (max-width: 900px) {
  :root { --header-h: 64px; }
  .gridlines { grid-template-columns: repeat(2, 1fr) 0; }
  .gridlines span:nth-child(n+3):not(:last-child) { display: none; }
  .header { grid-template-columns: 1fr auto; }
  .nav, .header__meta { display: none; }
  .burger { display: block; }
  .hide-sm { display: none !important; }

  .hero__meta { grid-template-columns: 1fr 1fr; }
  .hero__meta span:last-child { grid-column: 2; justify-self: end; }
  .hero__line:nth-child(2) { padding-left: 0; }
  .hero__bottom { grid-template-columns: 1fr 1fr; }
  .hero__tag { grid-column: 1 / -1; }
  .hero__badge { top: auto; bottom: 200px; left: var(--gutter); right: auto; }

  .section__head { grid-template-columns: 1fr; gap: 16px; }
  .section__head .label, .section__title { grid-column: 1; padding-top: 0; }
  .about__statement { margin-left: 0; }
  .about__photo, .about__text { grid-column: 1 / -1; }
  .stats { grid-template-columns: 1fr 1fr; }
  .services__row { grid-template-columns: 40px 1fr 24px; }
  .services__desc { grid-column: 2 / 3; grid-row: 2; }
  .services__plus { grid-column: 3; grid-row: 1; }

  .ongoing { height: auto !important; }
  .ongoing__sticky { position: relative; height: auto; padding: 96px 0; }
  .ongoing__head .section__title, .ongoing__count { grid-column: 1; justify-self: start; }
  .ongoing__track { overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 var(--gutter); transform: none !important; padding-bottom: 8px; scrollbar-width: none; }
  .ongoing__track::-webkit-scrollbar { display: none; }
  .ocard { flex-basis: 82vw; scroll-snap-align: start; }

  .spotlight__info { grid-template-columns: 1fr; }
  .spotlight__info h3 { grid-column: 1; }
  .index__head, .index__row { grid-template-columns: 36px 1fr 56px; }

  .cards, .cards--2 { grid-template-columns: 1fr; gap: 56px; }
  .contact__head, .form { grid-column: 1 / -1; }
  .form { margin-top: 40px; }
  .footer__top { grid-template-columns: 1fr 1fr; row-gap: 40px; }
  .footer__col--end { align-items: flex-start; }

  .grid-projects { grid-template-columns: 1fr; }
  .project__lead { margin-left: 0; }
  .project__cover, .article__cover { height: 62vw; }
  .project__meta, .project__body { grid-column: 1 / -1; position: static; }
  .project__body { margin-top: 48px; }
  .gallery { grid-template-columns: 1fr; }
  .post-row { grid-template-columns: 1fr; gap: 8px; }
  .post-row__cat { justify-self: start; }
  .next__img { display: none; }
}
@media (max-width: 560px) {
  .form__row { grid-template-columns: 1fr; }
  .hero__bottom { grid-template-columns: 1fr; }
  .hero__scroll { display: none; }
  .hero__badge { bottom: 220px; }
  .stats { grid-template-columns: 1fr; }
  .stats dt { min-height: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  [data-reveal] { opacity: 1; transform: none; clip-path: none; }
  .char { transform: none; }
}
