/* FABRIMTEX V05 · Capa visual aditiva. Sin fuentes, fotografías ni modelos nuevos.
   Movimiento: solo transform/opacity. El contenido existe sin JavaScript.
   Identidad, variables tipográficas y rutas proceden íntegramente de V04. */
:root { --ft-ease: cubic-bezier(.18,.72,.16,1); --ft-duration: 640ms; }
body[data-page="home"] .home-hero { isolation: isolate; }
body[data-page="home"] .home-hero::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: linear-gradient(90deg,var(--orange),#F26D1140 40%,transparent 80%);
  pointer-events: none;
}
body[data-page="home"] .hero-copy { position: relative; z-index: 2; }
body[data-page="home"] .hero-visual img { animation: ft-image-settle .95s var(--ft-ease) both; }
body[data-page="home"] .hero-title-line { animation: ft-title-enter .65s var(--ft-ease) both; }
body[data-page="home"] .hero-title-line:nth-child(1) { animation-delay: 0ms; }
body[data-page="home"] .hero-title-line:nth-child(2) { animation-delay: 65ms; }
body[data-page="home"] .hero-title-line:nth-child(3) { animation-delay: 130ms; }
body[data-page="home"] .hero-buttons { animation-duration: .5s; animation-delay: .2s; }
.ft-hero-process-link {
  position: absolute; right: max(var(--gutter),calc((100vw - var(--container))/2)); bottom: 32px;
  z-index: 3; display: inline-flex; align-items: center; gap: 14px; padding: 12px 16px;
  color: white; background: #0C1C2CE8; border: 1px solid #FFFFFF38;
  font-size: 10px; font-weight: 600; min-height: 44px; letter-spacing: .03em;
}
.ft-hero-process-link .icon { width: 16px; height: 16px; transition: transform .3s var(--ft-ease); }
.ft-hero-process-link:hover .icon { transform: translate(2px,-2px); }
.ft-hero-process-link:focus-visible { outline-offset: 4px; }
body[data-page="home"] .hero-caption { right: max(var(--gutter),calc((100vw - var(--container))/2)); bottom: 10px; }
body[data-page="home"] .clients-band { border-bottom: 1px solid var(--line); }
body[data-page="home"] .industry-section { background: linear-gradient(180deg,var(--paper),#EFEEE950); }
body[data-page="home"] .industry-grid { perspective: 1200px; }
body[data-page="home"] .industry-card { border-radius: 7px; }
body[data-page="home"] .industry-card:not(.industry-general) { background: var(--white); }
body[data-page="home"] .industry-top { border-bottom: 1px solid var(--line); padding-bottom: 17px; }
body[data-page="home"] .industry-general .industry-top { border: 0; padding: 0; }
/* La sombra es fija. Solo se anima su opacidad, no su desenfoque. */
.ft-tilt-card { position: relative; --ft-rx: 0deg; --ft-ry: 0deg; --ft-rise: 0px; --ft-reveal: 0px; }
.ft-tilt-card::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: 0 18px 34px -18px #10243836; opacity: 0;
  transition: opacity 260ms var(--ft-ease); pointer-events: none;
}
html.ft-motion-on .ft-tilt-card {
  transform: perspective(1100px) translateY(calc(var(--ft-reveal) + var(--ft-rise))) rotateX(var(--ft-rx)) rotateY(var(--ft-ry));
  transform-origin: 50% 50%;
  transition: opacity var(--ft-duration) var(--ft-ease),transform 480ms var(--ft-ease),border-color 220ms ease;
  transition-delay: 0ms;
}
html.ft-motion-on .ft-tilt-card.reveal-ready:not(.is-visible) { --ft-reveal: 18px; }
html.ft-motion-on .ft-tilt-card.ft-pointer-active { --ft-rise: -3px; transition-duration: 200ms,160ms,220ms; will-change: transform; }
html.ft-motion-on .ft-tilt-card.ft-pointer-active::after, .ft-tilt-card:focus-within::after { opacity: 1; }
.ft-tilt-card:focus-visible, .ft-tilt-card:focus-within { outline-offset: 5px; }
html.ft-motion-on .reveal-ready { transition-timing-function: var(--ft-ease); transition-duration: .65s; }
body[data-page="home"] .pillar-card, body[data-page="about"] .pillar-card-long { border-radius: 7px; }
body[data-page="home"] .pillar-top .icon, body[data-page="about"] .pillar-top .icon { transition: transform .35s var(--ft-ease); }
@media (hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference) {
  html.ft-motion-on .pillar-card:hover .pillar-top .icon { transform: translateY(-3px); }
}
body[data-page="about"] .inner-hero { position: relative; overflow: clip; }
body[data-page="about"] .inner-hero-grid { position: relative; z-index: 1; }
body[data-page="about"] .inner-hero .hero-title-line,
body[data-page="capabilities"] .inner-hero .hero-title-line { animation: ft-title-enter .6s var(--ft-ease) both; }
body[data-page="about"] .inner-hero .hero-title-line:nth-child(2),
body[data-page="capabilities"] .inner-hero .hero-title-line:nth-child(2) { animation-delay: 75ms; }
body[data-page="about"] .inner-hero .hero-title-line:nth-child(3) { animation-delay: 150ms; }
body[data-page="about"] .about-image-wrap { position: relative; }
body[data-page="about"] .about-image-wrap blockquote { border-top: 2px solid var(--orange); }
body[data-page="about"] .about-image-wrap :is(.media-slot,.editorial-panel) { border-radius: 6px; }
body[data-page="about"] .process-list { gap: 0; }
body[data-page="about"] .process-list > li { padding: 26px 24px 20px 0; position: relative; }
body[data-page="about"] .process-list > li::after {
  content: ''; position: absolute; left: 0; top: 0; width: calc(100% - 16px); height: 2px;
  background: var(--orange); transform-origin: left; transform: scaleX(1); transition: transform .75s var(--ft-ease);
}
html.ft-motion-on body[data-page="about"] .process-list > li.reveal-ready:not(.is-visible)::after { transform: scaleX(0); }
.ft-process-detail-link { margin-top: 30px; }
/* Encabezados editoriales: línea y espacio, no una segunda identidad gráfica. */
body[data-page="capabilities"] .capability-block { position: relative; }
body[data-page="capabilities"] .capability-copy > .eyebrow { letter-spacing: .14em; }
body[data-page="capabilities"] .capability-block .media-slot { overflow: hidden; border-radius: 6px; }
body[data-page="capabilities"] .capability-block .slot-image { transition: transform .6s var(--ft-ease); }
.capabilities-menu .ft-process-nav-link { color: var(--orange-text); font-weight: 800; }
/* FLUJO · scroll nativo, sin secuestrar la rueda ni fijar pantallas vacías. */
.ft-flow { position: relative; background: var(--night); color: var(--white); padding: 88px 0 62px; overflow: clip; }
.ft-flow::before { content:''; position:absolute; inset:0 auto 0 0; width:3px; background:var(--orange); }
.ft-flow .eyebrow { color: var(--orange-light); }
.ft-flow-heading { display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: 70px; padding-bottom: 45px; border-bottom: 1px solid #FFFFFF25; }
.ft-flow-heading h2 { font-size: clamp(46px,5.5vw,78px); line-height: 1; margin-top: 16px; }
.ft-flow-heading > p { font-size: 14px; line-height: 1.9; color: #C5D0D8; max-width: 490px; padding-bottom: 5px; }
.ft-flow-layout { display: grid; grid-template-columns: minmax(0,.92fr) minmax(0,1.08fr); gap: 74px; align-items: start; margin-top: 54px; }
.ft-flow-aside { min-width: 0; position: sticky; top: calc(var(--header-height) + 24px); }
.ft-stage-display { position: relative; isolation: isolate; padding: 25px 28px 24px; border: 1px solid #FFFFFF22; border-radius: 8px; background: linear-gradient(145deg,#1C3549,#102438); overflow: hidden; }
.ft-stage-meta { display:flex; gap:20px; justify-content:space-between; color: #C4D2DB; font: 9px/1.5 var(--font-mono); letter-spacing:.05em; }
.ft-stage-art { position:relative; height:182px; margin:10px 0 0; }
.ft-stage-plane { position:absolute; width:146px; height:106px; left:20px; top:46px; border:1px solid #DAE4EB38; border-radius:3px; transform:rotate(-19deg) skew(12deg,4deg); }
.ft-plane-back { transform:translate(14px,-13px) rotate(-19deg) skew(12deg,4deg); background:#DBE5EB06; }
.ft-plane-front { background:linear-gradient(130deg,#8BA0AE28,#FFFFFF05); }
.ft-stage-icon { position:absolute; top:74px; left:77px; color:#D4E0E9; }
.ft-stage-icon .icon { width:42px; height:42px; stroke-width:1; }
.ft-stage-counter { position:absolute; right:-6px; top:0; color:var(--orange); font:500 155px/.98 var(--font-display); letter-spacing:-.07em; }
.ft-stage-caption { min-height:122px; }
.ft-stage-caption > span { font:9px/1.5 var(--font-mono); letter-spacing:.08em; color:#BDCCD7; }
.ft-stage-caption h3 { font:500 clamp(28px,2.8vw,42px)/1.06 var(--font-display); text-transform:uppercase; margin:10px 0 9px; }
.ft-stage-caption p { font-size:12px; line-height:1.65; color:#CDDAE3; }
.ft-stage-progress { height:2px; background:#FFFFFF20; margin-top:20px; }
.ft-stage-progress > span { display:block; height:100%; background:var(--orange); transform:scaleX(.16667); transform-origin:left; transition:transform .4s var(--ft-ease); }
.ft-flow-nav { margin-top:20px; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:5px 20px; }
.ft-flow-nav a { min-height:42px; padding:8px 0; border-bottom:1px solid #FFFFFF22; display:flex; gap:12px; align-items:center; color:#C4D1DB; font-size:11px; }
.ft-flow-nav a > span { font:10px var(--font-mono); color:#ADBDC8; }
.ft-flow-nav a[aria-current="step"] { color:var(--orange-light); border-bottom-color:var(--orange); }
.ft-flow-nav a[aria-current="step"] > span { color:var(--orange-light); }
.ft-flow-nav a:hover { color:white; }
.ft-flow-hint { font-size:10px; color:#B9C9D4; margin-top:16px; }
.ft-flow-steps { list-style:none; position:relative; }
.ft-flow-step { position:relative; display:grid; grid-template-columns:46px minmax(0,1fr); gap:20px; padding:0 0 30px; scroll-margin-top:calc(var(--header-height) + 94px); }
.ft-flow-step::before { content:''; position:absolute; left:21px; top:40px; bottom:0; width:1px; background:#FFFFFF28; }
.ft-flow-step:last-child::before { display:none; }
.ft-step-marker { position:relative; display:flex; align-items:center; justify-content:center; width:42px; height:42px; background:var(--night); border:1px solid #73899A80; border-radius:50%; color:#B8C9D4; font:11px var(--font-mono); z-index:1; }
.ft-flow-step.is-current .ft-step-marker { background:var(--orange); border-color:var(--orange); color:var(--night); }
.ft-flow-step.is-complete .ft-step-marker { border-color:var(--orange); color:var(--orange-light); }
.ft-step-content { position:relative; padding:23px 25px 22px; min-height:208px; border:1px solid #FFFFFF20; border-radius:5px; background:#FFFFFF03; }
.ft-step-content::before { content:''; position:absolute; top:0; bottom:0; left:-1px; width:2px; background:var(--orange); opacity:0; transition:opacity .3s var(--ft-ease); }
.ft-flow-step.is-current .ft-step-content { background:#FFFFFF07; }
.ft-flow-step.is-current .ft-step-content::before { opacity:1; }
.ft-step-label { display:flex; align-items:center; justify-content:space-between; color:#BFCBD3; font:9px var(--font-mono); letter-spacing:.09em; }
.ft-step-label .icon { color:var(--orange-light); width:22px; height:22px; stroke-width:1.3; }
.ft-step-content h3 { font:500 30px/1.1 var(--font-display); text-transform:uppercase; margin:12px 0; }
.ft-step-description { color:#D6DFE6; font-size:12px; line-height:1.9; }
.ft-step-detail { border-top:1px solid #FFFFFF17; padding-top:13px; margin-top:16px; color:#B8C9D4; font-size:10px; }
.ft-flow-ending { display:flex; align-items:center; justify-content:space-between; gap:40px; border-top:1px solid #FFFFFF25; padding-top:28px; margin-top:15px; }
.ft-flow-ending > p { color:#B9C9D4; font-size:11px; max-width:640px; line-height:1.8; }
.ft-flow-ending .button { flex-shrink:0; }
html.ft-motion-on .ft-stage-caption.is-changing { animation:ft-stage-in .24s var(--ft-ease); }
html.ft-motion-on .ft-stage-art.is-changing .ft-plane-front { animation:ft-plane-settle .55s var(--ft-ease); }
.ft-motion-control { display:flex; justify-content:flex-end; padding-block:0 15px; }
.ft-motion-control button { border:1px solid #FFFFFF35; color:#CFDDE5; background:transparent; padding:10px 14px; font-size:10px; min-height:40px; border-radius:3px; }
.ft-motion-control button:disabled { color:#ADC0CD; border-color:#FFFFFF20; cursor:default; }
.ft-motion-control button:not(:disabled):hover { background:#FFFFFF0A; }
@keyframes ft-title-enter { from { opacity:.12; transform:translateY(14px); } to { opacity:1; transform:none; } }
@keyframes ft-image-settle { from { transform:scale(1.018); } to { transform:scale(1); } }
@keyframes ft-stage-in { from { opacity:.55; transform:translateY(6px); } to { opacity:1; transform:none; } }
@keyframes ft-plane-settle { from { transform:translate(-5px,4px) rotate(-22deg) skew(12deg,4deg); } to { transform:rotate(-19deg) skew(12deg,4deg); } }
/* Capa de profundidad solo en equipos con ratón y espacio suficiente. */
@media (min-width:941px) and (hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference) {
  html.ft-motion-on body[data-page="home"] .hero-visual { transform:translateY(var(--ft-hero-depth,0px)) scale(1.065); }
  html.ft-motion-on .ft-depth-active { will-change:transform; }
}
@media (max-width:1100px) {
  .ft-flow-layout { gap:38px; grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr); }
  .ft-stage-counter { font-size:125px; top:16px; }
  .ft-stage-plane { width:115px; height:84px; left:0; }
  .ft-stage-icon { left:30px; }
  .ft-stage-display { padding:23px; }
  .ft-stage-art { height:163px; }
}
@media (max-width:940px) {
  .ft-flow { padding:65px 0 48px; }
  .ft-flow-heading { gap:30px; }
  .ft-flow-layout { grid-template-columns:1fr; gap:32px; margin-top:32px; }
  .ft-flow-aside { position:static; }
  .ft-stage-display { display:none; }
  .ft-flow-nav { grid-template-columns:repeat(3,minmax(0,1fr)); margin-top:0; gap:8px 22px; }
  .ft-flow-hint { display:none; }
  .ft-flow-step { scroll-margin-top:calc(var(--header-height) + 24px); }
  .ft-step-content { min-height:0; padding:24px; }
  .ft-flow-ending { flex-wrap:wrap; gap:22px; }
  .ft-hero-process-link { font-size:9px; }
  /* Leve realce táctil sin inclinación/parallax, no depende de hover. */
  html.ft-motion-on .ft-tilt-card { --ft-rx:0deg!important; --ft-ry:0deg!important; --ft-rise:0px!important; }
}
@media (max-width:760px) {
  .ft-hero-process-link { position:relative; right:auto; bottom:auto; margin:0 var(--gutter) 24px; background:transparent; font-size:10px; }
  body[data-page="home"] .hero-caption { display:none; }
  .ft-flow-heading { grid-template-columns:1fr; gap:24px; padding-bottom:28px; }
  .ft-flow-heading h2 { font-size:48px; }
  .ft-flow-heading > p { font-size:13px; }
  .ft-flow-step { gap:13px; grid-template-columns:34px minmax(0,1fr); padding-bottom:22px; }
  .ft-step-marker { width:32px; height:32px; font-size:10px; }
  .ft-flow-step::before { left:15px; top:30px; }
  .ft-step-content { padding:19px 19px 20px; }
  .ft-step-content h3 { font-size:29px; }
  body[data-page="about"] .process-list > li { padding:23px 20px 24px 0; }
}
@media (max-width:480px) {
  .ft-flow-nav { grid-template-columns:repeat(2,minmax(0,1fr)); gap:4px 15px; }
  .ft-flow-nav a { font-size:11px; min-height:44px; }
  .ft-step-content h3 { font-size:27px; }
  .ft-step-description { font-size:12px; }
  .ft-step-content { padding:17px 16px 18px; }
  .ft-stage-meta { font-size:8px; }
}
/* Mismo estado estático tanto por preferencia del SO como por el control del sitio. */
html.ft-motion-off { scroll-behavior:auto!important; }
html.ft-motion-off *, html.ft-motion-off *::before, html.ft-motion-off *::after { animation:none!important; transition:none!important; scroll-behavior:auto!important; }
html.ft-motion-off :is(.reveal-ready,.hero-visual,.hero-visual img,.hero-title-line,.ft-tilt-card) { opacity:1!important; transform:none!important; will-change:auto!important; }
@media (prefers-reduced-motion:reduce) {
  html { scroll-behavior:auto!important; }
  *,*::before,*::after { animation:none!important; transition:none!important; scroll-behavior:auto!important; }
  :is(.reveal-ready,.hero-visual,.hero-visual img,.hero-title-line,.ft-tilt-card) { opacity:1!important; transform:none!important; will-change:auto!important; }
}
@media print {
  .ft-flow { background:white!important; color:var(--ink); padding:20px 0; }
  .ft-flow-aside,.ft-hero-process-link,.ft-motion-control { display:none; }
  .ft-flow-layout { display:block; }
  .ft-flow-step { break-inside:avoid; }
  .ft-step-content, .ft-step-marker { background:white!important; border-color:#B5BDC5; }
  .ft-flow :is(p,h2,h3,span) { color:var(--ink)!important; }
  .reveal-ready { opacity:1!important; transform:none!important; }
}
/* Espacio para cabecera + submenú de capacidades; evita solapamiento al fijarse. */
@media (min-width:941px) {
  .ft-flow-aside { top:calc(var(--header-height) + 78px); }
}
@media (min-width:941px) and (max-height:820px) {
  .ft-stage-art { height:108px; margin-top:8px; }
  .ft-stage-counter { font-size:94px; top:0; }
  .ft-stage-plane { width:99px; height:60px; top:25px; left:14px; }
  .ft-stage-icon { top:40px; left:51px; }
  .ft-stage-icon .icon { width:30px; height:30px; }
  .ft-stage-display { padding:18px 22px; }
  .ft-stage-caption { min-height:96px; }
  .ft-stage-caption h3 { font-size:30px; }
  .ft-stage-caption p { font-size:11px; }
  .ft-flow-nav { margin-top:13px; gap:2px 18px; }
  .ft-flow-nav a { min-height:39px; }
  .ft-flow-hint { display:none; }
}
/* Pantallas muy bajas: no fijar una caja que no cabe dentro del viewport. */
@media (max-height:620px) { .ft-flow-aside { position:static; } }
/* Títulos largos (p. ej. Infraestructura) siguen dentro de su tarjeta a 320 px. */
body[data-page="home"] .industry-card h3, .ft-flow h3 { overflow-wrap:break-word; }
@media(max-width:380px) { body[data-page="home"] .industry-card h3 {font-size:27px;} }
@media (min-width:761px) and (max-width:1024px) {
  body[data-page="about"] .process-list {grid-template-columns:repeat(2,minmax(0,1fr));}
  body[data-page="about"] .process-list::before {display:none;}
}
