/* =============================================================
   AVANTI · Ingeniería civil — styles.css (v2)
   Portada 3D oscura + secciones editoriales técnicas
   ============================================================= */

/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --navy:      #0f3b73;
  --navy-2:    #0b2c58;
  --night:     #061a36;   /* fondo oscuro principal */
  --night-2:   #041327;
  --yellow:    #f0b11f;
  --yellow-2:  #d99a0b;
  --paper:     #ffffff;
  --paper-2:   #f2f5f9;
  --ink:       #0b1a2e;
  --ink-soft:  #3d4c61;
  --ink-mute:  #6f7d90;
  --line:      rgba(15, 59, 115, 0.14);
  --line-2:    rgba(15, 59, 115, 0.32);
  --line-dark: rgba(255, 255, 255, 0.14);
  --text-dark: rgba(255, 255, 255, 0.74);

  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --sans:    "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono:    "JetBrains Mono", ui-monospace, "Consolas", monospace;

  --gutter: clamp(16px, 4.5vw, 64px);
  --max:    1360px;
  --nav-h:  76px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
body {
  font-family: var(--sans); font-size: 16px; line-height: 1.6;
  color: var(--ink); background: var(--paper);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
ol, ul { list-style: none; }
p { text-wrap: pretty; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: .95; text-wrap: balance; text-transform: uppercase; }
::selection { background: var(--yellow); color: var(--night); }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; }

.skip-link { position: fixed; top: -100px; left: 1rem; z-index: 9999; padding: .6rem 1rem; background: var(--yellow); color: var(--night); font-weight: 600; }
.skip-link:focus { top: 1rem; }
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); position: relative; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.label, .eyebrow {
  display: inline-flex; align-items: center; gap: .7rem;
  font-family: var(--mono); font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; color: var(--navy);
}
.label::before { content: ""; width: 32px; height: 2px; background: var(--yellow); }
.label-light { color: #fff; }

/* =============================================================
   3. Buttons
   ============================================================= */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .7rem;
  min-height: 56px; padding: .9rem 1.6rem; overflow: hidden; isolation: isolate;
  font-family: var(--display); font-size: 1.15rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  border: 1px solid transparent;
  transition: color .35s var(--ease-out), border-color .35s var(--ease-out);
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  transform: translateY(101%); transition: transform .45s var(--ease-out);
}
.btn:hover::before { transform: none; }
.btn span[aria-hidden] { transition: transform .35s var(--ease-out); }
.btn:hover span[aria-hidden] { transform: translateX(5px); }
.btn-accent { background: var(--yellow); color: var(--night); }
.btn-accent::before { background: #fff; }
.btn-line { color: #fff; border-color: rgba(255,255,255,.4); }
.btn-line::before { background: #fff; }
.btn-line:hover { color: var(--night); border-color: #fff; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* =============================================================
   4. Nav — transparente sobre la portada, blanca al bajar
   ============================================================= */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background-color .4s var(--ease-out), border-color .4s, box-shadow .4s;
  border-bottom: 1px solid transparent;
}
.nav-inner {
  max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter);
  height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.nav-logo { position: relative; display: block; width: 150px; flex: none; }
.nav-logo img { width: 100%; height: auto; transition: opacity .35s; }
.logo-dark { position: absolute; inset: 0; opacity: 0; }
.nav-links { display: flex; align-items: center; gap: .2rem; }
.nav-links a {
  position: relative; padding: .55rem .8rem;
  font-family: var(--display); font-size: 1.1rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: #fff; transition: color .25s;
}
.nav-links a:not(.nav-cta)::after {
  content: ""; position: absolute; left: .8rem; right: .8rem; bottom: .25rem; height: 2px; background: var(--yellow);
  transform: scaleX(0); transform-origin: 0 50%; transition: transform .4s var(--ease-out);
}
.nav-links a:hover::after, .nav-links a.is-active::after { transform: scaleX(1); }
.nav-links a.nav-cta { margin-left: .6rem; padding: .6rem 1.1rem; background: var(--yellow); color: var(--night); transition: background-color .25s; }
.nav-links a.nav-cta:hover { background: #fff; }
/* Selector de idioma */
.lang { display: flex; align-items: center; flex: none; border: 1px solid rgba(255,255,255,.35); transition: border-color .4s; }
.lang a {
  padding: .3rem .55rem; min-width: 2.4rem; text-align: center;
  font-family: var(--mono); font-size: .74rem; font-weight: 500; letter-spacing: .08em; color: rgba(255,255,255,.75);
  transition: background-color .25s, color .25s;
}
.lang a + a { border-left: 1px solid rgba(255,255,255,.35); }
.lang a:hover { color: #fff; background: rgba(255,255,255,.12); }
.lang a.is-current { background: #fff; color: var(--night); }
.nav.is-solid .lang { border-color: var(--line-2); }
.nav.is-solid .lang a { color: var(--navy); }
.nav.is-solid .lang a + a { border-color: var(--line-2); }
.nav.is-solid .lang a:hover { background: var(--paper-2); }
.nav.is-solid .lang a.is-current { background: var(--navy); color: #fff; }
.nav-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; }
.nav-progress span { display: block; height: 100%; background: var(--yellow); transform-origin: 0 50%; transform: scaleX(0); }

.nav.is-solid { background: rgba(255,255,255,.97); border-color: var(--line); box-shadow: 0 10px 30px -18px rgba(6,26,54,.35); }
@supports (backdrop-filter: blur(8px)) {
  .nav.is-solid { background: rgba(255,255,255,.86); backdrop-filter: blur(14px) saturate(160%); -webkit-backdrop-filter: blur(14px) saturate(160%); }
}
.nav.is-solid .logo-light { opacity: 0; }
.nav.is-solid .logo-dark { opacity: 1; }
.nav.is-solid .nav-links a:not(.nav-cta) { color: var(--navy); }
.nav.is-solid .nav-links a.nav-cta:hover { background: var(--navy); color: #fff; }

/* Celular: botonera deslizable debajo del logo */
@media (max-width: 959px) {
  :root { --nav-h: 108px; }
  .nav-inner { position: relative; height: auto; flex-direction: column; align-items: stretch; gap: .35rem; padding-top: .75rem; }
  .lang { position: absolute; top: .8rem; right: var(--gutter); }
  .nav-logo { width: 130px; }
  .nav-links { overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding: 0 var(--gutter) .55rem; gap: 0; }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a { flex: none; padding: .45rem .7rem; font-size: 1rem; }
  .nav-links a:first-child { padding-left: 0; }
  .nav-links a:not(.nav-cta)::after { left: .7rem; right: .7rem; bottom: .1rem; }
  .nav-links a:first-child::after { left: 0; }
  .nav-links a.nav-cta { margin-left: .4rem; padding: .45rem .8rem; }
  .nav { background: rgba(6,26,54,.55); }
  @supports (backdrop-filter: blur(8px)) { .nav { backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); } }
}

/* =============================================================
   5. Hero — escena 3D a pantalla completa
   ============================================================= */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding-top: calc(var(--nav-h) + 2rem);
  background:
    radial-gradient(80% 70% at 75% 40%, #0f3466 0%, transparent 70%),
    radial-gradient(60% 50% at 10% 100%, #0b2a52 0%, transparent 70%),
    var(--night);
  color: #fff;
}
.hero-grid-bg {
  position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(90% 80% at 60% 40%, #000 30%, transparent 85%);
  -webkit-mask-image: radial-gradient(90% 80% at 60% 40%, #000 30%, transparent 85%);
}
.hero-stage { position: absolute; inset: 0; z-index: -1; }
.hero-stage canvas { width: 100% !important; height: 100% !important; animation: stageIn 1.6s .2s var(--ease-out) both; }
@keyframes stageIn { from { opacity: 0; } to { opacity: 1; } }
.hero-fallback {
  position: absolute; right: 0; top: 50%; width: min(60vw, 760px); transform: translateY(-50%);
  mix-blend-mode: luminosity; opacity: .35; filter: invert(1) hue-rotate(180deg);
  display: none;
}
.no-js .hero-fallback, .no-webgl .hero-fallback { display: block; }
.hero-shade {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(6,26,54,.92) 0%, rgba(6,26,54,.6) 38%, rgba(6,26,54,0) 65%),
    linear-gradient(0deg, rgba(4,19,39,.95) 0%, rgba(4,19,39,0) 35%);
}

.hero-inner { padding-bottom: clamp(2rem, 5vh, 3.5rem); }
.eyebrow { color: rgba(255,255,255,.8); }
.eyebrow-dot { width: 8px; height: 8px; background: var(--yellow); box-shadow: 0 0 0 4px rgba(240,177,31,.2); animation: pulse 2.4s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 9px rgba(240,177,31,0); } }

.hero-title {
  margin-top: 1.3rem;
  font-size: clamp(3.2rem, min(8vw, 13vh), 8rem); line-height: .88; font-weight: 700; letter-spacing: -.005em;
  max-width: 11ch;
}
html[lang="en"] .hero-title { max-width: 14ch; }
.hero-title .line { display: block; overflow: hidden; padding-bottom: .04em; }
.hero-title .line > span { display: inline-block; animation: lineUp 1.1s var(--d, 0s) var(--ease-out) both; }
.hero-title .accent { color: var(--yellow); }
@keyframes lineUp { from { transform: translateY(105%); } to { transform: none; } }

.hero-sub { margin-top: 1.6rem; max-width: 50ch; font-size: clamp(1rem, 1.35vw, 1.15rem); color: var(--text-dark); }
.hero-actions { margin-top: 2.2rem; display: flex; flex-wrap: wrap; gap: .8rem; }
.hero-in { animation: heroIn 1s var(--d, 0s) var(--ease-out) both; }
@keyframes heroIn { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

.hero-tag {
  position: absolute; right: var(--gutter); top: calc(var(--nav-h) + 2rem);
  display: none; flex-direction: column; gap: .15rem; text-align: right;
  font-family: var(--mono); font-size: .7rem; color: rgba(255,255,255,.6);
  padding: .8rem 1rem; border-right: 2px solid var(--yellow);
}
.hero-tag span { color: var(--yellow); letter-spacing: .14em; }
.hero-tag strong { font-family: var(--display); font-size: 1.15rem; font-weight: 600; text-transform: uppercase; color: #fff; letter-spacing: .04em; }
.hero-tag em { font-style: normal; }

.hero-rail {
  display: grid; grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line-dark);
}
.hero-rail li {
  display: flex; gap: .6rem; align-items: baseline;
  padding: 1rem .9rem 1.1rem 0;
  font-family: var(--display); font-size: clamp(.98rem, 1.3vw, 1.2rem); font-weight: 500; text-transform: uppercase; letter-spacing: .03em; line-height: 1.15;
  color: rgba(255,255,255,.9);
}
.hero-rail li span { font-family: var(--mono); font-size: .7rem; color: var(--yellow); }

/* =============================================================
   6. Manifiesto con palabras que se encienden
   ============================================================= */
.statement { padding-block: clamp(5rem, 12vw, 10rem); border-bottom: 1px solid var(--line); }
.statement-text {
  margin-top: 2rem; max-width: 26ch;
  font-family: var(--display); font-weight: 600; text-transform: uppercase; line-height: 1;
  font-size: clamp(2.3rem, 5.6vw, 5.2rem); color: var(--navy);
  text-wrap: balance;
}
.statement-text .w { transition: opacity .35s var(--ease-soft), color .35s; }
.words-on .statement-text .w { opacity: .14; }
.words-on .statement-text .w.on { opacity: 1; }
.statement-text .w.hl { color: var(--yellow-2); }

/* =============================================================
   7. Encabezados de sección
   ============================================================= */
.section { position: relative; padding-block: clamp(5rem, 10vw, 8.5rem); }
.head { display: grid; gap: .8rem; margin-bottom: clamp(2.5rem, 6vw, 4.5rem); max-width: 900px; }
.head-num { font-family: var(--mono); font-size: .85rem; color: var(--navy); display: inline-flex; align-items: center; gap: .7rem; }
.head-num::after { content: ""; width: 64px; height: 1px; background: currentColor; opacity: .4; }
.head-title { font-size: clamp(2.6rem, 6.4vw, 5.6rem); color: var(--navy); }
.head-lede { max-width: 54ch; font-size: 1.08rem; color: var(--ink-soft); }
.head-light .head-num, .head-num-light { color: var(--yellow); }
.head-light .head-title { color: #fff; }
.head-light .head-lede { color: var(--text-dark); }

/* Reveal — defensivo */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-split] { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* =============================================================
   8. 01 Servicios — tarjetas
   ============================================================= */
.cards { display: grid; gap: 1px; background: var(--line-2); border: 1px solid var(--line-2); }
.card {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; align-content: start; gap: .8rem;
  min-height: 320px; padding: 2rem 1.6rem 2.2rem;
  background: #fff;
  transition: color .4s var(--ease-out);
}
.card::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--navy);
  clip-path: inset(100% 0 0 0); transition: clip-path .6s var(--ease-out);
}
.card:hover::before { clip-path: inset(0 0 0 0); }
.card-icon {
  width: 64px; height: 64px; margin-bottom: 2.2rem;
  fill: none; stroke: var(--navy); stroke-width: 1.6; stroke-linecap: square;
  transition: stroke .4s, transform .6s var(--ease-out);
}
.card-num { font-family: var(--mono); font-size: .75rem; color: var(--yellow-2); }
.card h3 { font-size: clamp(1.8rem, 2.6vw, 2.3rem); color: var(--navy); transition: color .4s; }
.card p { color: var(--ink-soft); transition: color .4s; max-width: 40ch; }
.card:hover .card-icon { stroke: var(--yellow); transform: translateY(-4px); }
.card:hover h3 { color: #fff; }
.card:hover p { color: var(--text-dark); }
.card:hover .card-num { color: var(--yellow); }

/* =============================================================
   9. 02 Proyectos — paneles apilados (sticky)
   ============================================================= */
.section-dark { background: var(--night); color: #fff; }
.dark-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 80px 80px;
}
.stack { display: grid; gap: 1.5rem; }
.panel {
  display: grid; background: #fff; color: var(--ink);
  border-top: 4px solid var(--yellow);
  box-shadow: 0 -20px 50px -30px rgba(0,0,0,.6);
}
.panel-copy { padding: 1.8rem 1.6rem 2rem; display: grid; align-content: start; gap: .9rem; }
.panel-num { font-family: var(--mono); font-size: .8rem; color: var(--yellow-2); }
.panel h3 { font-size: clamp(2.2rem, 4.6vw, 4rem); color: var(--navy); }
.panel p { color: var(--ink-soft); font-size: 1.05rem; max-width: 42ch; }
.tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .4rem; }
.tags li { font-family: var(--mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; padding: .35rem .7rem; border: 1px solid var(--line-2); color: var(--navy); }
.panel-img { overflow: hidden; aspect-ratio: 4 / 3; background: #fff; border-top: 1px solid var(--line); }
.panel-img img { width: 100%; height: 100%; object-fit: cover; object-position: center 55%; will-change: transform; }
.panel-img-plan img { object-position: left center; }

/* =============================================================
   10. 03 Rubros — lista interactiva con visor
   ============================================================= */
.sectors { display: grid; gap: 2.5rem; }
.sector-list { border-top: 1px solid var(--line-2); }
.sector {
  position: relative; display: grid; grid-template-columns: 3rem 1fr; gap: .3rem .5rem;
  padding: 1.4rem 0; border-bottom: 1px solid var(--line-2); cursor: default; outline: none;
}
.sector-num { font-family: var(--mono); font-size: .78rem; color: var(--ink-mute); padding-top: .9em; transition: color .3s; }
.sector-name {
  font-family: var(--display); font-weight: 600; text-transform: uppercase; line-height: 1;
  font-size: clamp(2.2rem, 5.2vw, 4.4rem); color: var(--navy);
  transition: color .35s, transform .5s var(--ease-out);
}
.sector-desc { grid-column: 2; color: var(--ink-soft); max-width: 46ch; }
.sector-thumb { grid-column: 1 / -1; margin-top: .9rem; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.sector-stage { display: none; }

/* =============================================================
   11. Banda de plano
   ============================================================= */
.plan-band { position: relative; overflow: hidden; isolation: isolate; min-height: clamp(460px, 70vw, 760px); display: flex; align-items: flex-end; background: var(--night); }
.plan-band img { position: absolute; inset: -12% 0 auto 0; width: 100%; height: 124%; object-fit: cover; object-position: center 30%; z-index: -2; opacity: .6; will-change: transform; }
.plan-band::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(6,26,54,.1) 0%, rgba(6,26,54,.55) 50%, rgba(4,19,39,.97) 100%); }
.plan-copy { padding-bottom: clamp(3rem, 8vw, 6rem); }
.plan-quote {
  margin-top: 1.2rem; max-width: 18ch;
  font-family: var(--display); font-weight: 700; text-transform: uppercase; line-height: .92;
  font-size: clamp(2.6rem, 7.4vw, 6.4rem); color: #fff;
}
.plan-quote span { color: var(--yellow); }

/* =============================================================
   12. 04 Método — línea de proceso
   ============================================================= */
.process { position: relative; }
.process-line { display: none; }
.steps { display: grid; gap: 0; border-left: 1px solid var(--line-2); }
.step { position: relative; padding: 0 0 2.4rem 2.2rem; }
.step-dot {
  position: absolute; left: -22px; top: 0;
  display: grid; place-items: center; width: 44px; height: 44px;
  font-family: var(--display); font-size: 1.4rem; font-weight: 700;
  background: #fff; border: 2px solid var(--navy); color: var(--navy);
  transition: background-color .4s, color .4s, border-color .4s;
}
.step.is-visible .step-dot { background: var(--navy); color: #fff; }
.step:hover .step-dot { background: var(--yellow); border-color: var(--yellow); color: var(--night); }
.step h3 { font-size: 2rem; color: var(--navy); margin: .35rem 0 .5rem; }
.step p { color: var(--ink-soft); max-width: 34ch; }

/* =============================================================
   13. 05 Contacto
   ============================================================= */
.contact-grid { display: grid; gap: 3rem; position: relative; }
.contact-title { margin-top: 1.2rem; font-size: clamp(3rem, 7.6vw, 6.6rem); line-height: .9; font-weight: 700; color: #fff; max-width: 11ch; text-transform: none; }
.contact-title span { color: var(--yellow); }
.contact-lede { margin-top: 1.3rem; max-width: 40ch; font-size: 1.12rem; color: var(--text-dark); }
.contact-info { margin-top: 2.6rem; border-top: 1px solid var(--line-dark); }
.contact-info li { display: grid; gap: .2rem; padding: 1.1rem 0; border-bottom: 1px solid var(--line-dark); }
.ci-label { font-family: var(--mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--yellow); }
.ci-value { font-size: clamp(1.1rem, 2vw, 1.35rem); font-weight: 500; overflow-wrap: anywhere; }
a.ci-value { justify-self: start; background: linear-gradient(var(--yellow), var(--yellow)) 0 100% / 0 2px no-repeat; transition: background-size .45s var(--ease-out); }
a.ci-value:hover { background-size: 100% 2px; }

.form { display: grid; gap: 1.1rem; padding: clamp(1.4rem, 3vw, 2.4rem); background: rgba(255,255,255,.035); border: 1px solid var(--line-dark); border-top: 3px solid var(--yellow); }
.form-row { display: grid; gap: 1.1rem; }
.field { display: grid; gap: .45rem; }
.field > span { font-family: var(--mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.65); }
.field input, .field select, .field textarea {
  width: 100%; padding: .85rem 0; background: transparent; color: #fff;
  border: 0; border-bottom: 1px solid rgba(255,255,255,.3); border-radius: 0;
  transition: border-color .25s;
}
.field select { appearance: none; padding-right: 2rem; background-image: linear-gradient(45deg, transparent 50%, var(--yellow) 50%), linear-gradient(135deg, var(--yellow) 50%, transparent 50%); background-position: calc(100% - 12px) 50%, calc(100% - 6px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
.field select option { color: var(--ink); }
.field textarea { resize: vertical; min-height: 130px; }
.field input::placeholder, .field textarea::placeholder { color: rgba(255,255,255,.35); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--yellow); }
.field.is-invalid input, .field.is-invalid textarea { border-color: #ff8a7a; }
.form-foot { display: grid; gap: 1rem; align-items: center; margin-top: .6rem; }
.form-status { font-size: .95rem; min-height: 1.5em; color: var(--text-dark); }
.form-status.is-ok { color: var(--yellow); }
.form-status.is-error { color: #ffb4a8; }
.form-status a { text-decoration: underline; }

/* =============================================================
   14. Footer
   ============================================================= */
.footer { background: var(--night-2); color: rgba(255,255,255,.65); padding-block: 3rem 2.2rem; }
.footer-grid { display: grid; gap: 1.6rem; }
.footer-logo { width: 150px; }
.footer-links { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; font-family: var(--display); font-size: 1.1rem; font-weight: 500; text-transform: uppercase; letter-spacing: .05em; color: #fff; }
.footer-links a:hover, .footer-meta a:hover { color: var(--yellow); }
.footer-meta { font-size: .92rem; }
.footer-ig { display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap; }
.footer-ig svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.footer-ig svg .dot { fill: currentColor; stroke: none; }
.footer-copy { font-family: var(--mono); font-size: .72rem; color: rgba(255,255,255,.4); padding-top: 1.4rem; border-top: 1px solid var(--line-dark); }

/* =============================================================
   15. Responsive
   ============================================================= */
@media (min-width: 540px) {
  .form-row { grid-template-columns: 1fr 1fr; }
  .form-foot { grid-template-columns: auto 1fr; }
}
@media (min-width: 720px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .hero-rail { grid-template-columns: repeat(4, 1fr); }
  .hero-rail li { padding-right: 1.2rem; }
  .hero-rail li + li { padding-left: 1.2rem; border-left: 1px solid var(--line-dark); }
  .footer-grid { grid-template-columns: auto 1fr; align-items: center; }
  .footer-links { justify-content: flex-end; }
  .footer-copy { grid-column: 1 / -1; }
}
@media (max-width: 959px) {
  /* En celular la escena 3D queda arriba y el texto debajo */
  .hero { justify-content: flex-start; }
  .hero-stage { position: relative; inset: auto; height: 46vh; min-height: 300px; margin-inline: calc(var(--gutter) * -1); }
  .hero-shade { background: linear-gradient(180deg, rgba(6,26,54,0) 30%, rgba(6,26,54,.85) 55%, var(--night) 70%); }
  .hero { padding-top: var(--nav-h); }
  .hero-inner { margin-top: -4rem; }
  .hero-fallback { width: 90%; right: 5%; }
}
@media (min-width: 960px) {
  .nav-links { margin-left: auto; }
  .hero-tag { display: flex; }
  .hero-inner { padding-bottom: clamp(3rem, 8vh, 5rem); }
  .cards { grid-template-columns: repeat(4, 1fr); }
  .card { min-height: 420px; }

  /* Paneles que se apilan al hacer scroll */
  .stack { gap: 3rem; }
  .panel {
    position: sticky; top: calc(var(--nav-h) + 24px + var(--i) * 22px);
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    height: min(520px, calc(100vh - var(--nav-h) - 150px));
  }
  .panel-copy { padding: 2.6rem 3rem; align-content: start; }
  .panel-img { aspect-ratio: auto; height: 100%; border-top: 0; border-left: 1px solid var(--line); }

  /* Rubros: lista + visor */
  .sectors { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 4rem; align-items: start; }
  .sector { cursor: pointer; padding: 1.6rem 0; }
  .sector-thumb { display: none; }
  .sector-desc { max-height: 0; opacity: 0; overflow: hidden; transition: max-height .5s var(--ease-out), opacity .4s, margin .4s; }
  .sector.is-active .sector-desc { max-height: 4em; opacity: 1; margin-top: .4rem; }
  .sector.is-active .sector-name, .sector:hover .sector-name { color: var(--navy); transform: translateX(14px); }
  .sector:not(.is-active) .sector-name { color: rgba(15,59,115,.28); }
  .sector.is-active .sector-num { color: var(--yellow-2); }
  .sector::before { content: ""; position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%; background: var(--yellow); transform: scaleX(0); transform-origin: 0 50%; transition: transform .6s var(--ease-out); }
  .sector.is-active::before { transform: scaleX(1); }
  .sector-stage {
    display: block; position: sticky; top: calc(var(--nav-h) + 40px);
    aspect-ratio: 4 / 5; overflow: hidden; background: var(--paper-2);
  }
  .sector-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.08); transition: opacity .7s var(--ease-out), transform 1.2s var(--ease-out); }
  .sector-stage img.is-active { opacity: 1; transform: none; }
  .stage-corner { position: absolute; width: 28px; height: 28px; border: solid var(--yellow); z-index: 1; }
  .stage-corner-a { top: 14px; left: 14px; border-width: 3px 0 0 3px; }
  .stage-corner-b { bottom: 14px; right: 14px; border-width: 0 3px 3px 0; }

  /* Proceso horizontal */
  .process-line { display: block; position: absolute; left: 22px; right: 22px; top: 21px; height: 2px; background: var(--line-2); }
  .process-line span { display: block; height: 100%; background: var(--navy); transform-origin: 0 50%; transform: scaleX(1); }
  .js-process .process-line span { transform: scaleX(0); }
  .steps { grid-template-columns: repeat(4, 1fr); gap: 2rem; border-left: 0; }
  .step { padding: 4.2rem 0 0; }
  .step-dot { left: 0; }

  .contact-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 5rem; align-items: start; }
}
@media (min-width: 1280px) {
  .nav-logo { width: 170px; }
  .nav-links a { padding: .6rem 1rem; }
  .nav-links a:not(.nav-cta)::after { left: 1rem; right: 1rem; }
}

/* =============================================================
   16. Reduced motion — solo lo intrusivo
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .eyebrow-dot { animation: none; }
}
