/* ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
   ROCA · Constructora — hoja de estilo
   Paleta de marca:  Firmeza #303030 · Innovación #B2B2B2 · Confianza #ECE8E5
   Tipografía:       Open Sans (cuerpo) · Jost (display, rol Avenir)
   ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ */

:root {
  --ink: #303030;          /* Firmeza  */
  --ink-soft: #4a4a4a;
  --grey: #B2B2B2;         /* Innovación */
  --bone: #ECE8E5;         /* Confianza */
  --paper: #f6f4f2;
  --white: #ffffff;
  --line: rgba(48, 48, 48, 0.12);
  --line-light: rgba(255, 255, 255, 0.18);

  --font-body: "Open Sans", system-ui, sans-serif;
  --font-display: "Jost", "Open Sans", sans-serif;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  --pad: clamp(1.5rem, 5vw, 6rem);
  --maxw: 1400px;
}

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

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

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--ink); color: var(--bone); }

/* ░░ Foco visible — anillo on-brand, contextual claro/oscuro ░░ */
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 3px; }
.hero :focus-visible,
.nav:not(.scrolled) :focus-visible,
.menu :focus-visible,
.contact :focus-visible,
.concrete-wall :focus-visible,
.stats :focus-visible,
.footer :focus-visible { outline-color: var(--bone); }
/* Inputs ya muestran foco con el subrayado blanco; evitar doble tratamiento */
.field input:focus-visible, .field textarea:focus-visible { outline: none; }
:where(section[id]) { scroll-margin-top: 5rem; }

/* ░░ Tipografía utilitaria ░░ */
.overline {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.overline--light { color: rgba(255, 255, 255, 0.72); }

.section { padding: clamp(5rem, 12vh, 11rem) var(--pad); }
.section__head { max-width: var(--maxw); margin: 0 auto clamp(2.5rem, 6vw, 5rem); }
.section__title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2rem, 5.4vw, 4.2rem);
  line-height: 1.04;
  letter-spacing: -0.01em;
  margin-top: 1.1rem;
  text-wrap: balance;
}
.hero__title, .reveal__headline, .contact__title, .intro__lead, .concrete-wall__quote { text-wrap: balance; }
.hero__sub, .contact__text, .intro__cols p, .pillar p, .service__body p,
.step p, .wip__meta { text-wrap: pretty; }

/* ░░░░ Botones ░░░░ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  font-family: var(--font-body);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.95em 1.7em;
  border-radius: 100px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s var(--ease-out), background 0.25s var(--ease-out),
    color 0.25s var(--ease-out), border-color 0.25s var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn--light { background: var(--ink); color: var(--bone); }
.btn--light:hover { background: #1d1d1d; }
.btn--ghost-light { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.4); }
.btn--ghost-light:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.7); }
.btn--nav { padding: 0.7em 1.3em; font-size: 0.8rem; background: var(--ink); color: var(--bone); }
.btn--nav:hover { background: #1d1d1d; }
.btn--full { width: 100%; padding: 1.1em; }

/* ░░░░ Loader ░░░░ */
.loader {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.6rem;
  transition: opacity 0.6s var(--ease-out), visibility 0.6s;
}
.loader.is-done { opacity: 0; visibility: hidden; }
.loader__mark img { width: 130px; opacity: 0.92; }
.loader__bar { width: 180px; height: 2px; background: var(--line); overflow: hidden; }
.loader__bar span {
  display: block; height: 100%; width: 0; background: var(--ink);
  transition: width 1.1s var(--ease-out);
}
.loader.is-loading .loader__bar span { width: 100%; }

/* ░░░░ Navbar ░░░░ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.3rem var(--pad);
  padding-left: max(var(--pad), env(safe-area-inset-left, 0px));
  padding-right: max(var(--pad), env(safe-area-inset-right, 0px));
  transition: background 0.4s var(--ease-out), padding 0.4s var(--ease-out),
    box-shadow 0.4s var(--ease-out);
}
/* Velo superior para legibilidad de los enlaces blancos sobre hero claro */
.nav::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(20,20,20,0.42) 0%, rgba(20,20,20,0.14) 55%, rgba(20,20,20,0) 100%);
  opacity: 1; transition: opacity 0.4s var(--ease-out);
}
.nav.scrolled::before { opacity: 0; }
.nav:not(.scrolled) .nav__links a { text-shadow: 0 1px 14px rgba(0,0,0,0.45); }
.nav:not(.scrolled) .nav__logo img,
.nav:not(.scrolled) .nav__burger span { filter: drop-shadow(0 1px 8px rgba(0,0,0,0.4)); }
.nav.scrolled {
  background: rgba(246, 244, 242, 0.85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  padding-top: 0.85rem; padding-bottom: 0.85rem;
  box-shadow: 0 1px 0 var(--line);
}
.nav__logo { position: relative; line-height: 0; }
.nav__logo img { height: 26px; transition: opacity 0.4s var(--ease-out); }
.nav__logo-white { position: absolute; inset: 0; }
.nav.scrolled .nav__logo-white { opacity: 0; }
.nav:not(.scrolled) .nav__logo-dark { opacity: 0; }

.nav__links { display: flex; gap: 2.2rem; }
.nav__links a {
  font-size: 0.85rem; font-weight: 500; letter-spacing: 0.01em;
  color: var(--white); position: relative; transition: color 0.3s var(--ease-out);
}
.nav.scrolled .nav__links a { color: var(--ink); }
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -5px; height: 1px; width: 0;
  background: currentColor; transition: width 0.3s var(--ease-out);
}
.nav__links a:hover::after { width: 100%; }
.nav .btn--nav { opacity: 0; pointer-events: none; transition: opacity 0.4s var(--ease-out); }
.nav.scrolled .btn--nav { opacity: 1; pointer-events: auto; }

.nav__burger { display: none; flex-direction: column; gap: 5px; width: 30px; background: none; border: 0; cursor: pointer; }
.nav__burger span { display: block; height: 2px; width: 100%; background: var(--white); transition: transform 0.3s var(--ease-out), background 0.3s; }
.nav.scrolled .nav__burger span { background: var(--ink); }

/* ░░░░ Mobile menu ░░░░ */
.menu {
  position: fixed; inset: 0; z-index: 90;
  background: var(--ink); color: var(--bone);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1.6rem;
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out), visibility 0.35s;
}
.menu.open { opacity: 1; visibility: visible; transform: translateY(0); }
.menu a { font-family: var(--font-display); font-size: 2rem; font-weight: 300; }
.menu__cta { margin-top: 1rem; font-size: 0.95rem !important; font-family: var(--font-body) !important; font-weight: 600; border: 1px solid var(--line-light); padding: 0.8em 2em; border-radius: 100px; }

/* ░░░░ Hero ░░░░ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding: var(--pad);
  padding-bottom: clamp(3rem, 9vh, 6rem);
  overflow: hidden;
  color: var(--white);
}
.hero__media { position: absolute; inset: -8% 0; z-index: -1; will-change: transform; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(20,20,20,0.58) 0%, rgba(20,20,20,0.26) 38%, rgba(20,20,20,0) 66%),
    linear-gradient(180deg, rgba(20,20,20,0.42) 0%, rgba(20,20,20,0.12) 32%, rgba(20,20,20,0.72) 100%);
}
.hero__inner { max-width: var(--maxw); width: 100%; margin: 0 auto; }
.hero__title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.7rem, 11vw, 9.5rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin: 1.4rem 0 1.6rem;
}
.hero__title .line { display: block; overflow: hidden; }
.hero__title .line > span { display: block; }
.hero__sub { max-width: 30rem; font-size: clamp(1rem, 1.5vw, 1.2rem); color: rgba(255,255,255,0.85); font-weight: 300; }
.hero__actions { display: flex; gap: 1rem; margin-top: 2.2rem; flex-wrap: wrap; }
.hero__cue { position: absolute; right: var(--pad); bottom: clamp(3rem, 9vh, 6rem); display: flex; flex-direction: column; align-items: center; gap: 0.8rem; font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(255,255,255,0.7); }
.hero__cue-line { width: 1px; height: 54px; background: linear-gradient(rgba(255,255,255,0.7), rgba(255,255,255,0)); animation: cue 2s var(--ease-in-out) infinite; transform-origin: top; }
@keyframes cue { 0%,100% { transform: scaleY(0.4); opacity: 0.4; } 50% { transform: scaleY(1); opacity: 1; } }

/* ░░░░ Signature reveal (expand on scroll) ░░░░ */
.reveal { position: relative; height: 220vh; background: var(--paper); }
.reveal__pin { position: sticky; top: 0; height: 100svh; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.reveal__frame {
  position: absolute; inset: 0;
  /* clip-path animado por GSAP: empieza recortado, termina a sangre completa */
  clip-path: inset(18vh 26vw 18vh 26vw round 18px);
  will-change: clip-path;
}
.reveal__frame img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.18); will-change: transform; }
.reveal__overlay {
  position: relative; z-index: 2; text-align: center; color: var(--white);
  padding: var(--pad); max-width: 60rem; mix-blend-mode: normal;
}
.reveal__overlay::before {
  content: ""; position: absolute; inset: -40% -30%; z-index: -1;
  background: radial-gradient(closest-side, rgba(20,20,20,0.45), rgba(20,20,20,0));
}
.reveal__headline {
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(1.7rem, 4.6vw, 3.6rem); line-height: 1.08; letter-spacing: -0.01em;
  margin-top: 1rem;
}

/* ░░░░ Banda cinemática (video con parallax) ░░░░ */
.filmband {
  position: relative;
  min-height: clamp(28rem, 86vh, 54rem);
  overflow: hidden;
  background: var(--ink);
  display: flex; align-items: flex-end;
  color: var(--white);
}
/* Sobredimensionado: deja margen para el parallax sin descubrir bordes. */
.filmband__media { position: absolute; inset: -14% 0; z-index: 0; will-change: transform; }
.filmband__video,
.filmband__fallback { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.filmband__fallback { z-index: 0; }
/* scale + anclaje superior empuja la marca de la IA (abajo-centro) fuera de cuadro. */
.filmband__video { z-index: 1; transform: scale(1.12); transform-origin: 50% 0; }
.filmband__scrim {
  position: absolute; inset: 0; z-index: 2;
  background:
    linear-gradient(90deg, rgba(20,20,20,0.55) 0%, rgba(20,20,20,0.2) 42%, rgba(20,20,20,0) 70%),
    linear-gradient(180deg, rgba(20,20,20,0.35) 0%, rgba(20,20,20,0) 34%, rgba(20,20,20,0.62) 100%);
}
.filmband__caption {
  position: relative; z-index: 3;
  padding: var(--pad);
  max-width: var(--maxw); margin: 0 auto; width: 100%;
}
.filmband__headline {
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(1.9rem, 5.4vw, 4.4rem); line-height: 1.02; letter-spacing: -0.015em;
  margin-top: 0.7rem;
}
/* Sin movimiento: oculta el video y deja el poster fijo. */
@media (prefers-reduced-motion: reduce) {
  .filmband__video { display: none; }
}

/* ░░░░ Intro ░░░░ */
.intro { background: var(--paper); }
.intro__grid { max-width: var(--maxw); margin: 0 auto; }
.intro__lead {
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(1.6rem, 3.6vw, 3rem); line-height: 1.18; letter-spacing: -0.01em;
  max-width: 22ch; margin: 1.4rem 0 clamp(2.5rem, 6vw, 4.5rem);
}
.intro__body {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1fr);
  gap: clamp(1.75rem, 5vw, 5rem);
  align-items: center;
}
.intro__figure {
  position: relative; margin: 0; overflow: hidden;
  border-radius: 8px; aspect-ratio: 3 / 4; background: var(--grey);
  clip-path: inset(0 0 0% 0); will-change: clip-path;
}
.intro__figure-media {
  position: absolute; inset: -10% 0; width: 100%; height: 120%;
  will-change: transform;
}
.intro__figure-media img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.7s var(--ease-out);
}
.intro__figure-scrim {
  position: absolute; inset: 0; z-index: 1; opacity: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(20, 20, 20, 0.6), rgba(20, 20, 20, 0) 48%);
  transition: opacity 0.5s var(--ease-out);
}
.intro__figure-cap {
  position: absolute; z-index: 2; pointer-events: none;
  left: clamp(1rem, 3vw, 1.6rem); right: 1rem; bottom: clamp(1rem, 3vw, 1.6rem);
  display: flex; flex-direction: column; gap: 0.28rem; color: #fff;
  opacity: 0; transform: translateY(10px);
  transition: opacity 0.45s var(--ease-out), transform 0.45s var(--ease-out);
}
.intro__figure-cap-k {
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.2em;
  text-transform: uppercase; color: rgba(255, 255, 255, 0.75);
}
.intro__figure-cap-v {
  font-family: var(--font-display); font-weight: 300; font-size: 1.15rem; letter-spacing: -0.01em;
}
@media (hover: hover) and (pointer: fine) {
  .intro__figure:hover .intro__figure-media img { transform: scale(1.05); }
  .intro__figure:hover .intro__figure-scrim { opacity: 1; }
  .intro__figure:hover .intro__figure-cap { opacity: 1; transform: translateY(0); }
}
.intro__cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(1.5rem, 3vw, 3rem); }
.intro__cols p { color: var(--ink-soft); font-size: 1.02rem; }

/* ░░░░ Pilares ░░░░ */
.pillars { background: var(--bone); }
.pillars__grid { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem, 3vw, 3rem); }
.pillar { border-top: 1px solid var(--line); padding-top: 1.8rem; }
.pillar__num { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.1em; color: var(--grey); }
.pillar h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.7rem; margin: 0.6rem 0 0.9rem; }
.pillar p { color: var(--ink-soft); font-size: 0.98rem; }

/* ░░░░ Servicios ░░░░ */
.services { background: #D9A882; padding-top: clamp(2.5rem, 5vh, 4.5rem); padding-bottom: clamp(2.5rem, 5vh, 4.5rem); }
.services .section__head { margin-bottom: clamp(1.2rem, 2.5vw, 2rem); }
.services .section__title { font-size: clamp(1.5rem, 3vw, 2.4rem); }
.services__list { max-width: var(--maxw); margin: 0 auto; list-style: none; }
.service {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: clamp(1rem, 4vw, 4rem);
  padding: clamp(1rem, 2vw, 1.5rem) 0;
  border-top: 1px solid var(--line);
  transition: padding-left 0.4s var(--ease-out);
}
.services__list .service:last-child { border-bottom: 1px solid var(--line); }
.service__index { font-size: 0.8rem; font-weight: 600; color: var(--grey); letter-spacing: 0.1em; }
.service__body { display: flex; flex-direction: column; gap: 0.25rem; }
.service__body h3 { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.1rem, 2.2vw, 1.75rem); transition: transform 0.4s var(--ease-out); }
.service__body p { color: var(--ink-soft); max-width: 46ch; font-size: 0.96rem; }
.service__arrow { font-size: 1.4rem; color: var(--grey); transition: transform 0.4s var(--ease-out), color 0.3s; }
@media (hover: hover) and (pointer: fine) {
  .service:hover { padding-left: 1.4rem; }
  .service:hover .service__arrow { transform: translate(6px, -6px); color: var(--ink); }
}

/* ░░░░ Proyectos ░░░░ */
.projects { background: var(--bone); }
.projects__grid {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(1rem, 2.4vw, 2rem);
}
.project { position: relative; display: flex; flex-direction: column; }
.project--tall { grid-row: span 2; }
.project--wide { grid-column: span 2; }
.project__media { position: relative; overflow: hidden; border-radius: 6px; flex: 1 1 auto; min-height: 280px; background: var(--grey); }
.project--tall .project__media { min-height: 580px; }
.project--wide .project__media { min-height: 420px; }
.project__media img { position: absolute; inset: -14% 0; width: 100%; height: 128%; object-fit: cover; will-change: transform; transition: transform 0.9s var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .project:hover .project__media img { transform: scale(1.05); } }
.project__meta { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: 1rem 0.2rem 0; }
.project__meta h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.3rem; }
.project__meta span { font-size: 0.82rem; color: var(--ink-soft); }

/* ░░░░ Obras en proceso — tarjetas con foto de obra ░░░░ */
.inprogress { background: var(--paper); }
.inprogress__list {
  max-width: var(--maxw);
  margin: 0 auto;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1rem, 2.4vw, 1.6rem);
}
.wip {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 4px;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: flex-end;
  background: var(--ink);
}
.wip__media { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.wip__media img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(0.18) contrast(1.04) saturate(0.92) brightness(0.9);
  transform: scale(1.02);
  transition: transform 1.2s var(--ease-out), filter 0.6s var(--ease-out);
}
.wip::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(20,18,17,0) 28%, rgba(20,18,17,0.5) 62%, rgba(16,15,14,0.9) 100%);
}
.wip:hover .wip__media img,
.wip:focus-within .wip__media img {
  transform: scale(1.06);
  filter: grayscale(0) contrast(1.05) saturate(1) brightness(0.95);
}
.wip__body { position: relative; width: 100%; padding: clamp(1.25rem, 3vw, 2.1rem); color: var(--white); }
.wip__top {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 1.2rem;
  margin-bottom: clamp(0.9rem, 2vw, 1.3rem);
}
.wip__info { display: flex; flex-direction: column; gap: 0.35rem; }
.wip__info h3 { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.4rem, 2.6vw, 2.1rem); line-height: 1.05; color: var(--white); }
.wip__meta { color: rgba(255, 255, 255, 0.74); font-size: 0.92rem; }
.wip__pct { display: flex; flex-direction: column; align-items: flex-end; gap: 0.3rem; text-align: right; flex-shrink: 0; }
.wip__value { display: flex; align-items: baseline; }
.wip__num { font-family: var(--font-display); font-weight: 300; font-size: clamp(2rem, 4.5vw, 3rem); line-height: 1; font-variant-numeric: tabular-nums; }
.wip__sign { font-family: var(--font-display); font-weight: 300; font-size: clamp(1rem, 2vw, 1.4rem); color: rgba(255, 255, 255, 0.7); margin-left: 0.08em; }
.wip__delivery { font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255, 255, 255, 0.66); }
.wip__track { height: 3px; background: rgba(255, 255, 255, 0.22); border-radius: 3px; overflow: hidden; }
.wip__bar {
  display: block; height: 100%; width: 0; background: var(--white); border-radius: 3px;
  transition: width 1.2s var(--ease-out);
}
@media (prefers-reduced-motion: reduce) {
  .wip__bar { transition: none; }
  .wip__media img { transition: none; }
}
@media (max-width: 760px) {
  .inprogress__list { grid-template-columns: 1fr; }
  .wip { aspect-ratio: 3 / 2; }
}
@media (max-width: 440px) {
  .wip { aspect-ratio: 4 / 3; }
}

/* ░░░░ Cifras ░░░░ */
.stats {
  position: relative;
  min-height: clamp(30rem, 72vh, 48rem);
  display: flex;
  align-items: center;
  background:
    linear-gradient(rgba(38, 28, 21, 0.5), rgba(30, 22, 16, 0.74)),
    url("assets/obra/bg-muro-terracota.jpg") center / cover no-repeat;
  background-color: var(--ink);
  color: var(--white);
  padding: clamp(4.5rem, 12vh, 9rem) var(--pad);
}
.stats__inner { width: 100%; max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
.stat { display: flex; flex-direction: column; gap: 0.5rem; }
.stat__num { font-family: var(--font-display); font-weight: 300; font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: 1; }
.stat__label { font-size: 0.85rem; color: var(--grey); letter-spacing: 0.02em; }

/* ░░░░ Proceso ░░░░ */
.process { background: var(--paper); }
.process__steps { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(1.5rem, 3vw, 3rem); }
.step { position: relative; padding-top: 2.4rem; }
.step::before { content: ""; position: absolute; top: 0; left: 0; width: 38px; height: 2px; background: var(--ink); }
.step__num { font-size: 0.8rem; font-weight: 600; color: var(--grey); letter-spacing: 0.1em; }
.step h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.45rem; margin: 0.5rem 0 0.7rem; }
.step p { color: var(--ink-soft); font-size: 0.95rem; }

/* ░░░░ Contacto ░░░░ */
.contact { position: relative; color: var(--white); overflow: hidden; }
.contact__media { position: absolute; inset: -8% 0; z-index: 0; will-change: transform; }
.contact__media img { width: 100%; height: 100%; object-fit: cover; }
.contact__scrim { position: absolute; inset: 0; background: linear-gradient(120deg, rgba(20,20,20,0.92), rgba(20,20,20,0.62)); }
.contact__inner { position: relative; z-index: 1; max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2.5rem, 6vw, 6rem); align-items: center; }
.contact__title { font-family: var(--font-display); font-weight: 300; font-size: clamp(2.2rem, 5vw, 4rem); line-height: 1.05; letter-spacing: -0.01em; margin: 1rem 0 1.4rem; }
.contact__text { color: rgba(255,255,255,0.8); max-width: 34ch; font-weight: 300; }
.contact__info { list-style: none; margin-top: 2.4rem; display: flex; flex-direction: column; gap: 1.1rem; }
.contact__info li { font-size: 1rem; display: flex; flex-direction: column; gap: 0.2rem; }
.contact__info span { font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--grey); }

/* form */
.contact__form { background: rgba(255,255,255,0.04); border: 1px solid var(--line-light); border-radius: 14px; padding: clamp(1.6rem, 3vw, 2.6rem); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: flex; flex-direction: column; gap: 1.4rem; }
.field { position: relative; }
.field input, .field textarea {
  width: 100%; background: transparent; border: 0; border-bottom: 1px solid rgba(255,255,255,0.3);
  padding: 1.4rem 0 0.6rem; color: var(--white); font-family: var(--font-body); font-size: 1rem; resize: none;
  transition: border-color 0.3s var(--ease-out);
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--white); }
.field label { position: absolute; left: 0; top: 1.3rem; color: rgba(255,255,255,0.6); font-size: 1rem; pointer-events: none; transition: transform 0.25s var(--ease-out), font-size 0.25s var(--ease-out), color 0.25s; transform-origin: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label,
.field.has-value label {
  transform: translateY(-1.35rem) scale(0.8); color: var(--grey);
}
.form__note { font-size: 0.9rem; color: var(--grey); text-align: center; }

/* ░░░░ Footer ░░░░ */
.footer { background: var(--ink); color: var(--bone); padding: clamp(3rem, 7vh, 5rem) var(--pad) max(2rem, calc(1rem + env(safe-area-inset-bottom, 0px))); }
.footer__top { max-width: var(--maxw); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding-bottom: 2.4rem; border-bottom: 1px solid var(--line-light); flex-wrap: wrap; }
.footer__logo { height: 30px; }
.footer__nav { display: flex; gap: 1.8rem; flex-wrap: wrap; }
.footer__nav a { font-size: 0.88rem; color: var(--grey); transition: color 0.3s var(--ease-out); }
.footer__nav a:hover { color: var(--white); }
.footer__bottom { max-width: var(--maxw); margin: 1.8rem auto 0; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: 0.8rem; color: var(--grey); }

/* ░░░░ Banda cinética ░░░░ */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  padding: clamp(1.4rem, 3vw, 2.4rem) 0;
}
.marquee__track {
  display: flex; align-items: center; gap: clamp(1.5rem, 3vw, 3rem);
  width: max-content; white-space: nowrap;
  animation: marq 34s linear infinite;
  will-change: transform;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__track span {
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(1.6rem, 4.5vw, 3.4rem); letter-spacing: -0.01em; color: var(--ink);
}
.marquee__dot { color: var(--grey); }
@keyframes marq { to { transform: translateX(-50%); } }

/* ░░░░ Estados de error de formulario ░░░░ */
.field__error {
  display: block; font-size: 0.78rem; color: #e0a3a3; margin-top: 0.4rem;
  opacity: 0; max-height: 0; overflow: hidden;
  transition: opacity 0.25s var(--ease-out), max-height 0.25s var(--ease-out);
}
.field.has-error input, .field.has-error textarea { border-bottom-color: #e0a3a3; }
.field.has-error .field__error { opacity: 1; max-height: 2rem; }
/* Shake al enviar con errores — micro-aviso, transform-only */
@media (prefers-reduced-motion: no-preference) {
  .field.shake input, .field.shake textarea { animation: field-shake 0.4s var(--ease-out); }
  @keyframes field-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
  }
}

/* ░░░░ Reveal-on-scroll base ░░░░ */
.reveal-up { opacity: 0; transform: translateY(26px); }
.is-in .reveal-up, .reveal-up.is-in { opacity: 1; transform: none; }

/* ░░░░ Motion extra ░░░░ */
/* Títulos enmascarados (curtain reveal por línea) */
.ln { display: block; overflow: hidden; }
.ln__i { display: block; will-change: transform; }

/* Indicador de progreso de scroll — hairline superior, legible sobre cualquier fondo */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 100%;
  transform: scaleX(0); transform-origin: 0 50%;
  background: #fff; mix-blend-mode: difference;
  z-index: 110; pointer-events: none; will-change: transform;
}

/* La banda cinética se inclina con la velocidad de scroll (skew aplicado por JS) */
.marquee { will-change: transform; }

/* Wipe de revelado en proyectos */
.project__media { will-change: clip-path; }

/* Micro-interacciones de hover (solo puntero fino) */
@media (hover: hover) and (pointer: fine) {
  .pillar { position: relative; transition: transform 0.55s var(--ease-out); }
  .pillar::after { content: ""; position: absolute; top: -1px; left: 0; height: 1px; width: 0; background: var(--ink); transition: width 0.55s var(--ease-out); }
  .pillar:hover { transform: translateY(-6px); }
  .pillar:hover::after { width: 100%; }
  .pillar__num { transition: color 0.4s var(--ease-out); }
  .pillar:hover .pillar__num { color: var(--ink); }

  .project { transition: transform 0.55s var(--ease-out); }
  .project:hover { transform: translateY(-6px); }
  .project__meta h3 { transition: transform 0.45s var(--ease-out); }
  .project:hover .project__meta h3 { transform: translateX(6px); }

  .stats__inner:hover .stat { opacity: 0.5; transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out); }
  .stats__inner .stat:hover { opacity: 1; transform: translateY(-5px); }

  .step::before { transition: width 0.5s var(--ease-out); }
  .step { transition: transform 0.5s var(--ease-out); }
  .step:hover { transform: translateY(-5px); }
  .step:hover::before { width: 56px; }

  /* Brillo que cruza los botones al pasar el cursor */
  .btn { position: relative; overflow: hidden; }
  .btn::after {
    content: ""; position: absolute; top: 0; left: -130%; width: 55%; height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255,255,255,0.28), transparent);
    transform: skewX(-18deg); pointer-events: none;
    transition: left 0.7s var(--ease-out);
  }
  .btn:hover::after { left: 150%; }
}

/* ░░░░ Sección material — color de marca plano ░░░░ */
.concrete-wall {
  position: relative;
  min-height: clamp(36rem, 90vh, 58rem);
  display: flex;
  align-items: center;
  padding: clamp(7rem, 18vh, 13rem) var(--pad);
  background:
    linear-gradient(rgba(30, 30, 33, 0.5), rgba(22, 22, 25, 0.74)),
    url("assets/obra/bg-muro-concreto.jpg") center / cover no-repeat;
  background-color: var(--ink);
  color: var(--white);
  overflow: hidden;
}
.concrete-wall__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: clamp(3rem, 8vw, 8rem);
  align-items: center;
}
.concrete-wall__sidebar {
  display: flex;
  flex-direction: column;
  gap: 2.4rem;
}
.concrete-wall__specs {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.concrete-wall__specs li {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(0.92rem, 1.5vw, 1.1rem);
  color: rgba(255,255,255,0.52);
  display: flex;
  align-items: center;
  gap: 1rem;
}
.concrete-wall__specs li::before {
  content: "";
  display: block;
  width: 20px;
  height: 1px;
  background: rgba(255,255,255,0.26);
  flex-shrink: 0;
}
.concrete-wall__quote {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2rem, 5.4vw, 4.6rem);
  line-height: 1.03;
  letter-spacing: -0.02em;
  margin: 0;
  border: 0;
  font-style: normal;
  color: var(--white);
}
.concrete-wall__rule {
  width: 40px;
  height: 1px;
  background: rgba(255,255,255,0.28);
  margin-top: clamp(1.8rem, 4vw, 3rem);
}
@media (max-width: 860px) {
  .concrete-wall__inner { grid-template-columns: 1fr; gap: clamp(2rem, 6vw, 4rem); }
  .concrete-wall__sidebar { flex-direction: row; align-items: flex-start; gap: 2rem; flex-wrap: wrap; }
}

/* ░░░░ Responsive ░░░░ */
@media (max-width: 980px) {
  .nav__links, .nav .btn--nav { display: none; }
  .nav__burger { display: flex; }
  .intro__body { grid-template-columns: 1fr; gap: clamp(1.5rem, 6vw, 2.5rem); }
  .intro__figure { aspect-ratio: 4 / 5; max-height: 70svh; }
  .intro__cols { grid-template-columns: 1fr; }
  .pillars__grid { grid-template-columns: 1fr; }
  .process__steps { grid-template-columns: repeat(2, 1fr); }
  .stats__inner { grid-template-columns: repeat(2, 1fr); gap: 2.5rem 1.5rem; }
  .contact__inner { grid-template-columns: 1fr; }
  .projects__grid { grid-template-columns: 1fr; }
  .project--tall, .project--wide { grid-column: auto; grid-row: auto; }
  .project--tall .project__media { min-height: 360px; }
  .project--wide .project__media { min-height: 280px; }
  .service { grid-template-columns: auto 1fr; }
  .service__arrow { display: none; }
}
/* Teléfonos: el efecto firma NO se ancla (pin), evita saltos de la barra de URL en iOS */
@media (max-width: 767px) {
  .reveal { height: auto; }
  /* overflow:hidden se conserva — impide que frame absoluto desborde horizontalmente */
  .reveal__pin { position: relative; top: auto; height: auto; min-height: 78svh; overflow: hidden; }
  .reveal__frame { clip-path: inset(7vh 7vw 7vh 7vw round 14px); }
  /* overlay: ancho total para no desbordarse y quitar pseudo que se extiende ±30% */
  .reveal__overlay { width: 100%; max-width: 100%; box-sizing: border-box; }
  .reveal__overlay::before { display: none; }
  .hero { padding-bottom: clamp(4rem, 14vh, 6rem); }
  .hero__cue { display: none; }
  /* Touch target mínimo 44×44 px (WCAG 2.5.5) */
  .nav__burger { padding: 7px; margin-right: -7px; min-width: 44px; min-height: 44px; justify-content: center; }
  .nav__burger span { width: 26px; }
  .hero__actions .btn { flex: 1 1 auto; }
  /* Filmband: el video SÍ corre en móvil (es el gancho del recorrido). 3 MB H.264. */
  .filmband__media { overflow: hidden; }
}
@media (max-width: 560px) {
  .process__steps { grid-template-columns: 1fr; }
  .stats__inner { grid-template-columns: 1fr 1fr; }
  /* concrete-wall: sidebar en columna en pantallas pequeñas */
  .concrete-wall__sidebar { flex-direction: column; gap: 1.6rem; }
  .wip__top { flex-wrap: wrap; gap: 0.8rem; }
  .footer__top { flex-direction: column; align-items: flex-start; }
  .footer__bottom { flex-direction: column; gap: 0.4rem; }
}

/* ░░░░ Accesibilidad: menos movimiento ░░░░ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .reveal { height: auto; }
  .reveal__pin { position: relative; height: 80svh; }
  .reveal__frame { clip-path: inset(0 0 0 0 round 0) !important; }
  .reveal-up { opacity: 1 !important; transform: none !important; }
  .marquee__track { animation: none !important; }
  .scroll-progress { display: none; }
  .ln__i { transform: none !important; }
  .marquee { transform: none !important; }
  .project__media { clip-path: none !important; }
  .intro__figure { clip-path: none !important; }
}
