/* =========================================================
   PRODESA EXPANSIÓN · Propuesta one-page 2026
   Concepto de layout: "plano arquitectónico". Retícula de 12
   columnas con líneas estructurales visibles, módulos a 45°
   tomados del isotipo y bandas alternas azul marino / ivory.
   Fuente única institucional: Montserrat (manual, sección 03).
   ========================================================= */

:root {
  /* Colores institucionales (manual 2.1) */
  --navy: #14263C;
  --ivory: #EAE4D8;
  /* Colores complementarios (manual 2.2) */
  --arena: #C9B898;
  --carbon: #262829;
  --acero: #6B7584;
  /* Derivados para profundidad y superficies */
  --navy-deep: #0D1A2A;
  --navy-soft: #1D3350;
  --paper: #F4F0E8;
  --ink: #14263C;
  --ink-soft: #4A5566;
  --line-dark: rgba(234, 228, 216, .12);
  --line-light: rgba(20, 38, 60, .14);
  --ok: #2F7D5B;
  --error: #B4232F;

  --font: "Montserrat", "Segoe UI", "Helvetica Neue", Arial, sans-serif;

  /* Escala tipográfica (razón 1.25) */
  --t-xs: .75rem;
  --t-sm: .875rem;
  --t-base: 1rem;
  --t-md: 1.125rem;
  --t-lg: 1.375rem;
  --t-xl: clamp(1.6rem, 1.2rem + 1.4vw, 2.25rem);
  --t-2xl: clamp(2rem, 1.3rem + 2.6vw, 3.4rem);
  --t-3xl: clamp(2.5rem, 1.4rem + 4.4vw, 5.2rem);

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  --header-h: 76px;
  --wrap: 1280px;
  --gutter: clamp(20px, 4vw, 56px);

  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--t-base);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 60;
  background: var(--navy);
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 300; line-height: 1.12; text-wrap: balance; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
[id] { scroll-margin-top: calc(var(--header-h) + 12px); }
:focus-visible { outline: 2px solid var(--arena); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link {
  position: fixed; left: 16px; top: -60px; z-index: 100;
  background: var(--arena); color: var(--navy); padding: 10px 16px; font-weight: 600; text-decoration: none;
  transition: top .2s;
}
.skip-link:focus { top: calc(12px + env(safe-area-inset-top, 0px)); }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

.band { position: relative; padding-block: clamp(80px, 10vw, 140px); }
.band--navy { background: var(--navy); color: var(--ivory); }
.band--deep { background: var(--navy-deep); color: var(--ivory); }
.band--ivory { background: var(--ivory); color: var(--ink); }
.band--paper { background: var(--paper); color: var(--ink); }

/* Líneas estructurales de fondo (recurso gráfico 4.1) */
.grid-lines {
  position: absolute; inset: 0; pointer-events: none; overflow: hidden;
}
.grid-lines::before {
  content: ""; position: absolute; inset: 0;
  margin-inline: auto; max-width: calc(var(--wrap) + 2 * var(--gutter));
  background-image: linear-gradient(to right, var(--grid-c, var(--line-dark)) 1px, transparent 1px);
  background-size: calc(100% / 6) 100%;
  background-position: var(--gutter) 0;
  opacity: .9;
}
.band--ivory .grid-lines, .band--paper .grid-lines { --grid-c: var(--line-light); }

/* ---------- Tipografía de sistema ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 14px;
  font-size: var(--t-xs); font-weight: 500;
  letter-spacing: .32em; text-transform: uppercase;
  color: var(--arena);
}
.band--ivory .eyebrow, .band--paper .eyebrow { color: var(--acero); }
.eyebrow::before { content: ""; width: 34px; height: 1px; background: currentColor; }
.h2 { font-size: var(--t-2xl); letter-spacing: -.01em; }
.h2 em, .hero__title em, .cta-band em {
  font-style: italic; font-weight: 300; color: var(--arena);
}
.band--ivory .h2 em, .band--paper .h2 em { color: var(--acero); }
.lead { font-size: var(--t-md); line-height: 1.7; max-width: 58ch; color: inherit; opacity: .86; }
.section-head { display: grid; gap: 20px; max-width: 780px; margin-bottom: clamp(44px, 6vw, 72px); }
.section-head--split {
  max-width: none; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); align-items: end; gap: 24px 64px;
}
.section-head--split .lead { justify-self: end; }

/* ---------- Botones ---------- */
.btn {
  --bg: var(--arena); --fg: var(--navy);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 52px; padding: 0 28px;
  background: var(--bg); color: var(--fg);
  border: 1px solid var(--bg);
  font-size: var(--t-sm); font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  text-decoration: none; cursor: pointer; overflow: hidden; isolation: isolate;
  transition: color .45s var(--ease-out), border-color .45s var(--ease-out), transform .3s var(--ease-out);
}
.btn::before {
  content: ""; position: absolute; inset: -2px; z-index: -1;
  background: var(--ivory);
  clip-path: polygon(0 100%, 0 100%, -30% 100%, -30% 100%);
  transition: clip-path .6s var(--ease-out);
}
.btn:hover::before, .btn:focus-visible::before { clip-path: polygon(0 -10%, 130% -10%, 100% 110%, -30% 110%); }
.btn:hover { border-color: var(--ivory); }
.btn .arrow { transition: transform .45s var(--ease-out); }
.btn:hover .arrow { transform: translateX(5px); }
.btn--ghost { --bg: transparent; --fg: var(--ivory); border-color: rgba(234, 228, 216, .45); }
.btn--ghost:hover { color: var(--navy); }
.btn--navy { --bg: var(--navy); --fg: var(--ivory); }
.btn--navy::before { background: var(--arena); }
.btn--navy:hover { color: var(--navy); border-color: var(--arena); }
.btn--sm { min-height: 42px; padding: 0 18px; font-size: .72rem; }
.btn[disabled] { cursor: progress; opacity: .85; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: var(--t-sm); font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0 1px; background-repeat: no-repeat; background-position: 0 100%;
  transition: background-size .5s var(--ease-out);
}
.link-arrow:hover, .link-arrow:focus-visible { background-size: 100% 1px; }

/* ---------- Intro (cortina diagonal) ---------- */
.intro {
  position: fixed; inset: 0; z-index: 90;
  display: grid; place-items: center;
  background: var(--navy);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  pointer-events: none;
}
.intro__logo { width: 92px; color: var(--ivory); }
.intro__logo .xm-bar { transform: translate(-26px, 26px); opacity: 0; }
.intro__logo .xm-main { opacity: 0; transform: scale(.94); transform-origin: 50% 70%; }
.is-loaded .intro__logo .xm-main { animation: xMain .7s var(--ease-out) forwards; }
.is-loaded .intro__logo .xm-bar { animation: xBar .8s .25s var(--ease-out) forwards; }
.is-loaded .intro { animation: introOut 1s 1.05s var(--ease-io) forwards; }
@keyframes xMain { to { opacity: 1; transform: none; } }
@keyframes xBar { 40% { opacity: 1; } to { opacity: 1; transform: translate(0, 0); } }
@keyframes introOut {
  to { clip-path: polygon(100% 0, 100% 0, 100% 0, 100% 0); visibility: hidden; }
}
.no-intro .intro { display: none; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  color: var(--ivory);
  transition: background-color .5s var(--ease-out), box-shadow .5s, transform .5s var(--ease-out);
}
.site-header.is-scrolled {
  background: rgba(20, 38, 60, .92);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 1px 0 var(--line-dark);
}
.site-header.is-hidden { transform: translateY(-100%); }
.site-header__inner { display: flex; align-items: center; gap: 32px; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; flex-shrink: 0; }
.brand svg { width: 34px; height: auto; color: var(--ivory); }
.brand__word { display: grid; line-height: 1; }
.brand__word b { font-weight: 500; font-size: 1.02rem; letter-spacing: .42em; }
.brand__word span { font-size: .5rem; letter-spacing: .62em; margin-top: 6px; padding-left: 2px; opacity: .85; }

.nav { margin-left: auto; }
.nav ul { display: flex; gap: 6px; }
.nav a {
  position: relative; display: block; padding: 10px 12px;
  font-size: .78rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  text-decoration: none; opacity: .72; transition: opacity .3s;
}
.nav a::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 4px; height: 1px;
  background: var(--arena); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease-out);
}
.nav a:hover, .nav a.is-active { opacity: 1; }
.nav a.is-active::after, .nav a:hover::after { transform: scaleX(1); }
.header-cta { flex-shrink: 0; }

.scroll-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; }
.scroll-progress span {
  display: block; height: 100%; background: var(--arena);
  transform-origin: left; transform: scaleX(var(--p, 0));
}

.menu-toggle {
  display: none; margin-left: auto; width: 48px; height: 48px;
  background: none; border: 1px solid var(--line-dark); cursor: pointer; position: relative;
}
.menu-toggle span {
  position: absolute; left: 13px; right: 13px; height: 1.5px; background: var(--ivory);
  transition: transform .45s var(--ease-out), opacity .3s;
}
.menu-toggle span:nth-child(1) { top: 18px; }
.menu-toggle span:nth-child(2) { top: 23px; right: 20px; }
.menu-toggle span:nth-child(3) { top: 28px; }
.menu-open .menu-toggle span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 45;
  background: var(--navy); color: var(--ivory);
  padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px) + 24px);
  padding-bottom: max(32px, env(safe-area-inset-bottom, 0px));
  clip-path: polygon(100% 0, 100% 0, 100% 0, 100% 0);
  transition: clip-path .7s var(--ease-io);
  overflow-y: auto;
}
.menu-open .mobile-menu { clip-path: polygon(-60% 0, 100% 0, 100% 100%, -60% 100%); }
.mobile-menu ol { display: grid; gap: 4px; padding: 0; margin: 0; list-style: none; }
.mobile-menu ol a {
  display: flex; align-items: baseline; gap: 18px; padding: 14px 0;
  border-bottom: 1px solid var(--line-dark);
  font-size: 1.9rem; font-weight: 300; text-decoration: none;
  opacity: 0; transform: translateY(18px);
  transition: opacity .5s var(--ease-out), transform .6s var(--ease-out);
}
.mobile-menu ol a small { font-size: .7rem; letter-spacing: .2em; color: var(--arena); }
.menu-open .mobile-menu ol a { opacity: 1; transform: none; }
.menu-open .mobile-menu li:nth-child(2) a { transition-delay: .05s; }
.menu-open .mobile-menu li:nth-child(3) a { transition-delay: .1s; }
.menu-open .mobile-menu li:nth-child(4) a { transition-delay: .15s; }
.menu-open .mobile-menu li:nth-child(5) a { transition-delay: .2s; }
.menu-open .mobile-menu li:nth-child(6) a { transition-delay: .25s; }
.mobile-menu__foot { margin-top: 36px; display: grid; gap: 8px; font-size: var(--t-sm); opacity: .8; }
.menu-open { overflow: hidden; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--navy); color: var(--ivory);
  padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px) + clamp(40px, 6vw, 80px));
  padding-bottom: 0;
}
.hero__lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero__lines path {
  fill: none; stroke: var(--arena); stroke-width: 1; vector-effect: non-scaling-stroke;
  stroke-dasharray: 1; stroke-dashoffset: 1; opacity: .5;
}
.is-ready .hero__lines path { animation: draw 2.2s var(--ease-io) forwards; }
.is-ready .hero__lines path:nth-child(2) { animation-delay: .25s; }
.is-ready .hero__lines path:nth-child(3) { animation-delay: .45s; opacity: .25; }
.is-ready .hero__lines path:nth-child(4) { animation-delay: .6s; opacity: .25; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.hero__inner {
  position: relative; display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(32px, 5vw, 72px); align-items: center;
}
.hero__copy { display: grid; gap: 28px; padding-bottom: clamp(24px, 4vw, 64px); }
.hero__title { font-size: var(--t-3xl); font-weight: 300; letter-spacing: -.015em; line-height: 1.04; }
.hero__title .line { display: block; overflow: hidden; padding-bottom: .08em; }
.hero__title .line > span { display: inline-block; }
.is-ready .hero__title .line > span { animation: rise 1.1s var(--ease-out) both; }
.is-ready .hero__title .line:nth-child(2) > span { animation-delay: .12s; }
.is-ready .hero__title .line:nth-child(3) > span { animation-delay: .24s; }
@keyframes rise { from { transform: translateY(105%); } to { transform: none; } }
.hero__lead { font-size: var(--t-md); max-width: 46ch; opacity: .82; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero__actions .btn { flex: 1 1 auto; }
@media (min-width: 601px) { .hero__actions .btn { flex: 0 0 auto; } }
.is-ready .hero__fade { animation: fadeUp 1s .45s var(--ease-out) both; }
.is-ready .hero__fade--2 { animation-delay: .6s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.hero__media { position: relative; margin: 0; align-self: stretch; min-height: 420px; }
.hero__frame {
  position: absolute; inset: 0 calc(-1 * var(--gutter)) 0 0;
  clip-path: polygon(22% 0, 100% 0, 100% 100%, 0 100%);
  overflow: hidden;
}
.is-ready .hero__frame { animation: frameIn 1.5s .1s var(--ease-io) both; }
@keyframes frameIn { from { clip-path: polygon(100% 0, 100% 0, 78% 100%, 78% 100%); } }
.hero__frame img {
  width: 100%; height: 115%; object-fit: cover; object-position: 38% 50%;
  transform: translate3d(0, var(--py, 0px), 0) scale(1.06);
  will-change: transform;
}
.hero__frame::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20, 38, 60, .15), rgba(20, 38, 60, 0) 40%, rgba(13, 26, 42, .55));
}
.hero__caption {
  position: absolute; right: 0; bottom: 28px; z-index: 2;
  display: grid; gap: 2px; text-align: right;
  font-size: var(--t-xs); letter-spacing: .18em; text-transform: uppercase;
}
.hero__caption b { font-weight: 600; color: var(--arena); }
.hero__mark {
  position: absolute; left: -2%; bottom: -1px; z-index: 2; width: clamp(110px, 13vw, 170px);
  color: var(--arena);
}
.hero__mark .xm-bar { transform: translate(-22px, 22px); }
.is-ready .hero__mark .xm-bar { animation: expand 1.3s 1s var(--ease-out) forwards; }
@keyframes expand { to { transform: translate(0, 0); } }

.hero__facts {
  position: relative; z-index: 3;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line-dark);
  background: var(--navy);
}
.hero__facts li {
  display: flex; align-items: center; gap: 14px; padding: 22px 0;
  font-size: var(--t-xs); font-weight: 500; letter-spacing: .22em; text-transform: uppercase;
}
.hero__facts li + li { padding-left: 24px; border-left: 1px solid var(--line-dark); }
.hero__facts svg { width: 14px; flex-shrink: 0; color: var(--arena); }

/* ---------- Cifras ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat { padding: 8px 28px 8px 0; display: grid; gap: 10px; align-content: start; }
.stat + .stat { padding-left: 28px; border-left: 1px solid var(--line-light); }
.stat__num {
  font-size: clamp(2.6rem, 1.6rem + 3vw, 4.4rem); font-weight: 200; line-height: 1;
  letter-spacing: -.02em; font-variant-numeric: tabular-nums;
}
.stat__num sup { font-size: .45em; font-weight: 400; color: var(--acero); vertical-align: .9em; margin-right: 2px; }
.stat__label { font-size: var(--t-sm); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.stat__note { font-size: var(--t-sm); color: var(--ink-soft); }

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden; background: var(--navy); color: var(--ivory);
  border-block: 1px solid var(--line-dark); padding-block: 22px;
}
.marquee__track { display: flex; width: max-content; animation: marquee 48s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__group { display: flex; align-items: center; gap: 36px; padding-right: 36px; }
.marquee__group span { font-size: clamp(1.1rem, .9rem + 1vw, 1.7rem); font-weight: 300; letter-spacing: .04em; white-space: nowrap; }
.marquee__group span:nth-child(4n+3) { font-style: italic; color: var(--arena); }
.marquee__group i {
  width: 34px; height: 10px; flex-shrink: 0; background: var(--arena);
  clip-path: polygon(30% 0, 100% 0, 70% 100%, 0 100%);
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Nosotros ---------- */
.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .85fr); gap: clamp(40px, 7vw, 110px); align-items: center; }
.about__copy { display: grid; gap: 26px; }
.about__copy p { color: var(--ink-soft); max-width: 60ch; }
.chips-static { display: flex; flex-wrap: wrap; gap: 10px; }
.chips-static li {
  padding: 9px 16px; border: 1px solid var(--line-light);
  font-size: var(--t-xs); font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
}
.about__media { position: relative; margin: 0; }
.parallelogram {
  position: relative; overflow: hidden;
  clip-path: polygon(14% 0, 100% 0, 86% 100%, 0 100%);
}
.parallelogram img { width: 100%; height: 100%; object-fit: cover; }
.about__media .parallelogram { aspect-ratio: 4 / 5; }
.about__tag {
  position: absolute; left: 0; bottom: 8%;
  background: var(--navy); color: var(--ivory); padding: 18px 22px; max-width: 250px;
  font-size: var(--t-sm); line-height: 1.5;
}
.about__tag b { display: block; font-size: var(--t-xs); letter-spacing: .22em; text-transform: uppercase; color: var(--arena); margin-bottom: 4px; }

/* Misión / visión (tabs) */
.purpose {
  margin-top: clamp(80px, 10vw, 130px);
  display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1fr);
  background: var(--navy); color: var(--ivory);
}
.purpose__img { position: relative; min-height: 360px; overflow: hidden; }
.purpose__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out); }
.purpose:hover .purpose__img img { transform: scale(1.04); }
.purpose__body { padding: clamp(32px, 5vw, 64px); display: grid; gap: 28px; align-content: center; }
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--line-dark); }
.tab {
  position: relative; background: none; border: 0; padding: 14px 22px 14px 0; margin-right: 22px; cursor: pointer;
  font-size: var(--t-sm); font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
  color: inherit; opacity: .55; transition: opacity .3s;
}
.tab::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--arena);
  transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease-out);
}
.tab[aria-selected="true"] { opacity: 1; }
.tab[aria-selected="true"]::after { transform: scaleX(1); }
.tab:hover { opacity: 1; }
.tab-panel { animation: panelIn .6s var(--ease-out); }
.tab-panel p { font-size: var(--t-lg); font-weight: 300; line-height: 1.55; max-width: 44ch; }
@keyframes panelIn { from { opacity: 0; transform: translateY(10px); } }

.values {
  margin-top: clamp(64px, 8vw, 100px);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line-light);
}
.value { padding: 28px 24px 8px 0; display: grid; gap: 10px; align-content: start; position: relative; }
.value + .value { padding-left: 24px; border-left: 1px solid var(--line-light); }
.value::before {
  content: ""; position: absolute; top: -1px; left: 0; height: 2px; width: 0; background: var(--navy);
  transition: width .7s var(--ease-out);
}
.value:hover::before { width: 100%; }
.value h3 { font-size: var(--t-lg); font-weight: 500; }
.value p { color: var(--ink-soft); font-size: .95rem; }

/* ---------- Servicios ---------- */
.services { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; }
.service {
  position: relative; overflow: hidden; min-height: 520px;
  display: grid; align-content: end; padding: clamp(28px, 4vw, 48px);
  isolation: isolate;
}
.service__img { position: absolute; inset: 0; z-index: -2; }
.service__img img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.02); transition: transform 1.4s var(--ease-out); }
.service::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(13, 26, 42, .25) 0%, rgba(13, 26, 42, .72) 45%, rgba(13, 26, 42, .96) 100%);
  transition: opacity .6s;
}
.service:hover .service__img img { transform: scale(1.08); }
.service__kicker { font-size: var(--t-xs); letter-spacing: .28em; text-transform: uppercase; color: var(--arena); font-weight: 600; }
.service h3 { font-size: var(--t-xl); margin: 12px 0 14px; }
.service p { max-width: 46ch; opacity: .85; }
.service ul { margin-top: 22px; display: grid; gap: 8px; }
.service li { display: flex; gap: 12px; align-items: baseline; font-size: .95rem; }
.service li::before { content: ""; width: 14px; height: 1px; background: var(--arena); flex-shrink: 0; transform: translateY(-4px); }

/* Proceso (secuencia real) */
.process { margin-top: clamp(72px, 9vw, 120px); }
.process__head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: 40px; }
.process__head h3 { font-size: var(--t-xl); }
.process__track { position: relative; }
.process__rail { position: absolute; left: 0; right: 0; top: 23px; height: 1px; background: var(--line-dark); }
.process__rail span { position: absolute; inset: 0; background: var(--arena); transform-origin: left; transform: scaleX(var(--fill, 0)); }
.process ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; position: relative; }
.step { display: grid; gap: 14px; align-content: start; }
.step__dot {
  width: 47px; height: 47px; display: grid; place-items: center;
  background: var(--navy); border: 1px solid var(--line-dark);
  font-size: var(--t-xs); font-weight: 600; letter-spacing: .1em; font-variant-numeric: tabular-nums;
  transition: background-color .5s, color .5s, border-color .5s;
}
.step.is-on .step__dot { background: var(--arena); color: var(--navy); border-color: var(--arena); }
.step h4 { font-size: var(--t-md); font-weight: 500; }
.step p { font-size: var(--t-sm); opacity: .72; }

/* ---------- Proyectos ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 18px;
  background: transparent; border: 1px solid var(--line-light); cursor: pointer;
  font-size: var(--t-xs); font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  transition: background-color .3s, color .3s, border-color .3s;
}
.chip small { font-size: .68rem; opacity: .6; font-variant-numeric: tabular-nums; }
.chip:hover { border-color: var(--navy); }
.chip[aria-pressed="true"], .chip[aria-selected="true"] { background: var(--navy); color: var(--ivory); border-color: var(--navy); }
.filter-status { font-size: var(--t-sm); color: var(--ink-soft); margin-top: 14px; }

.projects { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 28px; margin-top: 40px; }
.project { grid-column: span 6; display: grid; gap: 18px; align-content: start; transition: opacity .45s, transform .6s var(--ease-out); }
.project:nth-child(4n+1), .project:nth-child(4n+4) { grid-column: span 7; }
.project:nth-child(4n+2), .project:nth-child(4n+3) { grid-column: span 5; }
.project.is-out { display: none; }
.project__media {
  position: relative; overflow: hidden; aspect-ratio: 16 / 11; background: var(--ivory);
  border: 0; padding: 0; cursor: pointer; width: 100%;
}
.project__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease-out), filter .6s; }
.project__media:hover img, .project__media:focus-visible img { transform: scale(1.05); }
.project__media::after {
  content: ""; position: absolute; inset: 0;
  background: var(--navy); opacity: 0;
  clip-path: polygon(0 100%, 0 100%, 0 100%); transition: opacity .5s;
}
.project__view {
  position: absolute; right: 18px; bottom: 18px; z-index: 2;
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 16px;
  background: var(--ivory); color: var(--navy);
  font-size: var(--t-xs); font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  transform: translateY(8px); opacity: 0; transition: transform .5s var(--ease-out), opacity .4s;
}
.project__media:hover .project__view, .project__media:focus-visible .project__view { transform: none; opacity: 1; }
.status {
  position: absolute; left: 18px; top: 18px; z-index: 2;
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px;
  background: rgba(20, 38, 60, .88); color: var(--ivory);
  font-size: .68rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
}
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--arena); }
.status--live::before { background: #7FC8A0; box-shadow: 0 0 0 0 rgba(127, 200, 160, .7); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(127, 200, 160, 0); } 100% { box-shadow: 0 0 0 0 rgba(127, 200, 160, 0); } }
.project__info { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 20px; align-items: start; }
.project__info h3 { font-size: var(--t-xl); font-weight: 400; }
.project__loc { grid-column: 1; font-size: var(--t-sm); color: var(--ink-soft); }
.project__facts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--line-light); }
.project__facts li { font-size: var(--t-sm); }
.project__facts b { font-weight: 600; font-variant-numeric: tabular-nums; }
.project__info .link-arrow { grid-row: 1 / span 2; grid-column: 2; align-self: center; }

/* ---------- Andares Miramar I (destacado) ---------- */
.feature-hero { position: relative; overflow: hidden; width: 100%; max-width: 100%; aspect-ratio: 16 / 7; min-height: 340px; }
.feature-hero img { position: absolute; inset: -8% 0; width: 100%; height: 116%; object-fit: cover; transform: translate3d(0, var(--py, 0px), 0); will-change: transform; }
.feature-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(13, 26, 42, .1) 40%, var(--navy-deep)); }
.feature-hero__title {
  position: absolute; z-index: 2; left: 0; right: 0; bottom: 0;
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 20px; padding-bottom: 32px;
}
.feature-hero__title h2 { font-size: var(--t-3xl); font-weight: 300; letter-spacing: -.01em; }
.feature-hero__title h2 span { display: block; font-size: var(--t-xs); letter-spacing: .32em; text-transform: uppercase; color: var(--arena); font-weight: 500; margin-bottom: 14px; }
.feature-body { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(40px, 6vw, 96px); margin-top: clamp(48px, 6vw, 80px); }
.feature-body__copy { display: grid; gap: 24px; align-content: start; }
.feature-body__copy .lead { opacity: .8; }
.kv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line-dark); }
.kv div { padding: 18px 16px 0 0; display: grid; gap: 4px; }
.kv div + div { padding-left: 16px; border-left: 1px solid var(--line-dark); }
.kv b { font-size: var(--t-xl); font-weight: 300; font-variant-numeric: tabular-nums; }
.kv span { font-size: var(--t-xs); letter-spacing: .18em; text-transform: uppercase; opacity: .65; }

.amenities { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line-dark); border-left: 1px solid var(--line-dark); }
.amenity {
  display: grid; gap: 14px; align-content: start; padding: 24px 20px 26px;
  border-right: 1px solid var(--line-dark); border-bottom: 1px solid var(--line-dark);
  position: relative; overflow: hidden; transition: background-color .5s;
}
.amenity svg { width: 28px; height: 28px; stroke: var(--arena); fill: none; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .6s var(--ease-out); }
.amenity span { font-size: var(--t-sm); font-weight: 500; letter-spacing: .06em; }
.amenity:hover { background: var(--navy-soft); }
.amenity:hover svg { transform: translateY(-3px) rotate(-6deg); }

/* Galería horizontal */
.gallery { margin-top: clamp(64px, 8vw, 100px); }
.gallery__head { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.gallery__head h3 { font-size: var(--t-xl); }
.gallery__nav { display: flex; align-items: center; gap: 10px; }
.gallery__count { font-size: var(--t-sm); font-variant-numeric: tabular-nums; opacity: .7; margin-right: 8px; min-width: 52px; text-align: right; }
.icon-btn {
  width: 48px; height: 48px; display: grid; place-items: center; cursor: pointer;
  background: transparent; border: 1px solid var(--line-dark); color: inherit;
  transition: background-color .3s, color .3s, border-color .3s, opacity .3s;
}
.icon-btn:hover:not(:disabled) { background: var(--arena); color: var(--navy); border-color: var(--arena); }
.icon-btn:disabled { opacity: .35; cursor: default; }
.icon-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.band--ivory .icon-btn, .band--paper .icon-btn, .dialog .icon-btn { border-color: var(--line-light); }

.rail {
  display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding-bottom: 18px; cursor: grab; scrollbar-width: thin; scrollbar-color: var(--arena) transparent;
  overscroll-behavior-x: contain;
}
.rail.is-dragging { cursor: grabbing; scroll-snap-type: none; scroll-behavior: auto; }
.rail.is-dragging img { pointer-events: none; }
.rail__item { flex: 0 0 auto; width: min(78vw, 460px); scroll-snap-align: start; margin: 0; }
.rail__item:nth-child(3n+1) { width: min(84vw, 620px); }
.rail__btn { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; overflow: hidden; aspect-ratio: 4 / 3; }
.rail__item:nth-child(3n+1) .rail__btn { aspect-ratio: 16 / 10; }
.rail__btn img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease-out); }
.rail__btn:hover img { transform: scale(1.05); }
.rail__item figcaption { display: flex; justify-content: space-between; gap: 12px; padding-top: 12px; font-size: var(--t-sm); }
.rail__item figcaption span { opacity: .6; font-size: var(--t-xs); letter-spacing: .16em; text-transform: uppercase; }

/* ---------- Avance de obra ---------- */
.progress-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 36px; }
.updated {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px;
  background: var(--navy); color: var(--ivory);
  font-size: var(--t-xs); font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
}
.updated::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #7FC8A0; animation: pulse 2s infinite; }
.works { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.work { margin: 0; grid-column: span 2; position: relative; }
.works--3 .work:first-child { grid-column: span 4; grid-row: span 2; }
.works--3 .work:first-child .work__btn { aspect-ratio: auto; height: 100%; }
.work__btn { display: block; width: 100%; padding: 0; border: 0; cursor: zoom-in; aspect-ratio: 16 / 10; overflow: hidden; background: var(--ivory); }
.work__btn img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease-out); }
.work__btn:hover img { transform: scale(1.05); }
.work figcaption {
  position: absolute; left: 12px; bottom: 12px;
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(20, 38, 60, .9); color: var(--ivory); padding: 8px 12px;
  font-size: var(--t-xs); font-weight: 600; letter-spacing: .08em; pointer-events: none;
}
.work figcaption em { font-style: normal; color: var(--arena); font-weight: 500; }
.works-note { margin-top: 22px; font-size: var(--t-sm); color: var(--ink-soft); }

/* ---------- CTA band ---------- */
.cta-band { position: relative; overflow: hidden; color: var(--ivory); padding-block: clamp(96px, 12vw, 170px); isolation: isolate; }
.cta-band__bg { position: absolute; inset: -10% 0; z-index: -2; }
.cta-band__bg img { width: 100%; height: 100%; object-fit: cover; transform: translate3d(0, var(--py, 0px), 0); }
.cta-band::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, rgba(13, 26, 42, .94) 30%, rgba(20, 38, 60, .55)); }
.cta-band__inner { display: grid; gap: 28px; max-width: 760px; }
.cta-band h2 { font-size: var(--t-2xl); }
.cta-band .fragment { position: absolute; right: 6%; bottom: -10px; width: clamp(120px, 18vw, 260px); color: var(--arena); opacity: .9; }

/* ---------- Contacto ---------- */
.contact { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.contact__info { display: grid; gap: 34px; }
.contact__list { display: grid; gap: 0; border-top: 1px solid var(--line-dark); }
.contact__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line-dark); }
.contact__row dt { font-size: var(--t-xs); letter-spacing: .22em; text-transform: uppercase; color: var(--arena); font-weight: 600; }
.contact__row dd { margin: 0; grid-column: 1; font-size: var(--t-md); overflow-wrap: anywhere; }
.contact__row dd a { text-decoration: none; }
.contact__row dd a:hover { text-decoration: underline; text-underline-offset: 4px; }
.copy-btn {
  grid-column: 2; grid-row: 1 / span 2;
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px;
  background: transparent; border: 1px solid var(--line-dark); color: inherit; cursor: pointer;
  font-size: .68rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  transition: background-color .3s, color .3s;
}
.copy-btn:hover { background: var(--ivory); color: var(--navy); }
.copy-btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.offices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.office { display: grid; gap: 8px; align-content: start; }
.office b { font-size: var(--t-xs); letter-spacing: .22em; text-transform: uppercase; color: var(--arena); }
.office p { font-size: var(--t-sm); opacity: .8; }
.office a { font-size: var(--t-xs); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; border-bottom: 1px solid var(--arena); justify-self: start; padding-bottom: 2px; }

/* Formulario */
.form {
  background: var(--ivory); color: var(--ink);
  padding: clamp(26px, 4vw, 52px); display: grid; gap: 22px; position: relative;
  clip-path: polygon(0 0, calc(100% - 44px) 0, 100% 44px, 100% 100%, 0 100%);
}
.form__head { display: grid; gap: 6px; }
.form__head h3 { font-size: var(--t-xl); }
.form__head p { font-size: var(--t-sm); color: var(--ink-soft); }
.form__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.field { display: grid; gap: 8px; position: relative; min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field label, .field legend {
  font-size: var(--t-xs); font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  display: flex; align-items: center; gap: 8px;
}
.field label .opt { font-weight: 400; letter-spacing: .04em; text-transform: none; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 52px; padding: 14px 16px;
  background: var(--paper); border: 1px solid transparent; border-bottom-color: rgba(20, 38, 60, .35);
  border-radius: 0; font-size: var(--t-base); color: var(--ink);
  transition: border-color .3s, background-color .3s, box-shadow .3s;
  appearance: none; -webkit-appearance: none;
}
.field select {
  background-image: linear-gradient(45deg, transparent 50%, var(--navy) 50%), linear-gradient(135deg, var(--navy) 50%, transparent 50%);
  background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%;
  background-size: 6px 6px; background-repeat: no-repeat; padding-right: 44px;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; background: #fff; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(201, 184, 152, .45);
}
.field.is-valid input, .field.is-valid select { border-bottom-color: var(--ok); }
.field.is-invalid input, .field.is-invalid select { border-color: var(--error); background: #fff; }
.field__msg { font-size: .82rem; line-height: 1.4; min-height: 1.2em; display: flex; gap: 6px; align-items: flex-start; color: var(--ink-soft); }
.field.is-invalid .field__msg { color: var(--error); }
.field.is-valid .field__msg { color: var(--ok); }
.field__ok {
  position: absolute; right: 14px; top: 42px; width: 18px; height: 18px; opacity: 0; transform: scale(.6);
  stroke: var(--ok); fill: none; stroke-width: 2.2; transition: opacity .3s, transform .4s var(--ease-out); pointer-events: none;
}
.field.is-valid .field__ok { opacity: 1; transform: none; }

/* Tooltip de ayuda (heurística 10) */
.help { position: relative; display: inline-flex; }
.help__btn {
  width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--acero); background: transparent;
  font-size: .7rem; font-weight: 700; color: var(--acero); cursor: help; display: grid; place-items: center; padding: 0;
}
.help__tip {
  position: absolute; left: 50%; bottom: calc(100% + 10px); width: 230px; z-index: 5;
  transform: translate(-50%, 6px); opacity: 0; pointer-events: none;
  background: var(--navy); color: var(--ivory); padding: 10px 12px;
  font-size: .78rem; font-weight: 400; letter-spacing: 0; text-transform: none; line-height: 1.45;
  transition: opacity .25s, transform .35s var(--ease-out);
}
.help__tip::after { content: ""; position: absolute; left: 50%; top: 100%; transform: translateX(-50%); border: 6px solid transparent; border-top-color: var(--navy); }
.help:hover .help__tip, .help__btn:focus + .help__tip, .help.is-open .help__tip { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }

fieldset.field { border: 0; padding: 0; margin: 0; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg label {
  position: relative; cursor: pointer; min-height: 44px; padding: 0 16px; display: inline-flex; align-items: center;
  border: 1px solid var(--line-light); background: var(--paper);
  font-size: var(--t-sm); font-weight: 500; letter-spacing: 0; text-transform: none;
  transition: background-color .3s, color .3s, border-color .3s;
}
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg input:checked + span { color: var(--ivory); }
.seg label:has(input:checked) { background: var(--navy); border-color: var(--navy); color: var(--ivory); }
.seg label:has(input:focus-visible) { outline: 2px solid var(--arena); outline-offset: 2px; }

.check { display: flex; gap: 12px; align-items: flex-start; font-size: var(--t-sm); color: var(--ink-soft); cursor: pointer; }
.field .check { font-weight: 400; letter-spacing: 0; text-transform: none; font-size: var(--t-sm); align-items: flex-start; }
.field .check input { width: 20px; height: 20px; min-height: 0; padding: 0; accent-color: var(--navy); margin: 2px 0 0; flex-shrink: 0; appearance: auto; -webkit-appearance: checkbox; border: 0; }

.form__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.form__foot small { font-size: .8rem; color: var(--ink-soft); }
.spinner {
  width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent;
  animation: spin .8s linear infinite; display: none;
}
.is-sending .spinner { display: inline-block; }
.is-sending .arrow { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.form-success {
  position: absolute; inset: 0; z-index: 3; background: var(--ivory);
  display: grid; place-content: center; gap: 18px; text-align: center; padding: 32px;
  opacity: 0; pointer-events: none; transition: opacity .5s;
}
.form.is-sent .form-success { opacity: 1; pointer-events: auto; }
.form-success svg { width: 64px; height: 64px; margin-inline: auto; stroke: var(--navy); fill: none; stroke-width: 1.4; }
.form-success svg path { stroke-dasharray: 60; stroke-dashoffset: 60; }
.form.is-sent .form-success svg path { animation: drawCheck .8s .2s var(--ease-out) forwards; }
@keyframes drawCheck { to { stroke-dashoffset: 0; } }
.form-success h3 { font-size: var(--t-xl); }
.form-success p { color: var(--ink-soft); max-width: 40ch; margin-inline: auto; }
.form-success .note { font-size: .8rem; opacity: .8; }
.form-success .btn { justify-self: center; }

/* ---------- Footer ---------- */
.footer { background: var(--navy-deep); color: var(--ivory); padding-top: clamp(64px, 8vw, 100px); padding-bottom: max(28px, env(safe-area-inset-bottom, 0px)); position: relative; overflow: hidden; }
.footer__top { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 40px; padding-bottom: 56px; border-bottom: 1px solid var(--line-dark); }
.footer__brand { display: grid; gap: 22px; align-content: start; }
.footer__brand .brand svg { width: 44px; }
.footer__brand p { max-width: 34ch; opacity: .7; font-size: var(--t-sm); }
.footer h4 { font-size: var(--t-xs); font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: var(--arena); margin-bottom: 16px; }
.footer ul { display: grid; gap: 10px; font-size: var(--t-sm); }
.footer ul a { text-decoration: none; opacity: .75; transition: opacity .3s; }
.footer ul a:hover { opacity: 1; }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 24px; font-size: var(--t-xs); opacity: .6; letter-spacing: .06em; }
.footer__giant {
  font-size: clamp(3.6rem, 15vw, 15rem); font-weight: 200; letter-spacing: .14em; line-height: .8;
  color: transparent; -webkit-text-stroke: 1px rgba(234, 228, 216, .14);
  white-space: nowrap; margin-top: 40px; user-select: none; text-align: center;
}

/* ---------- WhatsApp flotante ---------- */
.float-wa {
  position: fixed; z-index: 40;
  right: calc(20px + env(safe-area-inset-right, 0px));
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  display: inline-flex; align-items: center; gap: 10px; height: 54px; padding: 0 18px 0 16px;
  background: var(--arena); color: var(--navy); text-decoration: none;
  font-size: var(--t-xs); font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  box-shadow: 0 10px 30px rgba(13, 26, 42, .35);
  transform: translateY(120px); transition: transform .6s var(--ease-out), background-color .3s;
}
.float-wa.is-visible { transform: none; }
.float-wa:hover { background: var(--ivory); }
.float-wa svg { width: 22px; height: 22px; fill: currentColor; }

/* ---------- Toast (heurística 01) ---------- */
.toast {
  position: fixed; left: 50%; z-index: 95;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 140%); opacity: 0;
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--carbon); color: var(--ivory); padding: 14px 20px; font-size: var(--t-sm);
  transition: transform .5s var(--ease-out), opacity .4s; max-width: calc(100vw - 32px);
}
.toast.is-on { transform: translate(-50%, 0); opacity: 1; }
.toast svg { width: 18px; height: 18px; stroke: #7FC8A0; fill: none; stroke-width: 2; flex-shrink: 0; }

/* ---------- Dialogs ---------- */
.dialog {
  border: 0; padding: 0; margin: auto; color: var(--ink); background: var(--paper);
  width: min(1100px, calc(100vw - 32px)); max-height: calc(100dvh - 48px);
  overflow: hidden;
}
.dialog::backdrop { background: rgba(13, 26, 42, .82); backdrop-filter: blur(6px); }
.dialog[open] { animation: dlgIn .6s var(--ease-out); }
@keyframes dlgIn { from { opacity: 0; transform: translateY(24px) scale(.98); } }
.dialog__close {
  position: absolute; top: 14px; right: 14px; z-index: 5; background: var(--paper);
}
.pdlg { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); max-height: calc(100dvh - 48px); }
.pdlg__media { position: relative; background: var(--navy); min-height: 300px; }
.pdlg__media > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .4s; }
.pdlg__media.is-plan > img { object-fit: contain; background: #fff; }
.pdlg__thumbs {
  position: absolute; left: 14px; right: 14px; bottom: 14px; display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px;
}
.pdlg__thumbs button { flex: 0 0 auto; width: 72px; height: 52px; padding: 0; border: 2px solid transparent; cursor: pointer; overflow: hidden; opacity: .7; background: var(--navy); transition: opacity .3s, border-color .3s; }
.pdlg__thumbs button[aria-current="true"] { border-color: var(--arena); opacity: 1; }
.pdlg__thumbs img { width: 100%; height: 100%; object-fit: cover; }
.pdlg__body { padding: clamp(28px, 4vw, 48px); overflow-y: auto; display: grid; gap: 20px; align-content: start; }
.pdlg__body h2 { font-size: var(--t-2xl); }
.pdlg__body .eyebrow { color: var(--acero); }
.pdlg__body > p { color: var(--ink-soft); }
.pdlg__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 20px; border-top: 1px solid var(--line-light); padding-top: 18px; }
.pdlg__list li { display: flex; gap: 10px; font-size: var(--t-sm); }
.pdlg__list li::before { content: ""; width: 10px; height: 1px; background: var(--acero); flex-shrink: 0; margin-top: 11px; }
.pdlg__stats { display: flex; flex-wrap: wrap; gap: 28px; }
.pdlg__stats div { display: grid; }
.pdlg__stats b { font-size: var(--t-xl); font-weight: 300; font-variant-numeric: tabular-nums; }
.pdlg__stats span { font-size: var(--t-xs); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); }

.lightbox { width: min(1280px, calc(100vw - 24px)); background: var(--navy-deep); color: var(--ivory); }
.lb { display: grid; grid-template-rows: minmax(0, 1fr) auto; height: min(86dvh, 860px); }
.lb__stage { position: relative; display: grid; place-items: center; overflow: hidden; }
.lb__stage img { max-width: 100%; max-height: 100%; object-fit: contain; animation: lbIn .5s var(--ease-out); }
@keyframes lbIn { from { opacity: 0; transform: scale(.985); } }
.lb__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; border-top: 1px solid var(--line-dark); }
.lb__bar p { font-size: var(--t-sm); }
.lb__bar span { opacity: .6; font-variant-numeric: tabular-nums; margin-left: 10px; }
.lb__nav { display: flex; gap: 8px; }
.lightbox .dialog__close { background: var(--navy-deep); }

/* ---------- Reveal (desde un estado visible) ---------- */
.js .reveal { opacity: .2; transform: translateY(32px); transition: opacity 1s var(--ease-out), transform 1.1s var(--ease-out); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .reveal-img { clip-path: inset(0 0 22% 0); transition: clip-path 1.4s var(--ease-io); }
.js .reveal-img img { transform: scale(1.12); transition: transform 1.6s var(--ease-out); }
.js .reveal-img.is-in { clip-path: inset(0 0 0 0); }
.js .reveal-img.is-in img { transform: none; }
.js .about__media.reveal-img { clip-path: none; }
.d1 { transition-delay: .08s !important; } .d2 { transition-delay: .16s !important; } .d3 { transition-delay: .24s !important; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .nav, .header-cta { display: none; }
  .menu-toggle { display: block; }
  .process ol { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 40px; }
  .process__rail { display: none; }
  .footer__top { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  :root { --header-h: 66px; }
  .hero__inner { grid-template-columns: minmax(0, 1fr); }
  .hero__media { min-height: 0; height: clamp(260px, 68vw, 460px); margin-right: calc(-1 * var(--gutter)); }
  .hero__frame { inset: 0; clip-path: polygon(14% 0, 100% 0, 100% 100%, 0 100%); }
  .hero__facts { grid-template-columns: 1fr; }
  .hero__facts li + li { padding-left: 0; border-left: 0; border-top: 1px solid var(--line-dark); }
  .hero__facts li { padding: 16px 0; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 36px; }
  .stat:nth-child(3) { padding-left: 0; border-left: 0; }
  .section-head--split { grid-template-columns: 1fr; }
  .section-head--split .lead { justify-self: start; }
  .about, .purpose, .feature-body, .contact { grid-template-columns: 1fr; }
  .about__media { max-width: 520px; }
  .values { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .value:nth-child(3) { padding-left: 0; border-left: 0; }
  .services { grid-template-columns: 1fr; }
  .service { min-height: 460px; }
  .projects { grid-template-columns: 1fr; }
  .project, .project:nth-child(n) { grid-column: auto; }
  .works { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .work, .works--3 .work:first-child { grid-column: span 1; grid-row: auto; }
  .works--3 .work:first-child { grid-column: 1 / -1; }
  .works--3 .work:first-child .work__btn { aspect-ratio: 16 / 10; height: auto; }
  .pdlg { grid-template-columns: 1fr; overflow-y: auto; }
  .pdlg__media { min-height: 260px; aspect-ratio: 16 / 11; }
  .pdlg__body { overflow: visible; }
  .feature-hero { aspect-ratio: 4 / 3; }
}
@media (max-width: 600px) {
  .process ol { grid-template-columns: 1fr; }
  .step { grid-template-columns: 47px minmax(0, 1fr); column-gap: 18px; }
  .step__dot { grid-row: span 2; }
  .stats { grid-template-columns: 1fr; }
  .stat + .stat, .stat:nth-child(3) { padding-left: 0; border-left: 0; border-top: 1px solid var(--line-light); padding-top: 24px; }
  .values { grid-template-columns: 1fr; }
  .value + .value { padding-left: 0; border-left: 0; }
  .amenities { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kv { grid-template-columns: 1fr; }
  .kv div + div { padding-left: 0; border-left: 0; }
  .form__grid, .offices, .pdlg__list { grid-template-columns: 1fr; }
  .works { grid-template-columns: 1fr; }
  .footer__top { grid-template-columns: 1fr 1fr; }
  .float-wa b { display: none; }
  .float-wa { padding: 0 16px; }
  .contact__row { grid-template-columns: 1fr; }
  .copy-btn { grid-column: 1; grid-row: auto; justify-self: start; }
  .brand__word b { font-size: .9rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .intro { display: none; }
  .js .reveal, .js .reveal-img, .js .reveal-img img { opacity: 1; transform: none; clip-path: none; }
  .hero__lines path { stroke-dashoffset: 0; }
  .hero__mark .xm-bar { transform: none; }
  .marquee__track { animation: none; }
}

/* =========================================================
   SITIO MULTIPÁGINA
   Encabezado de página interna, transiciones entre páginas,
   migas de pan, FAQ, "siguiente página" y teasers del inicio.
   ========================================================= */

/* ---------- Transiciones entre páginas ---------- */
html:not(.js) .intro, html:not(.js) .page-cover { display: none; }
.intro { animation: introOut 1s 3.2s var(--ease-io) forwards; } /* respaldo si el JS no carga */
.is-quick .intro__logo { display: none; }
.is-quick.is-loaded .intro { animation: introOut .8s .05s var(--ease-io) forwards; }
.page-cover {
  position: fixed; inset: 0; z-index: 92; pointer-events: none;
  display: grid; place-items: center;
  background: var(--navy);
  clip-path: polygon(0 0, 0 0, -35% 100%, -35% 100%);
  transition: clip-path .55s var(--ease-io);
}
.page-cover svg { width: 64px; color: var(--ivory); opacity: 0; transform: scale(.92); transition: opacity .3s .25s, transform .5s .25s var(--ease-out); }
.is-leaving .page-cover { clip-path: polygon(0 0, 135% 0, 100% 100%, -35% 100%); pointer-events: auto; }
.is-leaving .page-cover svg { opacity: 1; transform: none; }

/* ---------- Navegación: página actual ---------- */
.nav a[aria-current="page"] { opacity: 1; }
.nav a[aria-current="page"]::after { transform: scaleX(1); }
.header-cta[aria-current="page"] { background: var(--ivory); border-color: var(--ivory); }
.mobile-menu ol a[aria-current="page"] { color: var(--arena); }
.mobile-menu ol a::after {
  content: ""; margin-left: auto; width: 18px; height: 1px; background: currentColor; opacity: .5;
  align-self: center; transition: width .5s var(--ease-out);
}
.mobile-menu ol a:hover::after { width: 34px; }

/* ---------- Encabezado de página interna ---------- */
.page-hero {
  position: relative; overflow: hidden;
  background: var(--navy); color: var(--ivory);
  padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px) + clamp(28px, 4vw, 56px));
}
.page-hero__inner {
  position: relative; display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: clamp(32px, 5vw, 72px); align-items: stretch;
}
.page-hero__copy { display: grid; gap: 22px; align-content: center; padding-bottom: clamp(56px, 7vw, 104px); }
.hero__title.page-hero__title { font-size: clamp(2.3rem, 1.2rem + 3.8vw, 4.6rem); }
.page-hero__media { position: relative; margin: 0; min-height: clamp(320px, 34vw, 520px); }
.page-hero__media .hero__frame { clip-path: polygon(26% 0, 100% 0, 100% 100%, 0 100%); }
.page-hero__media .hero__frame::after { background: linear-gradient(180deg, rgba(20, 38, 60, .1), rgba(13, 26, 42, .45)); }
.page-hero__media .hero__caption { right: 0; bottom: 22px; }

.crumbs ol {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px;
  margin: 0; padding: 0; list-style: none;
  font-size: var(--t-xs); font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
}
.crumbs li { display: inline-flex; align-items: center; gap: 12px; }
.crumbs li + li::before { content: ""; width: 12px; height: 1px; background: var(--arena); transform: rotate(-55deg); }
.crumbs a { text-decoration: none; opacity: .62; transition: opacity .3s, color .3s; }
.crumbs a:hover { opacity: 1; color: var(--arena); }
.crumbs [aria-current="page"] { color: var(--arena); }
.is-ready .crumbs { animation: fadeUp .9s .2s var(--ease-out) both; }

/* ---------- Siguiente página ---------- */
.next-page { background: var(--navy); color: var(--ivory); position: relative; overflow: hidden; }
.next-page__link {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 14px 32px;
  padding-block: clamp(64px, 9vw, 120px); text-decoration: none;
}
.next-page .eyebrow { grid-column: 1 / -1; }
.next-page__title {
  font-size: var(--t-3xl); font-weight: 200; line-height: 1; letter-spacing: -.015em;
  transition: color .5s, letter-spacing .9s var(--ease-out);
}
.next-page__hint { grid-column: 1; font-size: var(--t-sm); opacity: .7; max-width: 52ch; }
.next-page__arrow {
  grid-row: 2 / span 2; grid-column: 2; align-self: center;
  width: clamp(56px, 7vw, 96px); height: clamp(56px, 7vw, 96px);
  display: grid; place-items: center; border: 1px solid var(--line-dark); color: var(--arena);
  transition: background-color .5s, color .5s, transform .6s var(--ease-out);
}
.next-page__arrow svg { width: 40%; height: 40%; }
.next-page__link:hover .next-page__title, .next-page__link:focus-visible .next-page__title { color: var(--arena); letter-spacing: .005em; }
.next-page__link:hover .next-page__arrow, .next-page__link:focus-visible .next-page__arrow { background: var(--arena); color: var(--navy); transform: translateX(8px); }

/* ---------- Pie de sección con enlace ---------- */
.section-foot {
  margin-top: clamp(36px, 5vw, 56px); padding-top: 22px; border-top: 1px solid var(--line-light);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
}
.band--navy .section-foot, .band--deep .section-foot { border-top-color: var(--line-dark); }
.section-foot p { font-size: var(--t-sm); opacity: .75; }

/* Tarjetas de servicio enlazadas (inicio) */
.service__link { margin-top: 26px; color: var(--arena); justify-self: start; position: static; }
.service__link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.service:has(.service__link:focus-visible) { outline: 2px solid var(--arena); outline-offset: 3px; }

/* Proyectos enlazados */
a.project__media { display: block; text-decoration: none; }
.project__info h3 a { text-decoration: none; background-image: linear-gradient(currentColor, currentColor); background-size: 0 1px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size .5s var(--ease-out); }
.project__info h3 a:hover { background-size: 100% 1px; }
a.work__btn { cursor: pointer; }

/* Presencia (nosotros) */
.presence { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line-dark); }
.presence__item { display: grid; gap: 12px; align-content: start; padding: 30px 28px 8px 0; position: relative; }
.presence__item + .presence__item { padding-left: 28px; border-left: 1px solid var(--line-dark); }
.presence__item::before { content: ""; position: absolute; top: -1px; left: 0; width: 0; height: 2px; background: var(--arena); transition: width .8s var(--ease-out); }
.presence__item:hover::before { width: 100%; }
.presence__tag { font-size: var(--t-xs); font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: var(--arena); }
.presence__item h3 { font-size: var(--t-lg); font-weight: 400; }
.presence__item p { font-size: .95rem; opacity: .75; }
.presence__item a { font-size: var(--t-xs); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; border-bottom: 1px solid var(--arena); justify-self: start; padding-bottom: 2px; margin-top: 4px; }

/* Tipos de proyecto (servicios) */
.values--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.value__tag { font-size: var(--t-xs); font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--acero); }

/* Datos en banda clara */
.kv--light { grid-template-columns: repeat(2, minmax(0, 1fr)); border-top-color: var(--line-light); }
.kv--light div + div { border-left-color: var(--line-light); }

/* Franja de imagen dentro de banda oscura */
.strip { position: relative; overflow: hidden; height: clamp(260px, 38vw, 520px); margin-block: clamp(64px, 8vw, 110px); }
.strip img { position: absolute; inset: -10% 0; width: 100%; height: 120%; object-fit: cover; transform: translate3d(0, var(--py, 0px), 0); will-change: transform; }
.strip::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, var(--navy-deep), rgba(13, 26, 42, 0) 22%, rgba(13, 26, 42, 0) 70%, var(--navy-deep)); }
.strip__cap { position: absolute; z-index: 2; left: 0; right: 0; bottom: 18px; font-size: var(--t-xs); letter-spacing: .2em; text-transform: uppercase; opacity: .8; }

/* ---------- Preguntas frecuentes ---------- */
.faq-layout { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.faq-layout .section-head { margin-bottom: 0; position: sticky; top: calc(var(--header-h) + 32px); }
.faq { border-top: 1px solid var(--line-light); }
.faq details { border-bottom: 1px solid var(--line-light); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: flex-start; gap: 24px;
  padding: 24px 0; font-size: var(--t-lg); font-weight: 400; line-height: 1.35;
  transition: color .3s;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; width: 16px; height: 16px; flex-shrink: 0; margin-top: 7px;
  background:
    linear-gradient(currentColor, currentColor) center / 100% 1.5px no-repeat,
    linear-gradient(currentColor, currentColor) center / 1.5px 100% no-repeat;
  transition: transform .5s var(--ease-out);
}
.faq summary:hover { color: var(--acero); }
.faq details[open] summary::after { transform: rotate(135deg); }
.faq__a { padding: 0 40px 26px 0; max-width: 68ch; color: var(--ink-soft); }
.faq__a a { color: var(--navy); font-weight: 600; text-underline-offset: 4px; }
.faq details[open] .faq__a { animation: panelIn .6s var(--ease-out); }

/* ---------- Pie de página (multipágina) ---------- */
.footer__social { display: flex; flex-wrap: wrap; gap: 8px; }
.footer__social a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px;
  border: 1px solid var(--line-dark); text-decoration: none;
  font-size: var(--t-xs); font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  transition: background-color .3s, color .3s;
}
.footer__social a:hover { background: var(--arena); color: var(--navy); border-color: var(--arena); }
.footer__contact li { opacity: .75; overflow-wrap: anywhere; }
.footer__bottom a { text-decoration: none; }
.footer__bottom a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Responsive (multipágina) ---------- */
@media (max-width: 900px) {
  .page-hero__inner { grid-template-columns: minmax(0, 1fr); }
  .page-hero__copy { padding-bottom: 8px; }
  .page-hero__media { min-height: 0; height: clamp(240px, 62vw, 420px); margin-right: calc(-1 * var(--gutter)); }
  .page-hero__media .hero__frame { inset: 0; clip-path: polygon(16% 0, 100% 0, 100% 100%, 0 100%); }
  .presence, .values--3 { grid-template-columns: minmax(0, 1fr); }
  .presence__item + .presence__item, .values--3 .value + .value { padding-left: 0; border-left: 0; border-top: 1px solid var(--line-dark); }
  .values--3 .value + .value { border-top-color: var(--line-light); }
  .faq-layout { grid-template-columns: minmax(0, 1fr); }
  .faq-layout .section-head { position: static; }
}
@media (max-width: 600px) {
  .next-page__link { grid-template-columns: minmax(0, 1fr) auto; }
  .faq summary { font-size: var(--t-md); }
  .faq__a { padding-right: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .page-cover { display: none; }
}
