/* =========================================================
   AEP Group Construcciones · estilos base
   ========================================================= */

:root {
  /* Marca (tomada del logo) */
  --azul: #1c5da8;
  --azul-900: #0f2f57;
  --celeste: #29a8e6;
  --celeste-200: #a9dcf6;
  --rojo: #b5121b;

  /* Neutros */
  --tinta: #0e141b;
  --tinta-2: #18212b;
  --papel: #f5f3ef;
  --papel-2: #ebe7e0;
  --blanco: #ffffff;
  --gris: #5d6672;
  --gris-claro: #9aa2ad;
  --linea: rgba(14, 20, 27, 0.12);
  --linea-clara: rgba(255, 255, 255, 0.16);

  --f-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --f-sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  --ease: cubic-bezier(0.22, 0.7, 0.18, 1);
  --ease-io: cubic-bezier(0.7, 0, 0.2, 1);

  --header-h: 84px;
  --radius: 20px;
  --radius-sm: 12px;
  --gutter: clamp(16px, 4vw, 56px);
  --maxw: 1320px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.is-smooth { scroll-behavior: auto; }
body {
  margin: 0;
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--tinta);
  background: var(--papel);
  font-variant-numeric: lining-nums; /* Cormorant usa cifras antiguas: el "1" parece una "I" */
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--celeste); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--azul); color: #fff; }

/* Lenis */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

/* ---------- Utilidades ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(80px, 11vw, 150px) 0; }
.section--dark { background: var(--tinta); color: #e9edf2; }
.section--tint { background: var(--papel-2); }
.muted { color: var(--gris); max-width: 46ch; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--azul);
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--rojo); }
.eyebrow--light { color: rgba(255, 255, 255, 0.86); }

.h2 {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(2.5rem, 5.2vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin-top: 18px;
}
.h2 em, .hero__title em, .cta__title em { font-style: italic; color: var(--azul); }
.section--dark .h2 em { color: var(--celeste-200); }

.section-head { margin-bottom: clamp(48px, 6vw, 80px); max-width: 860px; }
.section-head--split { max-width: none; display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: end; }
.section-head__aside { color: var(--gris); max-width: 42ch; justify-self: end; }

/* Botones */
.btn {
  --bg: var(--tinta); --fg: #fff; --bd: transparent;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 26px; border-radius: 999px;
  background: var(--bg); color: var(--fg); border: 1px solid var(--bd);
  font-size: 14px; font-weight: 600; letter-spacing: 0.01em; white-space: nowrap;
  transition: background .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease), transform .35s var(--ease);
}
.btn__arrow { display: inline-block; transition: transform .4s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(4px); }
.btn--sm { padding: 11px 20px; font-size: 13px; }
.btn--primary { --bg: var(--azul); }
.btn--primary:hover { --bg: var(--azul-900); }
.btn--light { --bg: #fff; --fg: var(--tinta); }
.btn--light:hover { --bg: var(--celeste-200); }
.btn--ghost-light { --bg: transparent; --fg: #fff; --bd: rgba(255, 255, 255, .45); backdrop-filter: blur(6px); }
.btn--ghost-light:hover { --bg: rgba(255, 255, 255, .12); --bd: #fff; }
.btn--outline { --bg: transparent; --fg: var(--tinta); --bd: var(--linea); }
.btn--outline:hover { --bd: var(--tinta); }

.link-arrow { display: inline-flex; gap: 10px; font-weight: 600; font-size: 15px; border-bottom: 1px solid currentColor; padding-bottom: 4px; }
.link-arrow span { transition: transform .4s var(--ease); }
.link-arrow:hover span { transform: translateX(5px); }

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  background: var(--papel); color: var(--tinta);
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill[data-estado="construccion"]::before { background: #f0a020; }
.pill[data-estado="preventa"]::before { background: var(--celeste); }
.pill[data-estado="entregado"]::before { background: #2fae6a; }
.pill--glass { background: rgba(255, 255, 255, .14); color: #fff; backdrop-filter: blur(8px); }

.round-btn {
  width: 52px; height: 52px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: 18px;
  border: 1px solid var(--linea); background: transparent;
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.round-btn:hover { background: var(--tinta); color: #fff; border-color: var(--tinta); }

/* ---------- Animaciones de entrada (scroll) ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 1.1s var(--ease) var(--d, 0s), transform 1.1s var(--ease) var(--d, 0s);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

.js [data-reveal="clip"] {
  opacity: 1; transform: none;
  clip-path: inset(100% 0 0 0 round var(--radius));
  transition: clip-path 1.4s var(--ease-io) var(--d, 0s);
}
.js [data-reveal="clip"] img { scale: 1.25; transition: scale 1.8s var(--ease) var(--d, 0s); }
.js [data-reveal="clip"].is-in { clip-path: inset(0 0 0 0 round var(--radius)); }
.js [data-reveal="clip"].is-in img { scale: 1; }

/* Tracking-in-expand (animista) */
@keyframes tracking-in-expand {
  0% { letter-spacing: -0.5em; opacity: 0; filter: blur(6px); }
  40% { opacity: .6; }
  100% { opacity: 1; filter: blur(0); }
}
.tracking-in-expand { animation: tracking-in-expand .9s cubic-bezier(0.215, 0.61, 0.355, 1) both; }

/* ---------- Precarga ---------- */
.preloader { display: none; }
.js .preloader {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center;
  background: var(--papel);
  transition: clip-path 1.1s var(--ease-io) .1s, visibility 0s 1.3s;
  clip-path: inset(0 0 0 0);
}
.preloader__inner { width: min(320px, 64vw); display: grid; gap: 22px; justify-items: center; }
.preloader__inner img { width: 100%; height: auto; opacity: 0; animation: pre-in 1s var(--ease) .1s forwards; }
.preloader__bar { width: 100%; height: 2px; background: var(--linea); overflow: hidden; }
.preloader__bar i { display: block; height: 100%; background: var(--azul); transform-origin: left; transform: scaleX(0); animation: pre-bar 1.2s var(--ease-io) .2s forwards; }
@keyframes pre-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes pre-bar { to { transform: scaleX(1); } }
.is-loaded .preloader { clip-path: inset(0 0 100% 0); visibility: hidden; pointer-events: none; }

/* ---------- Encabezado ---------- */
.header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  height: var(--header-h);
  background: rgba(245, 243, 239, .86);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  transition: transform .6s var(--ease), box-shadow .4s, height .4s var(--ease);
}
.header.is-scrolled { box-shadow: 0 1px 0 var(--linea); }
.header.is-hidden { transform: translateY(-100%); }
.header__inner {
  height: 100%; max-width: 1560px; margin: 0 auto;
  padding: 0 clamp(16px, 2.4vw, 32px);
  display: flex; align-items: center; gap: 32px;
}
.header__logo img { height: 60px; width: auto; }
.header__nav { display: flex; gap: 30px; margin-left: auto; }
.header__nav a { position: relative; font-size: 14px; font-weight: 500; padding: 6px 0; }
.header__nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: var(--rojo); transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease);
}
.header__nav a:hover::after, .header__nav a.is-current::after { transform: scaleX(1); transform-origin: left; }
.header__actions { display: flex; align-items: center; gap: 18px; }
.header__phone { font-size: 13px; font-weight: 600; color: var(--gris); }
.header__phone:hover { color: var(--azul); }

.burger { display: none; width: 44px; height: 44px; position: relative; border-radius: 50%; border: 1px solid var(--linea); }
.burger span { position: absolute; left: 13px; right: 13px; height: 1.5px; background: var(--tinta); transition: transform .45s var(--ease), top .45s var(--ease); }
.burger span:nth-child(1) { top: 17px; }
.burger span:nth-child(2) { top: 25px; }
.menu-open .burger span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.menu-open .burger span:nth-child(2) { top: 21px; transform: rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 45;
  background: var(--papel);
  padding: calc(var(--header-h) + 32px) var(--gutter) 32px;
  display: flex; flex-direction: column; justify-content: space-between;
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
  transition: clip-path .8s var(--ease-io), visibility 0s .8s;
}
.menu-open .menu { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path .8s var(--ease-io); }
.menu__nav { display: grid; gap: 4px; }
.menu__nav a {
  font-family: var(--f-display); font-size: clamp(2.4rem, 11vw, 3.6rem); line-height: 1.15;
  opacity: 0; transform: translateY(30px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.menu-open .menu__nav a { opacity: 1; transform: none; transition-delay: calc(.25s + var(--i) * .06s); }
.menu__foot { display: grid; gap: 6px; color: var(--gris); font-size: 14px; }

/* ---------- Hero ---------- */
.hero { padding: var(--header-h) 12px 12px; }
.hero__frame {
  position: relative; overflow: hidden; isolation: isolate;
  height: calc(100svh - var(--header-h) - 12px); min-height: 600px;
  border-radius: 24px; background: var(--tinta); color: #fff;
}
.hero__slides, .hero__slide { position: absolute; inset: 0; }
.hero__slide { opacity: 0; transition: opacity 1.6s var(--ease); }
.hero__slide.is-active { opacity: 1; }
.hero__slide img { width: 100%; height: 100%; object-fit: cover; scale: 1.14; transition: scale 0s 1.6s; }
.hero__slide.is-active img { scale: 1; transition: scale 9s cubic-bezier(.2, .55, .3, 1); }
.hero__shade {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(180deg, rgba(8, 12, 18, .25) 0%, rgba(8, 12, 18, 0) 28%, rgba(8, 12, 18, .1) 55%, rgba(8, 12, 18, .82) 100%),
    linear-gradient(90deg, rgba(8, 12, 18, .5) 0%, rgba(8, 12, 18, 0) 60%);
}
.hero__inner {
  position: absolute; inset: 0; z-index: 2;
  display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 32px;
  padding: clamp(24px, 4vw, 64px);
}
.hero__content { max-width: 780px; }
.hero__title {
  font-family: var(--f-display); font-weight: 500;
  font-size: clamp(3.1rem, 7.6vw, 7.4rem); line-height: .95; letter-spacing: -.015em;
  margin: 20px 0 22px;
}
.hero__title em { color: var(--celeste-200); }
.hero__title .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero__title .line > span { display: inline-block; }
.hero__lead { max-width: 46ch; color: rgba(255, 255, 255, .82); font-size: clamp(15px, 1.2vw, 17px); }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* Entrada del hero tras la precarga */
.js .hero__title .line > span { transform: translateY(110%); transition: transform 1.3s var(--ease); }
.js .hero__eyebrow, .js .hero__lead, .js .hero__ctas, .js .hero__project, .js .hero__scroll {
  opacity: 0; transform: translateY(20px); transition: opacity 1.2s var(--ease), transform 1.2s var(--ease);
}
.is-ready .hero__title .line > span { transform: none; }
.is-ready .hero__title .line:nth-child(2) > span { transition-delay: .1s; }
.is-ready .hero__eyebrow { opacity: 1; transform: none; }
.is-ready .hero__lead { opacity: 1; transform: none; transition-delay: .3s; }
.is-ready .hero__ctas { opacity: 1; transform: none; transition-delay: .42s; }
.is-ready .hero__project { opacity: 1; transform: none; transition-delay: .55s; }
.is-ready .hero__scroll { opacity: 1; transform: none; transition-delay: .8s; }

.hero__project {
  width: 340px; padding: 22px 24px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .18);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.hero__project-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.hero__count { font-size: 13px; color: rgba(255, 255, 255, .7); font-variant-numeric: tabular-nums; }
.hero__count b { color: #fff; font-weight: 700; }
.hero__project-label { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: rgba(255, 255, 255, .6); }
.hero__project-name { font-family: var(--f-display); font-weight: 500; font-size: 2.3rem; line-height: 1.05; margin: 4px 0 4px; white-space: nowrap; }
.hero__project-loc { font-size: 14px; color: rgba(255, 255, 255, .75); }
.hero__bars { display: flex; gap: 8px; margin-top: 20px; }
.hero__bar { flex: 1; padding: 10px 0; }
.hero__bar span { display: block; height: 2px; background: rgba(255, 255, 255, .25); overflow: hidden; border-radius: 2px; }
.hero__bar i { display: block; height: 100%; background: #fff; transform: scaleX(0); transform-origin: left; }
.hero__bar.is-done i { transform: scaleX(1); }
.hero__bar.is-active i { animation: bar-fill var(--slide-ms, 6500ms) linear forwards; }
.hero__project:hover .hero__bar.is-active i { animation-play-state: paused; }
@keyframes bar-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.hero__scroll {
  position: absolute; z-index: 2; left: 50%; bottom: 22px; translate: -50% 0;
  display: grid; justify-items: center; gap: 8px;
  font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: rgba(255, 255, 255, .7);
}
.hero__scroll i { width: 1px; height: 38px; background: rgba(255, 255, 255, .3); position: relative; overflow: hidden; }
.hero__scroll i::after { content: ""; position: absolute; inset: 0; background: #fff; animation: scroll-hint 2.2s var(--ease-io) infinite; }
@keyframes scroll-hint { 0% { transform: translateY(-100%); } 60%, 100% { transform: translateY(100%); } }

/* ---------- Nosotros ---------- */
.about__grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(40px, 7vw, 110px); align-items: center; }
.about__statement {
  font-family: var(--f-display); font-weight: 500;
  font-size: clamp(1.8rem, 3.1vw, 2.8rem); line-height: 1.18;
  margin: 26px 0 40px;
}
.about__statement .w { opacity: .16; transition: opacity .5s var(--ease); }
.about__statement .w.on { opacity: 1; }
.no-js .about__statement .w { opacity: 1; }
.about__sign { display: flex; align-items: center; gap: 22px; padding: 22px 0; margin-bottom: 30px; border-top: 1px solid var(--linea); border-bottom: 1px solid var(--linea); }
.about__sign img { width: 150px; height: auto; flex: none; }
.about__sign p { font-size: 14px; color: var(--gris); }

.about__media { position: relative; height: clamp(460px, 52vw, 680px); }
.about__img { position: absolute; overflow: hidden; border-radius: var(--radius); }
.about__img img { width: 100%; height: 120%; margin-top: -10%; object-fit: cover; }
.about__img--a { inset: 0 22% 18% 0; }
.about__img--b { inset: 46% 0 0 44%; border: 8px solid var(--papel); border-radius: calc(var(--radius) + 6px); }
.about__badge {
  position: absolute; left: -10px; bottom: 6%;
  background: var(--azul); color: #fff; padding: 20px 24px; border-radius: 16px;
  display: grid; gap: 2px; max-width: 200px;
  box-shadow: 0 20px 40px -20px rgba(15, 47, 87, .6);
}
.about__badge strong { font-family: var(--f-display); font-size: 3rem; line-height: 1; font-weight: 600; }
.about__badge > span { font-size: 13px; color: rgba(255, 255, 255, .85); line-height: 1.35; }

.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  margin-top: clamp(70px, 9vw, 120px);
  border-top: 1px solid var(--linea);
}
.stat { padding: 30px 24px 0 0; display: grid; gap: 6px; }
.stat + .stat { padding-left: 24px; border-left: 1px solid var(--linea); }
.stat strong { font-family: var(--f-display); font-weight: 500; font-size: clamp(2.6rem, 4.4vw, 4rem); line-height: 1; color: var(--azul-900); font-variant-numeric: tabular-nums; }
.stat small { font-size: .45em; color: var(--gris); }
.stat > span { font-size: 14px; color: var(--gris); }

/* ---------- Cinta de proyectos ---------- */
.marquee { overflow: hidden; padding: 26px 0; border-block: 1px solid var(--linea); background: var(--papel); }
.marquee__track { display: flex; width: max-content; will-change: transform; }
.marquee__item {
  display: inline-flex; align-items: center; gap: 40px; padding-right: 40px;
  font-family: var(--f-display); font-size: clamp(2rem, 4.2vw, 3.6rem); line-height: 1; white-space: nowrap;
}
.marquee__item:nth-child(even) { font-style: italic; color: var(--azul); }
.marquee__item svg { width: .55em; height: .55em; color: var(--rojo); flex: none; }

/* ---------- Servicios ---------- */
.services__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 90px); align-items: start; }
.svc { border-top: 1px solid var(--linea-clara); }
.svc:last-child { border-bottom: 1px solid var(--linea-clara); }
.svc__head {
  width: 100%; display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 12px;
  padding: 26px 0; text-align: left;
}
.svc__num { font-size: 13px; color: var(--gris-claro); font-variant-numeric: tabular-nums; }
.svc__title {
  font-family: var(--f-display); font-size: clamp(1.7rem, 2.6vw, 2.4rem); line-height: 1.1;
  color: rgba(233, 237, 242, .55); transition: color .5s var(--ease), transform .6s var(--ease);
}
.svc__arrow { font-size: 20px; opacity: 0; transform: translateX(-10px); transition: opacity .4s var(--ease), transform .4s var(--ease); color: var(--celeste); }
.svc.is-active .svc__title, .svc__head:hover .svc__title { color: #fff; }
.svc.is-active .svc__title { transform: translateX(8px); }
.svc.is-active .svc__arrow { opacity: 1; transform: none; }
.svc__body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .6s var(--ease); }
.svc__body > div { overflow: hidden; }
.svc.is-active .svc__body { grid-template-rows: 1fr; }
.svc__body p { padding: 0 0 26px 68px; max-width: 52ch; color: rgba(233, 237, 242, .72); font-size: 15px; }
.svc__img { display: none; }

.svc-media { position: sticky; top: calc(var(--header-h) + 30px); aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; background: var(--tinta-2); }
.svc-media__item { position: absolute; inset: 0; z-index: 0; clip-path: inset(0 0 100% 0); transition: clip-path 1s var(--ease-io); }
.svc-media__item img { width: 100%; height: 100%; object-fit: cover; scale: 1.15; transition: scale 1.6s var(--ease); }
.svc-media__item.is-active { clip-path: inset(0 0 0 0); z-index: 2; }
.svc-media__item.is-active img { scale: 1; }
.svc-media__item.was-active { clip-path: inset(0 0 0 0); z-index: 1; }

/* ---------- Proyectos: galería 3D tipo barrel ---------- */
.barrel-band {
  margin: 0 12px;
  border-radius: 24px;
  background: #0b1012;
  color: #f2efe9;
  padding: 26px 0 34px;
  overflow: hidden;
}
.barrel-band__top {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 0 clamp(18px, 3vw, 40px);
  font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: rgba(242, 239, 233, .5);
}
.barrel {
  --cw: clamp(170px, 21vw, 290px); /* ancho de tarjeta; alto = ancho / 0.8 */
  position: relative;
  height: calc(var(--cw) * 1.25 + 220px);
  perspective: 1300px;
  perspective-origin: 50% 54%;
  overflow: hidden;
  cursor: grab; user-select: none; -webkit-user-select: none;
  touch-action: pan-y;
}
.barrel:focus-visible { outline-offset: -6px; }
.barrel.is-dragging { cursor: grabbing; }
.barrel__ring {
  position: absolute; left: 50%; top: 54%; width: 0; height: 0;
  transform-style: preserve-3d;
  transform: rotateX(-8deg);
}
.barrel__card {
  position: absolute; left: 0; top: 0;
  width: var(--cw); aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #151b1e;
  will-change: transform, filter;
}
.barrel__card img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.barrel__card::after {
  content: ""; position: absolute; inset: 55% 0 0; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(5, 8, 10, .75));
  opacity: calc(1 - var(--depth, 0) * 25);
}
.barrel__cap {
  position: absolute; left: 16px; right: 16px; bottom: 14px; z-index: 1;
  color: #fff; text-align: left; pointer-events: none;
  opacity: calc(1 - var(--depth, 0) * 25); /* solo se lee en las tarjetas del frente */
}
.barrel__cap b { display: block; font-family: var(--f-display); font-size: 1.35rem; font-weight: 500; line-height: 1.1; }
.barrel__cap span { font-size: 12px; opacity: .8; }

.barrel-ui { display: flex; align-items: center; justify-content: center; gap: clamp(20px, 5vw, 60px); padding: 0 16px; }
.barrel-ui__focus { display: grid; justify-items: center; text-align: center; min-width: min(420px, 60vw); }
.barrel-ui__label { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: rgba(242, 239, 233, .5); }
.barrel-ui__name { font-family: var(--f-display); font-size: clamp(2rem, 3.6vw, 3rem); line-height: 1.1; white-space: nowrap; color: #f2efe9; }
.barrel-ui__name:hover { color: var(--celeste-200); }
.barrel-ui__loc { font-size: 14px; color: rgba(242, 239, 233, .6); }
.round-btn--dark { border-color: rgba(242, 239, 233, .2); color: #f2efe9; }
.round-btn--dark:hover { background: #f2efe9; color: #0b1012; border-color: #f2efe9; }

/* Listado */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin: clamp(70px, 9vw, 120px) 0 36px; }
.chip {
  padding: 10px 18px; border-radius: 999px; border: 1px solid var(--linea);
  font-size: 13px; font-weight: 600; transition: background .3s, color .3s, border-color .3s;
}
.chip:hover { border-color: var(--tinta); }
.chip.is-active { background: var(--tinta); color: #fff; border-color: var(--tinta); }

.pgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 28px; }
.pcard { width: 100%; text-align: left; display: grid; gap: 18px; align-content: start; }
.pcard[hidden] { display: none; }
.js .pcard.no-tr { transition: none; }
.pcard__name, .pcard__loc { display: block; }
.pcard__media { display: block; position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius); background: var(--papel-2); }
.pcard__media img { width: 100%; height: 100%; object-fit: cover; transition: scale 1.1s var(--ease); }
.pcard:hover .pcard__media img { scale: 1.06; }
.pcard__media .pill { position: absolute; top: 14px; left: 14px; z-index: 1; background: rgba(245, 243, 239, .92); }
.pcard__go {
  position: absolute; right: 14px; bottom: 14px; z-index: 1;
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; color: var(--tinta);
  transform: translateY(12px) scale(.8); opacity: 0;
  transition: transform .5s var(--ease), opacity .5s var(--ease);
}
.pcard:hover .pcard__go, .pcard:focus-visible .pcard__go { transform: none; opacity: 1; }
.pcard__name { font-family: var(--f-display); font-size: 1.9rem; font-weight: 500; line-height: 1.1; }
.pcard__loc { font-size: 14px; color: var(--gris); margin-top: 2px; }
.pcard__specs { display: flex; flex-wrap: wrap; gap: 6px 16px; padding-top: 12px; margin-top: 12px; border-top: 1px solid var(--linea); font-size: 13px; color: var(--gris); }
.pcard__specs b { color: var(--tinta); font-weight: 600; }

/* ---------- Proceso ---------- */
.process__grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(40px, 8vw, 120px); align-items: start; }
.process__head { position: sticky; top: calc(var(--header-h) + 40px); display: grid; gap: 22px; justify-items: start; }
.steps { position: relative; padding-left: 48px; }
.steps__line { position: absolute; left: 10px; top: 8px; bottom: 8px; width: 1px; background: var(--linea); }
.steps__line i { position: absolute; inset: 0; background: var(--azul); transform-origin: top; transform: scaleY(0); }
.step { position: relative; padding: 0 0 clamp(60px, 9vw, 110px); opacity: .35; transition: opacity .7s var(--ease); }
.step:last-child { padding-bottom: 0; }
.step.is-on { opacity: 1; }
.step::before {
  content: ""; position: absolute; left: -43px; top: 8px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--papel-2); border: 1.5px solid var(--gris-claro); transition: background .5s, border-color .5s;
}
.step.is-on::before { background: var(--azul); border-color: var(--azul); }
.step__num { font-size: 13px; font-weight: 700; color: var(--rojo); letter-spacing: .1em; }
.step h3 { font-family: var(--f-display); font-weight: 500; font-size: clamp(2rem, 3.2vw, 2.8rem); line-height: 1.1; margin: 8px 0 12px; }
.step p { color: var(--gris); max-width: 46ch; }

/* ---------- En obra (pila de tarjetas) ---------- */
.site__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 8vw, 120px); align-items: center; }
.site__text { display: grid; gap: 22px; justify-items: start; }
.site__caption { margin-top: 18px; padding-top: 24px; border-top: 1px solid var(--linea); min-height: 150px; width: 100%; }
.site__count { font-size: 13px; color: var(--gris); font-variant-numeric: tabular-nums; }
.site__caption h3 { font-family: var(--f-display); font-weight: 500; font-size: 2rem; margin: 6px 0 6px; }
.site__caption p { color: var(--gris); }
.site__ctrls { display: flex; gap: 10px; }

.stack {
  position: relative; width: min(100%, 440px); aspect-ratio: 4 / 5; justify-self: center;
  touch-action: pan-y; user-select: none; -webkit-user-select: none;
}
.stack__card {
  position: absolute; inset: 0; border-radius: 22px; overflow: hidden;
  background: var(--papel-2); cursor: grab;
  box-shadow: 0 30px 60px -30px rgba(14, 20, 27, .5);
  will-change: transform;
}
.stack__card:active { cursor: grabbing; }
.stack__card img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }

/* ---------- Testimonios ---------- */
.quotes__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.quote { background: var(--papel); border-radius: var(--radius); padding: 34px 30px 28px; display: flex; flex-direction: column; justify-content: space-between; gap: 34px; }
.quote p { font-family: var(--f-display); font-size: 1.6rem; line-height: 1.25; }
.quote footer { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--gris); }
.quote footer img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; }
.quote footer b { display: block; color: var(--tinta); font-size: 14px; }

/* ---------- CTA ---------- */
.cta { position: relative; overflow: hidden; color: #fff; padding: clamp(120px, 16vw, 220px) 0; isolation: isolate; }
.cta__bg { position: absolute; inset: 0; z-index: -1; }
.cta__bg img { width: 100%; height: 130%; margin-top: -15%; object-fit: cover; }
.cta__bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(15, 47, 87, .88), rgba(14, 20, 27, .55)); }
.cta__inner { display: grid; gap: 22px; justify-items: start; }
.cta__title { font-family: var(--f-display); font-weight: 500; font-size: clamp(3rem, 8vw, 7rem); line-height: .98; }
.cta__title em { color: var(--celeste-200); }
.cta__btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; }

/* ---------- Contacto ---------- */
.contact__grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(40px, 7vw, 100px); align-items: start; }
.contact__list { margin: 40px 0 44px; display: grid; }
.contact__list li { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 18px 0; border-top: 1px solid var(--linea); }
.contact__list li:last-child { border-bottom: 1px solid var(--linea); }
.contact__list small { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--gris); padding-top: 2px; }
.contact__list a:hover { color: var(--azul); }
.contact__subtitle { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--gris); margin-bottom: 14px; }

.socials { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.social {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  border: 1px solid var(--linea); border-radius: 14px;
  transition: background .35s var(--ease), border-color .35s var(--ease), transform .35s var(--ease);
}
.social:hover { background: #fff; border-color: transparent; transform: translateY(-3px); }
.social svg { width: 22px; height: 22px; flex: none; color: var(--azul); }
.social span { display: grid; line-height: 1.3; font-size: 13px; color: var(--gris); min-width: 0; }
.social b { color: var(--tinta); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.form { background: #fff; border-radius: 24px; padding: clamp(24px, 3.4vw, 44px); display: grid; gap: 18px; box-shadow: 0 40px 80px -50px rgba(14, 20, 27, .35); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 8px; }
.field span { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--gris); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 15px; color: var(--tinta);
  padding: 13px 14px; border-radius: 12px; border: 1px solid var(--linea); background: var(--papel);
  transition: border-color .3s, background .3s, box-shadow .3s;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--azul); background: #fff; box-shadow: 0 0 0 4px rgba(28, 93, 168, .12); }
.field.is-invalid input { border-color: var(--rojo); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--gris); }
.check input { margin-top: 3px; accent-color: var(--azul); }
.check.is-invalid { color: var(--rojo); }
.form__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.form__msg { font-size: 14px; min-height: 1.5em; color: var(--azul); }
.form__msg.is-error { color: var(--rojo); }

.map { margin-top: clamp(60px, 8vw, 100px); height: 380px; border-radius: var(--radius); overflow: hidden; background: var(--papel-2); }
.map iframe { width: 100%; height: 100%; border: 0; filter: grayscale(1) contrast(1.05); }

/* ---------- Pie ---------- */
.footer { background: var(--tinta); color: rgba(233, 237, 242, .7); padding: 90px 0 30px; overflow: hidden; }
.footer__top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; }
.footer__logo { background: #fff; border-radius: 16px; padding: 16px 20px; width: max-content; margin-bottom: 20px; }
.footer__logo img { width: 170px; height: auto; }
.footer__brand p { max-width: 36ch; font-size: 14px; }
.footer__col { display: grid; gap: 10px; align-content: start; font-size: 14px; }
.footer__col h4 { color: #fff; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; margin-bottom: 6px; }
.footer__col a:hover { color: #fff; }
.footer__word {
  font-family: var(--f-display); font-weight: 500; color: #fff;
  font-size: clamp(5rem, 19vw, 18rem); line-height: .9; letter-spacing: -.02em;
  margin: 70px 0 30px; white-space: nowrap; opacity: .08;
}
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 13px; padding-top: 24px; border-top: 1px solid var(--linea-clara); }
.footer__bottom a:hover { color: #fff; }

/* ---------- WhatsApp flotante ---------- */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 40;
  width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center;
  background: #1fae5b; color: #fff;
  box-shadow: 0 14px 30px -10px rgba(31, 174, 91, .7);
  transition: transform .4s var(--ease);
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 28px; height: 28px; }
.wa-float::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #1fae5b;
  animation: wa-pulse 2.6s var(--ease) infinite;
}
@keyframes wa-pulse { from { transform: scale(1); opacity: .8; } to { transform: scale(1.6); opacity: 0; } }

/* ---------- Ficha de proyecto ---------- */
.pd { position: fixed; inset: 0; z-index: 100; }
.pd[hidden] { display: none; }
.pd__backdrop { position: absolute; inset: 0; background: rgba(14, 20, 27, .55); backdrop-filter: blur(6px); }
.pd__panel {
  position: absolute; inset: 14px; overflow-y: auto; overscroll-behavior: contain;
  background: var(--papel); border-radius: 24px;
}
.pd__close {
  position: sticky; top: 16px; margin: 16px 16px -64px auto; z-index: 3;
  width: 48px; height: 48px; border-radius: 50%; background: #fff; display: grid; place-items: center;
  font-size: 16px; box-shadow: 0 8px 20px -10px rgba(0, 0, 0, .3); transition: transform .4s var(--ease);
}
.pd__close:hover { transform: rotate(90deg); }
.pd__grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(28px, 4vw, 60px); padding: clamp(16px, 3vw, 40px); }
.pd__hero { aspect-ratio: 4 / 3; border-radius: 18px; overflow: hidden; background: var(--papel-2); }
.pd__hero img { width: 100%; height: 100%; object-fit: cover; }
.pd__thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 10px; }
.pd__thumb { aspect-ratio: 1; border-radius: 12px; overflow: hidden; opacity: .55; transition: opacity .3s; outline-offset: 2px; }
.pd__thumb.is-active, .pd__thumb:hover { opacity: 1; }
.pd__thumb img { width: 100%; height: 100%; object-fit: cover; }
.pd__info { display: grid; gap: 20px; align-content: start; padding-top: 20px; }
.pd__top { display: flex; gap: 14px; align-items: center; }
.pd__top .pill { background: #fff; }
.pd__type { font-size: 13px; color: var(--gris); }
.pd__title { font-family: var(--f-display); font-weight: 500; font-size: clamp(2.6rem, 4.6vw, 4.4rem); line-height: 1; }
.pd__loc { display: flex; gap: 8px; align-items: center; color: var(--gris); }
.pd__loc svg { width: 18px; height: 18px; color: var(--rojo); flex: none; }
.pd__desc { font-size: 16px; max-width: 54ch; }
.pd__specs { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--linea); }
.pd__specs div { padding: 16px 0; border-bottom: 1px solid var(--linea); }
.pd__specs dt { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--gris); }
.pd__specs dd { font-family: var(--f-display); font-size: 1.7rem; line-height: 1.2; }
.pd__progress:empty { display: none; }
.pd__progress p { display: flex; justify-content: space-between; font-size: 13px; color: var(--gris); margin-bottom: 8px; }
.pd__progress p b { color: var(--tinta); }
.pd__progress span { display: block; height: 4px; border-radius: 4px; background: var(--papel-2); overflow: hidden; }
.pd__progress i { display: block; height: 100%; background: var(--azul); transform-origin: left; }
.pd__amen { display: flex; flex-wrap: wrap; gap: 8px; }
.pd__amen li { padding: 8px 14px; border-radius: 999px; background: #fff; font-size: 13px; }
.pd__ctas { display: flex; flex-wrap: wrap; gap: 10px; padding-bottom: 10px; }
.pd-ghost { position: fixed; z-index: 120; object-fit: cover; pointer-events: none; }

/* ---------- Responsivo ---------- */
@media (max-width: 1180px) {
  .header__nav { gap: 22px; }
  .header__phone { display: none; }
}

@media (max-width: 980px) {
  :root { --header-h: 72px; }
  .header__nav, .header__actions .btn { display: none; }
  .header__actions { margin-left: auto; }
  .burger { display: block; }
  .header__logo img { height: 50px; }

  .hero__inner { grid-template-columns: 1fr; gap: 24px; }
  .hero__project { width: 100%; max-width: 420px; }
  .hero__scroll { display: none; }

  .about__grid, .services__grid, .process__grid, .site__grid, .contact__grid, .pd__grid { grid-template-columns: 1fr; }
  .section-head--split { grid-template-columns: 1fr; }
  .section-head__aside { justify-self: start; }
  .about__media { height: clamp(420px, 90vw, 620px); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { padding-left: 0; border-left: 0; }
  .stat { padding-bottom: 26px; }

  .svc-media { display: none; }
  .svc__img { display: block; margin: 0 0 26px 68px; aspect-ratio: 16 / 10; border-radius: var(--radius-sm); overflow: hidden; }
  .svc__img img { width: 100%; height: 100%; object-fit: cover; }

  .process__head { position: static; }
  .pgrid { grid-template-columns: repeat(2, 1fr); }
  .quotes__grid { grid-template-columns: 1fr; }
  .footer__top { grid-template-columns: 1fr 1fr; }
  .pd__info { padding-top: 0; }
}

@media (max-width: 640px) {
  .hero { padding: var(--header-h) 8px 8px; }
  .hero__frame { border-radius: 18px; min-height: 640px; }
  .hero__project { padding: 18px; }
  .hero__project-name { font-size: 1.9rem; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat + .stat { padding-left: 16px; }
  .stat:nth-child(3) { padding-left: 0; }
  .svc__head { grid-template-columns: 40px 1fr auto; }
  .svc__body p { padding-left: 52px; }
  .svc__img { margin-left: 52px; }
  .barrel { --cw: 54vw; perspective: 1000px; height: calc(var(--cw) * 1.25 + 130px); }
  .barrel-band { margin: 0 8px; border-radius: 18px; }
  .barrel-band__top span:last-child { display: none; }
  .barrel-ui__focus { min-width: 0; }
  .barrel-ui__name { white-space: normal; }
  .pgrid { grid-template-columns: 1fr; }
  .form__row, .socials { grid-template-columns: 1fr; }
  .contact__list li { grid-template-columns: 1fr; gap: 2px; }
  .footer__top { grid-template-columns: 1fr; }
  .pd__panel { inset: 0; border-radius: 0; }
  .pd__specs { grid-template-columns: repeat(2, 1fr); }
  .about__badge { left: 0; }
}

/* ---------- Movimiento reducido ---------- */
/* Solo se activa si RESPETAR_MOVIMIENTO_REDUCIDO = true en js/main.js */
.reduce-motion *, .reduce-motion *::before, .reduce-motion *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
html.reduce-motion { scroll-behavior: auto; }
