/* ===========================================================================
   Drive Forge — Home (hero + secciones específicas)
   =========================================================================== */

/* --- HERO --- */
.hero { position: relative; padding-top: clamp(2.5rem, 1.5rem + 3vw, 4.5rem); padding-bottom: calc(var(--section-y) + 1rem); overflow: hidden; }
.hero::before { /* halo de acento detrás del visual, más presente */
  content: ""; position: absolute; right: -8%; top: 4%; width: 64vw; height: 64vw; max-width: 840px; max-height: 840px;
  background: radial-gradient(circle, var(--accent-glow), transparent 62%); pointer-events: none; z-index: 0;
}
/* Profundidad técnica: rejilla fina "blueprint" concentrada tras el visual,
   enmascarada hacia la derecha para no ensuciar el texto ni recargar. */
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px) 0 0 / 26px 26px,
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px) 0 0 / 26px 26px;
  -webkit-mask-image: radial-gradient(66% 78% at 82% 34%, #000 6%, transparent 64%);
          mask-image: radial-gradient(66% 78% at 82% 34%, #000 6%, transparent 64%);
}
.hero__inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 1rem + 4vw, 4rem); align-items: center; }
.hero__copy { max-width: 39rem; }
.hero h1 { margin: 1.25rem 0 1.4rem; font-weight: 700; letter-spacing: -0.035em; line-height: 1.02;
  font-size: clamp(2.7rem, 1.6rem + 4.6vw, 5rem); }
.hero h1 .hl { color: var(--accent); }
.hero__sub { font-size: var(--fs-lead); color: var(--ink-2); max-width: 34rem; line-height: 1.55; }
.hero__sub strong { color: var(--ink); }
.hero__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem; margin-top: 2rem; }
/* Jerarquía del hero: el CTA de WhatsApp (btn--lg, verde) es el primario. "Solicitar
   presupuesto" baja de énfasis a un botón ghost de tamaño normal (no --lg) para que no
   compita en peso con el primario. */
.hero__cta-secondary { padding: 0.7rem 1.15rem; font-size: 0.95rem; }
@media (max-width: 480px) { .hero__cta > .btn { width: 100%; justify-content: center; } }
.hero__micro { margin-top: 1.1rem; font-size: 0.92rem; color: var(--ink-3); max-width: 42ch; padding-left: 1.4rem; position: relative; }
.hero__micro::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 9px; height: 9px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.hero__alt { margin-top: 0.7rem; font-size: 0.88rem; }
.hero__alt a { font-family: var(--font-display); font-weight: 400; color: var(--ink-3); border-bottom: 1px dashed var(--line-strong); padding-bottom: 2px; transition: color var(--t-fast), border-color var(--t-fast); }
.hero__alt a:hover { color: var(--accent); border-color: var(--accent); }

/* --- Rotador de sectores (bajo el lead del hero) --- */
.hero__sectors { margin-top: 0.9rem; font-family: var(--font-display); font-size: 1.05rem; color: var(--ink-2); }
.hero__sectors-word { position: relative; display: inline-block; vertical-align: top; min-width: 11ch; height: 1.3em; text-align: left; }
.hero__sectors-item {
  position: absolute; left: 0; top: 0; white-space: nowrap;
  color: var(--accent); font-weight: 600;
  opacity: 0; transform: translateY(0.4em);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
  pointer-events: none;
}
.hero__sectors-item.is-active { opacity: 1; transform: translateY(0); }
.hero__sectors-item.is-leaving { opacity: 0; transform: translateY(-0.4em); }
@media (prefers-reduced-motion: reduce) {
  .hero__sectors-item { transition: none; opacity: 0; transform: none; }
  .hero__sectors-item.is-active { opacity: 1; }
}

.hero__trust { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 2.6rem; padding-top: 1.7rem; border-top: 1px solid var(--line); }
.hero__trust div { position: relative; display: flex; flex-direction: column; padding: 0 clamp(0.9rem, 0.5rem + 1.1vw, 1.5rem); border-left: 1px solid var(--line); }
.hero__trust div:first-child { padding-left: 0; border-left: 0; }
.hero__trust div::before { content: ""; position: absolute; top: 0.1rem; left: clamp(0.9rem, 0.5rem + 1.1vw, 1.5rem); width: 14px; height: 2px; background: var(--accent); }
.hero__trust div:first-child::before { left: 0; }
@media (max-width: 560px) {
  .hero__trust { grid-template-columns: 1fr; gap: 1.1rem; }
  .hero__trust div { padding-left: 0; border-left: 0; }
  .hero__trust div::before { left: 0; }
}
.hero__trust b { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.5rem, 1.2rem + 0.9vw, 1.85rem); color: var(--ink); line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; margin-top: 0.7rem; }
.hero__trust span { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em; color: var(--ink-3); margin-top: 0.5rem; text-transform: uppercase; max-width: 20ch; }

/* --- Visual del hero (SVG con línea de escaneo) --- */
.hero__visual { position: relative; aspect-ratio: 5 / 4.4; }
.hero__visual svg { width: 100%; height: 100%; overflow: visible; position: relative; z-index: 1; }
/* Corchetes de medición en las 4 esquinas: encuadran el visual como un visor de escáner */
.hero__visual::before {
  content: ""; position: absolute; inset: clamp(-6px, -0.5vw, -14px); z-index: 0; pointer-events: none; opacity: 0.55;
  background:
    linear-gradient(var(--accent),var(--accent)) 0 0/20px 2px no-repeat,
    linear-gradient(var(--accent),var(--accent)) 0 0/2px 20px no-repeat,
    linear-gradient(var(--accent),var(--accent)) 100% 0/20px 2px no-repeat,
    linear-gradient(var(--accent),var(--accent)) 100% 0/2px 20px no-repeat,
    linear-gradient(var(--accent),var(--accent)) 0 100%/20px 2px no-repeat,
    linear-gradient(var(--accent),var(--accent)) 0 100%/2px 20px no-repeat,
    linear-gradient(var(--accent),var(--accent)) 100% 100%/20px 2px no-repeat,
    linear-gradient(var(--accent),var(--accent)) 100% 100%/2px 20px no-repeat;
}
.scan-line { animation: scanY 4.2s var(--ease) infinite; }
@keyframes scanY { 0%,100% { transform: translateY(0); opacity: 0; } 8% { opacity: 1; } 50% { transform: translateY(330px); opacity: 1; } 60% { opacity: 0; } 92% { opacity: 0; } }
.mesh-pt { animation: meshPulse 4.2s ease-in-out infinite; }
@keyframes meshPulse { 0%, 40% { opacity: 0.2; } 55% { opacity: 1; } 100% { opacity: 0.35; } }
.spin-slow { transform-box: fill-box; transform-origin: center; animation: spin 30s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
/* El hero deja de animar cuando sale del viewport (ahorra CPU/batería) — lo activa main.js */
.hero__visual.is-anim-paused .scan-line,
.hero__visual.is-anim-paused .mesh-pt,
.hero__visual.is-anim-paused .spin-slow { animation-play-state: paused; }

/* Entrada orquestada del hero al cargar: aparición escalonada y sutil (una sola vez).
   Solo con JS activo y sin reduced-motion; sin JS el contenido se ve al instante. */
@media (prefers-reduced-motion: no-preference) {
  .js .hero__copy > *,
  .js .hero__visual { animation: heroIn 0.72s var(--ease) both; }
  .js .hero__copy > .eyebrow      { animation-delay: 0.02s; }
  .js .hero__copy > h1            { animation-delay: 0.09s; }
  .js .hero__copy > .hero__sub    { animation-delay: 0.16s; }
  .js .hero__copy > .hero__cta    { animation-delay: 0.23s; }
  .js .hero__copy > .hero__micro,
  .js .hero__copy > .hero__alt    { animation-delay: 0.29s; }
  .js .hero__copy > .hero__trust  { animation-delay: 0.35s; }
  .js .hero__visual               { animation-duration: 0.9s; animation-delay: 0.18s; }
  @keyframes heroIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}

/* sello pieza → escaneo → cad → fabricación */
.pipeline-stamp { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; margin-top: 1.6rem; font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.06em; color: var(--ink-2); }
.pipeline-stamp .step { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.4rem 0.7rem; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.pipeline-stamp .step b { color: var(--accent); font-family: var(--font-mono); }
.pipeline-stamp .arrow { color: var(--accent); }

/* Pista de scroll: una línea de escaneo que desciende en bucle (solo escritorio).
   Reutiliza el lenguaje de la línea de escaneo del hero; discreta, no es un icono. */
/* Anclada al pliegue de la primera pantalla (no al final del hero, que es más alto
   que el viewport): así siempre queda visible al cargar, sea cual sea la altura del hero. */
.scroll-cue { position: absolute; left: 50%; top: min(calc(100vh - 8rem), calc(100% - 5rem)); transform: translateX(-50%);
  width: 1px; height: 42px; overflow: hidden; z-index: 2; pointer-events: none;
  background: linear-gradient(var(--line-strong), transparent); }
.scroll-cue::after { content: ""; position: absolute; inset: 0 auto auto 0; width: 100%; height: 45%;
  background: linear-gradient(var(--accent), transparent);
  animation: scrollCue 2.1s var(--ease-scan) infinite; }
@keyframes scrollCue {
  0%   { transform: translateY(-100%); opacity: 0; }
  25%  { opacity: 1; }
  75%  { opacity: 1; }
  100% { transform: translateY(230%); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .scroll-cue::after { animation: none; opacity: 0.5; } }
@media (max-width: 940px) {
  .hero__inner { grid-template-columns: 1fr; }
  /* El titular y el CTA van primero; el visual acompaña debajo, más contenido */
  .hero__copy { order: 0; }
  .hero__visual { order: 1; max-width: 440px; margin-inline: auto; width: 100%; }
  .scroll-cue { display: none; } /* en móvil el hero no ocupa toda la pantalla: sobra */
}

/* ===========================================================================
   Home — secciones 2–11
   =========================================================================== */

/* 4 · Problemas */
.prob-list {
  list-style: none; padding: 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem 2.2rem;
}

.prob-list li {
  position: relative;
  padding: 0.85rem 0 0.85rem 2rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink); font-size: 1.05rem;
  /* sólo transform (nudge) + color/borde: nada de layout */
  transition: border-color var(--t-machine) var(--ease-machine),
              color var(--t-fast) var(--ease),
              transform var(--t-machine) var(--ease-machine);
}

/* Corchete de medición (esquina sup-izq): mismo trazo 1px que .case-media /
   .why__ico. En reposo --line-strong; salta a --accent al activar. Sólo se
   anima `background` (los gradientes), nunca layout. */
.prob-list li::before {
  content: ""; position: absolute; left: 0; top: 1.15rem;
  width: 11px; height: 11px; pointer-events: none;
  --c: var(--line-strong);
  background:
    linear-gradient(var(--c), var(--c)) left top / 9px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) left top / 1px 9px no-repeat;
  transition: background var(--t-machine) var(--ease-machine);
}

/* Rail-tick: hairline vertical que arranca corto y crece a plena altura al
   activar (scaleY, barato). "Renglón de instrumento" coherente con el rail
   del timeline. */
.prob-list li::after {
  content: ""; position: absolute; left: 0; top: 50%;
  width: 2px; height: 62%; transform: translateY(-50%) scaleY(0.34);
  transform-origin: center; background: var(--accent);
  opacity: 0; pointer-events: none;
  transition: transform var(--t-machine) var(--ease-machine),
              opacity var(--t-machine) var(--ease-machine);
}

/* --- Realce (puntero fino) --- */
@media (hover: hover) and (pointer: fine) {
  .prob-list li:hover {
    border-bottom-color: var(--line-strong);
    transform: translateX(3px);
  }
  .prob-list li:hover::before {
    --c: var(--accent);
    background:
      linear-gradient(var(--c), var(--c)) left top / 9px 1px no-repeat,
      linear-gradient(var(--c), var(--c)) left top / 1px 9px no-repeat;
  }
  .prob-list li:hover::after {
    opacity: 1; transform: translateY(-50%) scaleY(1);
  }
}

/* --- Foco (teclado): duplicado FUERA del media query hover. Si un <li>
   llegara a contener un enlace, :focus-within reproduce el mismo realce. --- */
.prob-list li:focus-within {
  border-bottom-color: var(--line-strong);
  transform: translateX(3px);
}
.prob-list li:focus-within::before {
  --c: var(--accent);
  background:
    linear-gradient(var(--c), var(--c)) left top / 9px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) left top / 1px 9px no-repeat;
}
.prob-list li:focus-within::after {
  opacity: 1; transform: translateY(-50%) scaleY(1);
}

/* --- Reduced-motion: pseudos decorativos en su estado de reposo visible; el
   rail-tick queda oculto (su función es el micro-realce). --- */
@media (prefers-reduced-motion: reduce) {
  .prob-list li,
  .prob-list li::before,
  .prob-list li::after { transition: none; }
  .prob-list li::after { opacity: 0; }
}

.prob-close {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1.4rem; margin-top: 2.4rem; padding: 1.8rem;
  border: 1px solid var(--line-strong); border-radius: var(--r-lg); background: var(--surface);
}
.prob-close p { font-size: var(--fs-lead); color: var(--ink); max-width: 44ch; margin: 0; }
@media (max-width: 640px) { .prob-list { grid-template-columns: 1fr; } }

/* 3 · Proceso en vídeo */
.proc-video { position: relative; margin: 2.6rem auto 0; max-width: 1000px; border: 1px solid var(--line-strong); border-radius: var(--r-lg); overflow: hidden; background: #000; box-shadow: var(--shadow-lg); }
.proc-video::after { /* marco técnico de esquina, coherente con el resto */
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: var(--r-lg);
  box-shadow: inset 0 0 0 1px rgba(255,229,0,0.06); }
.proc-video__el { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: var(--bg); }

/* 6·Proceso (timeline), 7·Antes/Después (ba-card), 9·Tienda (soon), 10·Por qué (why)
   → movidos a main.css: los comparten la home y páginas internas (proceso, proyectos,
   tienda, sobre) que NO cargan home.css. */

/* 11 · FAQ → movido a main.css: lo comparten la home y las fichas de servicio
   (escaneo-3d, ingeniería-inversa, diseño-cad, fabricación) que NO cargan home.css. */

/* CTA final (.final-cta) retirado: el cierre único de la home es .cta-banner
   (banda amarilla al final de este archivo). */

/* ===========================================================================
   HOME · #que-hacemos — misma familia, más sobria (son PASOS, no servicios).
   Requiere: clase `qh-steps` en el <div class="grid grid--3"> (línea 224).
   Estas cards NO tienen .card__icon ni .card__link (verificado): solo .card__num.
   Reforzamos el hairline del número como cue direccional y encendemos un
   corchete de medición al activar. El mismo idioma, en voz baja.
   =========================================================================== */

/* El hairline de .card__num (global: width:28px) pasa a guía que crece al
   activar: sugiere avance de proceso 01→02→03. */
.qh-steps > .card .card__num::after {
  width: 40px;
  transform-origin: left; transform: scaleX(0.7);
  transition: transform var(--t-machine) var(--ease-machine);
}
.qh-steps > .card:hover .card__num::after,
.qh-steps > .card:focus-within .card__num::after { transform: scaleX(1); }

/* Corchete de medición (esquina inf-derecha) reutilizando .card::before.
   IMPORTANTE: reseteamos inset a auto para que width/height se apliquen de
   verdad; si no, heredaríamos top:0/left:0 del ::before global y el pseudo se
   estiraría a toda la tarjeta (el gradiente 100% 100% caería en el sitio
   equivocado). Al reutilizar ::before perdemos la luz cenital → la reponemos
   con sombra interior, igual que en servicios. */
.qh-steps > .card::before {
  content: ""; z-index: 1; pointer-events: none;
  inset: auto;                 /* anula inset:0 heredado; ahora width/height mandan */
  right: 12px; bottom: 12px; width: 12px; height: 12px;
  background:
    linear-gradient(var(--line-strong), var(--line-strong)) 100% 100% / 12px 1px,
    linear-gradient(var(--line-strong), var(--line-strong)) 100% 100% / 1px 12px;
  background-repeat: no-repeat;
  opacity: 0.9;
  transition: background var(--t-machine) var(--ease-machine);
}
.qh-steps > .card {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), var(--shadow-card);
}
.qh-steps > .card:hover,
.qh-steps > .card:focus-within {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), var(--shadow-card-hover);
}
.qh-steps > .card:hover::before,
.qh-steps > .card:focus-within::before {
  background:
    linear-gradient(var(--accent-line), var(--accent-line)) 100% 100% / 12px 1px,
    linear-gradient(var(--accent-line), var(--accent-line)) 100% 100% / 1px 12px;
  background-repeat: no-repeat;
}

/* Reduced-motion: corchete y hairline nacen ya en su estado visible. */
@media (prefers-reduced-motion: reduce) {
  .qh-steps > .card .card__num::after { transform: scaleX(1); transition: none; }
  .qh-steps > .card::before { transition: none; }
}

/* ===========================================================================
   INTRO DE CARGA (solo home, 1 vez por sesión): la "D" de Drive Forge en
   fibra de carbono girando 2 vueltas en 3D y fundiendo a la web. Objeto SÓLIDO
   (a 180° se ve el reverso espejado). Nunca bloquea: la propia animación CSS lo
   oculta al terminar (opacity/visibility/pointer-events), aunque falle el JS.
   Se salta si ya se vio (df-intro-off) o con prefers-reduced-motion.
   =========================================================================== */
html.df-intro-lock { overflow: hidden; }
html.df-intro-off .df-intro { display: none; }
.df-intro {
  position: fixed; inset: 0; z-index: 9999;
  background: radial-gradient(60% 60% at 50% 42%, #191919, #0d0d0d 72%);
  display: grid; place-items: center;
  animation: dfIntroOut 0.6s var(--ease) 3.2s forwards;
}
@keyframes dfIntroOut { to { opacity: 0; visibility: hidden; pointer-events: none; } }
.df-intro__d {
  position: relative; width: min(64vw, 420px); aspect-ratio: 1;
  transform-style: preserve-3d;
  animation: dfIntroSpin 3.2s cubic-bezier(0.2, 0.9, 0.25, 1) forwards;
}
@keyframes dfIntroSpin { from { transform: rotateY(-28deg); } to { transform: rotateY(500deg); } }
/* Capa WebGL: el STL 3D real (js/intro3d.js). Si consigue renderizar a tiempo,
   se muestra por encima de la D CSS (que queda de placeholder + fallback si no
   hay WebGL, tarda demasiado o falla la carga de Three.js). */
.df-intro__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; opacity: 0; transition: opacity 0.35s ease; pointer-events: none; }
.df-intro.is-webgl .df-intro__canvas { opacity: 1; }
.df-intro.is-webgl .df-intro__d { opacity: 0; transition: opacity 0.35s ease; }
/* Objeto sólido: todas las capas comparten el recorte de la D, doble cara. */
.df-intro .layer {
  position: absolute; inset: 0; backface-visibility: visible;
  -webkit-mask: url(/img/df-d-mask.png) center/contain no-repeat;
          mask: url(/img/df-d-mask.png) center/contain no-repeat;
}
.df-intro .edge { background: linear-gradient(180deg, #2c2f34, #0a0b0c); }
.df-intro .face {
  background-color: #14161a;
  background-image:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.09) 0 1.5px, transparent 1.5px 4px),
    repeating-linear-gradient(-45deg, rgba(0,0,0,0.5) 0 1.5px, transparent 1.5px 4px),
    repeating-linear-gradient(45deg, #2a2e34 0 4px, #14161a 4px 8px),
    repeating-linear-gradient(-45deg, #1f232a 0 4px, #0f1114 4px 8px);
  background-size: 8px 8px;
  box-shadow: inset 0 0 26px rgba(0,0,0,0.55);
}
.df-intro .rim::after {
  content: ""; position: absolute; inset: 0; mix-blend-mode: screen;
  -webkit-mask: url(/img/df-d-mask.png) center/contain no-repeat;
          mask: url(/img/df-d-mask.png) center/contain no-repeat;
  background: linear-gradient(115deg, transparent 44%, rgba(255,229,0,0.55) 50%, transparent 56%);
}
@media (prefers-reduced-motion: reduce) { .df-intro { display: none; } }

/* ===========================================================================
   Forge Journey — recorrido pieza física → CAD (concepto central inmersivo)
   Nativo: CSS + SVG, sin JS nuevo. El barrido y el encendido de nodos se
   disparan con la clase .is-in que ya añade el observer de reveal (js/main.js).
   =========================================================================== */
.forge-journey { position: relative; }
.forge-journey::before {                 /* rejilla técnica muy sutil ("laboratorio") */
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(120% 88% at 50% 0%, #000 52%, transparent 100%);
          mask-image: radial-gradient(120% 88% at 50% 0%, #000 52%, transparent 100%);
}
.forge-journey > .container { position: relative; z-index: 1; }

.fj { margin-top: clamp(1.6rem, 1rem + 2vw, 2.6rem); }
.fj__grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: clamp(0.7rem, 0.4rem + 1vw, 1.1rem);
  grid-template-columns: repeat(5, 1fr);
}
@media (max-width: 1080px) { .fj__grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 680px)  { .fj__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px)  { .fj__grid { grid-template-columns: 1fr; } }

.fj__cell {
  position: relative; isolation: isolate;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 0.9rem 0.9rem 1rem;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.fj__cell::before {                      /* luz cenital de material */
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background: var(--surface-hi);
}
.fj__cell::after {                       /* corchetes de cota (brazo 9px canon) */
  content: ""; position: absolute; inset: 8px; pointer-events: none; z-index: 3; border-radius: 2px;
  background:
    linear-gradient(var(--accent-line), var(--accent-line)) left top / 1px 9px no-repeat,
    linear-gradient(var(--accent-line), var(--accent-line)) left top / 9px 1px no-repeat,
    linear-gradient(var(--accent-line), var(--accent-line)) right top / 1px 9px no-repeat,
    linear-gradient(var(--accent-line), var(--accent-line)) right top / 9px 1px no-repeat,
    linear-gradient(var(--accent-line), var(--accent-line)) left bottom / 1px 9px no-repeat,
    linear-gradient(var(--accent-line), var(--accent-line)) left bottom / 9px 1px no-repeat,
    linear-gradient(var(--accent-line), var(--accent-line)) right bottom / 1px 9px no-repeat,
    linear-gradient(var(--accent-line), var(--accent-line)) right bottom / 9px 1px no-repeat;
}

.fj__head { position: relative; z-index: 1; display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.55rem; }
.fj__node {
  width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong);
  box-shadow: 0 0 0 3px rgba(255, 229, 0, 0);
  transition: background var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.fj.is-in .fj__node { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
/* encendido secuencial de los nodos: sensación de "recorrido" */
.fj.is-in .fj__cell:nth-child(1) .fj__node { transition-delay: 0s; }
.fj.is-in .fj__cell:nth-child(2) .fj__node { transition-delay: 0.12s; }
.fj.is-in .fj__cell:nth-child(3) .fj__node { transition-delay: 0.24s; }
.fj.is-in .fj__cell:nth-child(4) .fj__node { transition-delay: 0.36s; }
.fj.is-in .fj__cell:nth-child(5) .fj__node { transition-delay: 0.48s; }
.fj__k { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.14em; color: var(--ink-3); }

.fj__view {
  position: relative; z-index: 1; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  aspect-ratio: 200 / 176;
  background: radial-gradient(130% 130% at 50% -10%, #191a1c, #0f1012);
  /* contenedor de tamaño: el barrido usa cqh (1% de ESTA altura) para no salirse */
  container-type: size;
}
.fj__view svg { display: block; width: 100%; height: 100%; }
.fj__cv { display: block; position: absolute; inset: 0; width: 100%; height: 100%; }

.fj__scan {                              /* barra de escaneo (solo transform/opacity) */
  position: absolute; left: 0; right: 0; top: 0; height: 38px; z-index: 2;
  pointer-events: none; opacity: 0; transform: translateY(-38px);
  background: linear-gradient(180deg, rgba(255, 229, 0, 0.16), rgba(255, 229, 0, 0));
  border-bottom: 1px solid var(--accent-line);
}
.fj.is-in .fj__cell:nth-child(1) .fj__scan { animation: fjScan 2.2s var(--ease-scan) 0s forwards; }
.fj.is-in .fj__cell:nth-child(2) .fj__scan { animation: fjScan 2.2s var(--ease-scan) 0.12s forwards; }
.fj.is-in .fj__cell:nth-child(3) .fj__scan { animation: fjScan 2.2s var(--ease-scan) 0.24s forwards; }
.fj.is-in .fj__cell:nth-child(4) .fj__scan { animation: fjScan 2.2s var(--ease-scan) 0.36s forwards; }
.fj.is-in .fj__cell:nth-child(5) .fj__scan { animation: fjScan 2.2s var(--ease-scan) 0.48s forwards; }
@keyframes fjScan {
  0%   { opacity: 0; transform: translateY(-38px); }
  10%  { opacity: 0.9; }
  88%  { opacity: 0.9; }
  /* 100cqh = alto real del .fj__view: el barrido termina justo al salir por abajo,
     sin recorrido muerto fuera del overflow (antes viajaba a 380px fijos). */
  100% { opacity: 0; transform: translateY(100cqh); }
}

.fj__t { position: relative; z-index: 1; font-family: var(--font-display); font-size: 1rem; margin: 0.75rem 0 0.25rem; }
.fj__d { position: relative; z-index: 1; color: var(--ink-2); font-size: 0.9rem; line-height: 1.5; margin: 0; }

.fj__cta { margin-top: clamp(1.4rem, 1rem + 1.5vw, 2.2rem); display: flex; justify-content: center; }

@media (prefers-reduced-motion: reduce) {
  .fj__scan { display: none; }
  .fj.is-in .fj__node { transition-delay: 0s; }
}

/* ===========================================================================
   HOME · 1C — Marquee de sectores (banda de scroll infinito)
   Técnica canónica: UN contenedor animado (.marquee__inner) envuelve TRES copias
   estáticas (.marquee__track) y se desplaza -33.333% (1/3) de su ancho total.
   Cada track lleva padding-right IGUAL a su gap interno, de modo que el ancho
   de una copia incluye el hueco que la separa de la siguiente → el bucle es
   continuo, sin salto al reiniciar. Se usan 3 copias (no 2) porque cada copia
   individual (~1145px con los 6 sectores) es más corta que los viewports
   anchos (hasta ~1920px): con solo 2 copias quedaba un hueco visible detrás de
   "Industria" antes de que la copia 1 volviera a entrar. Con 3 copias, el
   colchón de contenido repetido (~3435px) cubre de sobra cualquier viewport
   ancho en todo el ciclo. Las copias 2 y 3 van aria-hidden + inert y con
   <span> (nada interactivo; solo la copia 1 es navegable). Pausa al hover; al
   tabular dentro (focus-within) la animación se ANULA (la banda vuelve a x=0)
   para que el enlace enfocado sea visible.
   Bajo reduced-motion: estática, sin copias duplicadas visibles y sin scroll.
   =========================================================================== */
.marquee-sectors {
  position: relative;
  border-block: 1px solid var(--line);
  background: var(--surface);
  overflow: hidden;
}
.marquee {
  /* degradado lateral para que entren/salgan sin corte duro */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__inner {
  display: flex; width: max-content;
  animation: marquee-scroll 34s linear infinite;
}
.marquee__track {
  display: flex; align-items: center; flex: none;
  /* padding-right = gap → el hueco entre copias es idéntico al hueco entre items */
  gap: clamp(1.4rem, 1rem + 1.6vw, 2.6rem);
  margin: 0; padding: 0.95rem clamp(1.4rem, 1rem + 1.6vw, 2.6rem) 0.95rem 0;
  list-style: none;
}
.marquee:hover .marquee__inner { animation-play-state: paused; }
/* Teclado: al entrar foco, banda a reposo (x=0) y sin máscara → foco siempre visible */
.marquee:focus-within .marquee__inner { animation: none; }
.marquee:focus-within { -webkit-mask-image: none; mask-image: none; }
.marquee__track > li { flex: none; }
.marquee__track a,
.marquee__track span {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1rem, 0.85rem + 0.7vw, 1.35rem);
  letter-spacing: 0.01em; text-transform: uppercase;
  color: var(--ink-2); text-decoration: none; white-space: nowrap;
  transition: color var(--t-fast) var(--ease);
}
.marquee__track a:hover,
.marquee__track a:focus-visible { color: var(--accent); }
.marquee__sep {
  color: var(--accent); font-size: 0.7em; line-height: 1;
  opacity: 0.7; user-select: none;
}
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-33.3333%); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee__inner { animation: none; width: 100%; justify-content: center; }
  .marquee { -webkit-mask-image: none; mask-image: none; }
  /* estática y sin duplicados visibles: se oculta la copia aria-hidden */
  .marquee__track[aria-hidden="true"] { display: none; }
  .marquee__track { flex-wrap: wrap; justify-content: center; padding-right: 0; }
}

/* ===========================================================================
   HOME · 10 — Bento "Por qué" (2 destacadas grandes + resto pequeñas)
   Sobre .why-grid: reasignamos el grid a bento en desktop. Las dos .why--feat
   ocupan 2 columnas cada una (fila superior). El hover/borde/icono ya viven en
   .why (main.css); aquí solo añadimos el desplazamiento del icono al activar.
   En ≤640px colapsa a 1 columna y las destacadas no se distinguen en tamaño.
   =========================================================================== */
.why-grid--bento {
  grid-template-columns: repeat(6, 1fr);
  align-items: stretch;
}
.why-grid--bento .why { grid-column: span 2; }
.why-grid--bento .why--feat { grid-column: span 3; }
/* las dos destacadas ganan aire interior y jerarquía tipográfica */
.why-grid--bento .why--feat {
  padding: clamp(1.6rem, 1.2rem + 1.2vw, 2.2rem);
}
.why-grid--bento .why--feat h3 { font-size: 1.32rem; }
.why-grid--bento .why--feat p { font-size: 1.02rem; }
.why-grid--bento .why--feat .why__ico { width: 52px; height: 52px; }
.why-grid--bento .why--feat .why__ico svg { width: 25px; height: 25px; }
/* micro-interacción extra: el icono se desplaza 3px al activar (además del
   scale + halo que ya aporta .why en main.css). Anulado en reduced-motion. */
.why-grid--bento .why__ico {
  transition: transform var(--t-press) var(--ease-press),
              border-color var(--t-machine) var(--ease-machine),
              box-shadow var(--t-machine) var(--ease-machine);
}
@media (hover: hover) and (pointer: fine) {
  .why-grid--bento .why:hover .why__ico { transform: translateY(-3px) scale(1.04); }
}
@media (max-width: 900px) {
  .why-grid--bento { grid-template-columns: repeat(4, 1fr); }
  .why-grid--bento .why { grid-column: span 2; }
  .why-grid--bento .why--feat { grid-column: span 2; }
}
@media (max-width: 640px) {
  .why-grid--bento { grid-template-columns: 1fr; }
  .why-grid--bento .why,
  .why-grid--bento .why--feat { grid-column: 1 / -1; }
  /* en móvil las destacadas no se distinguen en tamaño */
  .why-grid--bento .why--feat h3 { font-size: 1.14rem; }
  .why-grid--bento .why--feat p { font-size: 0.96rem; }
  .why-grid--bento .why--feat .why__ico { width: 46px; height: 46px; }
  .why-grid--bento .why--feat .why__ico svg { width: 22px; height: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .why-grid--bento .why__ico { transition: none; }
}

/* ===========================================================================
   HOME · 12 — CTA banner de cierre (banda amarilla full-bleed, texto #111)
   Contraste fuerte contra el cierre oscuro de la página. Reutiliza .btn con
   dos variantes locales (--dark / --outline-dark) para legibilidad sobre amarillo.
   =========================================================================== */
.cta-banner {
  padding-block: clamp(2.6rem, 1.8rem + 3vw, 4.4rem);
  background: var(--accent);
  color: var(--on-accent);
}
.cta-banner__inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: clamp(1.4rem, 1rem + 2vw, 3rem);
}
.cta-banner__copy { flex: 1 1 22rem; }
.cta-banner__copy h2 {
  color: var(--on-accent);
  font-size: clamp(1.6rem, 1.2rem + 1.8vw, 2.5rem);
  line-height: 1.1; letter-spacing: -0.02em; max-width: 20ch; margin: 0;
}
.cta-banner__copy p {
  color: rgba(17, 17, 17, 0.82);
  font-size: var(--fs-lead); margin: 0.8rem 0 0; max-width: 46ch;
}
.cta-banner__btns { display: flex; flex-wrap: wrap; gap: 0.8rem; flex: none; }
/* Botón sólido oscuro sobre el amarillo */
.btn--dark { --_bg: #111111; --_fg: #FFFFFF; --_bd: #111111; box-shadow: none; }
.btn--dark:hover { --_bg: #000000; --_bd: #000000; }
.btn--dark:focus-visible { box-shadow: 0 0 0 2px var(--accent), 0 0 0 5px #111111; }
/* Botón contorno oscuro sobre el amarillo */
.btn--outline-dark { --_bg: transparent; --_fg: #111111; --_bd: rgba(17,17,17,0.55); box-shadow: none; }
.btn--outline-dark:hover { --_bd: #111111; background: rgba(17,17,17,0.06); }
.btn--outline-dark:focus-visible { box-shadow: 0 0 0 2px var(--accent), 0 0 0 5px #111111; }
@media (max-width: 640px) {
  .cta-banner__btns { width: 100%; }
  .cta-banner__btns .btn { flex: 1 1 auto; }
}
