/* =========================================================
   BESPI Landing — Visual System
   70% neutros · 20% teal · 10% coral
   ========================================================= */

:root {
  /* Brand */
  --teal-50:  #F0FDFA;
  --teal-100: #CCFBF1;
  --teal-500: #14B8A6;
  --teal-600: #0D9488;
  --teal-700: #0F766E;
  --teal-900: #134E4A;
  --coral:    #F97316;

  --slate-900: #0F172A;
  --slate-800: #1E293B;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748B;
  --slate-400: #94A3B8;
  --slate-300: #CBD5E1;
  --slate-200: #E2E8F0;
  --slate-100: #F1F5F9;
  --slate-50:  #F8FAFC;
  --white:     #FFFFFF;

  /* Mode-aware (dark hero / light body) */
  --bg:        var(--slate-900);
  --bg-alt:    #0B1220;
  --fg:        var(--white);
  --muted:     var(--slate-400);
  --rule:      rgba(255, 255, 255, 0.08);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  --max: 1440px;
  --gutter: clamp(20px, 4vw, 64px);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-font-smoothing: antialiased; }
html, body { width: 100%; }
html.lenis { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-scrolling iframe { pointer-events: none; }
body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, sans-serif;
  background: var(--bg);
  color: var(--fg);
  font-size: 16px;
  line-height: 1.5;
  font-feature-settings: "ss01", "cv11";
  overflow-x: hidden;
}

/* WebGL background canvas — sits behind everything */
#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  display: block;
}
.loader, .nav, .cursor, main, section, header, footer, .chapter { position: relative; z-index: 1; }
.loader { z-index: 9999; }
.nav { z-index: 100; }
.cursor { z-index: 9998; }
.chapter { z-index: 50; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

.mono { font-family: "JetBrains Mono", ui-monospace, monospace; font-feature-settings: "ss03"; }
.tab { font-variant-numeric: tabular-nums; }
.serif-i { font-style: italic; }

/* =========================================================
   1. LOADER
   ========================================================= */
.loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--slate-900);
  opacity: 1;
  transition: opacity 0.7s var(--ease-in-out);
  overflow: hidden;
}
.loader.exiting {
  opacity: 0;
  pointer-events: none;
}

/* ===== VIDEO LOADER — bloque reversible (borrar para revertir) ===== */
.loader-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.4s var(--ease-out);
  filter: saturate(0.95) brightness(1.08) contrast(1.04);
}
.loader-video.is-on { opacity: 1; }
/* Velo: mantiene legible el contenido del loader sobre el video */
.loader-video-veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(2, 6, 23, 0.08) 0%, rgba(2, 6, 23, 0.42) 100%),
    linear-gradient(to bottom, rgba(2, 6, 23, 0.38), rgba(2, 6, 23, 0.16) 50%, rgba(2, 6, 23, 0.5));
  pointer-events: none;
}
/* Parche: difumina la marca de agua del video (estrella IA, abajo-derecha) */
.loader-video-patch {
  position: absolute;
  right: -1%;
  bottom: 6.5%;
  width: clamp(150px, 14vw, 220px);
  height: clamp(150px, 14vw, 220px);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  border-radius: 50%;
  /* núcleo sólido amplio centrado en la marca de agua */
  -webkit-mask-image: radial-gradient(circle at center, #000 42%, transparent 72%);
  mask-image: radial-gradient(circle at center, #000 42%, transparent 72%);
  pointer-events: none;
}
/* ===== fin bloque VIDEO LOADER ===== */

/* fine grid texture */
.loader::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 80px 80px;
  pointer-events: none;
}

.loader-icon {
  position: absolute;
  top: clamp(28px, 3.5vw, 44px);
  left: clamp(28px, 3.5vw, 44px);
  opacity: 0;
  transform: translateY(-12px);
  animation: rise 0.7s var(--ease-out) 0.1s forwards;
}
.loader-icon img { width: clamp(48px, 5vw, 68px); height: auto; }

/* Loader: animación 3D de la B (gira sola mientras carga) */
.loader-logo-3d {
  position: relative;
  width: clamp(72px, 8vw, 110px);
  aspect-ratio: 1 / 1;
  opacity: 0;
  transition: opacity .45s ease;
}
.loader-logo-3d.is-ready { opacity: 1; }
.loader-logo-3d canvas { position: absolute; inset: 0; }
.loader-3d-fallback {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity .5s ease;
}
.loader-logo-3d.is-ready .loader-3d-fallback { opacity: 0; }

.loader-meta {
  position: absolute;
  top: clamp(36px, 3.8vw, 52px);
  right: clamp(28px, 3.5vw, 44px);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--slate-400);
  text-align: right;
  opacity: 0;
  animation: rise 0.7s var(--ease-out) 0.15s forwards;
  line-height: 1.7;
}
.loader-meta .dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--teal-500);
  margin-right: 8px;
  vertical-align: middle;
  box-shadow: 0 0 12px var(--teal-500);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

.loader-words {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 24px clamp(60px, 12vh, 140px);
  pointer-events: none;
}
.loader-word {
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: clamp(40px, 5.8vw, 88px);
  letter-spacing: -0.02em;
  color: var(--white);
  line-height: 1;
  text-align: center;
  opacity: 0;
  position: absolute;
  white-space: nowrap;
  max-width: 90vw;
}
.loader-word .accent {
  color: var(--teal-400, #2DD4BF);
  font-weight: 600;
  /* glow afinado al brillo de las líneas del video */
  text-shadow:
    0 0 22px rgba(45, 212, 191, 0.6),
    0 0 80px rgba(20, 184, 166, 0.35);
}
.loader-word.cycle  { animation: wordCycle 0.9s var(--ease-in-out) forwards; }
.loader-word.last   { animation: phraseIn 1.6s var(--ease-out) forwards; }
@keyframes wordCycle {
  0%   { opacity: 0; transform: translateY(24px); filter: blur(8px); }
  20%, 75% { opacity: 1; transform: translateY(0); filter: blur(0); }
  100% { opacity: 0; transform: translateY(-24px); filter: blur(8px); }
}
@keyframes phraseIn {
  0%   { opacity: 0; letter-spacing: 0.18em; filter: blur(10px); }
  100% { opacity: 1; letter-spacing: -0.02em; filter: blur(0); }
}

.loader-counter {
  position: absolute;
  bottom: clamp(28px, 3.5vw, 44px);
  right: clamp(28px, 3.5vw, 44px);
  display: flex;
  align-items: flex-end;
  gap: 12px;
  opacity: 0;
  transform: translateY(12px);
  animation: rise 0.7s var(--ease-out) 0.1s forwards;
}
.loader-counter-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--slate-500);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  padding-bottom: 12px;
  line-height: 1;
}
.loader-counter-num {
  font-family: "JetBrains Mono", monospace;
  font-weight: 300;
  font-size: clamp(40px, 5.5vw, 76px);
  letter-spacing: -0.04em;
  color: var(--white);
  line-height: 0.85;
  font-variant-numeric: tabular-nums;
}
.loader-counter-num .dim { color: var(--slate-700); }
.loader-counter-total {
  font-family: "JetBrains Mono", monospace;
  font-size: clamp(14px, 1.2vw, 18px);
  color: var(--slate-500);
  letter-spacing: 0.05em;
  padding-bottom: 16px;
}

.loader-track {
  display: none; /* barra de carga inferior eliminada */
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.loader-fill {
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--teal-500);
  box-shadow: 0 0 14px rgba(20, 184, 166, 0.45);
  transition: transform 0.1s linear;
}

.loader-corner {
  position: absolute;
  bottom: clamp(28px, 3.5vw, 44px);
  left: clamp(28px, 3.5vw, 44px);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--slate-500);
  line-height: 1.7;
  opacity: 0;
  animation: rise 0.7s var(--ease-out) 0.2s forwards;
}
.loader-corner .v { color: var(--white); }

@keyframes rise { to { opacity: 1; transform: translateY(0); } }

/* =========================================================
   2. NAV
   ========================================================= */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 20px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.4s var(--ease-out), border-color 0.4s var(--ease-out);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(0px);
}
.nav.scrolled {
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--rule);
  padding: 14px var(--gutter);
}
.nav-logo {
  display: flex;
  align-items: center;
}
.nav-logo img {
  height: 64px;
  width: auto;
  transition: height 0.4s var(--ease-out);
}
.nav.scrolled .nav-logo img { height: 48px; }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 36px;
  font-size: 14px;
  font-weight: 500;
  color: var(--slate-300);
}
.nav-menu a { transition: color 0.2s; position: relative; }
.nav-menu a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  width: 0; height: 1px;
  background: var(--teal-500);
  transition: width 0.3s var(--ease-out);
}
.nav-menu a:hover { color: var(--white); }
.nav-menu a:hover::after { width: 100%; }

.nav-cta {
  background: var(--white);
  color: var(--slate-900);
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.2s var(--ease-out), background 0.2s;
}
.nav-cta:hover { transform: translateY(-1px); background: var(--teal-100); }
.nav-cta svg { width: 14px; height: 14px; }

.nav-right { display: flex; align-items: center; gap: 14px; }

/* --- botón hamburguesa (sólo móvil/tablet) --- */
.nav-burger {
  display: none;
  width: 44px; height: 44px;
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(8px);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.nav-burger span {
  display: block;
  width: 16px; height: 1.5px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.32s var(--ease-out), opacity 0.2s;
}
.nav-burger.open span:first-child { transform: translateY(3.25px) rotate(45deg); }
.nav-burger.open span:last-child { transform: translateY(-3.25px) rotate(-45deg); }

/* --- panel de navegación móvil --- */
.nav-drawer {
  position: fixed;
  inset: 0;
  z-index: 99;
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 96px var(--gutter) 48px;
  background: rgba(10, 16, 30, 0.94);
  backdrop-filter: blur(18px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.36s var(--ease-out), visibility 0.36s;
}
.nav-drawer.open { opacity: 1; visibility: visible; pointer-events: auto; }
.nav-drawer-links { display: flex; flex-direction: column; }
.nav-drawer-links a {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(30px, 9vw, 44px);
  line-height: 1.05;
  color: var(--white);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}
.nav-drawer.open .nav-drawer-links a { opacity: 1; transform: none; }
.nav-drawer.open .nav-drawer-links a:nth-child(1) { transition-delay: 0.06s; }
.nav-drawer.open .nav-drawer-links a:nth-child(2) { transition-delay: 0.12s; }
.nav-drawer.open .nav-drawer-links a:nth-child(3) { transition-delay: 0.18s; }
.nav-drawer.open .nav-drawer-links a:nth-child(4) { transition-delay: 0.24s; }
.nav-drawer-links .nd-n {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--teal-500);
}
.nav-drawer-foot {
  margin-top: 28px;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--slate-400);
}
body.nav-open { overflow: hidden; }

@media (max-width: 860px) {
  .nav-menu { display: none; }
  .nav-burger { display: flex; }
  .nav-drawer { display: flex; }
  .nav-logo img { height: 46px; }
  .nav.scrolled .nav-logo img { height: 38px; }
  /* la CTA compite con el logo en pantallas angostas: la deja el drawer */
  .nav-cta { padding: 11px 16px; }
}
@media (max-width: 420px) {
  .nav-cta { display: none; }
}

/* =========================================================
   3. HERO
   ========================================================= */
.hero {
  position: relative;
  min-height: 100vh;
  padding: clamp(104px, 12vh, 136px) var(--gutter) 64px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: clamp(28px, 4.5vh, 52px);
  background: rgba(15, 23, 42, 0.78);
  overflow: hidden;
}

/* subtle grid background */
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 100px 100px;
  mask-image: radial-gradient(ellipse at 70% 30%, black 0%, transparent 70%);
  pointer-events: none;
}

/* glow orb */
.hero-orb {
  position: absolute;
  top: -200px; right: -180px;
  width: 700px; height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(13, 148, 136, 0.35) 0%, transparent 65%);
  filter: blur(40px);
  pointer-events: none;
  animation: orbFloat 12s ease-in-out infinite;
}
@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(-30px, 40px) scale(1.05); }
}

/* Hero brand mark — anchored on the right, vertically centered, slow float */
.hero-mark {
  position: absolute;
  top: 50%;
  right: clamp(8px, 2vw, 36px);
  left: auto;
  transform: translateY(-50%);
  width: clamp(280px, 48vw, 800px);
  height: auto;
  pointer-events: none;
  user-select: none;
  opacity: 0;
  filter: drop-shadow(0 28px 60px rgba(13, 148, 136, 0.45));
  animation:
    heroMarkIn 1.4s var(--ease-out) 0.4s forwards,
    heroMarkFloat 9s ease-in-out 1.6s infinite;
  z-index: 0;
}

/* 3D variant: needs intrinsic height + interactivity for orbit drag */
.hero-mark-3d {
  width: clamp(182px, 31vw, 520px); /* 65% del tamaño original */
  right: clamp(40px, 9vw, 220px);   /* más hacia la izquierda */
  aspect-ratio: 1 / 1;
  height: auto;
  pointer-events: auto;
  cursor: grab;
  filter: none;
  z-index: 3; /* por encima del headline-wrap (z-index:2) para capturar el arrastre */
}
.hero-mark-3d:active { cursor: grabbing; }
.hero-mark-3d canvas { border-radius: 0; }
@keyframes heroMarkIn {
  from { opacity: 0; transform: translateY(calc(-50% - 14px)) scale(0.94); filter: blur(8px) drop-shadow(0 0 0 rgba(13, 148, 136, 0)); }
  to   { opacity: 1; transform: translateY(-50%)               scale(1);    filter: blur(0)    drop-shadow(0 28px 60px rgba(13, 148, 136, 0.45)); }
}
@keyframes heroMarkFloat {
  0%, 100% { transform: translateY(-50%); }
  50%      { transform: translateY(calc(-50% - 12px)); }
}
@media (max-width: 980px) {
  .hero-mark {
    top: auto;
    bottom: 18%;
    right: clamp(16px, 5vw, 32px);
    width: clamp(140px, 28vw, 220px);
    transform: none;
    animation:
      heroMarkInMobile 1.4s var(--ease-out) 0.4s forwards,
      heroMarkFloatMobile 9s ease-in-out 1.6s infinite;
  }
}
@keyframes heroMarkInMobile {
  from { opacity: 0; transform: translateY(14px) scale(0.94); filter: blur(8px); }
  to   { opacity: 1; transform: translateY(0)    scale(1);    filter: blur(0); }
}
@keyframes heroMarkFloatMobile {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

.hero-top {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  max-width: var(--max);
  margin: 0 auto;
  width: 100%;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--slate-400);
}
.eyebrow .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--teal-500);
  box-shadow: 0 0 10px var(--teal-500);
  animation: pulse 2s ease-in-out infinite;
}
.eyebrow .sep { color: var(--slate-700); }

.hero-coord {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--slate-500);
  text-align: right;
  line-height: 1.8;
}
.hero-coord .v { color: var(--slate-300); }

.hero-headline-wrap {
  position: relative;
  max-width: var(--max);
  margin: auto auto 0;  /* centra el bloque titular+sub entre top y marquee */
  width: 100%;
  z-index: 2;
}

.hero-headline {
  font-weight: 700;
  font-size: clamp(40px, 7.4vw, 128px);
  line-height: 0.95;
  letter-spacing: -0.045em;
  color: var(--white);
}
.hero-headline .line {
  display: block;
  padding-bottom: 0.18em;
  margin-bottom: -0.18em;
}
.hero-headline .word {
  display: inline-block;
  opacity: 0;
  transition: opacity 0.9s var(--ease-out);
}
.hero-headline.in .word { opacity: 1; }
.hero-headline .word:nth-child(1) { transition-delay: 0.05s; }
.hero-headline .word:nth-child(2) { transition-delay: 0.13s; }
.hero-headline .word:nth-child(3) { transition-delay: 0.21s; }
.hero-headline .word:nth-child(4) { transition-delay: 0.29s; }
.hero-headline .word:nth-child(5) { transition-delay: 0.37s; }
.hero-headline .word:nth-child(6) { transition-delay: 0.45s; }

.hero-headline .accent {
  color: var(--teal-500);
  font-style: italic;
  font-weight: 300;
  font-family: "Inter", serif;
}

/* Rotator line — no clipping (the rotator animates outside the line box) */
.hero-headline .line--rotator { overflow: visible; }
.hero-headline .line--rotator .word {
  transform: none;
  opacity: 0;
  transition: opacity 0.9s var(--ease-out);
}
.hero-headline.in .line--rotator .word { opacity: 1; }

/* Rotating word (cycles inside the first line of the hero headline) */
.rotator {
  display: inline-block;
  color: var(--white);
  transition:
    transform 0.55s var(--ease-out),
    opacity 0.55s var(--ease-out),
    filter 0.55s var(--ease-out);
  will-change: transform, opacity, filter;
}
.rotator.out {
  transform: translateY(-42%);
  opacity: 0;
  filter: blur(14px);
}
.rotator.in-prep {
  transform: translateY(42%);
  opacity: 0;
  filter: blur(14px);
  transition: none;
}

.hero-bottom {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) auto;
  gap: clamp(32px, 5vw, 80px);
  align-items: flex-end;
}
@media (max-width: 860px) {
  .hero-bottom { grid-template-columns: 1fr; gap: 32px; align-items: stretch; }
}

.hero-sub {
  font-size: clamp(19px, 1.7vw, 24px);
  color: var(--slate-300);
  max-width: 42ch;
  line-height: 1.55;
}

.hero-ctas {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-self: end;
  flex-wrap: wrap;
}
@media (max-width: 860px) {
  .hero-ctas { justify-self: start; }
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.01em;
  transition: transform 0.25s var(--ease-out), background 0.25s, color 0.25s;
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; transition: transform 0.3s var(--ease-out); }
.btn:hover svg { transform: translateX(4px); }
.btn-primary {
  background: var(--teal-600);
  color: var(--white);
  box-shadow: 0 4px 30px rgba(13, 148, 136, 0.35), inset 0 1px 0 rgba(255,255,255,0.18);
}
.btn-primary:hover { background: var(--teal-500); transform: translateY(-2px); }
.btn-secondary {
  background: transparent;
  color: var(--white);
  border: 1px solid var(--slate-700);
}
.btn-secondary:hover { background: var(--slate-800); border-color: var(--slate-600); transform: translateY(-2px); }

/* Marquee strip */
.marquee {
  position: relative;
  max-width: var(--max);
  width: 100%;
  min-width: 0;
  margin: auto auto 0;  /* empuja el marquee al fondo del hero */
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
  padding: 22px 0;
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}
.marquee-track {
  display: flex;
  gap: 56px;
  width: max-content;
  animation: marqueeMove 38s linear infinite;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--slate-400);
  align-items: center;
}
.marquee-track .star { color: var(--teal-500); font-size: 10px; }
@keyframes marqueeMove {
  to { transform: translateX(-50%); }
}

/* Scroll cue */
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--slate-500);
  display: flex;
  align-items: center;
  gap: 10px;
}
.scroll-cue::before, .scroll-cue::after {
  content: ""; width: 28px; height: 1px; background: var(--slate-700);
}

/* =========================================================
   4. SECTION CHROME
   ========================================================= */
section { position: relative; }

.section {
  padding: clamp(72px, 10vw, 140px) var(--gutter);
}
.section-inner {
  max-width: var(--max);
  margin: 0 auto;
  position: relative;
}

.section-head {
  display: grid;
  grid-template-columns: 80px minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(24px, 3vw, 56px);
  margin-bottom: clamp(56px, 7vw, 96px);
  align-items: start;
}
.section-head .num {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: var(--slate-500);
  letter-spacing: 0.18em;
  padding-top: 14px;
}
.section-head .lead {
  font-size: clamp(28px, 4vw, 56px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.025em;
}
.section-head .lead .accent {
  color: var(--teal-500);
  font-style: italic;
  font-weight: 300;
}
.section-head .desc {
  font-size: 16px;
  color: var(--slate-400);
  line-height: 1.65;
  max-width: 50ch;
}
@media (max-width: 980px) {
  .section-head { grid-template-columns: 1fr; gap: 24px; }
}

/* Light mode sections */
.section--light {
  background: var(--white);
  color: var(--slate-900);
}
.section--light .section-head .num { color: var(--slate-500); }
.section--light .section-head .desc { color: var(--slate-600); }
.section--light .eyebrow { color: var(--slate-600); }
.section--light .eyebrow .sep { color: var(--slate-300); }

/* =========================================================
   5. MANIFESTO
   ========================================================= */
.manifesto {
  background: rgba(255, 255, 255, 0.96);
  color: var(--slate-900);
  backdrop-filter: blur(2px);
  padding-top: clamp(20px, 2.2vw, 32px);
  padding-bottom: clamp(20px, 2.2vw, 32px);
  min-height: calc(100vh - 76px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.manifesto .section-inner { width: 100%; }
.manifesto .section-head {
  margin-bottom: clamp(16px, 2vw, 28px);
}
.manifesto-quote {
  font-size: clamp(28px, 4.4vw, 64px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--slate-900);
  max-width: 22ch;
  margin: 0 auto;
  text-align: center;
  text-wrap: balance;
}
.manifesto-quote .accent {
  color: var(--teal-600);
  font-style: normal;
  font-weight: 600;
}
.manifesto-quote .strike {
  color: var(--slate-500);
  background-image: linear-gradient(var(--coral), var(--coral));
  background-repeat: no-repeat;
  background-position: 0 58%;
  background-size: 0% 6px;
  transition: background-size 0.9s var(--ease-out) 0.2s;
}
.manifesto-quote.in .strike { background-size: 100% 6px; }

.manifesto-sub {
  font-size: 15px;
  color: var(--slate-600);
  text-align: center;
  max-width: 56ch;
  margin: 28px auto 0;
  line-height: 1.65;
}

.stats {
  margin-top: clamp(40px, 6vh, 72px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  border-top: 1px solid var(--slate-200);
}
@media (max-width: 860px) { .stats { grid-template-columns: 1fr; } }
.stat {
  padding: 32px 32px 24px;
  border-right: 1px solid var(--slate-200);
  position: relative;
}
.stat:last-child { border-right: none; }
@media (max-width: 860px) {
  .stat { border-right: none; border-bottom: 1px solid var(--slate-200); }
  .stat:last-child { border-bottom: none; }
}
.stat-tag {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--slate-500);
  margin-bottom: 18px;
  display: block;
}
.stat-num {
  font-size: clamp(56px, 7vw, 104px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--slate-900);
  font-variant-numeric: tabular-nums;
}
.stat-num .unit {
  color: var(--teal-600);
  font-weight: 300;
  font-style: italic;
  font-size: 0.55em;
  letter-spacing: -0.02em;
  margin-left: 2px;
}
.stat-num .unit--word {
  display: block;
  font-size: 0.26em;
  margin-left: 0;
  line-height: 1.2;
  margin-top: 0.5em;
  max-width: 14ch;
}
.stat-num--text {
  font-size: clamp(30px, 3.2vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.02em;
}
.stat-num--text .hl {
  color: var(--teal-600);
  font-weight: 600;
}
.stat-desc {
  margin-top: 14px;
  font-size: 14px;
  color: var(--slate-600);
  line-height: 1.5;
  max-width: 32ch;
}

/* =========================================================
   6. SERVICES
   ========================================================= */
.services {
  background: rgba(15, 23, 42, 0.82);
  color: var(--white);
  backdrop-filter: blur(2px);
  padding-top: clamp(48px, 5vw, 72px);
  padding-bottom: clamp(32px, 4vw, 56px);
}
/* Campo de partículas: capa de fondo decorativa, detrás del contenido */
.particle-field {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
/* Fallback estático cuando no hay WebGL / Three.js */
.particle-field.pf-fallback {
  background:
    radial-gradient(60% 55% at 70% 35%, rgba(20, 184, 166, 0.10), transparent 70%),
    radial-gradient(45% 50% at 25% 80%, rgba(20, 184, 166, 0.06), transparent 70%);
}
.services .section-inner {
  position: relative;
  z-index: 1;
}
.services .section-head {
  margin-bottom: clamp(28px, 3.5vw, 48px);
}
.services-list {
  border-top: 1px solid var(--rule);
}
.services-list .service:last-child { border-bottom: none; }
.service {
  border-bottom: 1px solid var(--rule);
  padding: 52px 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr) 56px;
  gap: clamp(32px, 4vw, 64px);
  align-items: center;
  transition: padding 0.4s var(--ease-out);
  cursor: pointer;
  position: relative;
}
.service::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0; bottom: 0;
  background: linear-gradient(90deg, rgba(13, 148, 136, 0.08), transparent 50%);
  opacity: 0;
  transition: opacity 0.4s var(--ease-out);
  pointer-events: none;
}
.service:hover::before { opacity: 1; }
.service:hover { padding-left: 16px; padding-right: 16px; }
.service:hover .service-arrow { color: var(--teal-500); transform: translate(8px, -8px); }

@media (max-width: 860px) {
  .service { grid-template-columns: 1fr; gap: 14px; padding: 40px 0; }
  .service-arrow { display: none; }
}

.service-num {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--slate-500);
  margin-bottom: 14px;
}
.service-name {
  font-size: clamp(24px, 3vw, 40px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
}
.service-name .accent { color: var(--teal-500); font-style: italic; font-weight: 300; }
.service-desc {
  font-size: 17px;
  color: var(--slate-400);
  line-height: 1.6;
  max-width: 46ch;
}
.service-arrow {
  width: 48px; height: 48px;
  border: 1px solid var(--rule);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--slate-400);
  transition: color 0.3s, transform 0.3s var(--ease-out), border-color 0.3s;
}
.service:hover .service-arrow { border-color: var(--teal-500); }

/* =========================================================
   7. METHOD — los cuatro pasos viven dentro de Servicios
   ========================================================= */
.method-head {
  margin-top: clamp(56px, 7vw, 104px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}
.method-head-num {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--slate-500);
  white-space: nowrap;
}
.method-lead {
  font-size: clamp(28px, 4vw, 56px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.05;
}
.method-lead .accent { color: var(--teal-500); font-style: italic; font-weight: 300; }
@media (max-width: 860px) {
  .method-head { gap: 12px; }
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: clamp(16px, 2vw, 28px);
  padding-top: 78px;
  position: relative;
}
@media (max-width: 980px) { .method-grid { grid-template-columns: repeat(2, 1fr); padding-top: 8px; } }
@media (max-width: 560px) { .method-grid { grid-template-columns: 1fr; } }

/* ---- animated connector rail (the "wow") ---- */
.method-rail {
  --edge: calc((100% - 54px) / 8);
  position: absolute;
  top: 24px; left: 0; right: 0;
  height: 16px;
  pointer-events: none;
}
.method-rail-track,
.method-rail-fill {
  position: absolute;
  top: 50%; left: var(--edge); right: var(--edge);
  height: 2px;
  border-radius: 2px;
  transform: translateY(-50%);
}
.method-rail-track {
  background: var(--rule);
}
.method-rail-fill {
  background: linear-gradient(90deg, var(--teal-600), #2DD4BF);
  box-shadow: 0 0 16px rgba(45, 212, 191, 0.6);
  transform: translateY(-50%) scaleX(0);
  transform-origin: left center;
  transition: transform 2s var(--ease-out);
}
.method-grid.in .method-rail-fill { transform: translateY(-50%) scaleX(1); }

/* traveling signal that loops once the rail is drawn */
.method-rail-pulse {
  position: absolute;
  top: 50%; left: var(--edge);
  width: 9px; height: 9px;
  margin: -5px 0 0 -4.5px;
  border-radius: 50%;
  background: #99F6E4;
  box-shadow: 0 0 18px 5px rgba(94, 234, 212, 0.75);
  opacity: 0;
}
.method-grid.in .method-rail-pulse {
  animation: methodSignal 3.6s 2.1s cubic-bezier(0.45,0,0.55,1) infinite;
}
@keyframes methodSignal {
  0%   { left: var(--edge); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { left: calc(100% - var(--edge)); opacity: 0; }
}

.method-rail-nodes {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.method-node {
  justify-self: center;
  align-self: center;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--bg-alt);
  border: 1.5px solid rgba(148, 163, 184, 0.4);
  position: relative;
  transition: border-color .45s, background .45s, box-shadow .45s, transform .45s var(--ease-out);
}
.method-node::after {
  content: "";
  position: absolute; inset: -7px;
  border-radius: 50%;
  border: 1px solid #2DD4BF;
  opacity: 0;
  transform: scale(0.5);
}
/* stem: une cada nodo con su tarjeta */
.method-node::before {
  content: "";
  position: absolute;
  top: 13px; left: 50%;
  width: 1px; height: 42px;
  background: linear-gradient(180deg, rgba(45, 212, 191, 0.55), transparent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform .6s var(--ease-out);
}
.method-grid.in .method-node::before { transform: scaleY(1); }
.method-grid.in .method-node:nth-child(1)::before { transition-delay: .50s; }
.method-grid.in .method-node:nth-child(2)::before { transition-delay: 1.00s; }
.method-grid.in .method-node:nth-child(3)::before { transition-delay: 1.50s; }
.method-grid.in .method-node:nth-child(4)::before { transition-delay: 2.00s; }
.method-grid.in .method-node {
  border-color: #2DD4BF;
  background: #2DD4BF;
  box-shadow: 0 0 0 4px rgba(45, 212, 191, 0.13), 0 0 20px rgba(45, 212, 191, 0.75);
}
.method-node:nth-child(1) { transition-delay: .30s; }
.method-node:nth-child(2) { transition-delay: .80s; }
.method-node:nth-child(3) { transition-delay: 1.30s; }
.method-node:nth-child(4) { transition-delay: 1.80s; }
.method-grid.in .method-node::after { animation: methodNodePing 0.9s var(--ease-out) forwards; }
.method-grid.in .method-node:nth-child(1)::after { animation-delay: .30s; }
.method-grid.in .method-node:nth-child(2)::after { animation-delay: .80s; }
.method-grid.in .method-node:nth-child(3)::after { animation-delay: 1.30s; }
.method-grid.in .method-node:nth-child(4)::after { animation-delay: 1.80s; }
@keyframes methodNodePing {
  0%   { opacity: .85; transform: scale(0.5); }
  100% { opacity: 0;   transform: scale(2);   }
}
@media (max-width: 980px) { .method-rail { display: none; } }

/* ---- step cards ---- */
.method-step {
  padding: 30px 28px 36px;
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012));
  border: 1px solid rgba(255, 255, 255, 0.07);
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .75s var(--ease-out), transform .55s var(--ease-out),
              border-color .4s, box-shadow .4s, background .4s;
  transition-delay: calc(var(--step, 0) * 0.1s);
}
.method-step.in { opacity: 1; transform: none; }
.method-step:hover {
  transform: translateY(-5px);
  border-color: rgba(45, 212, 191, 0.35);
  background: linear-gradient(180deg, rgba(45, 212, 191, 0.055), rgba(255, 255, 255, 0.012));
  box-shadow: 0 28px 60px rgba(2, 12, 18, 0.45);
  transition-delay: 0s;
}
/* spotlight que sigue al cursor */
.method-step::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 0%), rgba(45, 212, 191, 0.12), transparent 70%);
  opacity: 0;
  transition: opacity .4s;
  pointer-events: none;
}
.method-step:hover::after { opacity: 1; }

.method-ghost {
  position: absolute;
  top: 14px; right: 16px;
  font-family: "JetBrains Mono", monospace;
  font-size: clamp(64px, 5.6vw, 96px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.06em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(148, 163, 184, 0.16);
  pointer-events: none;
  transition: -webkit-text-stroke-color .5s, transform .6s var(--ease-out);
}
.method-step:hover .method-ghost {
  -webkit-text-stroke-color: rgba(45, 212, 191, 0.4);
  transform: translateY(-3px);
}

.method-head-row {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}
.method-num {
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  font-weight: 600;
  color: #2DD4BF;
  letter-spacing: 0.1em;
}
.method-tag {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--slate-400);
}
.method-icon-wrap {
  width: 56px; height: 56px;
  margin: 26px 0 22px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(45, 212, 191, 0.06);
  border: 1px solid rgba(45, 212, 191, 0.16);
  position: relative;
  transition: transform .4s var(--ease-out), background .4s, border-color .4s, box-shadow .4s;
}
.method-step:hover .method-icon-wrap {
  transform: translateY(-3px);
  background: rgba(45, 212, 191, 0.12);
  border-color: rgba(45, 212, 191, 0.42);
  box-shadow: 0 12px 32px rgba(13, 148, 136, 0.28);
}
.method-icon {
  width: 26px; height: 26px;
  color: #5EEAD4;
}
.method-icon path,
.method-icon circle {
  stroke-dasharray: 130;
  stroke-dashoffset: 130;
  transition: stroke-dashoffset 1.1s var(--ease-out);
  transition-delay: calc(0.35s + var(--step, 0) * 0.1s);
}
.method-step.in .method-icon path,
.method-step.in .method-icon circle { stroke-dashoffset: 0; }

.method-title {
  font-size: clamp(21px, 2vw, 27px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 12px;
  text-wrap: balance;
}
.method-desc {
  font-size: 14.5px;
  color: var(--slate-400);
  line-height: 1.6;
  max-width: 30ch;
}

@media (prefers-reduced-motion: reduce) {
  .method-step { opacity: 1; transform: none; transition: none; }
  .method-rail-fill { transform: translateY(-50%) scaleX(1); transition: none; }
  .method-rail-pulse { display: none; }
  .method-node::before { transform: scaleY(1); transition: none; }
  .method-icon path, .method-icon circle { stroke-dashoffset: 0; transition: none; }
}

/* =========================================================
   8. VALUES — tarjetas con scroll horizontal (pin)
   ========================================================= */
.values {
  background: rgba(255, 255, 255, 0.96);
  color: var(--slate-900);
  backdrop-filter: blur(2px);
  position: relative;
  overflow: hidden;
}
@media (min-width: 981px) {
  .values.section {
    min-height: 100vh;
    padding-top: clamp(40px, 6vh, 72px);
    padding-bottom: clamp(40px, 6vh, 72px);
    display: grid;
    align-content: center;
  }
}
.values .section-inner { position: relative; z-index: 1; }

.values-layout {
  display: grid;
  grid-template-columns: minmax(330px, 420px) minmax(0, 1fr);
  gap: clamp(40px, 5vw, 84px);
  align-items: stretch;
  width: 100%;
}

/* --- columna fija --- */
.values-intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.values-intro .num {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: var(--slate-500);
  letter-spacing: 0.18em;
  margin-bottom: 18px;
}
.values-intro .lead {
  font-size: clamp(30px, 3.2vw, 52px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.025em;
}
.values-intro .lead .accent { color: var(--teal-500); font-style: italic; font-weight: 300; }
.values-intro .desc {
  margin-top: 22px;
  font-size: 16px;
  color: var(--slate-600);
  line-height: 1.65;
  max-width: 36ch;
}
.values-progress {
  margin-top: 30px;
  width: 170px;
  height: 2px;
  border-radius: 2px;
  background: var(--slate-200);
  overflow: hidden;
}
.values-progress-fill {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--teal-500);
  transform: scaleX(0);
  transform-origin: left;
}

/* índice editorial en la columna fija */
.values-index {
  margin-top: auto;
  padding-top: 40px;
  list-style: none;
  width: 100%;
  border-top: 1px solid var(--slate-200);
  counter-reset: none;
}
.values-index li {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 13px 4px 13px 0;
  border-bottom: 1px solid var(--slate-100);
  color: var(--slate-400);
  position: relative;
  transition: color .4s var(--ease-out), padding-left .4s var(--ease-out);
}
.values-index li::before {
  content: "";
  position: absolute;
  left: -14px; top: 50%;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--teal-500);
  transform: translateY(-50%) scale(0);
  transition: transform .4s var(--ease-out);
}
.values-index li.active {
  color: var(--slate-900);
  padding-left: 14px;
}
.values-index li.active::before { transform: translateY(-50%) scale(1); }
.vi-n {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--slate-400);
  transition: color .4s var(--ease-out);
}
.values-index li.active .vi-n { color: var(--teal-600); }
.vi-label {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

/* --- pista horizontal --- */
.values-clip { overflow: hidden; min-width: 0; }
@media (min-width: 981px) {
  /* fade en el borde izquierdo sólo cuando el track ya se desplazó:
     al llegar a la sección, la tarjeta 01 se ve completa */
  .values-clip.is-scrolled {
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 110px);
    mask-image: linear-gradient(to right, transparent 0, #000 110px);
  }
}
.values-track {
  display: flex;
  gap: 22px;
  will-change: transform;
}

.vcard {
  flex: 0 0 auto;
  width: clamp(310px, 24vw, 385px);
  min-height: clamp(440px, 64vh, 620px);
  display: flex;
  flex-direction: column;
  background: #F6F7F9;
  border: 1px solid rgba(15, 23, 42, 0.05);
  border-radius: 26px;
  padding: 26px 26px 22px;
  /* salida "hacia atrás": escala + fade controlados por scroll (JS) */
  opacity: var(--vfade, 1);
  transform: scale(var(--vscale, 1));
  transform-origin: right center;
  translate: 0 0;
  transition: translate .45s var(--ease-out), box-shadow .45s, border-color .45s;
}
.vcard:hover {
  translate: 0 -6px;
  border-color: rgba(45, 212, 191, 0.45);
  box-shadow: 0 30px 60px rgba(15, 23, 42, 0.10);
}
.vcard-badge {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--slate-600);
  background: var(--white);
  border: 1px solid var(--slate-200);
  padding: 8px 14px;
  border-radius: 999px;
  width: max-content;
  white-space: nowrap;
}
.vcard-title {
  margin-top: 22px;
  font-size: clamp(24px, 2vw, 31px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.08;
  text-wrap: balance;
}
.vcard-title .i { font-style: italic; font-weight: 300; color: var(--teal-700); }
.vcard-desc {
  margin-top: 12px;
  font-size: 14.5px;
  color: var(--slate-600);
  line-height: 1.6;
}

/* --- bloques de arte geométrico --- */
.vcard-art {
  margin-top: auto;
  border-radius: 18px;
  height: clamp(180px, 26vh, 260px);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.vcard-art > * { grid-area: 1 / 1; }
.value3d { width: 100%; height: 100%; }

/* V/01 — blob 3D que se esculpe (Three.js) */
.art-1 { background: #CCFBF1; }

/* V/02 — onda 3D sobre malla de esferas (Three.js) */
.art-2 { background: #DEE4F6; }

/* V/03 — colibrí 3D: ráfagas y estela (Three.js) */
.art-3 { background: #99F6E4; }

/* V/04 — barras 3D de métricas (Three.js) */
.art-4 { background: #FFE9D6; }

/* V/05 — eslabones entrelazados (Three.js) */
.art-5 { background: #E2E8F0; }

/* --- móvil / tablet: carrusel nativo --- */
@media (max-width: 980px) {
  .values-layout { display: block; }
  .values-progress, .values-index { display: none; }
  .values-clip {
    overflow-x: auto;
    margin: 36px calc(var(--gutter) * -1) 0;
    padding: 8px var(--gutter) 24px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  .vcard {
    width: min(80vw, 340px);
    min-height: 480px;
    scroll-snap-align: start;
  }
}

/* =========================================================
   9. IMPACT (case ribbons)
   ========================================================= */
.impact {
  background: rgba(15, 23, 42, 0.8);
  color: var(--white);
  backdrop-filter: blur(2px);
}
.impact-quote {
  font-size: clamp(40px, 7vw, 112px);
  font-weight: 200;
  letter-spacing: -0.04em;
  line-height: 0.95;
  max-width: 16ch;
  margin-bottom: 80px;
}
.impact-quote .accent { color: var(--teal-500); font-style: italic; font-weight: 300; }
.impact-quote .coral  { color: var(--coral); }

.impact-cases {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
}
@media (max-width: 860px) { .impact-cases { grid-template-columns: 1fr; } }

.impact-case {
  padding: 36px 28px 36px 0;
  border-bottom: 1px solid var(--rule);
  position: relative;
}
.impact-case:not(:last-child) { border-right: 1px solid var(--rule); padding-right: 28px; }
@media (max-width: 860px) {
  .impact-case { border-right: none; padding-right: 0; padding-left: 0; }
}

.impact-meta {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--slate-500);
  margin-bottom: 28px;
  display: flex;
  justify-content: space-between;
}
.impact-meta .sector { color: var(--teal-500); }

.impact-metric {
  font-size: clamp(48px, 6vw, 88px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.95;
  color: var(--white);
  font-variant-numeric: tabular-nums;
}
.impact-metric .unit { color: var(--slate-500); font-weight: 300; font-size: 0.5em; }
.impact-metric .sign { color: var(--coral); }

.impact-body {
  margin-top: 22px;
  font-size: 15px;
  color: var(--slate-300);
  line-height: 1.55;
}
.impact-name {
  margin-top: 28px;
  font-size: 13px;
  color: var(--slate-500);
}

/* =========================================================
   10. CTA
   ========================================================= */
.cta {
  background: var(--coral);
  color: var(--slate-900);
  padding: clamp(80px, 12vw, 160px) var(--gutter);
  overflow: hidden;
  position: relative;
}
/* wordmark fantasma al fondo (efecto wow) */
.cta-bg {
  position: absolute;
  left: 50%;
  bottom: clamp(-40px, -4vw, -70px);
  transform: translateX(-50%);
  font-size: clamp(180px, 30vw, 560px);
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 0.8;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(15, 23, 42, 0.10);
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}
.cta-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(48px, 6vw, 96px);
  align-items: end;
  position: relative;
  z-index: 1;
}
@media (max-width: 860px) { .cta-inner { grid-template-columns: 1fr; gap: 40px; } }

.cta-kicker {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.18em;
  color: rgba(15, 23, 42, 0.6);
  margin-bottom: clamp(20px, 3vw, 36px);
}
.cta-title {
  font-size: clamp(56px, 11vw, 196px);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 0.88;
  color: var(--slate-900);
  text-wrap: balance;
}
.cta-title .i { font-style: italic; font-weight: 300; }

.cta-side {
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding-bottom: 8px;
}
.cta-text {
  font-size: 17px;
  color: rgba(15, 23, 42, 0.82);
  line-height: 1.55;
  max-width: 38ch;
}
.cta-actions {
  display: flex;
  flex-direction: column;
  gap: 26px;
}
/* correo directo: enlace editorial gigante, no botón */
.cta-mail { display: flex; flex-direction: column; gap: 10px; color: var(--slate-900); }
.cta-mail-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.6;
}
.cta-mail-value {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(27px, 3.2vw, 46px);
  line-height: 1;
  letter-spacing: -0.01em;
  padding-bottom: 12px;
  border-bottom: 1.5px solid rgba(15, 23, 42, 0.35);
  position: relative;
}
.cta-mail-value::after {
  content: "";
  position: absolute;
  left: 0; bottom: -1.5px;
  width: 100%; height: 1.5px;
  background: var(--slate-900);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease-out);
}
.cta-mail:hover .cta-mail-value::after { transform: scaleX(1); }
.cta-mail-value svg {
  width: 0.62em; height: 0.62em;
  flex: 0 0 auto;
  transition: transform 0.35s var(--ease-out);
}
.cta-mail:hover .cta-mail-value svg { transform: translate(4px, -4px); }
.cta-btn {
  background: var(--slate-900);
  color: var(--white);
  padding: 20px 22px 20px 26px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--slate-900);
  transition: transform 0.35s var(--ease-out), background 0.3s, color 0.3s, box-shadow 0.35s;
}
.cta-btn-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: left;
}
.cta-btn-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  opacity: 0.62;
}
.cta-btn-value {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.cta-btn-ico {
  flex: 0 0 auto;
  width: 42px; height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  transition: background 0.3s, transform 0.35s var(--ease-out);
}
.cta-btn-ico svg { width: 18px; height: 18px; transition: transform 0.35s var(--ease-out); }
.cta-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 44px rgba(15, 23, 42, 0.28);
}
.cta-btn:hover .cta-btn-ico { background: var(--teal-500); }
.cta-btn:hover .cta-btn-ico svg { transform: translateX(4px); }

.cta-btn-alt {
  background: transparent;
  color: var(--slate-900);
  border: 1px solid rgba(15, 23, 42, 0.32);
}
.cta-btn-alt .cta-btn-ico { background: rgba(15, 23, 42, 0.08); }
.cta-btn-alt:hover {
  background: rgba(15, 23, 42, 0.04);
  border-color: var(--slate-900);
}
.cta-btn-alt:hover .cta-btn-ico { background: var(--slate-900); color: var(--white); }

.cta-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 36px;
  border-top: 1px solid rgba(15, 23, 42, 0.22);
  padding-top: 18px;
}
.cta-meta-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 0;
  color: rgba(15, 23, 42, 0.62);
}
.cta-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #0F9E8C;
  position: relative;
  flex: 0 0 auto;
}
.cta-dot::after {
  content: "";
  position: absolute; inset: -4px;
  border-radius: 50%;
  border: 1.5px solid #0F9E8C;
  animation: ctaPing 2.2s var(--ease-out) infinite;
}
@keyframes ctaPing {
  0%   { opacity: .7; transform: scale(0.6); }
  100% { opacity: 0;  transform: scale(1.8); }
}
@media (prefers-reduced-motion: reduce) {
  .cta-dot::after { animation: none; opacity: 0; }
}

/* =========================================================
   10b. MODAL CONTACTO
   ========================================================= */
.cmodal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 24px; visibility: hidden; }
.cmodal.open { visibility: visible; }
.cmodal-backdrop {
  position: absolute; inset: 0;
  background: rgba(4, 13, 12, 0.72);
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.35s var(--ease-out);
}
.cmodal.open .cmodal-backdrop { opacity: 1; }
.cmodal-panel {
  position: relative;
  width: min(640px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: var(--cream, #FAF7F2);
  color: var(--slate-900);
  border-radius: 22px;
  padding: clamp(28px, 4vw, 48px);
  box-shadow: 0 40px 90px rgba(2, 21, 18, 0.5);
  opacity: 0;
  transform: translateY(26px) scale(0.98);
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}
.cmodal.open .cmodal-panel { opacity: 1; transform: none; }
.cmodal-x {
  position: absolute; top: 18px; right: 18px;
  width: 44px; height: 44px;
  border: 1px solid rgba(15, 23, 42, 0.18);
  border-radius: 999px;
  background: transparent;
  color: var(--slate-900);
  cursor: pointer;
  display: grid; place-items: center;
  transition: background 0.25s, transform 0.25s;
}
.cmodal-x:hover { background: rgba(15, 23, 42, 0.06); transform: rotate(90deg); }
.cmodal-x svg { width: 17px; height: 17px; }
.cmodal-kicker {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #0F766E;
  margin-bottom: 14px;
}
.cmodal-title {
  font-size: clamp(26px, 3.6vw, 38px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.06;
  margin: 0 0 30px;
  max-width: 15ch;
}
.cmodal-title .i { font-family: "Instrument Serif", Georgia, serif; font-style: italic; font-weight: 400; color: #0F766E; }
.cmodal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cfield { display: flex; flex-direction: column; gap: 7px; }
.cfield-full { grid-column: 1 / -1; }
.cfield-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(15, 23, 42, 0.6);
}
.cfield input, .cfield textarea {
  font: inherit;
  font-size: 15.5px;
  color: var(--slate-900);
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.16);
  border-radius: 12px;
  padding: 13px 15px;
  outline: none;
  resize: vertical;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.cfield input::placeholder, .cfield textarea::placeholder { color: rgba(15, 23, 42, 0.34); }
.cfield input:focus, .cfield textarea:focus { border-color: #0D9488; box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.16); }
.cmodal-mail { margin-top: 4px; }
.cmodal-mail .cta-mail-value { border-color: rgba(15, 23, 42, 0.3); }
.cmodal-note {
  margin: 22px 0 0;
  font-size: 13px;
  color: rgba(15, 23, 42, 0.55);
  text-align: left;
}
@media (max-width: 540px) { .cmodal { padding: 14px; } }
body.cmodal-open { overflow: hidden; }

/* =========================================================
   11. FOOTER
   ========================================================= */
.footer {
  background: rgba(15, 23, 42, 0.92);
  color: var(--slate-400);
  padding: clamp(64px, 7vw, 96px) var(--gutter) 32px;
  border-top: 1px solid var(--rule);
  backdrop-filter: blur(2px);
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
}
@media (max-width: 860px) { .footer-inner { grid-template-columns: 1fr 1fr; gap: 40px 32px; } }
@media (max-width: 480px) { .footer-inner { grid-template-columns: 1fr; } }
/* targets táctiles cómodos en dispositivos sin cursor */
@media (pointer: coarse) {
  .footer ul { gap: 4px; }
  .footer ul a { padding: 11px 0; }
}

.footer-brand img { width: 420px; max-width: 100%; }
.footer-tag {
  margin-top: 20px;
  font-size: 14px;
  color: var(--slate-400);
  max-width: 28ch;
  line-height: 1.6;
}
.footer h4 {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--slate-500);
  margin-bottom: 18px;
  font-weight: 400;
}
.footer ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.footer ul a {
  color: var(--slate-300);
  font-size: 14.5px;
  display: inline-block;
  transition: color 0.2s;
}
.footer ul a:hover { color: var(--teal-500); }

.footer-bottom {
  max-width: var(--max);
  margin: clamp(48px, 6vw, 80px) auto 0;
  padding-top: 32px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--slate-500);
}
.footer-bottom .v { color: var(--slate-300); }

/* =========================================================
   12. SCROLL REVEAL utilities
   ========================================================= */
.r-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.r-up.in { opacity: 1; transform: translateY(0); }
.r-fade { opacity: 0; transition: opacity 1s var(--ease-out); }
.r-fade.in { opacity: 1; }

[data-stagger] > * {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
[data-stagger].in > *:nth-child(1) { transition-delay: 0.0s; }
[data-stagger].in > *:nth-child(2) { transition-delay: 0.08s; }
[data-stagger].in > *:nth-child(3) { transition-delay: 0.16s; }
[data-stagger].in > *:nth-child(4) { transition-delay: 0.24s; }
[data-stagger].in > *:nth-child(5) { transition-delay: 0.32s; }
[data-stagger].in > *:nth-child(6) { transition-delay: 0.4s; }
[data-stagger].in > * { opacity: 0; }
[data-stagger].in > * { opacity: 1; transform: translateY(0); }

/* Cursor dot */
.cursor {
  position: fixed;
  top: 0; left: 0;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--teal-500);
  pointer-events: none;
  z-index: 9998;
  mix-blend-mode: difference;
  transform: translate(-50%, -50%);
  transition: transform 0.18s var(--ease-out), width 0.25s, height 0.25s, opacity 0.3s;
  opacity: 0;
}
.cursor.show { opacity: 1; }
.cursor.hover { width: 48px; height: 48px; background: transparent; border: 1px solid var(--teal-500); }
@media (pointer: coarse), (hover: none) { .cursor { display: none; } }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* =========================================================
   13. CHAPTER NARRATOR
   ========================================================= */
.chapter {
  position: fixed;
  top: 50%;
  left: clamp(16px, 2vw, 32px);
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s var(--ease-out);
  z-index: 50;
  mix-blend-mode: difference;
  color: #fff;
}
.chapter.show { opacity: 1; }

.chapter-line {
  width: 1px;
  height: 180px;
  background: rgba(255,255,255,0.15);
  position: relative;
  overflow: hidden;
}
.chapter-line-fill {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 0%;
  background: #fff;
  transition: height 0.4s linear;
}

.chapter-meta {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  position: relative;
  overflow: hidden;
  height: 200px;
}
.chapter-num,
.chapter-title {
  display: block;
  line-height: 1.4;
  transition: transform 0.6s var(--ease-out), opacity 0.6s var(--ease-out);
}
.chapter.flip .chapter-num,
.chapter.flip .chapter-title {
  animation: chapterFlip 0.6s var(--ease-out);
}
@keyframes chapterFlip {
  0%   { opacity: 0; transform: translateY(40px); }
  100% { opacity: 1; transform: translateY(0); }
}
.chapter-num {
  font-weight: 500;
  color: #fff;
}
.chapter-title {
  font-weight: 400;
  opacity: 0.7;
}

.chapter-progress {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: #fff;
  opacity: 0.7;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 1599px) {
  /* El contenido (max 1440px centrado) solo gana margen libre real a partir
     de ~1600px de viewport; antes de eso el narrador se encima al contenido */
  .chapter { display: none; }
}
@media (max-width: 760px) {
  .chapter { display: none; }
}
