/* ==========================================================
   ICAPSA Infraestructura — estilos
   Paleta: negro #0c0c0c · rojo #e31e24 · blanco · grises
   ========================================================== */
:root {
  --red: #e31e24;
  --red-dark: #b8151a;
  --black: #0c0c0c;
  --ink: #1c1c1c;
  --gray-700: #4a4a4a;
  --gray-500: #7a7a7a;
  --gray-200: #e4e4e4;
  --gray-100: #f2f2f2;
  --white: #ffffff;

  --font-head: "Montserrat", "Segoe UI", Arial, sans-serif;
  --font-caps: "Josefin Sans", "Montserrat", Arial, sans-serif;
  --font-body: "Open Sans", "Segoe UI", Arial, sans-serif;

  --radius: 2px;
  --header-h: 84px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 70px; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--gray-700);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-loading { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-head); color: var(--ink); margin: 0; line-height: 1.15; }
p { margin: 0 0 1.1em; }
::selection { background: var(--red); color: var(--white); }

/* El contenido va por encima de la carretera de fondo */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding-inline: 24px; position: relative; z-index: 2; }
.text-red { color: var(--red); }

/* ==========================================================
   LOADER
   ========================================================== */
.loader {
  position: fixed; inset: 0; z-index: 200; background: var(--black);
  display: grid; place-items: center;
  transition: clip-path 1s var(--ease-out) .1s, visibility 0s 1.2s;
  clip-path: inset(0 0 0 0);
}
body.is-loaded .loader { clip-path: inset(0 0 100% 0); visibility: hidden; }
.loader__inner { display: flex; flex-direction: column; align-items: center; gap: 26px; }
.loader__a { width: 90px; overflow: visible; }
.loader__stroke {
  fill: none; stroke: var(--white); stroke-width: 12; stroke-linejoin: miter;
  stroke-dasharray: 200; stroke-dashoffset: 200; animation: draw 1s var(--ease) forwards;
}
.loader__dash {
  fill: none; stroke: var(--red); stroke-width: 4; stroke-dasharray: 7 6;
  animation: dashRun .6s linear infinite; opacity: 0; animation: dashRun .6s linear infinite, fadeIn .3s .6s forwards;
}
.loader__logo { width: 180px; opacity: 0; animation: fadeUp .6s .5s var(--ease) forwards; }
.loader__bar { width: 180px; height: 3px; background: rgba(255,255,255,.12); overflow: hidden; }
.loader__bar span { display: block; height: 100%; width: 100%; background: var(--red); transform-origin: left; animation: loadBar 1.3s var(--ease) forwards; transform: scaleX(0); }

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes dashRun { to { stroke-dashoffset: -13; } }
@keyframes fadeIn { to { opacity: 1; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes loadBar { to { transform: scaleX(1); } }

/* ==========================================================
   PROGRESO + VOLVER ARRIBA
   ========================================================== */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; pointer-events: none; }
.progress span {
  display: block; height: 100%; transform-origin: left; transform: scaleX(0);
  background: repeating-linear-gradient(90deg, var(--red) 0 22px, #ff6b6f 22px 30px);
}
.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 40; width: 48px; height: 48px;
  display: grid; place-items: center; background: var(--red); color: var(--white);
  font-family: var(--font-head); font-weight: 800; font-size: 1.2rem;
  opacity: 0; transform: translateY(20px) scale(.8); pointer-events: none;
  transition: opacity .4s, transform .4s var(--ease-out), background .25s;
  box-shadow: 0 10px 24px rgba(227,30,36,.35);
}
.to-top.is-shown { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--black); transform: translateY(-4px); }

/* ==========================================================
   CARRETERA "A" DE FONDO
   ========================================================== */
.road-bg {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; overflow: hidden;
}
.road-bg svg {
  position: absolute; left: 50%; bottom: -4vh;
  height: 108vh; width: 162vh; transform: translateX(-50%); overflow: visible;
}
.road-bg__group { will-change: transform; transform-origin: 600px 800px; }
.road-asphalt { fill: none; stroke: rgba(12,12,12,.05); stroke-width: 124; stroke-linejoin: miter; }
.road-edge    { fill: none; stroke: rgba(255,255,255,.09); stroke-width: 132; stroke-linejoin: miter; }
.road-lane    { fill: none; stroke: rgba(255,255,255,.32); stroke-width: 5; stroke-dasharray: 34 30; stroke-linejoin: miter; }
.road-center  { fill: none; stroke: rgba(227,30,36,.15); stroke-width: 6; stroke-dasharray: 26 24; }
.car rect { stroke: none; }
.car--tail rect { fill: rgba(227,30,36,.45); }
.car--head rect { fill: rgba(255,240,200,.5); }
/* En secciones claras las líneas blancas se leen como huecos del asfalto;
   en secciones oscuras aparecen los bordes y carriles */

/* ==========================================================
   TIPOS COMUNES
   ========================================================== */
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-caps); font-variant: small-caps;
  font-size: 1.05rem; letter-spacing: .14em; text-transform: lowercase;
  color: var(--gray-500); margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 34px; height: 4px; background: var(--red); transition: width .8s var(--ease-out) .35s; }
[data-reveal]:not(.is-visible) .eyebrow::before { width: 0; }
.eyebrow--light { color: #cfcfcf; }

.title {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 900; text-transform: uppercase; letter-spacing: .01em;
  margin-bottom: 26px;
}
.title--light { color: var(--white); }

.btn {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--font-head); font-weight: 700; font-size: .85rem;
  letter-spacing: .12em; text-transform: uppercase;
  padding: 16px 30px; border: 2px solid transparent; border-radius: var(--radius);
  cursor: pointer; transition: background .3s, color .3s, border-color .3s, transform .3s var(--ease-out), box-shadow .3s;
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .7s var(--ease);
}
.btn:hover::before { transform: translateX(120%); }
.btn:hover { transform: translateY(-3px); }
.btn--red { background: var(--red); color: var(--white); }
.btn--red:hover { background: var(--red-dark); box-shadow: 0 12px 26px rgba(227,30,36,.35); }
.btn--outline { border-color: var(--white); color: var(--white); }
.btn--outline:hover { background: var(--white); color: var(--black); }
.btn--sm { padding: 10px 20px; font-size: .75rem; }
.btn--block { width: 100%; }

/* ==========================================================
   ANIMACIONES DE APARICIÓN
   ========================================================== */
[data-reveal] {
  opacity: 0;
  transition: opacity .9s var(--ease), transform 1s var(--ease-out);
  transition-delay: var(--d, 0ms);
}
[data-reveal="up"]    { transform: translateY(50px); }
[data-reveal="left"]  { transform: translateX(-60px); }
[data-reveal="right"] { transform: translateX(60px); }
[data-reveal="zoom"]  { transform: scale(.9); }
[data-reveal="clip"]  { opacity: 1; }
[data-reveal].is-visible { opacity: 1; transform: none; }

/* Cortinilla roja sobre imágenes */
.wipe { position: relative; overflow: hidden; }
.wipe::after {
  content: ""; position: absolute; inset: 0; z-index: 4; background: var(--red);
  transform-origin: right; transform: scaleX(1);
  transition: transform 1.1s var(--ease-out) calc(var(--d, 0ms) + .25s);
  pointer-events: none;
}
.wipe--left::after { transform-origin: left; }
.wipe img { transform: scale(1.25); transition: transform 1.8s var(--ease-out) calc(var(--d, 0ms) + .25s); }
.is-visible.wipe::after, .is-visible .wipe::after { transform: scaleX(0); }
.is-visible.wipe img, .is-visible .wipe img { transform: scale(1); }

/* ==========================================================
   HEADER
   ========================================================== */
.header {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header-h);
  transition: background .35s, box-shadow .35s, height .35s, transform .45s var(--ease-out);
}
.header__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.header__logo { position: relative; display: block; width: 190px; transition: width .35s; }
.logo { width: 100%; transition: opacity .35s; }
.logo--dark { opacity: 0; }
.logo--light { position: absolute; inset: 0; }
.header.is-scrolled { background: rgba(255,255,255,.94); backdrop-filter: blur(10px); box-shadow: 0 2px 20px rgba(0,0,0,.08); height: 70px; }
.header.is-scrolled .header__logo { width: 160px; }
.header.is-scrolled .logo--dark { opacity: 1; }
.header.is-scrolled .logo--light { opacity: 0; }
.header.is-hidden { transform: translateY(-100%); }

.nav { display: flex; align-items: center; gap: 30px; }
.nav a:not(.btn) {
  font-family: var(--font-head); font-weight: 600; font-size: .8rem;
  letter-spacing: .1em; text-transform: uppercase; color: var(--white);
  position: relative; padding: 6px 0; transition: color .3s;
}
.nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%;
  background: repeating-linear-gradient(90deg, var(--red) 0 8px, transparent 8px 12px);
  transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease-out);
}
.nav a:not(.btn):hover::after, .nav a.is-active::after { transform: scaleX(1); transform-origin: left; }
.header.is-scrolled .nav a:not(.btn) { color: var(--ink); }
.nav a.is-active { color: var(--red) !important; }

.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 26px; height: 2px; margin: 6px 0; background: var(--white); transition: .35s var(--ease-out); }
.header.is-scrolled .nav-toggle span, .header.menu-open .nav-toggle span { background: var(--ink); }

/* ==========================================================
   HERO
   ========================================================== */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center; overflow: hidden; background: var(--black);
}
.hero__bg {
  position: absolute; inset: -8% -4%; background-size: cover; background-position: center;
  transform: scale(1.18); transition: transform 2.8s var(--ease-out);
}
body.is-loaded .hero__bg { transform: scale(1); }
.hero__overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(100deg, rgba(8,8,8,.93) 0%, rgba(8,8,8,.72) 45%, rgba(8,8,8,.3) 100%),
    linear-gradient(0deg, rgba(8,8,8,.6), transparent 40%);
}
.hero__content { padding-block: 140px 110px; }
.hero__title {
  color: var(--white); font-weight: 900; text-transform: uppercase;
  font-size: clamp(2.5rem, 6.5vw, 5.2rem); max-width: 900px; margin-bottom: 26px;
}
.hero__title .line { display: block; overflow: hidden; padding-bottom: .04em; }
.hero__title .line > span {
  display: inline-block; transform: translateY(110%) skewY(6deg);
  transition: transform 1.1s var(--ease-out) calc(var(--d) + .9s);
}
body.is-loaded .hero__title .line > span { transform: none; }
.hero-in { opacity: 0; transform: translateY(26px); transition: opacity 1s var(--ease) calc(var(--d) + .9s), transform 1s var(--ease-out) calc(var(--d) + .9s); }
body.is-loaded .hero-in { opacity: 1; transform: none; }
.hero .eyebrow::before { width: 0; transition: width .9s var(--ease-out) 1.2s; }
body.is-loaded .hero .eyebrow::before { width: 34px; }
.hero__text { color: #d6d6d6; font-size: 1.15rem; max-width: 560px; margin-bottom: 38px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 16px; }

.hero__scroll {
  position: absolute; left: 50%; bottom: 44px; z-index: 3; margin-left: -13px;
  width: 26px; height: 42px; border: 2px solid rgba(255,255,255,.7); border-radius: 14px;
}
.hero__scroll span {
  position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; margin-left: -1.5px;
  background: var(--red); border-radius: 2px; animation: scrollDot 1.8s var(--ease) infinite;
}
@keyframes scrollDot { 0% { opacity: 0; transform: translateY(-4px); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(16px); } }

/* Franja roja con carril en movimiento (guiño al logo) */
.road-stripe {
  position: absolute; left: 0; right: 0; bottom: 0; height: 14px; background: var(--red); z-index: 3;
}
.road-stripe::after {
  content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; transform: translateY(-50%);
  background: repeating-linear-gradient(90deg, #fff 0 28px, transparent 28px 52px);
  background-size: 52px 2px; animation: laneMove 1.2s linear infinite; opacity: .9;
}
.road-stripe--top { top: 0; bottom: auto; }
@keyframes laneMove { to { background-position: 52px 0; } }

/* ==========================================================
   SECCIONES
   ========================================================== */
.section { padding-block: 110px; position: relative; }
.section--light { background: var(--white); }
.section--gray { background: var(--gray-100); }
.section--dark { background: var(--black); color: #bdbdbd; }
.section__head { max-width: 720px; margin-bottom: 60px; }
.section__head--split { max-width: none; display: grid; grid-template-columns: 1fr 1.2fr; gap: 50px; align-items: end; }
.section__lead { font-size: 1.08rem; }

.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: 80px; align-items: center; }
.split--reverse .split__media { order: -1; }
.split__media { position: relative; }

.photo { margin: 0; position: relative; overflow: hidden; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo--tall { aspect-ratio: 4 / 5; }
.photo--tall::before {
  content: ""; position: absolute; top: 0; left: 0; width: 8px; height: 38%; background: var(--red); z-index: 3;
}
.photo--tall.is-visible:hover img, .is-visible .photo--tall:hover img { transform: scale(1.06); }
.photo--framed { aspect-ratio: 4 / 3; overflow: visible; }
.photo--framed::before {
  content: ""; position: absolute; inset: 24px -24px -24px 24px; background: var(--red);
  transform: translate(-24px, -24px); transition: transform 1.2s var(--ease-out) .4s;
}
.is-visible .photo--framed::before { transform: none; }
.photo--framed img { position: relative; transition: transform .8s var(--ease-out); }
.photo--framed:hover img { transform: translate(-6px, -6px); }

.stat-card {
  position: absolute; right: -26px; bottom: 40px; z-index: 5; background: var(--black); color: var(--white);
  padding: 22px 28px; display: flex; align-items: center; gap: 16px; border-left: 6px solid var(--red);
  animation: floaty 5s ease-in-out infinite;
}
@keyframes floaty { 50% { transform: translateY(-10px); } }
.stat-card__num { font-family: var(--font-head); font-size: 3rem; font-weight: 900; line-height: 1; min-width: 1ch; }
.stat-card__label { font-family: var(--font-caps); font-size: .95rem; letter-spacing: .1em; text-transform: uppercase; line-height: 1.3; }

.checklist { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.checklist li { position: relative; padding-left: 36px; color: var(--white); font-weight: 600; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .45em; width: 18px; height: 10px;
  border-left: 3px solid var(--red); border-bottom: 3px solid var(--red); transform: rotate(-45deg);
}

/* ==========================================================
   CINTA (TICKER)
   ========================================================== */
.ticker { position: relative; z-index: 2; background: var(--black); overflow: hidden; padding-block: 22px; transform: skewY(-1.5deg); margin-block: -10px; }
.ticker__track { display: flex; align-items: center; width: max-content; animation: ticker 40s linear infinite; }
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker span {
  font-family: var(--font-head); font-weight: 800; font-size: clamp(1rem, 2vw, 1.4rem);
  text-transform: uppercase; letter-spacing: .06em; color: var(--white); white-space: nowrap; padding-inline: 26px;
}
.ticker span:nth-of-type(odd) { color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,.75); }
.ticker i {
  width: 40px; height: 4px; flex: none;
  background: repeating-linear-gradient(90deg, var(--red) 0 10px, transparent 10px 15px);
}
@keyframes ticker { to { transform: translateX(-50%); } }

/* ==========================================================
   SERVICIOS
   ========================================================== */
.services { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.service {
  position: relative; background: var(--white); overflow: hidden;
  display: flex; flex-direction: column; box-shadow: 0 1px 0 rgba(0,0,0,.04);
}
.service.is-visible {
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--ty, 0px));
}
.service.tilt-ready { transition: transform .25s var(--ease), box-shadow .4s; }
.service:hover { --ty: -8px; box-shadow: 0 24px 50px rgba(0,0,0,.14); }
.service::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .35s; z-index: 3;
  background: radial-gradient(280px circle at var(--mx, 50%) var(--my, 50%), rgba(227,30,36,.13), transparent 65%);
}
.service:hover::after { opacity: 1; }
.service__img { aspect-ratio: 16 / 11; overflow: hidden; }
.service__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease-out), filter .6s; }
.service:hover .service__img img { transform: scale(1.1); filter: contrast(1.12); }
.service__icon {
  position: absolute; top: 18px; right: 18px; width: 58px; height: 58px; background: rgba(12,12,12,.9);
  display: grid; place-items: center; z-index: 2; transition: background .35s, transform .5s var(--ease-out);
}
.service__icon::before { content: ""; position: absolute; left: 0; bottom: 8px; width: 5px; height: 20px; background: var(--red); transition: height .4s var(--ease-out), bottom .4s var(--ease-out); }
.service:hover .service__icon { background: var(--red); transform: rotate(-6deg) scale(1.08); }
.service:hover .service__icon::before { background: var(--black); height: 100%; bottom: 0; }
.service__icon svg {
  width: 32px; height: 32px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 160; stroke-dashoffset: 0;
}
.service:hover .service__icon svg { animation: iconDraw 1s var(--ease) both; }
@keyframes iconDraw { from { stroke-dashoffset: 160; } to { stroke-dashoffset: 0; } }
.service__body { position: relative; padding: 24px 24px 28px; flex: 1; }
.service__body::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--red);
  transform: scaleX(.25); transform-origin: left; transition: transform .6s var(--ease-out);
}
.service:hover .service__body::before, .service.is-visible .service__body::before { transform: scaleX(1); transition-delay: calc(var(--d, 0ms) + .5s); }
.service:hover .service__body::before { transition-delay: 0s; }
.service__num { position: absolute; right: 20px; top: 16px; font-family: var(--font-head); font-weight: 900; font-size: 2rem; color: rgba(12,12,12,.06); transition: color .4s; }
.service:hover .service__num { color: rgba(227,30,36,.18); }
.service__body h3 {
  font-family: var(--font-caps); font-variant: small-caps; text-transform: none;
  font-weight: 600; font-size: 1.2rem; letter-spacing: .06em; margin-bottom: 10px; color: var(--ink); padding-right: 30px;
}
.service__body p { font-size: .92rem; margin: 0; }
.service--cta {
  background: var(--red); color: var(--white); padding: 34px 28px; justify-content: center;
  background-image: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
}
.service--cta::after { background: radial-gradient(280px circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,.2), transparent 65%); }
.service--cta h3 { color: var(--white); font-size: 1.45rem; font-weight: 800; text-transform: uppercase; }
.service--cta .eyebrow::before { background: var(--white); }
.service--cta .arrow { font-size: 2.2rem; margin-top: 20px; transition: transform .4s var(--ease-out); display: inline-block; }
.service--cta:hover .arrow { transform: translateX(14px); }

/* ==========================================================
   PILARES
   ========================================================== */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--gray-200); position: relative; }
.pillar { position: relative; padding: 44px 40px 20px 0; border-right: 1px solid var(--gray-200); }
.pillar + .pillar { padding-left: 40px; }
.pillar:last-child { border-right: 0; }
.pillar::before {
  content: ""; position: absolute; top: -1px; left: 0; height: 3px; width: 60px; background: var(--red);
  transform: scaleX(0); transform-origin: left; transition: transform .8s var(--ease-out) calc(var(--d, 0ms) + .4s), width .5s var(--ease-out);
}
.pillar + .pillar::before { left: 40px; }
.pillar.is-visible::before { transform: scaleX(1); }
.pillar:hover::before { width: calc(100% - 40px); }
.pillar__num { display: inline-block; font-family: var(--font-head); font-weight: 900; font-size: 3rem; color: var(--red); line-height: 1; transition: transform .5s var(--ease-out); }
.pillar:hover .pillar__num { transform: translateX(8px); }
.pillar h3 { font-size: 1.2rem; text-transform: uppercase; font-weight: 800; margin: 18px 0 14px; }

/* ==========================================================
   PROYECTOS
   ========================================================== */
.project { display: grid; grid-template-columns: 380px 1fr; margin-bottom: 40px; background: var(--white); }
.project__info {
  background: var(--black); color: var(--white); padding: 60px 44px;
  display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden;
}
.project__info::after {
  content: ""; position: absolute; right: -60px; bottom: -60px; width: 180px; height: 180px;
  border: 22px solid rgba(255,255,255,.03); transform: rotate(45deg); transition: transform 1.2s var(--ease-out);
}
.project:hover .project__info::after { transform: rotate(135deg); }
.project__info h3 { color: var(--white); font-family: var(--font-body); font-weight: 400; font-size: 1.25rem; line-height: 1.5; }
.project__info h3 strong { font-weight: 700; }
.bar { width: 52px; height: 7px; background: var(--red); margin-bottom: 30px; transform: scaleX(0); transform-origin: left; transition: transform .8s var(--ease-out) .6s; }
.project.is-visible .bar { transform: scaleX(1); }
.project__place { color: var(--red); font-family: var(--font-head); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .85rem; margin: 22px 0 6px; }
.project__tag { font-style: italic; font-size: .85rem; color: #a9a9a9; margin: 0; }
.project__gallery { display: grid; grid-template-columns: 1.4fr 1fr; grid-template-rows: 1fr 1fr; gap: 8px; padding: 8px; min-height: 420px; }
.project__gallery::after { inset: 8px; }
.project__gallery img { width: 100%; height: 100%; object-fit: cover; }
.project__gallery img:first-child { grid-row: span 2; }
.is-visible .project__gallery img:hover { transform: scale(1.03); transition-duration: .6s; transition-delay: 0s; }
.project--reverse { grid-template-columns: 1fr 380px; }
.project--reverse .project__info { order: 2; }

.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 60px; }
.gallery figure { margin: 0; position: relative; overflow: hidden; clip-path: inset(0 0 100% 0); transition: clip-path 1.2s var(--ease-out) var(--d, 0ms); }
.gallery.is-visible figure { clip-path: inset(0 0 0 0); }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transform: scale(1.3); transition: transform 1.6s var(--ease-out) var(--d, 0ms), filter .5s; }
.gallery.is-visible img { transform: scale(1); }
.gallery figure::after {
  content: ""; position: absolute; inset: 0; border: 0 solid var(--red); transition: border-width .35s var(--ease-out);
}
.gallery figure:hover::after { border-width: 6px; }
.gallery.is-visible figure:hover img { transform: scale(1.08); transition-delay: 0s; filter: contrast(1.15); }

/* ==========================================================
   RESPONSABILIDAD
   ========================================================== */
.values { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.value { position: relative; aspect-ratio: 3 / 4; overflow: hidden; background: var(--black); }
.value img { width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.value.is-visible:hover img { transform: scale(1.1); opacity: .6; transition: transform 1s var(--ease-out), opacity .4s; }
.value h3 {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 22px 22px 34px; z-index: 2;
  background: rgba(210,210,210,.93); color: var(--ink);
  font-family: var(--font-caps); font-variant: small-caps; font-weight: 600; font-size: 1.15rem; letter-spacing: .08em; line-height: 1.25;
  transform: translateY(100%); transition: transform .9s var(--ease-out) calc(var(--d, 0ms) + .9s), background .4s, color .4s;
}
.value.is-visible h3 { transform: none; }
.value:hover h3 { background: var(--red); color: var(--white); transition-delay: 0s; }
.value h3::before { content: ""; position: absolute; left: 18px; top: 22px; bottom: 22px; width: 5px; background: var(--red); transition: background .4s; }
.value:hover h3::before { background: var(--white); }

/* ==========================================================
   CONTACTO
   ========================================================== */
.contact { position: relative; padding-block: 130px 120px; background: var(--black); overflow: hidden; }
.contact__bg { position: absolute; inset: -15% 0; background-size: cover; background-position: center; }
.contact__overlay { position: absolute; inset: 0; background: rgba(8,8,8,.86); }
.contact__inner { display: grid; grid-template-columns: 1fr 460px; gap: 80px; align-items: start; }
.contact__info p { color: #cfcfcf; font-size: 1.05rem; max-width: 520px; }
.contact__list { list-style: none; padding: 0; margin: 40px 0 0; display: grid; gap: 26px; }
.contact__list li { color: var(--white); padding-left: 22px; border-left: 4px solid var(--red); transition: border-color .3s, padding-left .4s var(--ease-out); }
.contact__list li:hover { padding-left: 30px; }
.contact__list a { font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; transition: color .2s; }
.contact__list a:hover { color: var(--red); }
.contact__label { display: block; font-family: var(--font-caps); text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; color: #9a9a9a; }

.form { background: var(--white); padding: 40px 36px; border-top: 7px solid var(--red); position: relative; }
.form h3 { font-size: 1.35rem; text-transform: uppercase; font-weight: 800; margin-bottom: 22px; }
.form label { display: block; font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--gray-700); margin-bottom: 16px; transition: color .3s; }
.form label:focus-within { color: var(--red); }
.form input, .form select, .form textarea {
  display: block; width: 100%; margin-top: 6px; padding: 12px 14px;
  font: inherit; font-size: .95rem; text-transform: none; letter-spacing: 0; color: var(--ink);
  border: 1px solid var(--gray-200); border-radius: var(--radius); background: var(--gray-100);
  background-image: linear-gradient(var(--red), var(--red)); background-size: 0 2px; background-repeat: no-repeat; background-position: left bottom;
  transition: background-size .5s var(--ease-out), background-color .3s;
}
.form input:focus, .form select:focus, .form textarea:focus { outline: none; background-color: var(--white); background-size: 100% 2px; }
.form textarea { resize: vertical; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.btn__spinner {
  display: none; width: 18px; height: 18px; margin-left: 10px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.35); border-top-color: var(--white); animation: spin .7s linear infinite;
}
.btn.is-loading { pointer-events: none; opacity: .85; }
.btn.is-loading .btn__spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.form__status { display: none; margin-top: 14px; padding: 12px 14px; font-size: .9rem; line-height: 1.5; border-left: 4px solid; animation: fadeUp .4s var(--ease); }
.form__status.is-ok { display: block; background: #edf7ee; border-color: #2e7d32; color: #1e5a22; }
.form__status.is-error { display: block; background: #fdecec; border-color: var(--red); color: #8a1216; }
@media (max-width: 560px) { .form__row { grid-template-columns: 1fr; } }
.form__note { font-size: .78rem; color: var(--gray-500); margin: 12px 0 0; text-align: center; }

/* ==========================================================
   FOOTER
   ========================================================== */
.footer { position: relative; background: #050505; color: #8a8a8a; padding-block: 40px; }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.footer__logo { width: 170px; }
.footer__nav { display: flex; flex-wrap: wrap; gap: 26px; }
.footer__nav a { font-family: var(--font-head); font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: #cfcfcf; transition: color .25s; }
.footer__nav a:hover { color: var(--red); }
.footer__copy { margin: 0; font-size: .82rem; }

a:focus-visible, button:focus-visible { outline: 2px dashed var(--red); outline-offset: 4px; }

/* ==========================================================
   MOVIMIENTO REDUCIDO
   ========================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  html { scroll-behavior: auto; }
  .ticker__track { animation: none; }
}

/* ==========================================================
   RESPONSIVE
   ========================================================== */
@media (max-width: 1080px) {
  .services { grid-template-columns: repeat(2, 1fr); }
  .values { grid-template-columns: repeat(2, 1fr); }
  .split { gap: 50px; }
  .project, .project--reverse { grid-template-columns: 1fr; }
  .project--reverse .project__info { order: 0; }
  .contact__inner { grid-template-columns: 1fr; gap: 50px; }
}

@media (max-width: 860px) {
  :root { --header-h: 70px; }
  .nav-toggle { display: block; position: relative; z-index: 2; }
  .nav {
    position: fixed; inset: 0 0 0 auto; width: min(320px, 85vw); height: 100vh; background: var(--white);
    flex-direction: column; align-items: flex-start; gap: 22px; padding: 100px 32px 32px;
    transform: translateX(100%); transition: transform .5s var(--ease-out); box-shadow: -10px 0 40px rgba(0,0,0,.2);
  }
  .nav a { opacity: 0; transform: translateX(30px); transition: opacity .4s, transform .5s var(--ease-out); }
  .header.menu-open .nav a { opacity: 1; transform: none; }
  .header.menu-open .nav a:nth-child(2) { transition-delay: .05s; }
  .header.menu-open .nav a:nth-child(3) { transition-delay: .1s; }
  .header.menu-open .nav a:nth-child(4) { transition-delay: .15s; }
  .header.menu-open .nav a:nth-child(5) { transition-delay: .2s; }
  .header.menu-open .nav a:nth-child(6) { transition-delay: .25s; }
  .nav a:not(.btn) { color: var(--ink); font-size: .95rem; }
  .header.menu-open { transform: none; }
  .header.menu-open .nav { transform: none; }
  .header.menu-open .nav-toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .header.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .header.menu-open .nav-toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
  .header__logo, .header.is-scrolled .header__logo { width: 150px; }

  .section { padding-block: 80px; }
  .split, .section__head--split { grid-template-columns: 1fr; }
  .split--reverse .split__media { order: 0; }
  .stat-card { right: 12px; bottom: 16px; }
  .photo--framed { margin-right: 14px; }
  .photo--framed::before { inset: 12px -12px -12px 12px; }
  .pillars { grid-template-columns: 1fr; }
  .pillar, .pillar + .pillar { padding: 32px 0; border-right: 0; border-bottom: 1px solid var(--gray-200); }
  .pillar + .pillar::before { left: 0; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .project__info { padding: 40px 28px; }
  .project__gallery { min-height: 320px; }
  .hero__scroll { display: none; }
}

@media (max-width: 560px) {
  .container { padding-inline: 18px; }
  .services, .values { grid-template-columns: 1fr; }
  .value { aspect-ratio: 16 / 11; }
  .hero__actions .btn { flex: 1 1 100%; }
  .form { padding: 30px 22px; }
  .footer__inner { flex-direction: column; text-align: center; }
  .footer__nav { justify-content: center; }
  .to-top { right: 14px; bottom: 14px; width: 42px; height: 42px; }
}

/* ==========================================================
   v2 — COMPONENTES NUEVOS
   ========================================================== */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; top: -60px; left: 16px; z-index: 300; background: var(--red); color: #fff;
  padding: 12px 18px; font-family: var(--font-head); font-weight: 700; font-size: .8rem;
  letter-spacing: .1em; text-transform: uppercase; transition: top .25s;
}
.skip-link:focus { top: 16px; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 8px;
  font-family: var(--font-head); font-weight: 700; font-size: .82rem;
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink);
  border-bottom: 2px solid var(--red); padding-bottom: 4px; transition: gap .3s, color .3s;
}
.link-arrow:hover { gap: 18px; color: var(--red); }

.btn__icon { width: 18px; height: 18px; margin-right: 10px; fill: currentColor; }
.btn--ghost { border-color: rgba(12,12,12,.2); color: var(--ink); background: transparent; }
.btn--ghost:hover { border-color: var(--ink); background: var(--ink); color: #fff; }

/* Teléfono en el menú */
.nav__phone {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-head); font-weight: 700; font-size: .8rem; letter-spacing: .06em;
  color: var(--white); padding: 8px 14px; border: 1px solid rgba(255,255,255,.35); border-radius: 2px;
  transition: background .3s, color .3s, border-color .3s;
}
.nav__phone svg { width: 15px; height: 15px; fill: var(--red); transition: fill .3s; }
.nav__phone:hover { background: var(--red); border-color: var(--red); color: #fff; }
.nav__phone:hover svg { fill: #fff; }
.nav a.nav__phone::after { display: none; }
.header.is-scrolled .nav__phone { color: var(--ink); border-color: rgba(12,12,12,.2); }
.header.is-scrolled .nav__phone:hover { color: #fff; }

/* Chips del hero */
.hero__chips {
  list-style: none; display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 34px 0 0;
}
.hero__chips li {
  font-family: var(--font-caps); font-variant: small-caps; letter-spacing: .08em; font-size: .95rem;
  color: #e6e6e6; padding: 7px 16px; border: 1px solid rgba(255,255,255,.28); border-radius: 100px;
  background: rgba(255,255,255,.06);
}

/* CTA dentro de cada servicio */
.service__cta {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 16px;
  font-family: var(--font-head); font-weight: 700; font-size: .72rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--red); transition: gap .3s;
  position: relative; z-index: 4;
}
.service__cta:hover { gap: 16px; }

/* ---------- Proceso ---------- */
.process {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; position: relative;
}
.process::before {
  content: ""; position: absolute; left: 0; right: 0; top: 26px; height: 3px;
  background: repeating-linear-gradient(90deg, var(--gray-200) 0 14px, transparent 14px 24px);
}
.process__step { position: relative; padding-top: 70px; }
.process__num {
  position: absolute; top: 0; left: 0; width: 54px; height: 54px; display: grid; place-items: center;
  background: var(--black); color: #fff; font-family: var(--font-head); font-weight: 900; font-size: 1.1rem;
  border-bottom: 4px solid var(--red); transition: transform .4s var(--ease-out), background .3s;
}
.process__step:hover .process__num { transform: translateY(-6px); background: var(--red); border-bottom-color: var(--black); }
.process__step h3 { font-size: 1.1rem; text-transform: uppercase; font-weight: 800; margin-bottom: 12px; }
.process__step p { font-size: .94rem; margin: 0; }

/* ---------- FAQ ---------- */
.faq__layout { display: grid; grid-template-columns: .85fr 1.15fr; gap: 70px; align-items: start; }
.faq__layout .section__head { margin-bottom: 0; }
.faq__item { border-bottom: 1px solid var(--gray-200); }
.faq__item summary {
  cursor: pointer; list-style: none; padding: 22px 46px 22px 0; position: relative;
  font-family: var(--font-head); font-weight: 700; font-size: 1.02rem; color: var(--ink);
  transition: color .25s;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary:hover { color: var(--red); }
.faq__item summary::after {
  content: ""; position: absolute; right: 8px; top: 50%; width: 13px; height: 13px; margin-top: -9px;
  border-right: 3px solid var(--red); border-bottom: 3px solid var(--red);
  transform: rotate(45deg); transition: transform .35s var(--ease-out);
}
.faq__item[open] summary::after { transform: rotate(-135deg); margin-top: -3px; }
.faq__item[open] summary { color: var(--red); }
.faq__answer { padding: 0 40px 22px 0; animation: faqIn .45s var(--ease-out); }
.faq__answer p { margin: 0; font-size: .96rem; }
@keyframes faqIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ---------- Formulario por pasos ---------- */
.form__head { margin-bottom: 26px; }
.form__head h3 { margin-bottom: 6px; }
.form__sub {
  margin: 0 0 14px; font-family: var(--font-caps); font-variant: small-caps;
  letter-spacing: .08em; font-size: .98rem; color: var(--gray-500);
}
.form__progress { height: 4px; background: var(--gray-200); overflow: hidden; }
.form__progress span {
  display: block; height: 100%; width: 33.33%; background: var(--red);
  transition: width .5s var(--ease-out);
}
.step { border: 0; padding: 0; margin: 0; min-width: 0; }
.step.is-active { animation: stepIn .45s var(--ease-out); }
@keyframes stepIn { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
.step__nav { display: flex; gap: 12px; margin-top: 22px; }
.step__nav .btn { flex: 1; padding: 15px 18px; }
.step__nav .btn--ghost { flex: 0 0 auto; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { position: relative; margin: 0; display: block; }
.chip input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.chip span {
  display: block; padding: 11px 16px; border: 1.5px solid var(--gray-200); border-radius: 100px;
  font-size: .86rem; font-weight: 600; color: var(--gray-700); text-transform: none; letter-spacing: 0;
  transition: border-color .25s, background .25s, color .25s, transform .25s var(--ease-out);
}
.chip:hover span { border-color: var(--red); transform: translateY(-2px); }
.chip input:focus-visible + span { outline: 2px dashed var(--red); outline-offset: 3px; }
.chip input:checked + span { background: var(--red); border-color: var(--red); color: #fff; }

.field { margin-bottom: 16px; }
.form .field > label, .form .field__label {
  display: block; font-size: .78rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .08em; color: var(--gray-700); margin-bottom: 6px;
}
.form .field input, .form .field textarea, .form .field select { margin-top: 0; }
.field.is-hidden { display: none; }
.field--show { animation: fadeUp .4s var(--ease-out); }
.field__meta { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-top: 6px; }
.counter { margin-left: auto; font-size: .74rem; color: var(--gray-500); }
.counter.is-near { color: var(--red); }
.field__error { margin: 6px 0 0; font-size: .78rem; color: var(--red); font-weight: 600; }
.field.has-error input, .field.has-error textarea, .field.has-error select { border-color: var(--red); background-color: #fff6f6; }

.radios { display: flex; flex-wrap: wrap; gap: 10px; }
.radio { position: relative; margin: 0; display: block; }
.radio input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.radio span {
  display: block; padding: 9px 16px; border: 1.5px solid var(--gray-200);
  font-size: .84rem; font-weight: 600; color: var(--gray-700); transition: .25s;
}
.radio input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.radio input:focus-visible + span { outline: 2px dashed var(--red); outline-offset: 3px; }

.form .check {
  display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 0;
  font-size: .82rem; line-height: 1.5; color: var(--gray-700); text-transform: none; letter-spacing: 0; font-weight: 400;
}
.form .check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--red); flex: none; }

.summary {
  background: var(--gray-100); border-left: 4px solid var(--red); padding: 14px 16px; margin-bottom: 18px;
  font-size: .86rem; line-height: 1.6;
}
.summary strong { color: var(--ink); }
.summary:empty { display: none; }

/* ---------- Botón flotante de llamada ---------- */
.call-fab {
  position: fixed; left: 16px; bottom: 16px; z-index: 40; display: none; align-items: center; gap: 10px;
  padding: 13px 20px; background: var(--red); color: #fff; border-radius: 100px;
  font-family: var(--font-head); font-weight: 700; font-size: .82rem; letter-spacing: .08em; text-transform: uppercase;
  box-shadow: 0 12px 26px rgba(227,30,36,.4);
  animation: fabPulse 2.6s ease-in-out infinite;
}
.call-fab svg { width: 18px; height: 18px; fill: #fff; }
@keyframes fabPulse { 0%, 100% { box-shadow: 0 12px 26px rgba(227,30,36,.4); } 50% { box-shadow: 0 12px 34px rgba(227,30,36,.65); } }

/* ---------- Footer v2 ---------- */
.footer__inner { align-items: flex-start; gap: 40px; padding-bottom: 30px; }
.footer__brand { max-width: 300px; }
.footer__brand p { margin: 16px 0 0; font-size: .85rem; line-height: 1.6; }
.footer__nav { flex-direction: column; gap: 12px; }
.footer__contact { display: flex; flex-direction: column; gap: 8px; font-size: .9rem; }
.footer__contact a { color: #fff; font-family: var(--font-head); font-weight: 700; transition: color .25s; }
.footer__contact a:hover { color: var(--red); }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 22px; }
.footer__bottom p { margin: 0; font-size: .8rem; text-align: center; }

@media (max-width: 1080px) {
  .process { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
  .process::before { display: none; }
  .faq__layout { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 860px) {
  .nav__phone { width: 100%; justify-content: center; }
  .call-fab { display: inline-flex; }
  .to-top { bottom: 82px; }
  .footer__inner { flex-direction: column; align-items: flex-start; text-align: left; }
  .footer__nav { flex-direction: row; flex-wrap: wrap; }
}

@media (max-width: 560px) {
  .process { grid-template-columns: 1fr; }
  .step__nav { flex-wrap: wrap; }
  .step__nav .btn { flex: 1 1 100%; }
  .call-fab span { display: none; }
  .call-fab { padding: 14px; }
  .footer__bottom p { text-align: center; }
}

/* Ajustes finos móvil v2 */
.contact__list a, .footer__contact a { overflow-wrap: anywhere; }
@media (max-width: 860px) {
  .hero__content { padding-block: 120px 130px; }
  .hero__chips { gap: 8px; margin-top: 26px; }
  .hero__chips li { font-size: .85rem; padding: 6px 13px; }
}
@media (max-width: 560px) {
  .hero__chips { display: none; }
  .contact__list a { font-size: 1rem; }
}
