/* ==========================================================================
   Attraktor Labs — estilos
   ========================================================================== */

:root {
  /* tema oscuro (por defecto) */
  --bg-rgb: 7, 8, 26;
  --bg2-rgb: 12, 14, 38;
  --ink-rgb: 238, 238, 242;
  --orange-rgb: 247, 166, 0;
  --bg: rgb(var(--bg-rgb));
  --bg-2: rgb(var(--bg2-rgb));
  --ink: rgb(var(--ink-rgb));
  --ink-2: rgba(var(--ink-rgb), 0.7);
  --ink-3: rgba(var(--ink-rgb), 0.45);
  --line: rgba(var(--ink-rgb), 0.13);
  --orange: rgb(var(--orange-rgb));
  --on-accent: #07081a;
  --grain: 0.06;
  --panel-shadow: rgba(0, 0, 0, 0.35);
  /* fondos de los paneles de soluciones */
  --p1: #0d1030; --p2: #111436; --p3: #0c162e; --p4: #13112f; --p5: #0c1828; --p6: #0b1430; --p7: #15122b;
  color-scheme: dark;

  --f-display: 'Jockey One', 'Arial Narrow', sans-serif;
  --f-body: 'Instrument Sans', system-ui, sans-serif;
  --f-mono: 'IBM Plex Mono', ui-monospace, monospace;

  --gutter: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --chamfer: 10px;
}

/* tema claro: se activa con el interruptor (html[data-theme="light"]) */
:root[data-theme="light"] {
  --bg-rgb: 246, 245, 240;
  --bg2-rgb: 236, 234, 227;
  --ink-rgb: 11, 13, 36;
  --orange-rgb: 214, 128, 0; /* algo más intenso: el naranja de marca sobre claro se lee mal */
  --ink-2: rgba(var(--ink-rgb), 0.74);
  --ink-3: rgba(var(--ink-rgb), 0.52);
  --line: rgba(var(--ink-rgb), 0.14);
  --on-accent: #0b0d24;
  --grain: 0.035;
  --panel-shadow: rgba(11, 13, 36, 0.07);
  --p1: #eeece5; --p2: #e9eaf0; --p3: #e5ebee; --p4: #ece8ef; --p5: #e4ecea; --p6: #e7ebf3; --p7: #eee8ea;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  transition: background-color 0.4s, color 0.4s;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* grano analógico sobre toda la página */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: var(--grain);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img, svg, canvas { display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4, p, ol, ul, figure, dl, dd { margin: 0; padding: 0; }
ol, ul { list-style: none; }
::selection { background: var(--orange); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Utilidades tipográficas
   -------------------------------------------------------------------------- */

.micro, .section-label, .eyebrow {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-3);
  margin-bottom: clamp(24px, 4vw, 48px);
}
.section-label span { color: var(--orange); }

.section-title {
  font-family: var(--f-display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(2.8rem, 8vw, 8.5rem);
  line-height: 0.88;
  letter-spacing: -0.01em;
}

.mini-title {
  font-family: var(--f-mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 14px;
}

/* palabras partidas por JS */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.wi { display: inline-block; will-change: transform; }
.word { display: inline-block; white-space: nowrap; }
.c { display: inline-block; will-change: transform; }

/* --------------------------------------------------------------------------
   Botones y enlaces
   -------------------------------------------------------------------------- */

.btn {
  --c: var(--chamfer);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 26px;
  background: var(--orange);
  color: var(--on-accent);
  font-family: var(--f-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c));
  overflow: hidden;
  isolation: isolate;
  will-change: transform;
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--ink);
  transform: translateX(-101%);
  transition: transform 0.6s var(--ease);
}
.btn:hover::before { transform: translateX(0); }
.btn svg { width: 18px; height: 18px; transition: transform 0.5s var(--ease-out); }
.btn:hover svg { transform: translateX(4px); }
.btn--small { padding: 12px 18px; font-size: 12px; --c: 7px; }

.link-under {
  position: relative;
  font-family: var(--f-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 0;
}
.link-under::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: currentColor;
  transform-origin: right;
  transition: transform 0.6s var(--ease);
}
.link-under:hover::after { transform: scaleX(0); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  font-family: var(--f-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--orange);
}
.link-arrow svg {
  width: 34px; height: 34px;
  padding: 8px;
  border: 1px solid currentColor;
  border-radius: 50%;
  transition: transform 0.6s var(--ease-out), background 0.3s, color 0.3s;
}
.link-arrow:hover svg { transform: rotate(-45deg); background: var(--orange); color: var(--on-accent); }

/* efecto "rodillo" en la navegación */
.roll { display: inline-flex; align-items: baseline; gap: 8px; }
.roll i {
  font-style: normal;
  font-family: var(--f-mono);
  font-size: 10px;
  color: var(--orange);
}
.roll span {
  position: relative;
  display: inline-block;
  overflow: hidden;
  line-height: 1.2;
}
.roll span::before, .roll span::after { display: block; transition: transform 0.55s var(--ease); }
.roll span { color: transparent; }
.roll span::before { content: attr(data-text); position: absolute; left: 0; top: 0; color: var(--ink); }
.roll span::after { content: attr(data-text); position: absolute; left: 0; top: 100%; color: var(--orange); }
.roll:hover span::before, .roll:hover span::after { transform: translateY(-100%); }

/* --------------------------------------------------------------------------
   Entrada: el hero espera oculto a que arranque su animación
   -------------------------------------------------------------------------- */

.intro-pending .hero, .intro-pending .stage__canvas { opacity: 0; }

/* --------------------------------------------------------------------------
   Escenario del atractor (fondo fijo)
   -------------------------------------------------------------------------- */

.stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  will-change: transform, opacity;
}
.stage__canvas { position: absolute; inset: 0; }
@media (max-width: 1100px) { .stage__canvas { opacity: 0.5; top: 20vh; } }
/* en vertical, el atractor ocupa la parte superior y el texto queda debajo */
/* En vertical la primera pantalla se ordena en tres zonas:
   arriba el rotador, en medio el atractor, abajo el titular y el botón */
@media (max-width: 1100px) and (orientation: portrait) {
  main .hero {
    min-height: 100svh;
    padding-top: 96px;
    padding-bottom: 88px; /* sitio para "Desliza" */
    align-items: stretch;
  }
  main .hero__content {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: calc(100svh - 96px - 88px);
  }
  main .hero__title { flex: 1; display: flex; flex-direction: column; }
  main .hero__big { margin-top: auto; padding-top: 24px; } /* el hueco hasta aquí es del atractor */
  /* El atractor ocupa el hueco entre el rotador y el titular (--bt arriba, --bb abajo).
     El lienzo es transparente y 1/0.6 veces más alto que ese hueco, con el mismo centro:
     la cámara compensa con zoom 0.6, así que el atractor mide lo mismo pero sus bordes,
     la neblina y el resplandor tienen sitio para desvanecerse en lugar de cortarse */
  .stage__canvas {
    --bt: calc(190px - (100svh - 480px) * 0.08);
    --bb: calc(290px - (100svh - 480px) * 0.08);
    --bh: calc(100svh - var(--bt) - var(--bb));
    opacity: 1;
    top: calc(var(--bt) + var(--bh) / 2 - var(--bh) / 1.2);
    bottom: auto;
    height: calc(var(--bh) / 0.6);
    left: 0;
    right: 0;
    /* resplandor que lo funde con el fondo */
    background:
      radial-gradient(closest-side, rgba(var(--orange-rgb), 0.1), rgba(var(--orange-rgb), 0.03) 55%, transparent),
      radial-gradient(50% 38% at 50% 50%, rgba(var(--ink-rgb), 0.05), transparent);
  }
  /* el titular puede rozar la parte baja del atractor: se oscurece solo esa franja */
  main .hero::before {
    background: linear-gradient(180deg,
      rgba(var(--bg-rgb), 0) 55%,
      rgba(var(--bg-rgb), 0.7) 70%,
      rgba(var(--bg-rgb), 0.9) 85%);
  }
}
@media (min-width: 601px) and (max-width: 1100px) and (orientation: portrait) {
  .stage__canvas { top: calc(190px - (100svh - 660px) * 0.35); bottom: calc(470px - (100svh - 660px) * 0.35); }
}
/* móvil: solo lo esencial en la primera pantalla */
@media (max-width: 600px) and (orientation: portrait) {
  main .hero .hero__sub, main .hero .link-under { display: none; }
  main .hero .eyebrow { margin-bottom: 16px; }
  main .hero__ctas { margin-top: 28px; }
  main .hero__ctas .btn { width: 100%; justify-content: center; }
}
.stage__canvas canvas { width: 100% !important; height: 100% !important; }
.stage__fallback {
  position: absolute;
  top: 50%; left: 50%;
  width: min(900px, 90vw);
  height: auto;
  aspect-ratio: 625 / 427;
  transform: translate(-50%, -50%);
  fill: none;
  stroke: var(--orange);
  stroke-width: 0.6;
  opacity: 0;
  transition: opacity 1s;
}
.stage.is-fallback .stage__fallback, html:not(.js) .stage__fallback { opacity: 0.25; }

main, .footer { position: relative; z-index: 1; }

/* --------------------------------------------------------------------------
   Cabecera
   -------------------------------------------------------------------------- */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 18px var(--gutter);
  transition: transform 0.6s var(--ease), background 0.4s;
}
.site-header.is-hidden { transform: translateY(-110%); }
.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(var(--bg-rgb), 0.94);
  border-bottom: 1px solid var(--line);
  opacity: 0;
  transition: opacity 0.4s;
}
.site-header.is-scrolled::before { opacity: 1; }

.brand { display: flex; align-items: center; gap: 14px; margin-right: auto; flex: none; }
.brand__logo { width: 50px; height: 34px; fill: var(--orange); transition: transform 0.8s var(--ease-out); }
.brand:hover .brand__logo { transform: rotate(-12deg) scale(1.08); }
.brand__name {
  font-family: var(--f-display);
  font-size: 27px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1;
}
.brand__name em {
  font-style: normal;
  color: var(--orange);
  margin-left: 0.22em;
}

.nav { display: flex; gap: 32px; font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }

.menu-toggle { display: none; width: 44px; height: 44px; position: relative; }
.menu-toggle i {
  position: absolute; left: 10px; right: 10px; height: 1.5px;
  background: var(--ink);
  transition: transform 0.5s var(--ease);
}
.menu-toggle i:nth-of-type(1) { top: 17px; }
.menu-toggle i:nth-of-type(2) { top: 26px; }
.menu-open .menu-toggle i:nth-of-type(1) { transform: translateY(4.5px) rotate(45deg); }
.menu-open .menu-toggle i:nth-of-type(2) { transform: translateY(-4.5px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: var(--bg-2);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 110px var(--gutter) 40px;
  clip-path: circle(0% at calc(100% - 38px) 38px);
  transition: clip-path 0.9s var(--ease);
  visibility: hidden;
}
.menu-open .mobile-menu { clip-path: circle(150% at calc(100% - 38px) 38px); visibility: visible; }
.mobile-menu nav { display: flex; flex-direction: column; gap: 6px; }
.mobile-menu nav a {
  font-family: var(--f-display);
  font-size: clamp(2.6rem, 13vw, 4.5rem);
  line-height: 1;
  text-transform: uppercase;
  display: flex; align-items: baseline; gap: 14px;
}
.mobile-menu nav i { font-style: normal; font-family: var(--f-mono); font-size: 12px; color: var(--orange); }
.mobile-menu__foot { display: flex; flex-direction: column; gap: 8px; font-family: var(--f-mono); font-size: 13px; color: var(--ink-2); }

@media (max-width: 1100px) {
  .nav, .header-cta { display: none; }
  .menu-toggle { display: block; flex: none; }
  .site-header { gap: 12px; }
  .brand { min-width: 0; }
}
@media (max-width: 420px) {
  .brand__logo { width: 40px; height: 27px; }
  .brand__name { font-size: 23px; }
}
@media (max-width: 360px) {
  .brand { gap: 10px; }
  .brand__logo { width: 34px; height: 23px; }
  .brand__name { font-size: 20px; }
}

.theme-toggle {
  position: relative;
  flex: none; /* en móvil la cabecera lo comprimía y el círculo se deformaba */
  width: 40px; height: 40px;
  aspect-ratio: 1;
  padding: 0;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  transition: border-color 0.3s, color 0.3s;
}
.theme-toggle:hover { border-color: var(--orange); color: var(--orange); }
.theme-toggle svg { width: 18px; height: 18px; position: absolute; transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s; }
.theme-toggle .i-sun { opacity: 0; transform: rotate(-90deg) scale(0.6); }
[data-theme="light"] .theme-toggle .i-sun { opacity: 1; transform: none; }
[data-theme="light"] .theme-toggle .i-moon { opacity: 0; transform: rotate(90deg) scale(0.6); }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding: 140px var(--gutter) clamp(40px, 7vh, 80px);
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(var(--bg-rgb), 0.85) 0%, rgba(var(--bg-rgb), 0.35) 45%, rgba(var(--bg-rgb), 0) 70%);
  pointer-events: none;
}
.hero__content { max-width: 1100px; }

.eyebrow { display: flex; align-items: center; gap: 10px; color: var(--ink-2); margin-bottom: 28px; }
.eyebrow svg { width: 10px; height: 11px; fill: var(--orange); animation: spin 8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.hero__title { font-weight: 400; }
.hero__kicker {
  display: block;
  max-width: 34ch;
  font-family: var(--f-body);
  font-size: clamp(1rem, 1.4vw, 1.25rem);
  font-weight: 500;
  color: var(--orange);
  margin-bottom: 18px;
}
/* rotador de disciplinas: sustituye a la frase estática cuando hay JavaScript */
.kicker__rotator { display: none; }
.has-rotator .kicker__static {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.has-rotator .kicker__rotator {
  display: block;
  max-width: none;
  font-size: clamp(1.3rem, 2.6vw, 2.3rem);
  white-space: nowrap; /* la palabra nunca salta de línea mientras se descifra */
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.kicker__lead {
  display: block;
  margin-bottom: 4px;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 400;
}
.kicker__word {
  display: inline-block;
  color: var(--orange);
  font-weight: 600;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 2px no-repeat;
  padding-bottom: 2px;
}
.kicker__caret {
  display: inline-block;
  width: 0.5em;
  height: 0.9em;
  margin-left: 4px;
  vertical-align: -0.08em;
  background: var(--orange);
  animation: caret 1s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }
.hero__big {
  display: block;
  font-family: var(--f-display);
  text-transform: uppercase;
  font-size: clamp(4rem, 13.5vw, 15rem);
  line-height: 0.84;
  letter-spacing: -0.015em;
}
.hero__big .line { display: block; overflow: hidden; padding-top: 0.04em; }
.hero__big b { font-weight: 400; color: var(--orange); }

.hero__sub {
  max-width: 46ch;
  margin-top: 32px;
  font-size: clamp(1rem, 1.25vw, 1.2rem);
  color: var(--ink-2);
}
.hero__ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; margin-top: 36px; }

.readout {
  position: absolute;
  right: var(--gutter);
  bottom: clamp(40px, 7vh, 80px);
  width: 210px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--ink-3);
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.readout__title { text-transform: uppercase; color: var(--ink-2); margin-bottom: 12px; line-height: 1.5; }
.readout__title span { color: var(--ink-3); }
.readout dl { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; }
.readout dl div { display: flex; justify-content: space-between; }
.readout dt { color: var(--orange); }
.readout dd { color: var(--ink); font-variant-numeric: tabular-nums; }

.scroll-cue {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 24px;
  width: fit-content;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.scroll-cue i { width: 1px; height: 44px; background: var(--line); position: relative; overflow: hidden; }
.scroll-cue i::after {
  content: '';
  position: absolute; left: 0; top: 0;
  width: 1px; height: 50%;
  background: var(--orange);
  animation: drip 2s var(--ease) infinite;
}
@keyframes drip { from { transform: translateY(-100%); } to { transform: translateY(200%); } }

@media (max-width: 900px) {
  .hero { padding-bottom: 90px; }
  .hero::before { background: linear-gradient(0deg, rgba(var(--bg-rgb), 0.9) 10%, rgba(var(--bg-rgb), 0.2) 70%); }
  .readout { display: none; }
}
@media (max-width: 1100px) { .scroll-cue { display: none; } }
/* en vertical: abajo y centrado, en el espacio reservado al final de la primera pantalla */
@media (max-width: 1100px) and (orientation: portrait) {
  .scroll-cue { display: flex; bottom: 20px; gap: 8px; }
  .scroll-cue i { height: 30px; }
}

/* --------------------------------------------------------------------------
   Marquee
   -------------------------------------------------------------------------- */

.marquee {
  border-block: 1px solid var(--line);
  padding: 18px 0;
  overflow: hidden;
  background: rgba(var(--bg-rgb), 0.55);
}
.marquee__row { overflow: hidden; }
.marquee__track {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 44px);
  width: max-content;
  padding-right: clamp(20px, 3vw, 44px);
  font-family: var(--f-display);
  font-size: clamp(2.4rem, 6.5vw, 6.5rem);
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  will-change: transform;
}
.marquee__track svg { width: 0.32em; height: 0.35em; fill: var(--orange); flex: none; }
.marquee__row--outline .marquee__track span { color: transparent; -webkit-text-stroke: 1px var(--ink-3); }
.marquee__row--outline .marquee__track svg { fill: var(--ink-3); }

html:not(.js) .marquee__track, .no-motion .marquee__track { animation: marquee 40s linear infinite; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* --------------------------------------------------------------------------
   Enfoque / manifiesto
   -------------------------------------------------------------------------- */

.manifesto { padding: clamp(100px, 16vw, 220px) var(--gutter); }
.manifesto__text {
  max-width: 34ch;
  font-size: clamp(1.5rem, 3.1vw, 3.1rem);
  line-height: 1.2;
  letter-spacing: -0.025em;
  font-weight: 400;
  color: var(--ink-2);
}
.manifesto__text .hl { color: var(--orange); font-weight: 600; }

.manifesto__cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 420px));
  gap: clamp(32px, 6vw, 96px);
  margin-top: clamp(64px, 9vw, 130px);
  margin-left: auto;
  width: fit-content;
  color: var(--ink-2);
}
@media (max-width: 760px) { .manifesto__cols { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   Soluciones: índice
   -------------------------------------------------------------------------- */

.solutions { padding: clamp(60px, 8vw, 120px) var(--gutter) clamp(80px, 10vw, 140px); background: linear-gradient(to bottom, transparent, var(--bg) 30%); }
.solutions__head { display: grid; grid-template-columns: 1fr; margin-bottom: clamp(48px, 6vw, 90px); }
.solutions__intro { max-width: 44ch; margin-top: 28px; color: var(--ink-2); justify-self: end; }

.index-list { position: relative; }
/* líneas separadoras como elementos propios: se dibujan de izquierda a derecha al aparecer */
.index-list li { position: relative; }
.index-list li::before, .index-list li:last-child::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: var(--line);
  transform-origin: left;
  transform: scaleX(var(--line-p, 1));
}
.index-list li::before { top: 0; }
.index-list li:last-child::after { bottom: 0; }

.index-list a {
  position: relative;
  display: grid;
  grid-template-columns: 70px 1fr auto 44px;
  align-items: center;
  gap: 24px;
  padding: 26px 0;
  isolation: isolate;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
/* relleno naranja: barrido horizontal rápido (solo transform: sin recalcular maquetación) */
.index-list a::before {
  content: '';
  position: absolute;
  inset: 0 calc(var(--gutter) * -1);
  z-index: -1;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.il__num, .il__title, .il__tags {
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), color 0.2s;
  will-change: transform;
}
.il__num { font-family: var(--f-mono); font-size: 13px; color: var(--orange); }
.il__title {
  font-family: var(--f-display);
  font-size: clamp(1.5rem, 3.2vw, 3rem);
  line-height: 1;
  text-transform: uppercase;
}
.il__tags { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.il__arrow {
  width: 28px; height: 28px;
  justify-self: end;
  transform: rotate(90deg);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), color 0.2s;
}

/* efectos de ratón solo donde hay ratón: en táctil no se quedan "enganchados" */
@media (hover: hover) and (pointer: fine) {
  .index-list a:hover::before { transform: scaleX(1); transform-origin: left; }
  .index-list a:hover { color: var(--on-accent); }
  .index-list a:hover .il__num { color: var(--on-accent); transform: translateX(14px); }
  .index-list a:hover .il__title { transform: translateX(20px); }
  .index-list a:hover .il__tags { color: rgba(var(--bg-rgb), 0.7); transform: translateX(-8px); }
  .index-list a:hover .il__arrow { transform: rotate(0deg) translateX(-6px); }
  /* las demás filas se atenúan: la elegida destaca */
  .index-list:hover li:not(:hover) a { opacity: 0.45; }
  .index-list li a { transition: opacity 0.3s; }
}
/* táctil: destello breve al pulsar */
@media (hover: none) {
  .index-list a:active::before { transform: scaleX(1); transform-origin: left; transition-duration: 0.15s; }
  .index-list a:active { color: var(--on-accent); }
  .index-list a:active .il__num { color: var(--on-accent); }
}

@media (max-width: 760px) {
  .index-list a { grid-template-columns: 38px 1fr 24px; gap: 14px; padding: 20px 0; }
  .il__tags { display: none; }
  .il__arrow { width: 20px; height: 20px; }
}

/* --------------------------------------------------------------------------
   Soluciones: paneles apilados
   -------------------------------------------------------------------------- */

.stack { position: relative; }
.service:nth-child(1) { --panel-bg: var(--p1); }
.service:nth-child(2) { --panel-bg: var(--p2); }
.service:nth-child(3) { --panel-bg: var(--p3); }
.service:nth-child(4) { --panel-bg: var(--p4); }
.service:nth-child(5) { --panel-bg: var(--p5); }
.service:nth-child(6) { --panel-bg: var(--p6); }
.service:nth-child(7) { --panel-bg: var(--p7); }
.service {
  position: sticky;
  top: 0;
  min-height: 100vh;
  min-height: 100svh;
}
.service__inner {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(32px, 4vw, 72px);
  padding: 100px var(--gutter) 40px;
  background: var(--panel-bg, var(--bg-2));
  border-top: 1px solid var(--line);
  border-radius: 18px 18px 0 0;
  transform-origin: 50% 0;
  box-shadow: 0 -30px 60px var(--panel-shadow);
  will-change: transform, opacity;
}

.service__body { display: flex; flex-direction: column; gap: 18px; align-self: center; padding-bottom: 20px; }
.service__body > p { color: var(--ink-2); max-width: 52ch; font-size: 15px; }
.service__body > p.service__lead { color: var(--ink); font-size: clamp(1.05rem, 1.35vw, 1.3rem); line-height: 1.45; max-width: 44ch; }

.service__meta {
  display: flex;
  align-items: baseline;
  gap: 18px;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.service__num { color: var(--orange); }
.service__num span { color: var(--ink-3); }

.service__title {
  font-family: var(--f-display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(2.2rem, 4.4vw, 4.6rem);
  line-height: 0.9;
  margin-bottom: 6px;
}

.service__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin-top: 8px; }
.service__actions .link-arrow { margin-top: 0; }
.service__apps { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
.service__apps .micro, .service__result .micro { color: var(--ink-3); }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags li {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.03em;
  padding: 6px 10px;
  border: 1px solid var(--line);
  color: var(--ink-2);
  transition: border-color 0.3s, color 0.3s;
}
.tags li:hover { border-color: var(--orange); color: var(--ink); }

.service__result {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 20px;
  border-left: 2px solid var(--orange);
  background: rgba(var(--orange-rgb), 0.05);
  color: var(--ink) !important;
}

/* marco técnico de las figuras */
.visual {
  position: relative;
  min-height: 420px;
  background: var(--panel-bg, var(--bg-2));
  --tick: 18px;
}
.visual canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.visual::before, .visual::after {
  content: '';
  position: absolute;
  width: var(--tick);
  height: var(--tick);
  z-index: 2;
  pointer-events: none;
}
.visual::before { top: 0; left: 0; border-top: 1px solid var(--ink-3); border-left: 1px solid var(--ink-3); }
.visual::after { right: 0; bottom: 0; border-bottom: 1px solid var(--ink-3); border-right: 1px solid var(--ink-3); }
.visual figcaption {
  position: absolute;
  left: 0; bottom: -26px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-3);
}

@media (max-width: 1100px) {
  .service { position: relative; min-height: 0; top: 0 !important; }
  .service__inner {
    min-height: 0;
    grid-template-columns: 1fr;
    padding: 64px var(--gutter) 72px;
    border-radius: 14px 14px 0 0;
    box-shadow: none;
    will-change: auto;
  }
  .visual { order: -1; min-height: 0; aspect-ratio: 16 / 10; max-height: 70vh; }
  .service__body { max-width: 720px; }
}
@media (max-width: 600px) {
  .visual { aspect-ratio: 4 / 3; }
}

/* --------------------------------------------------------------------------
   Método
   -------------------------------------------------------------------------- */

.method { padding: clamp(100px, 14vw, 200px) var(--gutter) clamp(60px, 8vw, 120px); background: var(--bg); position: relative; }
.method__line { width: 100%; height: 110px; margin: clamp(40px, 5vw, 70px) 0 10px; overflow: visible; }
.method__line path {
  fill: none;
  stroke: var(--orange);
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(20px, 3vw, 48px); }
.steps li { border-top: 1px solid var(--line); padding-top: 22px; }
.step__num {
  display: block;
  font-family: var(--f-display);
  font-size: clamp(3.5rem, 6vw, 6rem);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px var(--ink-3);
  margin-bottom: 18px;
  transition: color 0.5s, -webkit-text-stroke-color 0.5s;
}
.steps li:hover .step__num { color: var(--orange); -webkit-text-stroke-color: var(--orange); }
.steps h3 {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: 1.9rem;
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 12px;
}
.steps p { color: var(--ink-2); font-size: 15px; max-width: 30ch; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; row-gap: 48px; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } .method__line { display: none; } }

/* --------------------------------------------------------------------------
   Escenarios
   -------------------------------------------------------------------------- */

.scenarios { padding: clamp(60px, 8vw, 120px) var(--gutter) clamp(100px, 14vw, 200px); background: linear-gradient(to bottom, var(--bg) 60%, transparent); }
.scenarios__intro { max-width: 44ch; margin-top: 28px; color: var(--ink-2); }
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: clamp(40px, 5vw, 64px);
}
.filters button {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  padding: 10px 14px;
  border: 1px solid var(--line);
  color: var(--ink-2);
  transition: background 0.3s, border-color 0.3s, color 0.3s;
}
.filters button:hover { border-color: var(--ink-3); color: var(--ink); }
.filters button.is-active { background: var(--orange); border-color: var(--orange); color: var(--on-accent); }

.example-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}
.example {
  --mx: 50%;
  --my: 50%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 260px;
  padding: 26px 24px;
  border: 1px solid var(--line);
  background:
    radial-gradient(360px circle at var(--mx) var(--my), rgba(var(--orange-rgb), 0.1), transparent 60%),
    rgba(var(--bg2-rgb), 0.75);
  transition: border-color 0.4s, transform 0.6s var(--ease-out);
}
.example:hover { border-color: rgba(var(--orange-rgb), 0.45); transform: translateY(-4px); }
.example[hidden] { display: none; }
.example__num { font-family: var(--f-mono); font-size: 12px; color: var(--orange); margin-bottom: auto; }
.example h3 {
  font-family: var(--f-display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(1.45rem, 1.9vw, 1.9rem);
  line-height: 0.98;
  margin-top: 28px;
}
.example p { color: var(--ink-2); font-size: 15px; }
.combo { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; font-family: var(--f-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; }
.combo li { color: var(--orange); }
.combo li + li::before { content: '+'; color: var(--ink-3); margin-right: 8px; }

.examples__more { display: flex; justify-content: center; margin-top: 40px; }
.examples__more[hidden] { display: none; }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink-3); }
.btn--ghost::before { background: var(--orange); }
.btn--ghost:hover { color: var(--on-accent); }

@media (max-width: 1100px) { .example-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .example-grid { grid-template-columns: 1fr; }
  .example { min-height: 0; }
  .example h3 { margin-top: 16px; }
  /* filtros en una fila deslizable */
  .filters { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .filters button { flex: none; }
}

/* --------------------------------------------------------------------------
   Contacto
   -------------------------------------------------------------------------- */

.contact { padding: clamp(100px, 14vw, 200px) var(--gutter) clamp(80px, 10vw, 140px); }
.contact__title {
  font-family: var(--f-display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(2.6rem, 8.5vw, 9.5rem);
  line-height: 0.9;
}
.contact__title .line { display: block; }
.contact__title .line--outline { color: transparent; -webkit-text-stroke: 1.5px var(--orange); }

.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(40px, 7vw, 120px);
  margin-top: clamp(56px, 7vw, 100px);
}
.contact__info { display: flex; flex-direction: column; gap: 14px; }
.contact__info p { color: var(--ink-2); max-width: 40ch; margin-bottom: 24px; font-size: 1.1rem; }
.contact__big {
  position: relative;
  width: fit-content;
  font-family: var(--f-display);
  font-size: clamp(1.6rem, 3vw, 2.8rem);
  line-height: 1.1;
  text-transform: uppercase;
}
.contact__big::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 2px;
  height: 2px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s var(--ease);
}
.contact__big:hover::after { transform: scaleX(1); }

.form {
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding: clamp(24px, 3vw, 40px);
  border: 1px solid var(--line);
  background: rgba(var(--bg-rgb), 0.9);
}
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field span, .chips legend {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.field input, .field textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 8px 0 10px;
  border-radius: 0;
  resize: vertical;
  transition: border-color 0.3s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--orange); }
.field input:user-invalid, .field textarea:user-invalid { border-color: var(--orange); }

.chips { border: 0; padding: 0; margin: 0; min-width: 0; }
.chips__list { display: flex; flex-wrap: wrap; gap: 8px; }
.chips legend { margin-bottom: 12px; padding: 0; }
.chips label { position: relative; cursor: pointer; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips span {
  display: inline-block;
  font-family: var(--f-mono);
  font-size: 12px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  color: var(--ink-2);
  transition: all 0.3s;
}
.chips label:hover span { border-color: var(--ink-3); color: var(--ink); }
.chips input:checked + span { background: var(--orange); border-color: var(--orange); color: var(--on-accent); }
.chips input:focus-visible + span { outline: 2px solid var(--orange); outline-offset: 2px; }

.consent { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.consent input { accent-color: var(--orange); margin-top: 4px; width: 16px; height: 16px; flex: none; }
.consent a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

.form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.form__status { font-family: var(--f-mono); font-size: 12px; color: var(--ink-2); max-width: 40ch; }
.form__status[data-kind="ok"] { color: var(--orange); }
.form__status[data-kind="error"] { color: var(--ink); }
.form__status[data-kind="error"]::before { content: '! '; color: var(--orange); }
.form button[disabled] { opacity: 0.6; pointer-events: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 900px) {
  .contact__grid { grid-template-columns: 1fr; }
  .contact__grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
}

/* formulario compacto en móvil: cabe en una pantalla */
@media (max-width: 640px) {
  .form { gap: 16px; padding: 20px 18px; }
  .form__row { gap: 14px; }
  .field { gap: 4px; }
  .field input, .field textarea { padding: 6px 0 8px; }
  .chips legend { margin-bottom: 8px; }
  .chips__list { flex-wrap: nowrap; overflow-x: auto; margin-inline: -18px; padding-inline: 18px; scrollbar-width: none; }
  .chips__list::-webkit-scrollbar { display: none; }
  .chips label { flex: none; }
  .chips span { padding: 7px 10px; }
  .form__foot { gap: 12px; }
  .form__foot .btn { width: 100%; justify-content: center; }
  .contact__info p { margin-bottom: 8px; }
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.footer {
  padding: clamp(56px, 7vw, 96px) var(--gutter) 28px;
  background: var(--bg-2);
  border-top: 1px solid var(--line);
}
.footer__top {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: clamp(32px, 4vw, 64px);
}
.footer__brand { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.footer__brand .brand { margin: 0; }
.footer__brand p { color: var(--ink-2); max-width: 34ch; font-size: 15px; }
.footer__col { display: flex; flex-direction: column; gap: 10px; font-size: 15px; color: var(--ink-2); }
.footer__col h2 {
  font-family: var(--f-mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 6px;
}
.footer__col a { width: fit-content; transition: color 0.3s; }
.footer__col a:hover { color: var(--orange); }
@media (max-width: 1000px) { .footer__top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer__top { grid-template-columns: 1fr; } }

.footer__bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px 32px;
  margin-top: clamp(48px, 6vw, 80px);
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--ink-3);
}
.footer__bar nav { display: flex; flex-wrap: wrap; gap: 20px; }
.footer__bar a:hover { color: var(--orange); }

/* --------------------------------------------------------------------------
   Cursor
   -------------------------------------------------------------------------- */

.cursor {
  position: fixed;
  left: 0; top: 0;
  z-index: 150;
  width: 0; height: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}
.cursor.is-visible { opacity: 1; }
.cursor::before {
  content: '';
  position: absolute;
  left: -18px; top: -18px;
  width: 36px; height: 36px;
  border: 1px solid rgba(var(--ink-rgb), 0.55);
  border-radius: 50%;
  transition: transform 0.5s var(--ease-out), background 0.3s, border-color 0.3s;
}
.cursor.is-hover::before { transform: scale(0.45); background: var(--orange); border-color: var(--orange); }
.cursor.has-label::before { transform: scale(2.3); background: var(--orange); border-color: var(--orange); }
.cursor__label {
  position: absolute;
  left: 0; top: 0;
  transform: translate(-50%, -50%);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--on-accent);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s;
}
.cursor.has-label .cursor__label { opacity: 1; }

/* --------------------------------------------------------------------------
   Banner de cookies
   -------------------------------------------------------------------------- */

.consent-banner {
  position: fixed;
  right: var(--gutter);
  bottom: 20px;
  z-index: 120;
  width: min(440px, calc(100vw - 2 * var(--gutter)));
  padding: 22px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  font-size: 14px;
  color: var(--ink-2);
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.6s var(--ease-out), opacity 0.4s;
}
.consent-banner.is-open { transform: none; opacity: 1; }
.consent-banner p { margin-bottom: 16px; }
.consent-banner a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.consent-banner__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.consent-banner button {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 11px 16px;
  border: 1px solid var(--line);
  transition: all 0.3s;
}
.consent-banner button:hover { border-color: var(--ink); }
.consent-banner button[data-consent="accept"] { background: var(--orange); border-color: var(--orange); color: var(--on-accent); }

/* --------------------------------------------------------------------------
   Páginas legales
   -------------------------------------------------------------------------- */

.legal { max-width: 760px; margin: 0 auto; padding: 140px var(--gutter) 100px; }
.legal h1 { font-family: var(--f-display); font-weight: 400; text-transform: uppercase; font-size: clamp(2.6rem, 7vw, 5rem); line-height: 0.95; margin-bottom: 40px; }
.legal h2 { font-family: var(--f-mono); font-weight: 500; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--orange); margin: 44px 0 14px; }
.legal p, .legal li { color: var(--ink-2); margin-bottom: 12px; }
.legal ul { list-style: square; padding-left: 20px; }
.legal a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.legal table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 12px 0 20px; }
.legal th, .legal td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); color: var(--ink-2); vertical-align: top; }
.legal th { font-family: var(--f-mono); font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); }
.legal .todo { color: var(--orange); }
.legal-back { position: fixed; top: 22px; right: var(--gutter); z-index: 60; }

/* --------------------------------------------------------------------------
   Movimiento reducido
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .kicker__caret { animation: none; }
  .eyebrow svg, .scroll-cue i::after { animation: none; }
  .marquee__track { animation: none !important; }
}
