/* =========================================================
   ANPAB · Ingeniería y construcción
   ========================================================= */

@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/assets/fonts/geist-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/assets/fonts/geist-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --navy: #001c56;
  --navy-2: #0a2a6e;
  --coral: #fc684b;
  --coral-2: #ff8468;
  --ink: rgba(0, 0, 0, .88);
  --muted: rgba(0, 0, 0, .58);
  --line: rgba(0, 28, 86, .09);
  --soft: #f5f6f8;
  --white: #fff;
  --black: #05070c;

  --pad: clamp(20px, 5vw, 72px);
  --maxw: 1296px;
  --header-h: 84px;
  --radius: 14px;
  --radius-lg: 22px;

  --fs-body: clamp(16px, 1.25vw, 19px);
  --fs-h1: clamp(42px, 6.3vw, 96px);
  --fs-h2: clamp(32px, 3.6vw, 52px);
  --fs-h3: clamp(19px, 1.5vw, 22px);
  --fs-statement: clamp(26px, 3.2vw, 46px);

  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) - 1px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  font-family: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: var(--fs-body);
  line-height: 1.5;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, video, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
button, input, textarea { font: inherit; color: inherit; }
::selection { background: var(--coral); color: #fff; }

.container { width: min(100% - 2 * var(--pad), var(--maxw)); margin-inline: auto; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ico { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.skip {
  position: fixed; left: 16px; top: -60px; z-index: 200;
  background: var(--coral); color: #fff; padding: 10px 16px; border-radius: 999px;
  transition: top .2s;
}
.skip:focus { top: 16px; }

:focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; border-radius: 6px; }

/* Líneas de la retícula (detalle del diseño original) */
body::before {
  content: "";
  position: fixed; inset: 0;
  width: min(100% - 2 * var(--pad), var(--maxw));
  margin-inline: auto;
  pointer-events: none;
  z-index: 0;
  background-image: linear-gradient(to right, var(--line) 1px, transparent 1px);
  background-size: calc(100% / 6) 100%;
  border-right: 1px solid var(--line);
}
main, footer { position: relative; }
section { position: relative; z-index: 1; }

/* ---------- Botones ---------- */
.btn {
  --bg: var(--white); --fg: var(--black);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  padding: 1em 1.5em; border-radius: 999px; border: 0;
  background: var(--bg); color: var(--fg);
  font-size: 16px; font-weight: 500; line-height: 1;
  cursor: pointer; overflow: hidden; isolation: isolate;
  transition: color .4s var(--ease), transform .4s var(--ease), box-shadow .4s var(--ease);
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--coral);
  transform: translateY(101%); border-radius: inherit;
  transition: transform .5s var(--ease);
}
.btn .ico { transition: transform .5s var(--ease); }
.btn:hover::before, .btn:focus-visible::before { transform: translateY(0); }
.btn:hover, .btn:focus-visible { --fg: #fff; box-shadow: 0 14px 30px -12px rgba(252, 104, 75, .65); }
.btn:hover .ico { transform: translate(2px, -2px) rotate(45deg); }
.btn:active { transform: scale(.97); }
.btn--dark { --bg: var(--black); --fg: #fff; }
.btn--ghost { --bg: transparent; --fg: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .45); }
.btn--ghost::before { background: #fff; }
.btn--ghost:hover, .btn--ghost:focus-visible { --fg: var(--black); box-shadow: inset 0 0 0 1px #fff; }
.btn--sm { padding: .75em 1.15em; font-size: 15px; }
.btn--block { width: 100%; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 15px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
  color: var(--navy);
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--coral); }
.eyebrow--light { color: rgba(255, 255, 255, .85); }

/* ---------- Intro ---------- */
.intro { display: none; }
.js .intro.is-on {
  display: grid; place-items: center; align-content: center; gap: 22px;
  position: fixed; inset: 0; z-index: 150;
  background: var(--navy);
  animation: introOut .8s var(--ease-in-out) 1s forwards;
}
.intro img { width: 56px; height: 56px; animation: introLogo 1s var(--ease) both; }
.intro__bar { width: 120px; height: 2px; background: rgba(255, 255, 255, .15); overflow: hidden; position: relative; }
.intro__bar::after { content: ""; position: absolute; inset: 0; background: var(--coral); transform-origin: left; animation: introBar .9s var(--ease-in-out) .1s both; }
@keyframes introLogo { from { opacity: 0; transform: translateY(14px) scale(.9); } }
@keyframes introBar { from { transform: scaleX(0); } }
@keyframes introOut { to { clip-path: inset(0 0 100% 0); visibility: hidden; } }

/* ---------- Barra de progreso ---------- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 120; pointer-events: none; }
.progress span { display: block; height: 100%; background: var(--coral); transform-origin: left; transform: scaleX(var(--p, 0)); }

/* ---------- Header ---------- */
.header {
  position: fixed; inset: 0 0 auto; z-index: 100;
  height: var(--header-h);
  color: #fff;
  transition: transform .5s var(--ease), background-color .4s, backdrop-filter .4s, box-shadow .4s;
}
.header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to bottom, rgba(0, 0, 0, .45), transparent);
  transition: opacity .4s;
}
.header.is-scrolled { background: rgba(0, 18, 58, .78); -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%); box-shadow: 0 1px 0 rgba(255, 255, 255, .06); }
.header.is-scrolled::before { opacity: 0; }
.header.is-hidden { transform: translateY(-100%); }
.header__inner { height: 100%; display: flex; align-items: center; gap: 28px; }
.header__logo { margin-right: auto; }
.header__logo img { width: clamp(150px, 15vw, 210px); }
.nav { display: flex; gap: 4px; }
.nav a {
  position: relative; padding: 10px 14px; font-size: 16px; font-weight: 500;
  color: rgba(255, 255, 255, .78); transition: color .3s;
}
.nav a::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 1.5px;
  background: var(--coral); transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease);
}
.nav a:hover, .nav a.is-active { color: #fff; }
.nav a:hover::after, .nav a.is-active::after { transform: scaleX(1); transform-origin: left; }
.header__cta { margin-left: 6px; }

.burger { display: none; position: relative; width: 46px; height: 46px; border: 0; background: transparent; cursor: pointer; border-radius: 50%; }
.burger span { position: absolute; left: 11px; right: 11px; height: 2px; background: #fff; border-radius: 2px; transition: transform .45s var(--ease), top .45s var(--ease); }
.burger span:nth-child(1) { top: 18px; }
.burger span:nth-child(2) { top: 26px; }
.burger[aria-expanded="true"] span:nth-child(1) { top: 22px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { top: 22px; transform: rotate(-45deg); }

/* Menú móvil */
.mmenu {
  position: fixed; inset: 0; z-index: 90;
  background: var(--navy); color: #fff;
  padding: calc(var(--header-h) + 24px) var(--pad) calc(28px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; justify-content: space-between;
  clip-path: inset(0 0 100% 0);
  transition: clip-path .6s var(--ease-in-out);
}
.mmenu[hidden] { display: flex; visibility: hidden; }
.mmenu.is-open { clip-path: inset(0 0 0 0); visibility: visible; }
.mmenu__nav { display: grid; }
.mmenu__nav a {
  display: flex; align-items: baseline; gap: 14px;
  padding: 14px 0; border-bottom: 1px solid rgba(255, 255, 255, .1);
  font-size: clamp(28px, 8vw, 40px); font-weight: 500; letter-spacing: -.03em;
  opacity: 0; transform: translateY(24px);
  transition: opacity .5s var(--ease), transform .6s var(--ease), color .3s;
}
.mmenu__nav a small { font-size: 13px; letter-spacing: .06em; color: var(--coral); }
.mmenu__nav a:hover { color: var(--coral); }
.mmenu.is-open .mmenu__nav a { opacity: 1; transform: none; }
.mmenu.is-open .mmenu__nav a:nth-child(2) { transition-delay: .05s; }
.mmenu.is-open .mmenu__nav a:nth-child(3) { transition-delay: .1s; }
.mmenu.is-open .mmenu__nav a:nth-child(4) { transition-delay: .15s; }
.mmenu.is-open .mmenu__nav a:nth-child(5) { transition-delay: .2s; }
.mmenu.is-open .mmenu__nav a:first-child { transition-delay: 0s; }
.mmenu__foot { display: grid; gap: 6px; color: rgba(255, 255, 255, .7); font-size: 17px; }
body.menu-open { overflow: hidden; }

/* ---------- Hero ---------- */
.hero {
  position: relative; z-index: 2;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  color: #fff; background: var(--black); overflow: hidden;
}
.hero__media { position: absolute; inset: 0; will-change: transform; }
.hero__video {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.08); transition: transform 2.4s var(--ease);
}
.is-loaded .hero__video { transform: scale(1); }
.hero__shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(0, 0, 0, .78) 0%, rgba(0, 0, 0, .15) 45%, rgba(0, 0, 0, .35) 100%),
    radial-gradient(120% 80% at 0% 100%, rgba(0, 28, 86, .55), transparent 60%);
}
.hero__content { position: relative; padding-top: calc(var(--header-h) + 40px); }
.hero__eyebrow { margin-bottom: 22px; }
.hero__title {
  max-width: 13em;
  font-size: var(--fs-h1); font-weight: 500; line-height: .98; letter-spacing: -.05em;
  text-transform: uppercase; color: var(--coral);
  text-wrap: balance;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(28px, 4vw, 44px); }
.hero__bottom {
  position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 32px;
  padding: clamp(40px, 7vw, 96px) 0 clamp(28px, 4vw, 48px);
}
.hero__lead { max-width: 30ch; font-size: clamp(17px, 1.45vw, 21px); line-height: 1.4; color: rgba(255, 255, 255, .92); }
.hero__scroll {
  display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .35); font-size: 22px; flex: none;
  transition: background .3s, border-color .3s;
}
.hero__scroll .ico { animation: bob 2.2s var(--ease-in-out) infinite; }
.hero__scroll:hover { background: var(--coral); border-color: var(--coral); }
@keyframes bob { 0%, 100% { transform: translateY(-3px); } 50% { transform: translateY(4px); } }

/* División por palabras (títulos) */
.split-w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .06em; margin-bottom: -.06em; }
.split-w > span { display: inline-block; transform: translateY(105%); transition: transform 1.1s var(--ease); transition-delay: calc(var(--w) * 70ms + var(--base, 0ms)); }
.is-in .split-w > span, .split-w.is-in > span { transform: none; }

.js [data-hero-item] { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform 1s var(--ease); }
.is-loaded [data-hero-item] { opacity: 1; transform: none; }
.is-loaded .hero__actions[data-hero-item] { transition-delay: .55s; }
.is-loaded .hero__lead[data-hero-item] { transition-delay: .7s; }
.is-loaded .hero__scroll[data-hero-item] { transition-delay: .8s; }

/* ---------- Reveals ---------- */
.js [data-reveal]:not([data-reveal="clip"]):not([data-reveal="line"]) {
  opacity: 0; transform: translateY(28px);
  transition: opacity .9s var(--ease), transform 1s var(--ease);
  transition-delay: calc(var(--d, 0) * 110ms);
}
.js [data-reveal].is-in:not([data-reveal="clip"]):not([data-reveal="line"]) { opacity: 1; transform: none; }

.js [data-reveal="clip"] { clip-path: inset(12% 12% 12% 12% round var(--radius)); transition: clip-path 1.3s var(--ease); }
.js [data-reveal="clip"] img { transform: scale(1.25); transition: transform 1.6s var(--ease); }
.js [data-reveal="clip"].is-in { clip-path: inset(0 0 0 0 round var(--radius)); }
.js [data-reveal="clip"].is-in img { transform: scale(1.12); }

/* Parallax: el contenedor se mueve, la imagen se escala para no dejar huecos */
.parallax { will-change: transform; }
figure .parallax, .collage__item .parallax { height: 100%; }
figure .parallax img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Títulos de sección ---------- */
.section-head { display: grid; gap: 18px; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head--split { grid-template-columns: 1fr minmax(0, 30ch); align-items: end; gap: 24px 48px; }
.section-head__intro { max-width: 52ch; color: var(--muted); }
.section-head__aside { color: var(--muted); padding-bottom: 14px; }
.title {
  position: relative; padding-bottom: 18px;
  font-size: var(--fs-h2); font-weight: 500; line-height: 1.06; letter-spacing: -.035em;
  color: var(--coral); text-wrap: balance;
}
.title::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(to right, var(--navy), rgba(0, 28, 86, .2));
  transform-origin: left; transition: transform 1.4s var(--ease) .15s;
}
.js .title[data-reveal="line"]::after { transform: scaleX(0); }
.js .title[data-reveal="line"].is-in::after { transform: scaleX(1); }

/* ---------- Nosotros ---------- */
.about { padding-top: clamp(64px, 9vw, 120px); }
.collage {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(10px, 1.2vw, 16px);
  align-items: start; margin-bottom: clamp(64px, 9vw, 120px);
}
.collage__item { overflow: hidden; border-radius: var(--radius); background: var(--soft); }
.collage__item--a { grid-column: 1 / span 3; aspect-ratio: 1; }
.collage__item--b { grid-column: 4 / span 3; aspect-ratio: 5 / 6; margin-top: clamp(40px, 6vw, 96px); }
.collage__item--c { grid-column: 9 / span 4; aspect-ratio: 1; margin-top: clamp(-20px, -1vw, 0px); }
.collage .parallax { height: 118%; margin-top: -9%; }

.statement {
  max-width: 30ch;
  font-size: var(--fs-statement); font-weight: 500; line-height: 1.16; letter-spacing: -.025em;
  color: var(--navy);
  margin-inline: auto; text-align: center; text-wrap: pretty;
}
.statement { max-width: 32ch; }
.scrub-w { transition: color .35s linear, opacity .35s linear; }
.js [data-scrub] .scrub-w { opacity: .16; }
.js [data-scrub] .scrub-w.on { opacity: 1; }

.stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 32px clamp(32px, 6vw, 96px);
  align-items: end;
  padding-block: clamp(72px, 10vw, 140px) clamp(64px, 9vw, 120px);
}
.stat { display: flex; align-items: flex-start; font-size: clamp(72px, 9vw, 136px); font-weight: 500; letter-spacing: -.06em; line-height: .9; color: var(--navy); margin-bottom: 18px; }
.stat__plus { color: var(--coral); font-size: .6em; margin-top: .08em; margin-right: .04em; }
.stats__num p:last-child { max-width: 26ch; }
.stats__text { color: var(--muted); }

.team {
  position: relative; overflow: hidden; color: #fff;
  min-height: clamp(520px, 80vh, 820px);
  display: flex; align-items: center;
}
.team__media { position: absolute; inset: -12% 0; }
.team__media img { width: 100%; height: 100%; object-fit: cover; }
.team__shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0, 18, 58, .82), rgba(0, 18, 58, .45) 60%, rgba(0, 18, 58, .25)); }
.team__content { position: relative; padding-block: 96px; }
.team__text {
  max-width: 26ch;
  font-size: clamp(28px, 3.4vw, 50px); font-weight: 500; line-height: 1.14; letter-spacing: -.03em;
}
.js .team__text .scrub-w { opacity: .22; }
.js .team__text .scrub-w.on { opacity: 1; }

.values { padding-block: clamp(80px, 10vw, 140px); }
.values__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.vcard {
  position: relative; display: flex; flex-direction: column;
  min-height: clamp(320px, 30vw, 420px);
  padding: clamp(24px, 2.6vw, 36px);
  background: rgba(255, 255, 255, .7);
  overflow: hidden; isolation: isolate;
  transition: color .5s var(--ease);
}
.vcard + .vcard { border-left: 1px solid var(--line); }
.vcard::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--navy);
  clip-path: inset(100% 0 0 0); transition: clip-path .7s var(--ease);
}
.vcard__num { font-size: 14px; color: var(--muted); letter-spacing: .06em; transition: color .5s; }
.vcard__ico { width: 34px; height: 34px; margin-top: 18px; color: var(--navy); stroke-width: 1.5; transition: color .5s, transform .7s var(--ease); }
.vcard h3 { margin-top: auto; font-size: var(--fs-h3); font-weight: 600; text-transform: uppercase; letter-spacing: .01em; color: var(--navy); transition: color .5s; }
.vcard p { margin-top: 10px; color: var(--muted); transition: color .5s; }
@media (hover: hover) {
  .vcard:hover::before { clip-path: inset(0 0 0 0); }
  .vcard:hover h3, .vcard:hover { color: #fff; }
  .vcard:hover p, .vcard:hover .vcard__num { color: rgba(255, 255, 255, .75); }
  .vcard:hover .vcard__ico { color: var(--coral); transform: translateY(-4px) rotate(-6deg); }
}
/* Alinear títulos de las 3 tarjetas aunque el texto mida distinto */
@supports (grid-template-rows: subgrid) {
  @media (min-width: 900px) {
    .values__grid { grid-template-rows: auto minmax(160px, 1fr) auto auto; }
    .vcard { display: grid; grid-row: span 4; grid-template-rows: subgrid; align-content: start; }
    .vcard__ico { align-self: start; }
    .vcard h3 { margin-top: 0; align-self: end; }
  }
}

/* ---------- Servicios ---------- */
.services { padding-block: clamp(80px, 10vw, 140px) clamp(40px, 6vw, 80px); background: linear-gradient(to bottom, transparent, rgba(245, 246, 248, .9) 30%, rgba(245, 246, 248, .9) 85%, transparent); }
.lines { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 64px); align-items: start; }
.line-card--offset { margin-top: clamp(80px, 14vw, 220px); }
.line-card__media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius); background: var(--soft); }
.line-card__media .parallax { height: 116%; margin-top: -8%; }
.tag {
  position: absolute; left: 16px; top: 16px;
  padding: 8px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, .9); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font-size: 14px; font-weight: 500; color: var(--navy);
}
.line-card__body { padding-top: 24px; }
.line-card__num, .stack-card__num, .budget__num, .acc__num { font-size: 14px; letter-spacing: .06em; color: var(--coral); font-weight: 500; }
.line-card h3 { margin: 8px 0 12px; font-size: clamp(22px, 2vw, 28px); font-weight: 600; letter-spacing: -.02em; line-height: 1.2; color: var(--navy); }
.line-card p { color: var(--muted); }

.build { padding-top: clamp(96px, 12vw, 180px); }
.stack { display: grid; gap: 24px; padding-bottom: 24px; }
.stack-card {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: stretch;
  padding: clamp(18px, 2vw, 24px);
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: 0 30px 60px -40px rgba(0, 28, 86, .35);
}
.stack-card__body { padding: clamp(8px, 2vw, 24px); display: flex; flex-direction: column; gap: 14px; }
.stack-card h3 { font-size: clamp(22px, 2vw, 30px); font-weight: 600; letter-spacing: -.02em; line-height: 1.15; color: var(--navy); text-transform: uppercase; }
.stack-card__lead { font-weight: 500; color: var(--ink); }
.stack-card p { color: var(--muted); }
.stack-card p.stack-card__lead { color: var(--ink); }
.stack-card__media { border-radius: var(--radius); overflow: hidden; min-height: 320px; background: var(--soft); }
.stack-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.stack-card:hover .stack-card__media img { transform: scale(1.05); }

@media (min-width: 900px) {
  .stack-card { position: sticky; top: calc(var(--header-h) + 24px + var(--i) * 22px); min-height: min(560px, calc(100vh - var(--header-h) - 120px)); transform-origin: 50% 0; }
  .stack-card.is-under { transform: scale(var(--s, 1)); filter: brightness(var(--b, 1)); }
}

/* ---------- Ventaja competitiva ---------- */
.advantage { padding-block: clamp(80px, 10vw, 140px); }
.advantage__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 5vw, 80px); align-items: start; }
.advantage__media { aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; background: var(--soft); position: sticky; top: calc(var(--header-h) + 24px); }
.advantage__media .parallax { height: 116%; margin-top: -8%; }

.acc { border-top: 1px solid var(--line); }
.acc__item { border-bottom: 1px solid var(--line); }
.acc__item h3 { font-size: inherit; font-weight: inherit; }
.acc__btn {
  width: 100%; display: flex; align-items: center; gap: 18px;
  padding: clamp(20px, 2.4vw, 30px) 4px; border: 0; background: none; cursor: pointer; text-align: left;
}
.acc__label { flex: 1; font-size: clamp(20px, 1.9vw, 28px); font-weight: 600; letter-spacing: -.02em; color: var(--navy); transition: color .3s; }
.acc__btn:hover .acc__label { color: var(--coral); }
.acc__icon { position: relative; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); flex: none; transition: background .4s, border-color .4s, transform .5s var(--ease); }
.acc__icon::before, .acc__icon::after { content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 1.6px; background: var(--navy); transform: translate(-50%, -50%); transition: transform .5s var(--ease), background .4s; }
.acc__icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.acc__item.is-open .acc__icon { background: var(--coral); border-color: var(--coral); transform: rotate(180deg); }
.acc__item.is-open .acc__icon::before, .acc__item.is-open .acc__icon::after { background: #fff; }
.acc__item.is-open .acc__icon::after { transform: translate(-50%, -50%) rotate(0deg); }
.acc__panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .6s var(--ease); }
.acc__item.is-open .acc__panel { grid-template-rows: 1fr; }
.acc__inner { overflow: hidden; }
.acc__inner p { padding: 0 4px clamp(22px, 2.4vw, 32px) calc(4px + 18px + 2ch); color: var(--muted); max-width: 60ch; opacity: 0; transform: translateY(-8px); transition: opacity .5s, transform .6s var(--ease); }
.acc__item.is-open .acc__inner p { opacity: 1; transform: none; transition-delay: .12s; }

/* ---------- Presupuesto ---------- */
.budget { padding-block: clamp(40px, 6vw, 80px) clamp(96px, 12vw, 160px); }
.budget__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 80px); align-items: center; }
.budget__media { aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; background: var(--soft); }
.budget__media .parallax { height: 116%; margin-top: -8%; }
.budget__media img { filter: grayscale(1) contrast(1.05); }
.budget__list { display: grid; gap: 0; justify-items: start; }
.budget__item { padding: 28px 0; border-bottom: 1px solid var(--line); }
.budget__item:first-child { border-top: 1px solid var(--line); }
.budget__item h3 { margin: 6px 0 10px; font-size: var(--fs-h3); font-weight: 600; text-transform: uppercase; color: var(--navy); line-height: 1.25; }
.budget__item p { color: var(--muted); }
.budget__list .btn { margin-top: 32px; }

/* ---------- Contacto ---------- */
.contact { background: #fff; }
.contact__banner { position: relative; display: grid; place-items: center; min-height: clamp(380px, 62vh, 620px); overflow: hidden; color: #fff; }
.contact__media { position: absolute; inset: -15% 0; }
.contact__media img { width: 100%; height: 100%; object-fit: cover; }
.contact__shade { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0, 0, 0, .15), rgba(0, 18, 58, .55)); }
.contact__title {
  position: relative; max-width: 15ch; text-align: center;
  font-size: clamp(40px, 6vw, 92px); font-weight: 500; line-height: 1; letter-spacing: -.045em; text-transform: uppercase;
  padding-inline: var(--pad);
}
.contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); padding-block: clamp(56px, 8vw, 110px); }
.contact__info { display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.contact__lead { font-size: clamp(19px, 1.7vw, 24px); line-height: 1.4; color: var(--ink); max-width: 34ch; }
.contact__links { display: grid; gap: 4px; }
.contact__links a {
  display: inline-flex; align-items: center; gap: 14px; padding: 10px 0;
  font-size: clamp(18px, 1.6vw, 22px); color: var(--navy); font-weight: 500;
  background: linear-gradient(var(--coral), var(--coral)) left bottom / 0 1.5px no-repeat;
  transition: background-size .5s var(--ease), color .3s;
}
.contact__links a:hover { background-size: 100% 1.5px; color: var(--coral); }
.contact__links .ico { width: 22px; height: 22px; color: var(--coral); }

.form { display: grid; gap: 18px; padding: clamp(22px, 3vw, 36px); background: var(--soft); border-radius: var(--radius-lg); align-content: start; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 8px; }
.field label { font-size: 15px; font-weight: 500; color: var(--ink); }
.field input, .field textarea {
  width: 100%; padding: 14px 16px;
  background: #fff; border: 1px solid rgba(0, 28, 86, .12); border-radius: 10px;
  font-size: 16px; line-height: 1.4;
  transition: border-color .25s, box-shadow .25s;
}
.field textarea { resize: vertical; min-height: 140px; }
.field input::placeholder, .field textarea::placeholder { color: rgba(0, 0, 0, .38); }
.field input:hover, .field textarea:hover { border-color: rgba(0, 28, 86, .28); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 4px rgba(0, 28, 86, .1); }
.field.has-error input, .field.has-error textarea { border-color: #d23a1c; box-shadow: 0 0 0 4px rgba(210, 58, 28, .1); }
.field__error { min-height: 0; font-size: 14px; color: #c2361a; }
.field__error:empty { display: none; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__status { font-size: 15px; min-height: 1px; }
.form__status.is-ok { color: #13734b; }
.form__status.is-error { color: #c2361a; }
.form.is-sending .btn { pointer-events: none; opacity: .7; }
.form.is-sending .btn__label::after { content: "…"; }
.form.is-sent .btn { --bg: #13734b; }

/* ---------- Footer ---------- */
.footer { z-index: 1; background: var(--black); color: #fff; padding-top: clamp(56px, 7vw, 96px); overflow: hidden; }
.footer__top { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 40px; padding-bottom: clamp(48px, 7vw, 96px); }
.footer__logo img { width: clamp(150px, 14vw, 200px); }
.footer__nav, .footer__social { display: grid; gap: 10px; align-content: start; }
.footer__nav a, .footer__social a { display: inline-flex; align-items: center; gap: 10px; width: fit-content; font-size: 18px; color: rgba(255, 255, 255, .85); transition: color .3s, transform .4s var(--ease); }
.footer__nav a:hover, .footer__social a:hover { color: var(--coral); transform: translateX(4px); }
.footer__social .ico { width: 18px; height: 18px; }
.footer__bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  padding-block: 26px calc(26px + env(safe-area-inset-bottom)); padding-right: 76px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  font-size: 15px; color: rgba(255, 255, 255, .6);
}
.footer__bottom a:hover { color: #fff; }

/* ---------- WhatsApp flotante ---------- */
.wa-float {
  position: fixed; right: max(18px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); z-index: 80;
  display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%;
  background: #25d366; color: #fff; font-size: 28px;
  box-shadow: 0 12px 30px -8px rgba(0, 0, 0, .35);
  transform: translateY(120px); transition: transform .6s var(--ease), box-shadow .3s;
}
.wa-float.is-visible { transform: none; }
.wa-float:hover { box-shadow: 0 16px 36px -8px rgba(37, 211, 102, .6); transform: translateY(-3px); }
.wa-float::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #25d366; animation: ping 2.6s var(--ease) infinite; }
@keyframes ping { 0% { transform: scale(1); opacity: .7; } 80%, 100% { transform: scale(1.6); opacity: 0; } }

/* ---------- 404 / gracias ---------- */
.simple {
  min-height: 100vh; min-height: 100svh; display: grid; place-items: center; text-align: center;
  background: var(--navy); color: #fff; padding: calc(var(--header-h) + 40px) var(--pad) 60px;
}
.simple .simple__code { font-size: clamp(96px, 20vw, 220px); font-weight: 500; letter-spacing: -.06em; line-height: .9; color: var(--coral); }
.simple h1 { font-size: clamp(28px, 3.4vw, 44px); font-weight: 500; letter-spacing: -.03em; margin: 18px 0 12px; }
.simple p { color: rgba(255, 255, 255, .75); max-width: 44ch; margin: 0 auto 32px; }
.simple__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1100px) {
  .nav a { padding: 10px 10px; font-size: 15px; }
  .nav a::after { left: 10px; right: 10px; }
  .header__cta { display: none; }
}
@media (max-width: 899px) {
  :root { --header-h: 72px; }
  .nav { display: none; }
  .burger { display: block; }
  .header.menu-is-open { background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .header.menu-is-open::before { opacity: 0; }

  .section-head--split { grid-template-columns: 1fr; }
  .section-head__aside { padding-bottom: 0; }

  .collage__item--a { grid-column: 1 / span 6; }
  .collage__item--b { grid-column: 7 / span 6; margin-top: 48px; }
  .collage__item--c { grid-column: 3 / span 8; margin-top: -24px; aspect-ratio: 16 / 10; }

  .stats { grid-template-columns: 1fr; }

  .values__grid { grid-template-columns: 1fr; }
  .vcard { min-height: 0; }
  .vcard + .vcard { border-left: 0; border-top: 1px solid var(--line); }
  .vcard h3 { margin-top: 28px; }

  .lines { grid-template-columns: 1fr; gap: 56px; }
  .line-card--offset { margin-top: 0; }

  .stack-card { grid-template-columns: 1fr; }
  .stack-card__media { order: -1; min-height: 0; aspect-ratio: 16 / 10; }

  .advantage__grid { grid-template-columns: 1fr; }
  .advantage__media { position: relative; top: 0; aspect-ratio: 16 / 11; }

  .budget__grid { grid-template-columns: 1fr; }
  .budget__media { aspect-ratio: 16 / 11; }

  .contact__grid { grid-template-columns: 1fr; }

  .footer__top { grid-template-columns: 1fr 1fr; }
  .footer__logo { grid-column: 1 / -1; }
}
@media (max-width: 599px) {
  .hero__shade { background: linear-gradient(to top, rgba(0, 0, 0, .85) 0%, rgba(0, 0, 0, .55) 55%, rgba(0, 0, 0, .3) 100%); }
  .hero__title { max-width: none; letter-spacing: -.045em; }
  .hero__bottom { flex-direction: row-reverse; align-items: flex-end; }
  .hero__lead { font-size: 16px; }
  .hero__scroll { width: 46px; height: 46px; font-size: 18px; }
  .hero__actions .btn { flex: 1 1 auto; }
  .statement { text-align: left; }
  .form__row { grid-template-columns: 1fr; }
  .acc__inner p { padding-left: 4px; }
  .wa-float { width: 52px; height: 52px; font-size: 25px; }
}

/* =========================================================
   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; }
  .js [data-reveal], .js [data-reveal] img, .js [data-hero-item] { opacity: 1 !important; transform: none !important; clip-path: none !important; }
  .split-w > span { transform: none !important; }
  .js [data-scrub] .scrub-w { opacity: 1 !important; }
  .intro { display: none !important; }
  .stack-card { position: relative !important; top: 0 !important; transform: none !important; filter: none !important; }
}
