/* ==========================================================================
   GRF — estilos
   Modos:
   - html.is-jack   → escritorio: scroll-jacking (una sección por gesto)
   - html.is-native → móvil / movimiento reducido: scroll nativo con scroll-snap
   ========================================================================== */

:root {
  --bg: #07080a;
  --bg-2: #0e1013;
  --fg: #f3f3ef;
  --muted: rgba(243, 243, 239, .58);
  --dim: rgba(243, 243, 239, .32);
  --line: rgba(243, 243, 239, .11);
  --line-2: rgba(243, 243, 239, .2);
  --accent: #c8ff3d;
  --accent-ink: #0b0d05;
  --danger: #ff6b5e;

  --font: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --ease: cubic-bezier(.77, 0, .18, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  --pad: clamp(20px, 5vw, 84px);
  --topbar: 84px;
  --base-delay: 0ms;
  --radius: 26px;
}

.is-jack { --base-delay: 380ms; }

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

html {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

html.is-native {
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
}

html.is-jack,
html.is-jack body {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

body { min-height: 100%; }

::selection { background: var(--accent); color: var(--accent-ink); }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
em { font-style: normal; color: var(--accent); }
img, svg { display: block; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 6px; }
.section:focus { outline: none; }

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

.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.skip-link {
  position: fixed; left: 16px; top: 16px; z-index: 200;
  padding: 10px 16px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink); font-weight: 600;
  transform: translateY(-160%); transition: transform .3s var(--ease-out);
}
.skip-link:focus { transform: none; }

/* ---------- Loader ---------- */
.loader { display: none; }
.js .loader {
  position: fixed; inset: 0; z-index: 300;
  display: grid; place-items: center; align-content: center; gap: 34px;
  background: var(--bg);
  transition: opacity .7s var(--ease), visibility 0s linear .7s;
}
.loader__logo { width: 64px; color: var(--fg); fill: currentColor; overflow: visible; }
.loader__logo .lp { transform-box: fill-box; animation: lp-in 1s var(--ease-out) both; }
.loader__logo .lp--g { --tx: 0; --ty: -900px; }
.loader__logo .lp--r { --tx: 780px; --ty: 450px; animation-delay: .12s; }
.loader__logo .lp--f { --tx: -780px; --ty: 450px; animation-delay: .24s; }
@keyframes lp-in { from { opacity: 0; transform: translate(var(--tx), var(--ty)); } }
.loader__bar { width: 120px; height: 1px; background: var(--line); overflow: hidden; }
.loader__bar i {
  display: block; height: 100%; background: var(--accent);
  animation: load 1.1s var(--ease) infinite;
}
@keyframes load { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.is-loaded .loader { opacity: 0; visibility: hidden; }

/* ---------- Fondo ---------- */
.bg {
  position: fixed; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}
.grain {
  position: fixed; inset: -50%; z-index: 1; pointer-events: none;
  opacity: .06;
  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");
  animation: grain 1.2s steps(4) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 25% { transform: translate(-3%, 2%); }
  50% { transform: translate(2%, -3%); } 75% { transform: translate(-2%, -1%); } 100% { transform: translate(0, 0); }
}

/* ---------- Cursor ---------- */
.cursor { display: none; }
.has-cursor .cursor {
  display: block;
  position: fixed; left: 0; top: 0; z-index: 250;
  width: 34px; height: 34px; margin: -17px 0 0 -17px;
  border: 1px solid rgba(243, 243, 239, .5);
  border-radius: 50%;
  pointer-events: none;
  transition: width .35s var(--ease-out), height .35s var(--ease-out), margin .35s var(--ease-out),
              background-color .35s, border-color .35s, opacity .3s;
  mix-blend-mode: difference;
}
.has-cursor .cursor.is-hover {
  width: 64px; height: 64px; margin: -32px 0 0 -32px;
  background: rgba(243, 243, 239, .95); border-color: transparent;
}
.has-cursor .cursor.is-text { width: 4px; height: 28px; margin: -14px 0 0 -2px; border-radius: 2px; background: var(--fg); }
.has-cursor .cursor.is-hidden { opacity: 0; }

/* ---------- Topbar ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--topbar);
  display: flex; align-items: center; gap: 32px;
  padding: 0 var(--pad);
  background: linear-gradient(to bottom, rgba(7, 8, 10, .85), rgba(7, 8, 10, 0));
  opacity: 0; transform: translateY(-20px);
  transition: opacity .9s var(--ease-out) .2s, transform .9s var(--ease-out) .2s;
}
.is-loaded .topbar, html:not(.js) .topbar { opacity: 1; transform: none; }

.brand { display: flex; align-items: center; gap: 12px; font-weight: 600; letter-spacing: .14em; font-size: 15px; margin-right: auto; }
.brand svg { width: 30px; height: auto; fill: currentColor; transition: transform .8s var(--ease-out); }
.brand:hover svg { transform: rotate(-60deg); }

.menu { display: flex; gap: 30px; }
.menu a {
  position: relative;
  font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .12em;
  color: var(--muted); padding: 6px 0;
  transition: color .3s;
}
.menu a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform .5s var(--ease);
}
.menu a:hover, .menu a.is-active { color: var(--fg); }
.menu a:hover::after, .menu a.is-active::after { transform: scaleX(1); transform-origin: left; }
.menu a.is-active::before {
  content: ''; position: absolute; left: -12px; top: 50%; width: 5px; height: 5px; margin-top: -2.5px;
  border-radius: 50%; background: var(--accent);
}

.burger { display: none; width: 44px; height: 44px; position: relative; border-radius: 50%; border: 1px solid var(--line-2); }
.burger span:not(.sr-only) {
  position: absolute; left: 13px; right: 13px; height: 1.5px; background: var(--fg);
  transition: transform .5s var(--ease), top .5s var(--ease);
}
.burger span:nth-child(1) { top: 17px; }
.burger span:nth-child(2) { top: 25px; }
.menu-open .burger span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.menu-open .burger span:nth-child(2) { top: 21px; transform: rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 90;
  display: flex; align-items: center;
  padding: var(--topbar) var(--pad) 40px;
  background: rgba(7, 8, 10, .96);
  backdrop-filter: blur(12px);
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
  transition: clip-path .8s var(--ease), visibility 0s linear .8s;
}
.menu-open .mobile-menu { clip-path: inset(0); visibility: visible; transition: clip-path .8s var(--ease); }
.mobile-menu nav { display: flex; flex-direction: column; gap: 6px; }
.mobile-menu a {
  display: flex; align-items: baseline; gap: 16px;
  font-size: clamp(34px, 9vw, 64px); font-weight: 500; letter-spacing: -.03em; line-height: 1.12;
  opacity: 0; transform: translateY(30px);
  transition: opacity .5s, transform .7s var(--ease-out), color .3s;
}
.mobile-menu a small { font-family: var(--mono); font-size: 12px; color: var(--dim); letter-spacing: .1em; }
.mobile-menu a:hover { color: var(--accent); }
.menu-open .mobile-menu a { opacity: 1; transform: none; }
.menu-open .mobile-menu a:nth-child(1) { transition-delay: .15s; }
.menu-open .mobile-menu a:nth-child(2) { transition-delay: .2s; }
.menu-open .mobile-menu a:nth-child(3) { transition-delay: .25s; }
.menu-open .mobile-menu a:nth-child(4) { transition-delay: .3s; }
.menu-open .mobile-menu a:nth-child(5) { transition-delay: .35s; }
.menu-open .mobile-menu a:nth-child(6) { transition-delay: .4s; }
.menu-open .mobile-menu a:nth-child(7) { transition-delay: .45s; }

/* ---------- Botones ---------- */
.btn {
  --h: 58px;
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  height: var(--h); padding: 0 30px;
  border-radius: 999px;
  font-weight: 500; font-size: 16px; letter-spacing: -.01em; white-space: nowrap;
  overflow: hidden; isolation: isolate;
  transition: transform .5s var(--ease-out), background-color .4s, color .4s, border-color .4s;
}
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .5s var(--ease-out); }
.btn:hover svg { transform: translateX(4px); }
.btn::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  border-radius: inherit;
  transform: translateY(101%); transition: transform .6s var(--ease);
}
.btn:hover::before { transform: none; }

.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary::before { background: var(--fg); }
.btn--ghost, .btn--outline { border: 1px solid var(--line-2); color: var(--fg); }
.btn--ghost::before, .btn--outline::before { background: var(--fg); }
.btn--ghost:hover, .btn--outline:hover { color: var(--bg); border-color: var(--fg); }
.btn--small { --h: 44px; padding: 0 22px; font-size: 14px; }

.round-btn {
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--line-2);
  transition: background-color .3s, color .3s, border-color .3s, opacity .3s;
}
.round-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.round-btn:hover:not(:disabled) { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.round-btn:disabled { opacity: .3; cursor: default; }

/* ---------- Navegación lateral (puntos) ---------- */
.dots {
  position: fixed; right: calc(var(--pad) * .45); top: 50%; z-index: 80;
  display: flex; flex-direction: column; gap: 6px;
  transform: translateY(-50%);
  opacity: 0; transition: opacity .8s .5s;
}
.is-loaded .dots { opacity: 1; }
.dots__item {
  display: flex; align-items: center; justify-content: flex-end; gap: 14px;
  height: 22px; padding-left: 12px;
}
.dots__line {
  display: block; width: 14px; height: 1.5px; background: var(--dim);
  transition: width .6s var(--ease), background-color .3s;
}
.dots__label {
  font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted);
  opacity: 0; transform: translateX(8px);
  transition: opacity .35s, transform .5s var(--ease-out);
}
.dots__item:hover .dots__label, .dots__item:focus-visible .dots__label { opacity: 1; transform: none; }
.dots__item:hover .dots__line { width: 24px; background: var(--fg); }
.dots__item[aria-current="true"] .dots__line { width: 36px; background: var(--accent); }

/* ---------- HUD ---------- */
.hud {
  position: fixed; left: var(--pad); bottom: 30px; z-index: 80;
  display: flex; align-items: center; gap: 14px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .1em; color: var(--muted);
  opacity: 0; transition: opacity .8s .5s;
}
.is-loaded .hud { opacity: 1; }
.hud__index { color: var(--fg); min-width: 2ch; }
.hud__bar { position: relative; width: 90px; height: 1px; background: var(--line); overflow: hidden; }
.hud__bar i {
  position: absolute; inset: 0; background: var(--fg);
  transform-origin: left; transform: scaleX(var(--p, 0));
  transition: transform 1s var(--ease);
}
.hud__title { margin-left: 14px; text-transform: uppercase; color: var(--dim); }

/* ---------- Pista de scroll ---------- */
.scroll-hint {
  position: fixed; left: 50%; bottom: 26px; z-index: 80;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .25em; text-transform: uppercase; color: var(--muted);
  transform: translateX(-50%);
  opacity: 0; transition: opacity .6s, transform .6s var(--ease-out);
}
.is-loaded .scroll-hint { opacity: 1; transition-delay: 1.6s; }
.is-loaded .scroll-hint.is-hidden { opacity: 0; transform: translate(-50%, 10px); transition-delay: 0s; }
.scroll-hint__mouse { position: relative; width: 22px; height: 34px; border: 1.5px solid var(--dim); border-radius: 12px; }
.scroll-hint__mouse i {
  position: absolute; left: 50%; top: 7px; width: 2px; height: 7px; margin-left: -1px;
  border-radius: 2px; background: var(--fg);
  animation: wheel 1.8s var(--ease) infinite;
}
@keyframes wheel { 0% { opacity: 0; transform: translateY(-3px); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(10px); } }

/* ==========================================================================
   Secciones
   ========================================================================== */
.sections { position: relative; z-index: 2; }

.section {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex; flex-direction: column;
  scroll-snap-align: start;
}
.section__scroll { flex: 1; display: flex; width: 100%; }
.section__inner {
  width: 100%; max-width: 1560px;
  margin: 0 auto;
  padding: calc(var(--topbar) + 3vh) var(--pad) 12vh;
  display: flex; flex-direction: column; justify-content: center;
}

/* Modo scroll-jacking: secciones apiladas a pantalla completa */
.is-jack .section {
  position: fixed; inset: 0;
  height: 100%; min-height: 0;
  visibility: hidden;
  overflow: hidden;
  will-change: transform, opacity;
}
.is-jack .section.is-current { visibility: visible; z-index: 3; }
.is-jack .section.is-leaving { visibility: visible; z-index: 2; pointer-events: none; }
.is-jack .section__scroll {
  height: 100%;
  overflow-y: auto; overflow-x: hidden;
  scrollbar-width: none;
}
.is-jack .section__scroll::-webkit-scrollbar { display: none; }
.is-jack .section__inner { min-height: 100%; }

.is-resetting, .is-resetting * { transition: none !important; }

/* ---------- Revelado de contenido ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(36px);
  filter: blur(6px);
  transition:
    opacity .9s var(--ease-out),
    transform 1.2s var(--ease-out),
    filter .9s var(--ease-out);
  transition-delay: calc(var(--d, 0) * 90ms + var(--base-delay));
}
.js .is-active [data-reveal] { opacity: 1; transform: none; filter: none; }

.line { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }
.line > span { display: block; }
.js .line > span {
  transform: translateY(110%) rotate(2deg);
  transform-origin: left bottom;
  transition: transform 1.25s var(--ease-out);
  transition-delay: calc(var(--d, 0) * 95ms + var(--base-delay));
}
.js .is-active .line > span { transform: none; }

.word {
  display: inline-block;
  transition: opacity .7s var(--ease-out), transform .9s var(--ease-out), filter .7s;
  transition-delay: calc(var(--i, 0) * 28ms + var(--base-delay) + 120ms);
}
.js .word { opacity: .1; transform: translateY(.25em); filter: blur(4px); }
.js .is-active .word { opacity: 1; transform: none; filter: none; }

/* ---------- Tipografía común ---------- */
.label {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 3.2vh;
}
.label span { color: var(--accent); }
.label::after { content: ''; width: 46px; height: 1px; background: var(--line-2); }

.title {
  font-size: clamp(38px, 5.6vw, 96px);
  line-height: .98; letter-spacing: -.045em; font-weight: 500;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4vh;
}
.pulse { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.pulse::after {
  content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 1px solid var(--accent);
  animation: pulse 2.2s var(--ease-out) infinite;
}
@keyframes pulse { from { transform: scale(.4); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }

/* ---------- 01 · Hero ---------- */
.hero__grid {
  display: grid; grid-template-columns: 1.25fr 1fr; align-items: center; gap: 4vw;
}
.hero__title {
  font-size: clamp(46px, 7.4vw, 132px);
  line-height: .94; letter-spacing: -.05em; font-weight: 500;
}
.hero__lead {
  max-width: 34em; margin-top: 4.5vh;
  font-size: clamp(16px, 1.3vw, 20px); color: var(--muted); line-height: 1.6;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 5vh; }

.hero__visual { display: grid; place-items: center; perspective: 1200px; }
.hero__tilt {
  position: relative;
  width: min(100%, 58vh, 560px);
  aspect-ratio: 1;
  display: grid; place-items: center;
  transform-style: preserve-3d;
  will-change: transform;
}
.hero__hex { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hex { fill: none; stroke-width: .22; vector-effect: non-scaling-stroke; }
.hex--a {
  stroke: var(--line-2); stroke-width: 1px;
  stroke-dasharray: 1; stroke-dashoffset: 1;
  transition: stroke-dashoffset 2.4s var(--ease) calc(var(--base-delay) + 300ms);
}
.is-active .hex--a { stroke-dashoffset: 0; }
.hex--b {
  stroke: var(--line); stroke-width: 1px; stroke-dasharray: 2 6;
  transform-origin: 50% 50%;
  animation: spin 60s linear infinite;
}
.hex-dot {
  fill: var(--accent);
  offset-path: path('M50,2 L91.57,26 L91.57,74 L50,98 L8.43,74 L8.43,26 Z');
  animation: orbit 14s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes orbit { from { offset-distance: 0%; } to { offset-distance: 100%; } }

.hero__logo {
  position: relative;
  width: 58%; height: auto;
  fill: var(--fg);
  overflow: visible;
  transform: translateZ(60px);
}
.hero__logo .lp {
  transform-box: fill-box;
  transition: transform 1.6s var(--ease-out), opacity 1.2s var(--ease-out), fill .5s;
}
.js .hero__logo .lp { opacity: 0; }
.js .hero__logo .lp--g { transform: translate(0, -700px); }
.js .hero__logo .lp--r { transform: translate(606px, 350px); }
.js .hero__logo .lp--f { transform: translate(-606px, 350px); }
.js .hero.is-active .hero__logo .lp { opacity: 1; transform: none; }
.js .hero.is-active .hero__logo .lp--g { transition-delay: calc(var(--base-delay) + 200ms); }
.js .hero.is-active .hero__logo .lp--r { transition-delay: calc(var(--base-delay) + 330ms); }
.js .hero.is-active .hero__logo .lp--f { transition-delay: calc(var(--base-delay) + 460ms); }
/* Al pasar el ratón, el cubo se "despiece" ligeramente */
.js .hero.is-active .hero__visual:hover .lp { transition-delay: 0s; transition-duration: .9s; }
.js .hero.is-active .hero__visual:hover .lp--g { transform: translate(0, -110px); }
.js .hero.is-active .hero__visual:hover .lp--r { transform: translate(95px, 55px); fill: var(--accent); }
.js .hero.is-active .hero__visual:hover .lp--f { transform: translate(-95px, 55px); }

/* ---------- 02 · Nosotros ---------- */
.statement {
  font-size: clamp(28px, 3.7vw, 64px);
  line-height: 1.1; letter-spacing: -.035em; font-weight: 400;
  max-width: min(1200px, 100%);
}
.pillars {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 3vw;
  margin-top: 7vh;
}
.pillar { position: relative; padding-top: 26px; }
.pillar::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--line-2);
  transform: scaleX(0); transform-origin: left;
  transition: transform 1.4s var(--ease) calc(var(--d, 0) * 90ms + var(--base-delay));
}
.is-active .pillar::before { transform: none; }
.pillar__n { font-family: var(--mono); font-size: 12px; color: var(--accent); letter-spacing: .1em; }
.pillar h3 { margin: 14px 0 10px; font-size: clamp(20px, 1.7vw, 28px); font-weight: 500; letter-spacing: -.02em; }
.pillar p { color: var(--muted); max-width: 30em; }

.marquee {
  position: absolute; left: 0; right: 0; bottom: 11vh;
  overflow: hidden; pointer-events: none;
  opacity: .9;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
}
.marquee__track {
  display: flex; align-items: center; gap: 3vw; width: max-content;
  font-size: clamp(30px, 4.4vw, 72px); font-weight: 600; letter-spacing: -.03em; line-height: 1;
  color: transparent; -webkit-text-stroke: 1px rgba(243, 243, 239, .14);
  animation: marquee 38s linear infinite;
}
.marquee__track i { font-style: normal; font-size: .3em; -webkit-text-stroke: 0; color: var(--accent); opacity: .7; }
@keyframes marquee { to { transform: translateX(-50%); } }
.about .section__inner { padding-bottom: 24vh; }

/* ---------- 03 · Servicios ---------- */
.services { --card: min(60vw, 900px); --gap: clamp(16px, 2.4vw, 36px); }
.services__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; }
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper__count { font-family: var(--mono); font-size: 13px; color: var(--dim); letter-spacing: .1em; margin-right: 14px; }
.stepper__count b { color: var(--fg); font-weight: 500; }

.services__viewport { margin-top: 6vh; }
.services__track {
  display: flex; gap: var(--gap);
  transition: transform 1s var(--ease);
}
.is-native .services__viewport { margin-left: calc(var(--pad) * -1); margin-right: calc(var(--pad) * -1); }
.is-native .services__track {
  overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 0 var(--pad) 8px; scroll-padding: 0 var(--pad);
  scrollbar-width: none;
}
.is-native .services__track::-webkit-scrollbar { display: none; }
.is-native .svc { scroll-snap-align: start; }
.is-jack .services__track { transform: translateX(calc(var(--sub, 0) * -1 * (var(--card) + var(--gap)))); }

.svc {
  position: relative;
  flex: 0 0 var(--card);
  display: grid; grid-template-columns: 1fr auto; gap: 4vw; align-items: center;
  min-height: min(48vh, 460px);
  padding: clamp(28px, 3.6vw, 60px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(120% 120% at 100% 0%, rgba(200, 255, 61, .06), transparent 50%),
    linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .01));
  backdrop-filter: blur(8px);
  transition: opacity .9s var(--ease-out), transform 1s var(--ease), border-color .6s;
}
.is-jack .svc { opacity: .22; transform: scale(.94); }
.is-jack .svc.is-current { opacity: 1; transform: none; border-color: var(--line-2); }
.svc__n { font-family: var(--mono); font-size: 13px; color: var(--accent); letter-spacing: .1em; }
.svc h3 { margin: 2.4vh 0 2vh; font-size: clamp(32px, 4vw, 68px); line-height: 1; font-weight: 500; letter-spacing: -.045em; }
.svc p { color: var(--muted); max-width: 32em; font-size: clamp(15px, 1.15vw, 18px); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 3.4vh; list-style: none; }
.tags li {
  padding: 7px 14px; border: 1px solid var(--line-2); border-radius: 999px;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .04em; color: var(--muted);
}
.svc__icon {
  width: clamp(110px, 13vw, 200px); height: auto;
  fill: none; stroke: var(--fg); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round;
}
.svc__icon > * { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.6s var(--ease); }
.svc__icon > *:nth-child(2) { transition-delay: .1s; }
.svc__icon > *:nth-child(3) { transition-delay: .2s; }
.svc__icon > *:nth-child(4) { transition-delay: .3s; }
.svc__icon > *:nth-child(5) { transition-delay: .4s; }
.svc__icon > *:nth-child(6) { transition-delay: .5s; }
.svc__icon > *:nth-child(7) { transition-delay: .6s; stroke: var(--accent); }
.svc__icon > *:last-child { stroke: var(--accent); }
.is-active .svc.is-current .svc__icon > *,
.is-native .is-active .svc__icon > * { stroke-dashoffset: 0; }

/* ---------- 04 · Soluciones ---------- */
.sols { margin-top: 5vh; }
.sols__head, .sol {
  display: grid; grid-template-columns: 1fr clamp(50px, 7vw, 110px) 1fr; gap: 2.4vw; align-items: center;
}
.sols__head {
  padding-bottom: 14px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--dim);
}
.sols__head span:last-child { color: var(--accent); }
.sol {
  position: relative;
  padding: 2.6vh 0;
  border-top: 1px solid var(--line);
  font-size: clamp(16px, 1.55vw, 25px); line-height: 1.3; letter-spacing: -.015em;
}
.sol:last-child { border-bottom: 1px solid var(--line); }
.sol::before {
  content: ''; position: absolute; inset: 0 -2vw; z-index: -1; border-radius: 14px;
  background: rgba(255, 255, 255, .03); opacity: 0; transition: opacity .4s;
}
.sol:hover::before { opacity: 1; }

.sol__before { color: var(--muted); }
.sol__before span {
  background: linear-gradient(var(--danger), var(--danger)) 0 58% / 0% 1.5px no-repeat;
  transition: background-size 1s var(--ease), color .8s;
  transition-delay: calc(var(--d, 0) * 110ms + var(--base-delay) + 250ms);
}
.sol__arrow { width: 100%; height: 12px; fill: none; stroke: var(--accent); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.sol__arrow path {
  stroke-dasharray: 1; stroke-dashoffset: 1;
  transition: stroke-dashoffset .8s var(--ease);
  transition-delay: calc(var(--d, 0) * 110ms + var(--base-delay) + 550ms);
}
.sol__after {
  font-weight: 500;
  transition: opacity .9s var(--ease-out), transform 1s var(--ease-out), filter .9s;
  transition-delay: calc(var(--d, 0) * 110ms + var(--base-delay) + 750ms);
}
.js .sol__after { opacity: 0; transform: translateX(-24px); filter: blur(6px); }
.js .sol { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease-out), transform 1s var(--ease-out); transition-delay: calc(var(--d, 0) * 110ms + var(--base-delay)); }

.is-active .sol { opacity: 1; transform: none; }
.is-active .sol__before span { background-size: 100% 1.5px; color: var(--dim); }
.is-active .sol__arrow path { stroke-dashoffset: 0; }
.js .is-active .sol__after { opacity: 1; transform: none; filter: none; }

/* ---------- 05 · Proceso ---------- */
.steps {
  --sub: 0;
  position: relative;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 3vw;
  list-style: none;
  margin-top: 9vh; padding-top: 52px;
}
.steps::before, .steps::after {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px;
}
.steps::before { background: var(--line-2); }
.steps::after {
  background: var(--accent);
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 1.1s var(--ease) calc(var(--base-delay) + 200ms);
}
.is-jack .is-active .steps::after { transform: scaleX(calc((var(--sub) + .5) / 4)); }
.is-native .is-active .steps::after { transform: scaleX(1); }

.step { position: relative; transition: opacity .8s var(--ease-out), transform 1s var(--ease-out); }
.step::before {
  content: ''; position: absolute; left: 0; top: -57px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--line-2);
  transition: background-color .5s, border-color .5s, box-shadow .5s;
}
.is-jack .step { opacity: .2; transform: translateY(16px); }
.is-jack .step.is-reached { opacity: 1; transform: none; }
.step.is-reached::before, .is-native .step::before { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 6px rgba(200, 255, 61, .12); }
.step__n {
  display: block;
  font-size: clamp(56px, 6.4vw, 120px); line-height: .9; font-weight: 600; letter-spacing: -.05em;
  color: transparent; -webkit-text-stroke: 1px var(--line-2);
  transition: color .8s, -webkit-text-stroke-color .8s;
}
.step.is-current .step__n { color: var(--fg); -webkit-text-stroke-color: transparent; }
.step h3 { margin: 3vh 0 1.4vh; font-size: clamp(20px, 1.7vw, 28px); font-weight: 500; letter-spacing: -.02em; }
.step p { color: var(--muted); }

/* ---------- 06 · Tu problema ---------- */
.problem__grid {
  display: grid; grid-template-columns: 1fr 1.08fr; gap: 6vw; align-items: center;
}
.problem__lead { margin-top: 4vh; max-width: 30em; color: var(--muted); font-size: clamp(15px, 1.2vw, 19px); line-height: 1.6; }
.mini-steps { list-style: none; margin-top: 5vh; display: grid; gap: 14px; }
.mini-steps li { display: flex; align-items: center; gap: 16px; font-size: 15px; }
.mini-steps b {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--line-2);
  font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--accent);
}

.form-card {
  position: relative;
  padding: clamp(24px, 3vw, 46px);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .015));
  backdrop-filter: blur(14px);
  box-shadow: 0 40px 120px -40px rgba(0, 0, 0, .8);
}
.form-card::before {
  content: ''; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
  padding: 1px;
  background: conic-gradient(from var(--ang, 0deg), transparent 0 70%, rgba(200, 255, 61, .6) 80%, transparent 90%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: ang 6s linear infinite;
  opacity: .7;
}
@property --ang { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes ang { to { --ang: 360deg; } }

.pform { display: grid; gap: 26px; }
.pform[hidden] { display: none; }
.field { display: grid; gap: 10px; }
.field__top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.field label { font-size: 14px; font-weight: 500; }
.field__count { font-family: var(--mono); font-size: 11px; color: var(--dim); }

.pform textarea, .pform input[type="email"] {
  width: 100%;
  font: inherit; font-size: 16px; color: var(--fg); line-height: 1.55;
  background: rgba(0, 0, 0, .35);
  border: 1px solid var(--line-2);
  border-radius: 16px;
  padding: 16px 18px;
  transition: border-color .3s, box-shadow .3s, background-color .3s;
}
.pform textarea { resize: vertical; min-height: 150px; max-height: 40vh; }
.pform input[type="email"] { height: 56px; }
.pform textarea::placeholder, .pform input::placeholder { color: var(--dim); }
.pform textarea:hover, .pform input[type="email"]:hover { border-color: rgba(243, 243, 239, .35); }
.pform textarea:focus, .pform input[type="email"]:focus {
  outline: none; border-color: var(--accent); background: rgba(0, 0, 0, .5);
  box-shadow: 0 0 0 4px rgba(200, 255, 61, .12);
}
.field.has-error textarea, .field.has-error input[type="email"] { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(255, 107, 94, .12); }
.field__error { min-height: 0; font-size: 13px; color: var(--danger); }
.field__error:empty { display: none; }

.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.chips__label { font-family: var(--mono); font-size: 11px; color: var(--dim); letter-spacing: .08em; margin-right: 2px; }
.chip {
  padding: 6px 12px; border-radius: 999px;
  border: 1px dashed var(--line-2);
  font-size: 12.5px; color: var(--muted);
  transition: color .3s, border-color .3s, background-color .3s, transform .3s var(--ease-out);
}
.chip:hover { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); border-style: solid; transform: translateY(-2px); }

.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.check { display: flex; gap: 14px; align-items: flex-start; cursor: pointer; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.check input { position: absolute; opacity: 0; width: 22px; height: 22px; margin: 0; cursor: pointer; }
.check__box {
  flex: 0 0 22px; height: 22px; margin-top: 1px;
  border-radius: 7px; border: 1px solid var(--line-2);
  display: grid; place-items: center;
  transition: background-color .3s, border-color .3s;
}
.check__box::after {
  content: ''; width: 10px; height: 6px; margin-top: -3px;
  border-left: 2px solid var(--accent-ink); border-bottom: 2px solid var(--accent-ink);
  transform: rotate(-45deg) scale(0); transition: transform .35s var(--ease-out);
}
.check input:checked + .check__box { background: var(--accent); border-color: var(--accent); }
.check input:checked + .check__box::after { transform: rotate(-45deg) scale(1); }
.check input:focus-visible + .check__box { outline: 2px solid var(--accent); outline-offset: 3px; }
.field--check.has-error .check__box { border-color: var(--danger); }

.pform__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.btn--submit { min-width: 220px; }
.btn__spinner {
  display: none; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(11, 13, 5, .25); border-top-color: var(--accent-ink);
  animation: spin .8s linear infinite;
}
.is-sending .btn__spinner { display: block; }
.is-sending .btn--submit svg { display: none; }
.is-sending .btn--submit { pointer-events: none; opacity: .85; }
.pform__status { font-size: 13.5px; color: var(--muted); flex: 1 1 220px; }
.pform__status.is-error { color: var(--danger); }
.pform__status a { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }

.sent {
  display: grid; justify-items: start; gap: 18px;
  padding: 3vh 0;
  animation: sent-in 1s var(--ease-out) both;
}
.sent[hidden] { display: none; }
@keyframes sent-in { from { opacity: 0; transform: translateY(24px); filter: blur(8px); } }
.sent__icon { width: 64px; height: 64px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sent__icon * { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.1s var(--ease) .2s forwards; }
.sent__icon path { animation-delay: .8s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.sent h3 { font-size: clamp(32px, 3.4vw, 54px); font-weight: 500; letter-spacing: -.04em; line-height: 1; }
.sent p { color: var(--muted); max-width: 30em; }
.sent b { color: var(--fg); font-weight: 500; word-break: break-all; }

/* ---------- 07 · Contacto ---------- */
.contact .section__inner { padding-bottom: 18vh; }
.contact__title {
  font-size: clamp(72px, 15vw, 260px);
  line-height: .86; letter-spacing: -.065em; font-weight: 500;
}
.contact__row { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 28px; margin-top: 5vh; }
.contact__email {
  position: relative;
  font-size: clamp(26px, 3.6vw, 60px); letter-spacing: -.035em; font-weight: 400;
}
.contact__email::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -.08em; height: 2px; background: var(--accent);
  transform: scaleX(.12); transform-origin: left; transition: transform .8s var(--ease);
}
.contact__email:hover::after { transform: scaleX(1); }
.contact__note { margin-top: 4vh; color: var(--muted); }
.contact__note a { color: var(--fg); border-bottom: 1px solid var(--line-2); transition: border-color .3s; }
.contact__note a:hover { border-color: var(--accent); }

.footer {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap;
  padding: 24px var(--pad) 28px;
  border-top: 1px solid var(--line);
  font-size: 13px; color: var(--muted);
}
.footer__brand { display: flex; align-items: center; gap: 14px; }
.footer__brand svg { width: 20px; fill: currentColor; }
.footer__top { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; transition: color .3s; }
.footer__top svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .5s var(--ease-out); }
.footer__top:hover { color: var(--fg); }
.footer__top:hover svg { transform: translateY(-4px); }
.is-contact-active .hud { opacity: 0; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1180px) {
  .menu, .topbar__cta { display: none; }
  .burger { display: block; }
}

@media (max-width: 899px) {
  :root { --topbar: 72px; }
  .dots, .hud { display: none; }
  .scroll-hint { display: none; }

  .section__inner { padding-top: calc(var(--topbar) + 32px); padding-bottom: 72px; }

  .hero__grid { grid-template-columns: 1fr; gap: 24px; }
  .hero__visual { order: -1; }
  .hero__tilt { width: min(56vw, 260px); }
  .hero__text { text-align: left; }

  .pillars { grid-template-columns: 1fr; gap: 28px; margin-top: 44px; }
  .about .section__inner { padding-bottom: 140px; }

  .services__head { flex-direction: column; align-items: flex-start; }
  .services__viewport { margin-top: 36px; }
  .svc { flex-basis: 84vw; grid-template-columns: 1fr; min-height: 0; }
  .svc__icon { order: -1; width: 84px; }

  .sols__head { display: none; }
  .sol { grid-template-columns: 1fr; gap: 10px; padding: 22px 0; }
  .sol__arrow { width: 40px; transform: rotate(90deg); margin: 4px 0; }

  .steps { grid-template-columns: 1fr; gap: 34px; padding-top: 0; padding-left: 34px; margin-top: 44px; }
  .steps::before, .steps::after { left: 5px; right: auto; top: 0; bottom: 0; width: 1px; height: auto; }
  .steps::after { transform-origin: top; transform: scaleY(0); }
  .is-native .is-active .steps::after { transform: scaleY(1); }
  .step::before { left: -34px; top: 8px; }
  .step__n { font-size: 48px; }
  .step h3 { margin-top: 12px; }

  .problem__grid { grid-template-columns: 1fr; gap: 40px; }

  .contact .section__inner { padding-bottom: 160px; }
  .footer { flex-direction: column; align-items: flex-start; }
}

@media (min-width: 900px) and (max-height: 760px) {
  .services .title { font-size: clamp(34px, 4.4vw, 64px); }
  .services__viewport { margin-top: 4vh; }
  .svc { min-height: 0; padding-top: 32px; padding-bottom: 32px; }
  .svc h3 { margin: 12px 0; }
  .pform { gap: 18px; }
  .pform textarea { min-height: 110px; }
  .mini-steps { margin-top: 3vh; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
  .grain { display: none; }
}
