/* ==========================================================================
   UNYX — sections.css · V10 «EL PLANO TÉCNICO»
   ========================================================================== */

.section {
  position: relative; z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(90px, 13vh, 160px) clamp(22px, 4vw, 58px);
}

/* cruceta de registro en cada sección */
.section::after {
  content: "+";
  position: absolute;
  top: clamp(44px, 6vh, 72px);
  right: clamp(22px, 4vw, 58px);
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--ink-3);
  pointer-events: none;
}

.sec-head { max-width: 800px; margin-bottom: clamp(40px, 6vh, 64px); position: relative; }

/* cota bajo cada cabecera: extremos + línea central */
.sec-head::after {
  content: "";
  display: block;
  margin-top: 22px;
  height: 9px;
  max-width: 380px;
  border-left: 1px solid var(--line-2);
  border-right: 1px solid var(--line-2);
  background: linear-gradient(var(--line-2), var(--line-2)) center / 100% 1px no-repeat;
}

.sec-eyebrow {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cobalt);
  margin: 0 0 16px;
}

.sec-eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--cobalt); }

.sec-title {
  margin: 0;
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 800;
  font-size: clamp(30px, 4.2vw, 58px);
  line-height: 1.02;
  letter-spacing: -0.022em;
  text-wrap: balance;
  text-transform: none;
  color: var(--ink);
}

.sec-title .serif {
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 500;
  color: var(--ink-3);
}

.sec-title .grad-text { color: var(--cobalt); }

.sec-sub {
  margin: 18px 0 0;
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--ink-2);
  max-width: 56ch;
  text-wrap: pretty;
}

/* ===================== la máquina · scrollytelling ===================== */

.machine { position: relative; height: 460vh; z-index: 2; }

.machine-sticky {
  position: sticky; top: 0;
  height: 100vh;
  overflow: hidden;
}

.machine-sticky { counter-reset: station; }

.station {
  position: absolute;
  left: clamp(22px, 6vw, 96px);
  top: 22vh;
  width: min(360px, 40vw);
  background: var(--sheet);
  border: 1px solid var(--ink);
  box-shadow: 6px 6px 0 var(--line);
  padding: 20px 22px;
  opacity: 0;
  transform: translateY(14px);
  will-change: opacity, transform;
  pointer-events: none;
  counter-increment: station;
  overflow: hidden;
}

/* cruceta de registro + numeral fantasma en cada ficha */
.station::before {
  content: "+";
  position: absolute;
  top: 8px; right: 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--cobalt);
}

.station::after {
  content: "0" counter(station);
  position: absolute;
  right: 10px; bottom: -14px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 76px;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.2px var(--line-2);
  pointer-events: none;
}

.station[data-station="1"] { top: 30vh; }
.station[data-station="2"] { top: 24vh; }
.station[data-station="3"] { top: 32vh; }

.s-eyebrow {
  margin: 0 0 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cobalt);
}

.station h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(19px, 2vw, 25px);
  letter-spacing: -0.015em;
  color: var(--ink);
}

.station p {
  margin: 0 0 14px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-2);
}

.station p strong { color: var(--cobalt); font-weight: 600; }

/* línea de cota viva: de la ficha al engranaje enfocado (trazo punteado de plano) */
.leader {
  position: absolute;
  height: 1px;
  background: repeating-linear-gradient(90deg, var(--ink) 0 5px, transparent 5px 9px);
  transform-origin: 0 50%;
  opacity: 0;
  pointer-events: none;
}

.leader::before {
  content: "";
  position: absolute;
  left: 0; top: -4px;
  width: 1px; height: 9px;
  background: var(--ink);
}

.leader i {
  position: absolute;
  right: -4px; top: -3.5px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--cobalt);
  border: 1px solid var(--ink);
}

/* panel estrecho, móvil o reduced-motion: estaciones en lista estática */
@media (max-width: 880px), (prefers-reduced-motion: reduce) {
  .machine { height: auto; }
  .machine-sticky {
    position: relative;
    height: auto;
    overflow: visible;
    display: grid;
    gap: 14px;
    padding: clamp(60px, 9vh, 100px) clamp(22px, 4vw, 58px);
  }
  .station {
    position: relative;
    left: auto; top: auto !important;
    width: 100%;
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
  .leader { display: none; }
}

/* ===================== por qué · comparativa ===================== */

.versus {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: stretch;
  position: relative;
}

.vs-col { padding: clamp(24px, 3vw, 38px); }

.vs-generic {
  position: relative;
  background: var(--sheet);
  border: 1px solid var(--line-2);
  overflow: hidden;
}

/* sello de inspección: el modelo genérico no pasa el control de calidad */
.vs-generic::after {
  content: "Modelo obsoleto";
  position: absolute;
  top: 30px; right: -34px;
  transform: rotate(18deg);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--signal);
  border: 1.5px solid var(--signal);
  padding: 5px 38px;
  opacity: 0.5;
  pointer-events: none;
}

/* la hoja UNYX es el cianotipo: cobalto pleno, tinta blanca */
.vs-unyx {
  background: var(--cobalt);
  border: 1px solid var(--cobalt-deep);
  box-shadow: 6px 6px 0 rgba(34, 64, 242, 0.18);
  animation: none;
}

.vs-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 8px;
}

.vs-unyx .vs-label { color: rgba(255, 255, 255, 0.88); } /* AA 5:1 sobre cobalto */

.vs-name {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(20px, 2vw, 27px);
  letter-spacing: -0.01em;
  text-transform: none;
}

.vs-generic .vs-name { color: var(--ink-2); }
.vs-unyx .vs-name { color: #fff; }

.vs-col ul { list-style: none; margin: 0; padding: 0; }

.vs-col li {
  display: flex; gap: 13px; align-items: baseline;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  font-size: 14.5px;
  line-height: 1.55;
  text-wrap: pretty;
}

.vs-unyx li { border-top-color: rgba(255, 255, 255, 0.22); }

.vs-generic li { color: var(--ink-2); }
.vs-unyx li { color: #fff; }

.vs-col li .mark {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 12px;
}

.vs-generic .mark { color: var(--signal); }
.vs-unyx .mark { color: #fff; background: rgba(255,255,255,0.16); width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; transform: translateY(2px); }

/* medallón vs: chincheta del plano */
@media (min-width: 881px) {
  .versus::after {
    content: "vs";
    position: absolute; left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    width: 52px; height: 52px;
    border-radius: 50%;
    display: grid; place-items: center;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--ink);
    background: var(--paper);
    border: 1px solid var(--ink);
    box-shadow: 3px 3px 0 var(--line);
    z-index: 2;
    pointer-events: none;
  }
}

/* ===================== cómo funciona ===================== */

/* línea de cota que se dibuja con el scroll */
.steps-track {
  position: relative;
  height: 9px;
  margin-bottom: clamp(28px, 4vh, 44px);
  border-left: 1px solid var(--line-2);
  border-right: 1px solid var(--line-2);
  background: linear-gradient(var(--line), var(--line)) center / 100% 1px no-repeat;
}

.steps-track i {
  position: absolute; left: 0; right: 0; top: 4px;
  height: 1px;
  display: block;
  background: var(--cobalt);
  transform-origin: left center;
  transform: scaleX(0);
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(18px, 2.4vw, 32px);
  perspective: 1500px;
  perspective-origin: 50% 0%;
}

.step {
  border-top: 1px solid var(--line-2);
  padding-top: 20px;
  transition: border-color 0.3s;
}

.step:hover { border-top-color: var(--cobalt); }

.step-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(40px, 4vw, 60px);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.3px var(--ink-2);
  transition: color 0.3s, -webkit-text-stroke-color 0.3s;
}

.step:hover .step-num { color: var(--cobalt); -webkit-text-stroke-color: var(--cobalt); }

.step h3 {
  margin: 14px 0 9px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
}

.step p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-2);
  text-wrap: pretty;
}

.step p b { color: var(--cobalt); font-weight: 600; }

/* ===================== servicios ===================== */

.services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  perspective: 1500px;
  perspective-origin: 50% 22%;
}

.svc {
  position: relative;
  display: flex; flex-direction: column; align-items: flex-start;
  background: var(--sheet);
  border: 1px solid var(--line-2);
  padding: 26px 24px 22px;
  overflow: hidden;
  transition: transform 0.3s var(--ease-snap), border-color 0.3s, box-shadow 0.3s;
}

.svc::before { display: none; }

/* card spotlight (inspirado en Aceternity UI, recreado en vanilla):
   una linterna cobalto que sigue al cursor sobre la tarjeta */
.svc { --mx: 50%; --my: 50%; }
.svc::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(220px circle at var(--mx) var(--my), rgba(34, 64, 242, 0.16), transparent 62%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
  z-index: 0;
}
.svc:hover::after { opacity: 1; }
.svc > * { position: relative; z-index: 1; }

.svc:hover {
  border-color: var(--ink);
  box-shadow: 6px 6px 0 var(--line);
}

.svc-icon {
  color: var(--ink);
  margin-bottom: 16px;
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border: 1px solid var(--line-2);
  background: var(--paper);
  transition: color 0.3s, border-color 0.3s, background 0.3s;
}

.svc:hover .svc-icon { color: var(--cobalt); border-color: var(--cobalt); }

.svc-icon svg { display: block; }

.svc h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17.5px;
}

.svc p {
  margin: 0 0 20px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-2);
  text-wrap: pretty;
}

.svc-cta {
  margin-top: auto;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cobalt);
  background: none; border: none; padding: 0;
  cursor: pointer;
}

.svc-cta .arr { transition: transform 0.25s var(--ease-snap); }
.svc-cta:hover .arr { transform: translateX(4px); }

.svc--featured {
  border: 1.5px solid var(--cobalt);
  box-shadow: 5px 5px 0 rgba(34, 64, 242, 0.16);
}

.svc-tag {
  position: absolute;
  top: 0; right: 0;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  background: var(--cobalt);
  padding: 5px 10px;
}

.svc--otro { border-style: dashed; background: transparent; }
.svc--otro:hover { border-style: solid; }

/* ===================== contacto ===================== */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

.contact-aside .sec-title { font-size: clamp(34px, 4.6vw, 60px); }

.contact-mail {
  display: inline-block;
  margin-top: 24px;
  font-family: var(--font-mono);
  font-size: clamp(14px, 1.5vw, 17px);
  letter-spacing: 0.02em;
  color: var(--cobalt);
  border-bottom: 1px solid var(--cobalt);
  padding-bottom: 5px;
  transition: color 0.25s, border-color 0.25s;
}

.contact-mail:hover { color: var(--cobalt-deep); border-color: var(--cobalt-deep); }

.contact-note { margin-top: 16px; font-size: 12.5px; color: var(--ink-3); max-width: 38ch; }

.form {
  display: flex; flex-direction: column; gap: 16px;
  background: var(--sheet);
  border: 1px solid var(--line-2);
  padding: clamp(22px, 2.6vw, 34px);
}

.form label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 7px;
}

.form input, .form textarea {
  width: 100%;
  background: var(--paper);
  border: 1px solid var(--line-2);
  border-radius: 2px;
  padding: 14px 15px;
  font-family: var(--font-body);
  font-size: 14.5px;
  color: var(--ink);
  transition: border-color 0.25s, box-shadow 0.25s;
}

.form input::placeholder, .form textarea::placeholder { color: var(--ink-3); }

.form input:focus, .form textarea:focus {
  outline: none;
  border-color: var(--cobalt);
  box-shadow: 2px 2px 0 rgba(34, 64, 242, 0.18);
}

.form textarea { resize: vertical; min-height: 140px; }

.form .btn-primary { align-self: flex-start; margin-top: 4px; }

/* consentimiento RGPD */
.form-consent {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 12.5px; line-height: 1.5; color: var(--ink-3);
  cursor: pointer; margin-top: -2px;
}
.form-consent input {
  width: 16px; height: 16px; margin: 2px 0 0; flex: 0 0 auto;
  accent-color: var(--cobalt); cursor: pointer;
}
.form-consent a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.form-consent a:hover { color: var(--cobalt); }

/* mensaje de estado del envío */
.form-status {
  margin: 2px 0 0; font-family: var(--font-mono);
  font-size: 12px; letter-spacing: 0.02em; line-height: 1.45;
  padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 2px;
}
.form-status--send { color: var(--ink-3); }
.form-status--ok   { color: var(--cobalt); border-color: var(--cobalt); background: rgba(34, 64, 242, 0.06); }
.form-status--err  { color: #b3261e; border-color: rgba(179, 38, 30, 0.5); background: rgba(179, 38, 30, 0.05); }

/* ===================== footer · cajetín del plano ===================== */

.footer {
  position: relative; z-index: 2;
  margin: clamp(40px, 8vh, 90px) auto 40px;
  max-width: 1280px;
  padding: 0 clamp(22px, 4vw, 58px);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 0;
  align-items: stretch;
  border: 1px solid var(--ink);
  background: var(--sheet);
}

.f-brand, .footer .f-col { padding: clamp(20px, 2.4vw, 32px); }

.footer .f-col { border-left: 1px solid var(--line-2); }

.f-brand .logo { font-size: 16px; }

/* eslogan de marca, justo bajo el logotipo del pie */
.f-slogan {
  margin: 12px 0 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(18px, 1.7vw, 22px);
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.f-tag {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.65;
  color: var(--ink-2);
  max-width: 34ch;
  text-wrap: pretty;
}

.f-col h4 {
  margin: 0 0 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.f-col a {
  display: block;
  padding: 4px 0;
  font-size: 13.5px;
  color: var(--ink-2);
  transition: color 0.2s ease;
}

.f-col a:hover { color: var(--cobalt); }

/* campos del cajetín: como un plano de verdad */
.footer-specs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--ink);
  border-top: none;
  background: var(--sheet);
}

.footer-specs span {
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px clamp(14px, 1.8vw, 24px);
  border-left: 1px solid var(--line-2);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink);
}

.footer-specs span:first-child { border-left: none; }

.footer-specs b {
  font-weight: 400;
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.footer-base {
  border: 1px solid var(--ink);
  border-top: none;
  background: var(--paper);
  padding: 12px clamp(20px, 2.4vw, 32px);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.05em;
  color: var(--ink-3);
}
.footer-legal { display: flex; gap: 18px; order: 2; }
.footer-legal a { color: var(--ink-3); text-decoration: none; }
.footer-legal a:hover { color: var(--cobalt); }

/* ===================== responsive ===================== */

@media (max-width: 1024px) {
  .services, .folio { grid-template-columns: repeat(2, 1fr); }
  .folio-featured { grid-column: span 2; }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 36px; }
}

@media (max-width: 880px) {
  .versus { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .folio-featured { grid-template-columns: 1fr; }
  .folio-visual { border-left: none; border-top: 1px solid var(--line-2); min-height: 200px; }
}

@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer .f-col { border-left: none; border-top: 1px solid var(--line-2); }
}

@media (max-width: 620px) {
  .services, .folio { grid-template-columns: 1fr; }
  .folio-featured { grid-column: span 1; }
  .steps { grid-template-columns: 1fr; }
}

/* ===================== contexto · datos del sector ===================== */

.facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border: 1px solid var(--ink);
  background: var(--sheet);
}

.fact {
  margin: 0;
  padding: clamp(22px, 3vw, 40px);
  border-left: 1px solid var(--line-2);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.fact:first-child { border-left: none; }

.fact-num {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(44px, 7vw, 86px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--ink);
  text-wrap: nowrap;
}

/* "de cada" y "%" acompañan a la cifra sin competir con ella */
.fact-unit {
  font-size: 0.36em;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--ink-2);
}

.fact-sep { color: var(--line-2); font-weight: 400; }

.fact-claim {
  margin: 0;
  font-size: clamp(14px, 1.2vw, 16px);
  line-height: 1.6;
  color: var(--ink-2);
  text-wrap: pretty;
  max-width: 42ch;
}

.fact-claim b { color: var(--ink); font-weight: 600; }

/* la fuente va en mono y pequeña: es un pie de dato, no un argumento */
.fact-src {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.5;
  color: var(--ink-3);
}

.fact-src cite { font-style: normal; }

.fact-src a {
  color: var(--cobalt);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
  white-space: nowrap;
}

.fact-src a:hover,
.fact-src a:focus-visible { border-bottom-color: currentColor; }

.facts-close {
  margin: clamp(22px, 2.6vw, 34px) 0 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(18px, 2vw, 26px);
  line-height: 1.35;
  letter-spacing: -0.015em;
  color: var(--ink-2);
  max-width: 46ch;
  text-wrap: pretty;
}

.facts-close b { color: var(--ink); font-weight: 700; }

@media (max-width: 820px) {
  .facts { grid-template-columns: 1fr; }
  .fact { border-left: none; border-top: 1px solid var(--line-2); }
  .fact:first-child { border-top: none; }
}
