/* =========================================================
   NuLerna Consulting - style.css
   Marca Opción 2. Sora (display) + Inter (cuerpo).
   Sin estilos inline (CSP estricto). Fuentes auto-hospedadas.
   ========================================================= */

/* ---------- Fuentes locales (variable, subset latin) ---------- */
@font-face {
  font-family: 'Sora';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/sora-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens ---------- */
:root {
  --bg: #FFFFFF;
  --surface: #F0F4FF;
  --primary: #2563EB;
  --primary-700: #1D4ED8;
  --jade: #00C896;
  --jade-700: #059B76;         /* jade legible sobre superficie clara si hace falta */
  --ink: #111827;
  --ink-soft: #374151;
  --ink-mute: #5B6472;
  --border: #E2E8F5;
  --border-strong: #CBD5EE;

  --font-display: 'Sora', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;

  --maxw: 1400px;
  --gutter: clamp(1.5rem, 4vw, 5rem);   /* 24px móvil -> 48-80px desktop; nada pegado a la orilla */
  --section-y: clamp(5rem, 10vw, 8rem);

  --radius: 14px;
  --radius-lg: 20px;

  --shadow-sm: 0 1px 2px rgba(17, 24, 39, 0.04);
  --shadow-md: 0 10px 30px -12px rgba(17, 24, 39, 0.16);

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);          /* entrada editorial (decelera) */
  --ease-premium: cubic-bezier(0.4, 0, 0.2, 1);    /* firma premium/corporate */
  --dur: 0.6s;
  --dur-quick: 160ms;
  --dur-std: 320ms;
  --dur-slow: 640ms;

  --navy: #0C1220;
  --navy-card: #111827;

  --header-h: 72px;
}

/* ---------- Reset ligero ---------- */
*, *::before, *::after { box-sizing: border-box; }
:root { color-scheme: light; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p, dl, dd { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
strong { font-weight: 600; color: var(--ink); }
:target { scroll-margin-top: calc(var(--header-h) + 24px); }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: var(--section-y); }
.section--surface { background: var(--surface); }

.section__head {
  max-width: 40rem;
  margin-inline: 0;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
  text-align: left;
}
/* Ancla editorial: hairline jade corto a la izquierda del título */
.section__head::before {
  content: "";
  display: block;
  width: 34px;
  height: 2px;
  background: var(--jade);
  margin-bottom: 1.4rem;
}

/* ---------- Tipografía ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--primary);
}
.eyebrow::before {
  content: "";
  width: 30px;
  height: 2px;
  background: var(--jade);
  flex: none;
}
.eyebrow span { margin-inline: 0.1em; color: var(--border-strong); }

.section__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 1.3rem + 2.6vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
  color: var(--ink);
}
.section__intro {
  margin-top: 1.1rem;
  font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem);
  color: var(--ink-soft);
  text-wrap: pretty;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1;
  letter-spacing: -0.01em;
  transition: background-color 0.2s var(--ease-out), transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-700); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn--primary:active { transform: translateY(0) scale(0.97); }   /* feedback de presión (Emil Kowalski) */
.btn--lg { min-height: 52px; padding: 0.95rem 1.9rem; font-size: 1rem; }

/* Táctil: sin retardo de doble-tap ni flash de highlight (hay estados propios) */
.btn, .site-nav a, .brand, .field input, .field textarea, .faq__q, .skip-link {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

:where(a, button, input, textarea):focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: 1rem; top: -100px;
  z-index: 100;
  background: var(--ink); color: #fff;
  padding: 0.7rem 1rem; border-radius: 8px;
  transition: top 0.2s var(--ease-out);
}
.skip-link:focus { top: 1rem; }

/* ---------- Marca / lockup ---------- */
.brand { display: inline-flex; align-items: center; gap: 0.6rem; }
.brand__mark { flex: none; }
.brand__text { display: flex; flex-direction: column; line-height: 1; }
.brand__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.brand__sub {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.5625rem;
  letter-spacing: 0.28em;
  color: var(--ink-mute);
  margin-top: 0.18rem;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: transparent;
  transition: background-color 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
  border-bottom: 1px solid transparent;
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: var(--header-h);
  padding-block: 0.75rem;
  transition: min-height 0.3s var(--ease-out);
}
.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.98);
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}
.site-header.is-scrolled .site-header__inner { min-height: 60px; }

.site-nav {
  display: flex;
  gap: 2rem;
  margin-left: auto;
}
.site-nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-soft);
  padding: 0.4rem 0;
  position: relative;
  transition: color 0.2s var(--ease-out);
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%; height: 2px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease-out);
}
.site-nav a:hover { color: var(--ink); }
.site-nav a:hover::after { transform: scaleX(1); }
.site-header__cta { margin-left: 0.25rem; }

/* ---------- Hero (editorial, izquierda, llena el viewport) ---------- */
.hero {
  min-height: calc(100svh - var(--header-h));
  padding-top: clamp(3rem, 9vh, 6rem);
  padding-bottom: clamp(3rem, 8vh, 5.5rem);
  display: grid;
  align-content: center;   /* contenido centrado verticalmente (equilibrado) */
}
.hero__inner {
  text-align: left;     /* contenido a la izquierda dentro del contenedor */
}
.hero .eyebrow { margin-bottom: 1.6rem; }
.hero__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.6rem, 1rem + 6.4vw, 4.9rem);   /* ~42 -> 78px */
  line-height: 1.0;
  letter-spacing: -0.038em;
  color: var(--ink);
  max-width: 14ch;
  text-wrap: balance;
}
.hero__lead {
  margin: 1.9rem 0 0;
  max-width: 52ch;
  font-size: clamp(1.125rem, 1.02rem + 0.5vw, 1.375rem);
  line-height: 1.55;
  color: var(--ink-soft);
  text-wrap: pretty;
}
.hero__actions { margin-top: 2.4rem; }

/* Motivo circuito como textura MUY sutil (hero) */
.hero { position: relative; overflow: hidden; }
.hero::before {
  content: "";
  position: absolute;
  inset: -48px;                 /* extra para que la deriva ambient no descubra bordes */
  z-index: 0;
  pointer-events: none;
  background-image: url("../assets/motif-circuito.svg");
  background-repeat: repeat;
  background-size: 760px auto;
  opacity: 0.28;
  -webkit-mask-image: linear-gradient(172deg, #000 0%, rgba(0,0,0,0.35) 46%, transparent 82%);
  mask-image: linear-gradient(172deg, #000 0%, rgba(0,0,0,0.35) 46%, transparent 82%);
  animation: hero-ambient 42s ease-in-out infinite alternate;   /* capa ambient: vida sutil */
}
@keyframes hero-ambient {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-34px, -10px, 0); }
}
.hero__inner { position: relative; z-index: 1; }

/* Señal viajando por las pistas del circuito (grecas) */
.hero__signal {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
.hero__trace {
  fill: none;
  stroke: var(--primary);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;   /* fino como las grecas del fondo, no se engorda al escalar */
  opacity: 0.08;
  stroke-linejoin: miter;
}
.hero__pulse { filter: drop-shadow(0 0 1.5px currentColor); opacity: 0.55; }
.hero__pulse--jade { fill: var(--jade); color: var(--jade); }
.hero__pulse--blue { fill: var(--primary); color: var(--primary); }
@media (prefers-reduced-motion: reduce) {
  .hero__signal { display: none; }   /* sin movimiento cuando el usuario lo pide */
}

/* ---------- Promesa (sección puro tipográfica, respira mucho) ---------- */
.promise { padding-block: clamp(6rem, 14vw, 11rem); }
.promise__inner { margin-inline: auto; }   /* contenedor centrado como el resto (no pegado a la orilla) */
.promise__inner::before {
  content: "";
  display: block;
  width: 34px;
  height: 2px;
  background: var(--jade);
  margin-bottom: 2rem;
}
.promise__text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.6rem, 1rem + 2.3vw, 2.6rem);
  line-height: 1.24;
  letter-spacing: -0.025em;
  color: var(--ink);
  text-wrap: pretty;
  max-width: 46rem;   /* el texto no abarca todo el ancho, pero arranca centrado con el resto */
}
.promise__text strong { color: var(--primary); font-weight: 700; }

/* ---------- Servicios (ecosistema, layout editorial asimétrico) ---------- */
.services { position: relative; overflow: hidden; }
.services::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url("../assets/motif-circuito.svg");
  background-repeat: repeat;
  background-size: 720px auto;
  opacity: 0.4;
  -webkit-mask-image: radial-gradient(120% 90% at 100% 0%, #000 0%, transparent 70%);
  mask-image: radial-gradient(120% 90% at 100% 0%, #000 0%, transparent 70%);
}
.services > .container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(15rem, 20rem) 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.services .section__head {
  margin-bottom: 0;
  position: sticky;
  top: calc(var(--header-h) + 1.75rem);
}
.services__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1rem, 2vw, 1.5rem);
}
.service {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(1.6rem, 3vw, 2.4rem);
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out), border-color 0.25s var(--ease-out);
}
.service:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}
.service__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  letter-spacing: -0.015em;
  color: var(--ink);
}
.service__desc { margin-top: 0.6rem; color: var(--ink-soft); }
.service__shift {
  margin-top: 1.5rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--border);
  font-size: 0.9375rem;
  color: var(--ink-mute);
  display: flex;
  flex-direction: column;   /* "De X ->" en la 1a línea, resultado en la 2a: patrón uniforme */
  align-items: flex-start;
  gap: 0.25rem;
}
.service__from { color: var(--ink-mute); }
.service__arrow { color: var(--primary); font-weight: 700; margin-left: 0.4rem; }
.service__end { color: var(--ink); font-weight: 600; }

/* ---------- Casos ---------- */
.cases__grid {
  display: grid;
  grid-template-columns: 1fr 1.55fr;
  gap: clamp(1rem, 2.5vw, 1.75rem);
  align-items: stretch;
}
.case {
  border-radius: var(--radius-lg);
  padding: clamp(1.75rem, 3.5vw, 2.75rem);
  border: 1px solid var(--border);
  background: var(--bg);
}
.case--prod { display: flex; flex-direction: column; }
.case__tag {
  align-self: flex-start;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
}
.case__tag--live { background: var(--jade); color: #06231b; }
.case__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  letter-spacing: -0.02em;
  margin-top: 1.4rem;
}
.case--prod .case__desc { margin-top: 0.8rem; color: var(--ink-soft); }

.case--data {
  background: var(--ink);
  border-color: var(--ink);
  color: #E5E7EB;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}
.case--data .case__name { color: #fff; margin-top: 0; }
.case__kicker { margin-top: 0.4rem; color: #9AA3B2; font-size: 0.95rem; }

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2.5vw, 2rem);
}
.metric { display: flex; flex-direction: column; gap: 0.4rem; }
.metric__value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.25rem, 1.4rem + 3.4vw, 3.5rem);
  line-height: 1;
  letter-spacing: -0.03em;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.metric__label { font-size: 0.875rem; line-height: 1.35; color: #9AA3B2; }
.case__context {
  font-size: 0.95rem;
  color: #C3CAD6;
  line-height: 1.5;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.case__source { color: #7E8798; }

/* ---------- Proceso ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1rem, 2vw, 1.5rem);
  counter-reset: step;
}
.step {
  position: relative;
  padding: 1.75rem 1.5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.step__num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--primary);
  letter-spacing: 0.02em;
}
.step__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.015em;
  margin-top: 0.6rem;
}
.step__desc { margin-top: 0.5rem; font-size: 0.95rem; color: var(--ink-soft); }
.step--live {
  border-color: var(--jade);
  box-shadow: inset 0 0 0 1px var(--jade);
}
.step--live .step__title { color: var(--jade-700); }

/* ---------- Nosotros ---------- */
.about__inner { display: grid; gap: clamp(2.5rem, 5vw, 4rem); }
.about__intro { text-align: left; max-width: 40rem; margin-inline: 0; }
.about__intro::before {
  content: "";
  display: block;
  width: 34px;
  height: 2px;
  background: var(--jade);
  margin-bottom: 1.4rem;
}
.about__people {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1rem, 2.5vw, 2rem);
}
.person {
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.person__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.375rem;
  letter-spacing: -0.015em;
}
.person__role {
  margin-top: 0.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary);
}
.person__bio { margin-top: 0.9rem; color: var(--ink-soft); }

.about__values {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  padding-top: clamp(1rem, 2vw, 1.5rem);
  border-top: 1px solid var(--border);
}
.value__label {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.value__text {
  margin-top: 0.7rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.125rem, 1rem + 0.6vw, 1.375rem);
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-wrap: pretty;
}

/* ---------- FAQ ---------- */
.faq { padding-block: clamp(4rem, 8vw, 6rem); }   /* sección más apretada (ritmo) */
.faq__inner { max-width: 62rem; margin-inline: 0; }
.faq .section__title { text-align: left; margin-bottom: clamp(2rem, 4vw, 3rem); }
.faq .section__title::before {
  content: "";
  display: block;
  width: 34px;
  height: 2px;
  background: var(--jade);
  margin-bottom: 1.4rem;
}
.faq__list { display: grid; gap: 0; }
.faq__item { padding-block: 1.6rem; border-top: 1px solid var(--border); }
.faq__item:last-child { border-bottom: 1px solid var(--border); }
.faq__q {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1875rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.faq__a { margin-top: 0.6rem; color: var(--ink-soft); max-width: 60ch; }

/* ---------- CTA final (navy, cierre editorial) ---------- */
.cta { background: var(--navy); color: #E5E7EB; }
.cta__inner { max-width: 54rem; margin-inline: 0; text-align: left; }
.cta__inner::before {
  content: "";
  display: block;
  width: 34px;
  height: 2px;
  background: var(--jade);
  margin-bottom: 1.6rem;
}
.cta__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.25rem, 1.5rem + 3vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: #FFFFFF;
  text-wrap: balance;
}
.cta__lead { margin-top: 1.1rem; font-size: 1.125rem; color: #AEB6C4; }

/* ---------- Formulario ---------- */
.form {
  margin-top: clamp(2rem, 4vw, 3rem);
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3.5vw, 2.5rem);
  display: grid;
  gap: 1.1rem;
}
.form__hp { position: absolute; left: -9999px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.field input,
.field textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  transition: border-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:hover,
.field textarea:hover { border-color: var(--ink-mute); }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}
.field input:user-invalid,
.field textarea:user-invalid {
  border-color: #DC2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.14);
}
.form .btn { margin-top: 0.4rem; width: 100%; }

/* Formulario sobre navy (CTA de cierre) */
.cta .form { background: var(--navy-card); border-color: rgba(255, 255, 255, 0.09); }
.cta .field label { color: #AEB6C4; }
.cta .field input,
.cta .field textarea {
  background: var(--navy);
  border-color: rgba(255, 255, 255, 0.16);
  color: #FFFFFF;
}
.cta .field input:hover,
.cta .field textarea:hover { border-color: rgba(255, 255, 255, 0.34); }
.cta .field input:focus,
.cta .field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.40);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy);       /* cierra continuo con el CTA navy, sin costura */
  color: #C3CAD6;
  padding-block: clamp(3rem, 6vw, 4.5rem);
}
.site-footer__inner { display: grid; gap: 1rem; justify-items: start; text-align: left; }
.brand--footer .brand__name { color: #fff; }
.brand--footer .brand__sub { color: #8A93A3; }
.site-footer__tagline { max-width: 36rem; color: #9AA3B2; }
.site-footer__meta { display: flex; gap: 0.6rem; align-items: center; font-size: 0.9rem; color: #9AA3B2; }
.site-footer__sep { color: #4B5563; }
.site-footer__copy { font-size: 0.85rem; color: #868E9C; margin-top: 0.5rem; }

/* =========================================================
   RITMO EDITORIAL - alineación intencional variada (>=861px)
   Cada sección aterriza en un lado distinto para dar cadencia;
   en móvil todo colapsa a una sola columna izquierda y legible.
   Se conserva el contenedor central y los márgenes: nada pegado.
   ========================================================= */
.cta .cta__lead { max-width: 44ch; }        /* base móvil */
.cta .form { max-width: 38rem; margin-inline: 0; }

@media (min-width: 861px) {
  /* Promesa: el enunciado se desplaza a la derecha (contrapunto al hero) */
  .promise__inner {
    display: grid;
    grid-template-columns: minmax(0, 56rem);
    justify-content: end;
  }
  .promise__text { max-width: none; }

  /* Casos (banda oscura): el encabezado se alinea a la derecha */
  .cases .section__head { margin-left: auto; text-align: right; }
  .cases .section__head::before { margin-left: auto; }

  /* Nosotros: encabezado a dos columnas (titular izquierda / intro derecha) */
  .about__intro {
    max-width: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: clamp(2rem, 5vw, 4rem);
    align-items: baseline;
  }
  .about__intro::before { grid-column: 1 / -1; }
  .about__intro .section__intro { margin-top: 0; }

  /* CTA de cierre: discurso a la izquierda, formulario a la derecha */
  .cta__inner {
    max-width: none;
    display: grid;
    grid-template-columns: 0.82fr 1.18fr;   /* el formulario ocupa más ancho de la sección */
    column-gap: clamp(2.5rem, 5vw, 4.5rem);
    align-items: start;
  }
  .cta__inner::before { grid-column: 1 / -1; }
  .cta .cta__lead { max-width: 38ch; }
  .cta .form { margin-top: 0; max-width: none; }
}

/* =========================================================
   MOTION - progressive enhancement (.js) + reduced-motion
   ========================================================= */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
  will-change: opacity, transform;
}
.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* Hero: entrada escalonada al cargar */
.js [data-hero] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.js .hero.is-entered [data-hero] { opacity: 1; transform: none; }
.js .hero.is-entered .eyebrow { transition-delay: 0ms; }
.js .hero.is-entered .hero__title { transition-delay: 110ms; }
.js .hero.is-entered .hero__lead { transition-delay: 220ms; }
.js .hero.is-entered .hero__actions { transition-delay: 330ms; }

/* Capa secundaria: la línea jade del eyebrow se dibuja de izquierda a derecha */
.js .eyebrow::before {
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-slow) var(--ease) 160ms;
}
.js .hero.is-entered .eyebrow::before { transform: scaleX(1); }

/* Firma de marca: las reglas jade de cada sección se dibujan al revelarse.
   Bajo @supports para que, sin :has(), los marcadores queden visibles (nunca ocultos). */
@supports selector(:has(*)) {
  .js .section__head::before,
  .js .promise__inner::before,
  .js .about__intro::before,
  .js .faq .section__title::before,
  .js .cta__inner::before {
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--dur-slow) var(--ease) 120ms;
  }
  .js .section__head:has([data-reveal].is-visible)::before,
  .js .promise:has(.promise__text.is-visible) .promise__inner::before,
  .js .about:has(.about__intro .section__title.is-visible) .about__intro::before,
  .js .faq .section__title.is-visible::before,
  .js .cta:has(.cta__pitch [data-reveal].is-visible) .cta__inner::before {
    transform: scaleX(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-reveal],
  .js [data-hero] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .hero::before { animation: none !important; transform: none !important; }
  .js .eyebrow::before { transform: none !important; transition: none !important; }
  .js .section__head::before,
  .js .promise__inner::before,
  .js .about__intro::before,
  .js .faq .section__title::before,
  .js .cta__inner::before { transform: none !important; transition: none !important; }
  .service:hover .ico { transform: none !important; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* =========================================================
   CAPA VISUAL - motivo del hero, íconos, banda oscura
   ========================================================= */

/* (El motivo del hero ahora es el circuito de marca, definido en la sección Hero.) */

/* --- Íconos de línea de marca --- */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico { color: var(--primary); }
.service .ico { width: 36px; height: 36px; display: block; margin-bottom: 1.1rem; transition: transform var(--dur-std) var(--ease-out); }
.service:hover .ico { transform: translateY(-3px); }   /* detalle secundario en hover */
.step { position: relative; }
.step .ico { position: absolute; top: 1.6rem; right: 1.4rem; width: 28px; height: 28px; }

/* --- Hover coherente en tarjetas (elevación sutil, misma firma que servicios) --- */
.step, .person, .case--prod {
  transition: transform var(--dur-std) var(--ease-out),
              border-color var(--dur-std) var(--ease-out),
              box-shadow var(--dur-std) var(--ease-out);
}
.step:hover, .person:hover, .case--prod:hover { transform: translateY(-3px); }
.person:hover, .step:not(.step--live):hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.section--dark .case--prod:hover { border-color: rgba(255, 255, 255, 0.18); }
@media (prefers-reduced-motion: reduce) {
  .step:hover, .person:hover, .case--prod:hover { transform: none !important; }
}

/* --- Casos: banda oscura dramática --- */
.section--dark { background: #0C1220; color: #E5E7EB; position: relative; overflow: hidden; }
.section--dark .section__title { color: #FFFFFF; }
.section--dark .section__intro { color: #AEB6C4; }
.cases__glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(40% 44% at 20% 38%, rgba(37, 99, 235, 0.30), transparent 72%),
    radial-gradient(36% 42% at 84% 70%, rgba(0, 200, 150, 0.20), transparent 72%);
}
.section--dark .container { position: relative; z-index: 1; }
.section--dark .case { background: #111827; border-color: rgba(255, 255, 255, 0.09); }
.section--dark .case--prod .case__name { color: #FFFFFF; }
.section--dark .case--prod .case__desc { color: #AEB6C4; }
.section--dark .case--data { border-color: rgba(37, 99, 235, 0.32); }

/* --- Secuencia de los 4 pasos + cascada de servicios --- */
.js .services .service:nth-child(2) { transition-delay: 80ms; }
.js .services .service:nth-child(3) { transition-delay: 160ms; }
.js .services .service:nth-child(4) { transition-delay: 240ms; }
.js .steps .step:nth-child(1) { transition-delay: 0ms; }
.js .steps .step:nth-child(2) { transition-delay: 100ms; }
.js .steps .step:nth-child(3) { transition-delay: 200ms; }
.js .steps .step:nth-child(4) { transition-delay: 300ms; }

@media (prefers-reduced-motion: reduce) {
  .js .services .service, .js .steps .step { transition-delay: 0ms !important; }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 860px) {
  .cases__grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .about__people { grid-template-columns: 1fr; }
  .about__values { grid-template-columns: 1fr; gap: 2rem; }
  .services > .container { grid-template-columns: 1fr; gap: 0; }
  .services .section__head { position: static; margin-bottom: clamp(2rem, 5vw, 3rem); }
}

@media (max-width: 720px) {
  .site-nav { display: none; }
  .site-header__inner { gap: 1rem; }
  .services__grid { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: 1fr; gap: 1.5rem; text-align: left; }
  .metric { flex-direction: row; align-items: baseline; gap: 0.9rem; }
  .metric__value { min-width: 4.5ch; }
}

@media (max-width: 480px) {
  .steps { grid-template-columns: 1fr; }
  .form__row { grid-template-columns: 1fr; }
  .site-header__cta { padding-inline: 1rem; font-size: 0.875rem; }
}

/* =========================================================
   TEXTO JUSTIFICADO - cuerpo con guionado (evita ríos)
   Solo prosa de cuerpo; títulos/eyebrows/etiquetas se respetan.
   ========================================================= */
.hero__lead,
.section__intro,
.service__desc,
.case--prod .case__desc,
.case__context,
.person__bio,
.value__text,
.faq__a,
.cta__lead {
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}
/* El encabezado de Casos conserva su alineación derecha (>=861px) */
@media (min-width: 861px) {
  .cases .section__head .section__intro { text-align: right; }
}

/* =========================================================
   PANTALLA DE CARGA (splash de marca) + PROGRESO DE SCROLL
   ========================================================= */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: var(--bg);
  animation: preloader-hide 0.5s var(--ease-premium) 1.8s forwards;
}
/* El logo del encabezado aparece SOLO cuando el splash ya se fue: nunca dos logos a la vez */
.js .site-header__inner { opacity: 0; animation: header-in 0.5s var(--ease-out) 2.3s forwards; }
@keyframes header-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.preloader__logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.preloader__mark {
  width: 84px;
  height: 84px;
  animation: preloader-mark 0.7s var(--ease-out) both;
}
.preloader .brand__text { align-items: center; animation: preloader-fade 0.6s var(--ease-out) 0.18s both; }
.preloader .brand__name { font-size: 1.6rem; }
.preloader .brand__sub { font-size: 0.7rem; letter-spacing: 0.32em; }
.preloader__logo::after {
  content: "";
  width: 44px;
  height: 2px;
  background: var(--jade);
  transform: scaleX(0);
  transform-origin: center;
  animation: preloader-line 0.55s var(--ease) 0.42s forwards;
}
@keyframes preloader-mark { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: none; } }
@keyframes preloader-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes preloader-line { to { transform: scaleX(1); } }
@keyframes preloader-hide { to { opacity: 0; visibility: hidden; transform: translateY(-10px); } }

/* Barra de progreso de scroll (solo donde hay scroll-driven animations) */
.scroll-progress { display: none; }
@supports (animation-timeline: scroll()) {
  .scroll-progress {
    display: block;
    position: fixed;
    inset: 0 0 auto 0;
    height: 3px;
    transform-origin: left;
    transform: scaleX(0);
    background: linear-gradient(90deg, var(--primary), var(--jade));
    z-index: 60;
    pointer-events: none;
    animation: scroll-progress-grow linear both;
    animation-timeline: scroll(root block);
  }
}
@keyframes scroll-progress-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* =========================================================
   MÁS MOVIMIENTO - firma de marca (sobrio, transform/opacity)
   ========================================================= */
/* Métricas EXATEC: leve pop escalonado al revelarse */
.js .case--data .metric__value {
  opacity: 0;
  transform: translateY(10px) scale(0.98);
  transition: opacity var(--dur-std) var(--ease-out), transform var(--dur-std) var(--ease-out);
}
.js .case--data.is-visible .metric__value { opacity: 1; transform: none; }
.js .case--data.is-visible .metric:nth-child(2) .metric__value { transition-delay: 90ms; }
.js .case--data.is-visible .metric:nth-child(3) .metric__value { transition-delay: 180ms; }

/* Indicadores "en operación": halo jade que respira (estado real: vivo) */
.case__tag--live, .step--live { position: relative; }
.case__tag--live::after, .step--live::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: 0 0 0 4px rgba(0, 200, 150, 0.18);
  opacity: 0;
  animation: live-pulse 2.8s ease-in-out infinite;
}
.step--live::after { border-radius: var(--radius); box-shadow: 0 0 0 5px rgba(0, 200, 150, 0.12); }
@keyframes live-pulse { 0%, 100% { opacity: 0; } 50% { opacity: 1; } }

/* Flecha "de X -> Y": empuje al pasar el cursor por la tarjeta */
.service__arrow { display: inline-block; transition: transform var(--dur-quick) var(--ease-out); }
.service:hover .service__arrow { transform: translateX(4px); }

/* Tarjetas: entrada un poco más rica (sube y asienta con leve escala) */
.js .service[data-reveal], .js .case[data-reveal],
.js .step[data-reveal], .js .person[data-reveal] {
  transform: translateY(26px) scale(0.985);
}
.js .service.is-visible, .js .case.is-visible,
.js .step.is-visible, .js .person.is-visible { transform: none; }

@media (prefers-reduced-motion: reduce) {
  .preloader { animation: preloader-hide 0.3s linear 0.5s forwards !important; }
  .js .site-header__inner { animation: none !important; opacity: 1 !important; transform: none !important; }
  .preloader__mark, .preloader .brand__text, .preloader__logo::after {
    animation: none !important; opacity: 1 !important; transform: none !important;
  }
  .case__tag--live::after, .step--live::after { animation: none !important; opacity: 0 !important; }
  .scroll-progress { display: none !important; }
  .js .case--data .metric__value,
  .js .service[data-reveal], .js .case[data-reveal],
  .js .step[data-reveal], .js .person[data-reveal] {
    transform: none !important; opacity: 1 !important;
  }
  .service:hover .service__arrow { transform: none !important; }
}

/* Preferencia de color: el sitio es claro por diseño de marca; no forzar dark. */
