/* ==========================================================================
   Xelaris — sitio portafolio
   Marca: Manual de marca v1.0 (octubre 2026). Sora para todo el texto; el logo
   se usa siempre como dibujo (SVG), nunca escrito con una fuente.
   Concepto: "la x marca el lugar". Un único punto violeta recorre la página y
   marca cada punto importante.
   ========================================================================== */

/* Lienzo Noche con piezas claras (Hielo) como figura; violetas en poca dosis. */
:root {
  color-scheme: dark;

  /* Paleta oficial */
  --noche: #1B1745;
  --violeta: #9A7CFF;
  --profundo: #6A4DF0;
  --lila: #C9BEFF;
  --hielo: #F4F3FF;
  --blanco: #FFFFFF;

  /* Tonos de apoyo tomados del manual */
  --noche-2: #2A2560;          /* superficie elevada (ícono de app) */
  --tinta-2: #4A4380;          /* texto secundario sobre claro */
  --borde-claro: #D3CBF6;      /* borde de tarjetas sobre claro */
  --linea: rgba(201, 190, 255, .16);
  --linea-2: rgba(201, 190, 255, .3);
  --linea-clara: rgba(27, 23, 69, .12);

  /* Estados de datos: solo dentro de las maquetas */
  --aviso: #FFD37A;
  --error: #FF8FA3;

  --font: "Sora", Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --nav-h: 72px;
  --r-card: 28px;
  --r-panel: 20px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 24px); }
body {
  margin: 0;
  background: var(--noche);
  color: var(--hielo);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 600; text-wrap: balance; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--violeta); outline-offset: 3px; border-radius: 6px; }
.sec-light :focus-visible { outline-color: var(--profundo); }
::selection { background: var(--violeta); color: var(--noche); }

.skip {
  position: fixed; left: 16px; top: -60px; z-index: 100;
  background: var(--hielo); color: var(--noche); padding: 10px 16px; border-radius: 999px;
  text-decoration: none; font-size: 14px; transition: top .2s;
}
.skip:focus { top: 16px; }
.nw { white-space: nowrap; }
.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;
}

.wrap { max-width: calc(var(--wrap) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.sec { position: relative; z-index: 1; padding-block: clamp(96px, 12vw, 168px); }
.sec-light { background: var(--hielo); color: var(--noche); }
.sec-violet { background: var(--profundo); color: var(--hielo); }

.mono {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-weight: 400;
}
.eyebrow { display: flex; align-items: center; gap: 12px; color: var(--lila); margin-bottom: 24px; }
.eyebrow::before { content: ""; width: 24px; height: 1px; background: currentColor; opacity: .7; }
.sec-light .eyebrow { color: var(--tinta-2); }
.sec-violet .eyebrow { color: var(--hielo); }

.h2 { font-size: clamp(34px, 4.4vw, 48px); line-height: 1.08; letter-spacing: -.028em; max-width: 18ch; }
.section-head { display: grid; gap: 20px; max-width: 760px; }
.section-lead { font-size: clamp(17px, 1.5vw, 19px); color: var(--lila); max-width: 56ch; }
.sec-light .section-lead { color: var(--tinta-2); }

/* ---------- Botones ---------- */
.btn {
  --bg: var(--profundo); --fg: var(--hielo);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 24px; border-radius: 999px;
  background: var(--bg); color: var(--fg); border: 1px solid transparent;
  font-size: 15px; font-weight: 600; letter-spacing: -.005em; text-decoration: none; cursor: pointer;
  transition: background-color .25s, color .25s, border-color .25s, transform .35s var(--ease-out);
  will-change: transform;
}
.btn:hover { --bg: #7A60F4; }
.btn .arr { transition: transform .35s var(--ease-out); }
.btn:hover .arr { transform: translateX(3px); }
.btn-ghost { --bg: transparent; --fg: var(--hielo); border-color: var(--linea-2); }
.btn-ghost:hover { --bg: rgba(201, 190, 255, .08); border-color: var(--lila); }
.btn-light { --bg: var(--hielo); --fg: var(--noche); }
.btn-light:hover { --bg: var(--blanco); }
.btn-sm { min-height: 40px; padding: 0 18px; font-size: 14px; }

/* ---------- El punto: zócalos donde aterriza ---------- */
.spot {
  --spot-c: var(--violeta);
  position: relative;
  display: inline-block;
  width: .2em; height: .2em;
  margin-left: .05em;
  border-radius: 50%;
  background: currentColor;
  vertical-align: baseline;
  transition: background-color .35s var(--ease);
}
.sec-light .spot, .case .spot { --spot-c: var(--profundo); }
.sec-violet .spot { --spot-c: var(--blanco); }
.spot.is-marked { background: var(--spot-c); }
.spot.is-here { background: transparent; }

.ripple {
  position: absolute; left: 50%; top: 50%;
  width: 100%; height: 100%;
  translate: -50% -50%;
  border-radius: 50%;
  border: 2px solid var(--spot-c, var(--violeta));
  pointer-events: none;
  animation: ripple .9s var(--ease-out) forwards;
}
@keyframes ripple {
  from { transform: scale(1); opacity: .9; }
  to { transform: scale(5.5); opacity: 0; }
}

/* La pelotita que recorre la página */
.ball {
  position: fixed; left: 0; top: 0; z-index: 70;
  width: 128px; height: 128px; margin: -64px 0 0 -64px;
  border-radius: 50%;
  background: rgb(154, 124, 255);
  pointer-events: none;
  opacity: 0;
  transform: translate3d(-500px, -500px, 0) scale(.1);
  will-change: transform;
}
.ball.on { opacity: 1; }

/* Grilla de puntos de fondo (canvas) */
.field { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }

/* ---------- Navegación ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 80;
  padding-top: env(safe-area-inset-top, 0px);
  border-bottom: 1px solid transparent;
  transition: background-color .3s, border-color .3s;
}
.nav.scrolled {
  background: rgba(27, 23, 69, .8);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
  border-bottom-color: var(--linea);
}
.nav-in { height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.nav-logo { display: block; padding: 6px 0; transition: opacity .4s var(--ease), transform .5s var(--ease-out); }
.nav-logo svg { height: 24px; width: auto; color: var(--blanco); }
.nav-logo .dot { fill: var(--violeta); }
.js .nav:not(.logo-on) .nav-logo { opacity: 0; transform: translateY(-6px); pointer-events: none; }
.nav-links { display: flex; align-items: center; gap: 30px; font-size: 14px; }
.nav-links a:not(.btn) { text-decoration: none; color: var(--lila); transition: color .2s; position: relative; }
.nav-links a:not(.btn):hover, .nav-links a[aria-current="true"] { color: var(--hielo); }
.nav-links a[aria-current="true"]::after {
  content: ""; position: absolute; left: 50%; bottom: -10px; width: 4px; height: 4px; margin-left: -2px;
  border-radius: 50%; background: var(--violeta);
}
.menu-btn {
  display: none; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--linea-2); background: transparent; cursor: pointer;
  align-items: center; justify-content: center; flex-direction: column; gap: 5px;
}
.menu-btn span { width: 16px; height: 1.5px; background: var(--hielo); border-radius: 2px; transition: transform .3s var(--ease); }
.menu-open .menu-btn span:first-child { transform: translateY(3.25px) rotate(45deg); }
.menu-open .menu-btn span:last-child { transform: translateY(-3.25px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 79;
  background: var(--noche);
  padding: calc(var(--nav-h) + 40px + env(safe-area-inset-top, 0px)) var(--gutter) 40px;
  display: flex; flex-direction: column; justify-content: space-between;
  opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
}
.menu-open .mobile-menu { opacity: 1; visibility: visible; }
.mobile-menu ul { display: grid; gap: 6px; }
.mobile-menu a { text-decoration: none; font-size: 36px; font-weight: 600; letter-spacing: -.03em; line-height: 1.25; }

/* ---------- Hero ---------- */
.hero { position: relative; z-index: 1; padding-top: calc(var(--nav-h) + clamp(64px, 11vw, 150px)); padding-bottom: clamp(36px, 5vw, 56px); }
.hero-logo { width: min(100%, 860px); height: auto; overflow: visible; }
.hl-letter { fill: var(--blanco); transform-box: fill-box; transform-origin: 50% 100%; }
.hl-stroke { fill: none; stroke: var(--blanco); stroke-width: 24; stroke-linecap: round; }
.hl-dot { fill: var(--violeta); transform-box: fill-box; transform-origin: center; transition: fill .5s var(--ease); }
.hl-dot.is-white { fill: var(--blanco); transition: none; }
.hl-ring { fill: none; stroke: var(--violeta); stroke-width: 1.5; vector-effect: non-scaling-stroke; opacity: 0; transform-box: fill-box; transform-origin: center; }
/* Mientras arranca la intro el logo espera oculto; si el script no carga, aparece igual. */
.js .hero-logo:not(.intro-ready) { opacity: 0; animation: logo-failsafe .5s 2.5s forwards; }
@keyframes logo-failsafe { to { opacity: 1; } }

.hero-body {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px); align-items: end;
  margin-top: clamp(56px, 11vw, 140px);
}
.hero-title { font-size: clamp(38px, 5.2vw, 68px); line-height: 1.02; letter-spacing: -.035em; }
.hero-side { display: grid; gap: 28px; }
.hero-lead { font-size: clamp(17px, 1.5vw, 19px); line-height: 1.6; color: var(--lila); max-width: 50ch; }
.hero-lead strong { color: var(--hielo); font-weight: 400; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap;
  margin-top: clamp(56px, 8vw, 104px); padding-top: 20px; border-top: 1px solid var(--linea);
}
.status-list { display: flex; flex-wrap: wrap; gap: 10px 28px; color: var(--lila); }
.status-list li { display: inline-flex; align-items: center; gap: 10px; }
.status-list b { color: var(--hielo); font-weight: 500; }
.pip { width: 6px; height: 6px; border-radius: 50%; background: var(--lila); opacity: .7; }
.hint { color: var(--lila); display: inline-flex; align-items: center; gap: 10px; transition: opacity .6s var(--ease); }
.js .hint { opacity: 0; }
.js .hint.show { opacity: 1; }

/* ---------- Estudio (manifiesto + cifras) ---------- */
.statement {
  font-size: clamp(28px, 3.7vw, 50px); line-height: 1.2; letter-spacing: -.025em; font-weight: 400;
  max-width: 23em;
}
.statement .w { transition: opacity .25s linear; }
.stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: clamp(72px, 9vw, 128px); border-top: 1px solid var(--linea-clara);
}
.stat { padding: 28px 24px 4px 0; display: grid; gap: 12px; align-content: start; }
.stat + .stat { padding-left: 24px; border-left: 1px solid var(--linea-clara); }
.stat-n { font-size: clamp(52px, 6.4vw, 92px); font-weight: 300; line-height: 1; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.stat-l { color: var(--noche); font-weight: 500; }
.stat-d { font-size: 14px; color: var(--tinta-2); line-height: 1.5; }

/* ---------- Servicios ---------- */
.svc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: clamp(48px, 6vw, 72px); }
.svc {
  --mx: 50%; --my: 0%;
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 14px;
  padding: 28px 28px 30px; border-radius: var(--r-panel);
  border: 1px solid var(--linea);
  background: rgba(42, 37, 96, .38);
  transition: border-color .3s, transform .5s var(--ease-out);
}
.svc::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .35s;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(154, 124, 255, .13), transparent 62%);
}
.svc:hover { border-color: var(--linea-2); transform: translateY(-4px); }
.svc:hover::before { opacity: 1; }
.svc-icon { width: 44px; height: 44px; margin-bottom: 14px; }
.svc-icon .s { fill: none; stroke: var(--lila); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.svc-icon .d { fill: var(--violeta); }
.svc h3 { font-size: 22px; line-height: 1.25; letter-spacing: -.015em; }
.svc p { color: var(--lila); font-size: 16px; line-height: 1.6; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 10px; }
.tags li { font-family: var(--mono); font-size: 11px; letter-spacing: .04em; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--linea); color: var(--lila); }

/* ---------- Proyectos: tarjetas apiladas ---------- */
.stack { display: flex; flex-direction: column; gap: clamp(28px, 4vw, 56px); margin-top: clamp(48px, 6vw, 72px); }
.stack-sentinel { height: 0; }
.case {
  --q: 0;
  position: relative;
  border-radius: var(--r-card);
  background: var(--hielo); color: var(--noche);
  transform-origin: 50% 0;
  transform: scale(calc(1 - var(--q) * .05));
}
.case::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: var(--noche); opacity: calc(var(--q) * .5);
}
.case-inner {
  display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  gap: clamp(24px, 3.4vw, 48px); padding: clamp(24px, 3.4vw, 44px);
  min-height: min(660px, calc(100svh - var(--nav-h) - 80px));
}
.case-info { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.case-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 16px; color: var(--tinta-2); }
.status { display: inline-flex; align-items: center; gap: 0; color: var(--noche); }
.spot-pulse { width: 10px; height: 10px; margin: 0 10px 0 0; vertical-align: middle; background: var(--profundo); }
.spot-pulse.is-here { background: transparent; }
.spot-pulse.is-live::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 1.5px solid var(--profundo); animation: live 2.2s var(--ease) infinite;
}
@keyframes live { 0% { transform: scale(.6); opacity: .9; } 80%, 100% { transform: scale(1.9); opacity: 0; } }
.case-title { font-size: clamp(36px, 4.4vw, 60px); line-height: 1; letter-spacing: -.04em; }
.case-lead { font-size: clamp(17px, 1.4vw, 19px); line-height: 1.55; color: var(--tinta-2); }
.case-points { display: grid; border-top: 1px solid var(--linea-clara); }
.case-points li {
  display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px;
  padding: 11px 0; border-bottom: 1px solid var(--linea-clara); font-size: 15.5px; line-height: 1.5;
}
.case-points li::before { content: ""; width: 7px; height: 7px; margin-top: .55em; border-radius: 2px; background: var(--profundo); opacity: .9; transform: rotate(45deg); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { font-family: var(--mono); font-size: 11px; letter-spacing: .04em; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--borde-claro); color: var(--tinta-2); background: var(--blanco); }
.case-foot { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding-top: 6px; }
.case-note { font-size: 14px; color: var(--tinta-2); line-height: 1.5; }
.link { color: var(--profundo); font-weight: 600; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.link:hover { text-decoration: underline; text-underline-offset: 4px; }

.case-visual {
  container-type: inline-size;
  position: relative; min-width: 0;
  border-radius: var(--r-panel);
  background-color: var(--noche);
  background-image: radial-gradient(rgba(201, 190, 255, .14) 1px, transparent 1.6px);
  background-size: 22px 22px;
  display: grid; place-items: center;
  padding: clamp(20px, 5cqi, 40px);
  overflow: hidden;
  min-height: 420px;
}

/* ---------- Maquetas (UI ilustrativa) ---------- */
.mock { font-size: clamp(10px, 2.8cqi, 15px); color: var(--hielo); position: relative; }
.mock * { box-sizing: border-box; }
.mk { font-family: var(--mono); text-transform: uppercase; letter-spacing: .06em; font-size: .78em; color: var(--lila); }

/* Teléfono — CanchasLibres */
.phone-wrap { width: 100%; display: grid; place-items: center; position: relative; }
.phone {
  width: 19.5em; aspect-ratio: 9 / 17.2;
  border-radius: 2.6em; border: .45em solid var(--noche-2);
  background: var(--noche); position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 1.05em;
  padding: 1.2em 1.15em 1.1em;
}
.ph-bar { display: flex; justify-content: space-between; align-items: center; font-family: var(--mono); font-size: .78em; color: var(--lila); }
.ph-bar i { display: inline-block; width: 1.6em; height: .7em; border-radius: .2em; border: 1px solid var(--lila); opacity: .7; }
.ph-head { display: grid; gap: .3em; }
.ph-title { font-size: 1.28em; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; }
.ph-days { display: grid; grid-template-columns: repeat(5, 1fr); gap: .4em; }
.ph-days span {
  display: grid; justify-items: center; gap: .1em; padding: .45em 0; border-radius: .8em;
  font-size: .78em; color: var(--lila); border: 1px solid var(--linea);
}
.ph-days b { font-size: 1.35em; color: var(--hielo); font-weight: 600; }
.ph-days .on { background: var(--hielo); color: var(--noche); border-color: transparent; }
.ph-days .on b { color: var(--noche); }
.ph-slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5em; }
.slot {
  position: relative; display: grid; place-items: center; height: 2.7em; border-radius: .8em;
  font-family: var(--mono); font-size: .9em; border: 1px solid var(--linea-2); color: var(--hielo);
  transition: background-color .3s, color .3s, border-color .3s, transform .3s var(--ease-out);
}
.slot.taken { color: rgba(201, 190, 255, .45); border-style: dashed; border-color: var(--linea); text-decoration: line-through; text-decoration-color: rgba(201, 190, 255, .35); }
.slot.sel { background: var(--violeta); color: var(--noche); border-color: transparent; transform: scale(1.04); }
.slot.mine { background: var(--hielo); color: var(--noche); border-color: transparent; text-decoration: none; }
.slot .tap {
  position: absolute; inset: 0; border-radius: inherit; border: 2px solid var(--violeta);
  animation: tap .6s var(--ease-out) forwards;
}
@keyframes tap { from { transform: scale(.85); opacity: 1; } to { transform: scale(1.35); opacity: 0; } }
.ph-legend { display: flex; gap: 1.2em; }
.ph-legend span { display: inline-flex; align-items: center; gap: .5em; }
.ph-legend i { width: .8em; height: .8em; border-radius: .25em; border: 1px solid var(--linea-2); }
.ph-legend i.t { border-style: dashed; border-color: var(--linea); }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 1.2em 1.2em 1.3em;
  background: var(--hielo); color: var(--noche); border-radius: 1.6em 1.6em 0 0;
  display: grid; gap: .7em; transform: translateY(105%); transition: transform .55s var(--ease-out);
}
.sheet .mk { color: var(--tinta-2); }
.sheet-title { font-size: 1.2em; font-weight: 600; letter-spacing: -.02em; }
.sheet-row { display: flex; justify-content: space-between; font-size: .95em; color: var(--tinta-2); border-top: 1px solid var(--linea-clara); padding-top: .6em; }
.sheet-row b { color: var(--noche); }
.sheet-btn {
  display: flex; align-items: center; justify-content: center; gap: .6em; height: 3em; border-radius: 999px;
  background: var(--profundo); color: var(--hielo); font-weight: 600; font-size: .95em; transition: background-color .3s;
}
.sheet-note { text-align: center; font-size: .72em; color: var(--tinta-2); }
.spin { width: 1em; height: 1em; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; display: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.phone.paying .spin { display: inline-block; }
.phone.sheet-open .sheet { transform: none; }
.ph-done {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: .6em; text-align: center;
  background: var(--noche); opacity: 0; visibility: hidden; transition: opacity .4s, visibility .4s;
}
.done-check {
  width: 4.2em; height: 4.2em; border-radius: 50%; background: var(--violeta); display: grid; place-items: center;
  transform: scale(.4); transition: transform .5s var(--ease-out);
}
.done-check svg { width: 50%; }
.done-check path { fill: none; stroke: var(--noche); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.ph-done p:first-of-type { font-size: 1.3em; font-weight: 600; letter-spacing: -.02em; }
.phone.is-done .ph-done { opacity: 1; visibility: visible; }
.phone.is-done .done-check { transform: scale(1); }
.toast {
  position: absolute; z-index: 2; top: 14%; left: calc(50% + 6.5em); width: 15.5em;
  padding: .9em 1em; border-radius: 1em; background: var(--noche-2); border: 1px solid var(--linea-2);
  display: grid; gap: .35em; font-size: .92em; line-height: 1.35;
  opacity: 0; transform: translateY(-.6em) scale(.96); transition: opacity .4s, transform .5s var(--ease-out);
}
.toast.show { opacity: 1; transform: none; }
@container (max-width: 520px) {
  .toast { left: 50%; top: auto; bottom: 4%; margin-left: -7.75em; }
}

/* Ventana — FacturiX y ObraTrack */
.win { width: 100%; max-width: 38em; border-radius: 1.1em; background: var(--noche-2); border: 1px solid var(--linea-2); overflow: hidden; }
.win-bar { display: flex; align-items: center; gap: .45em; padding: .85em 1em; border-bottom: 1px solid var(--linea); }
.win-bar i { width: .62em; height: .62em; border-radius: 50%; background: rgba(201, 190, 255, .28); }
.win-bar .mk { margin-left: .7em; }
.win-body { padding: 1.2em; display: grid; gap: 1em; }

.fx-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 1em; }
.fx-count { font-size: 1.35em; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; }
.fx-count b { font-variant-numeric: tabular-nums; }
.chip-ok { display: inline-flex; align-items: center; gap: .45em; padding: .35em .7em; border-radius: 999px; border: 1px solid var(--linea-2); white-space: nowrap; }
.chip-ok::before { content: ""; width: .5em; height: .5em; border-radius: 50%; background: var(--violeta); }
.bar { height: .45em; border-radius: 999px; background: rgba(27, 23, 69, .7); overflow: hidden; }
.bar i { display: block; height: 100%; width: 100%; border-radius: inherit; background: var(--violeta); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); transition: transform .45s var(--ease); }
.fx-table { border: 1px solid var(--linea); border-radius: .8em; overflow: hidden; background: rgba(27, 23, 69, .55); }
.fx-row {
  display: grid; grid-template-columns: 2.6em minmax(0, 1.25fr) minmax(0, .9fr) minmax(0, 1.05fr) minmax(0, 1.45fr);
  gap: .6em; align-items: center; height: 2.75em; padding: 0 .9em; border-top: 1px solid var(--linea);
  white-space: nowrap;
}
.fx-row > span { overflow: hidden; text-overflow: ellipsis; }
.fx-row:not(.fx-th) > span:not(.st) { font-size: .9em; }
.fx-th { border-top: 0; height: 2.4em; font-family: var(--mono); font-size: .7em; letter-spacing: .06em; text-transform: uppercase; color: var(--lila); }
.fx-rows { height: calc(2.75em * 6); overflow: hidden; }
.fx-rows-in { transition: transform .5s var(--ease); }
.num { font-family: var(--mono); color: var(--lila); font-size: .85em; }
.st {
  justify-self: start; display: inline-flex; align-items: center; gap: .4em; max-width: 100%;
  padding: .28em .65em; border-radius: 999px; font-family: var(--mono); font-size: .76em; letter-spacing: .02em;
}
.st.q { color: rgba(201, 190, 255, .6); border: 1px dashed var(--linea-2); }
.st.send { color: var(--lila); border: 1px solid var(--linea-2); }
.st.send .spin { display: inline-block; width: .9em; height: .9em; }
.st.ok { background: rgba(154, 124, 255, .2); color: var(--hielo); }
.st.ok::before { content: "✓"; color: var(--violeta); }
.st.err { background: rgba(255, 143, 163, .14); color: var(--error); }
.fx-foot { display: flex; justify-content: space-between; align-items: center; gap: 1em; min-height: 2.6em; }
.fx-summary { font-size: .92em; color: var(--lila); }
.fx-summary b { color: var(--hielo); font-weight: 600; }
.fx-dl { display: inline-flex; align-items: center; height: 2.6em; padding: 0 1.1em; border-radius: 999px; background: var(--hielo); color: var(--noche); font-weight: 600; font-size: .88em; opacity: .35; transition: opacity .4s; white-space: nowrap; }
.fx-dl.ready { opacity: 1; }
@container (max-width: 470px) {
  .fx-row { grid-template-columns: 2.4em minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1.5fr); }
  .fx-col-tipo { display: none; }
}

.ot-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 1em; }
.ot-pct { font-size: 2.2em; font-weight: 300; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.ot-top .bar { width: 45%; margin-bottom: .5em; }
.ot-graph { position: relative; aspect-ratio: 520 / 236; }
.ot-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ot-lines path { fill: none; stroke: rgba(201, 190, 255, .28); stroke-width: 1.6; stroke-dasharray: 4 5; vector-effect: non-scaling-stroke; }
.ot-lines path.lit { stroke: var(--violeta); stroke-dasharray: none; }
.node {
  position: absolute; left: calc(var(--x) * 1%); top: calc(var(--y) * 1%); transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: .5em; padding: .5em .75em; border-radius: .7em;
  font-size: .86em; line-height: 1.2; white-space: nowrap;
  background: var(--noche); border: 1px solid var(--linea-2); color: var(--hielo);
  transition: background-color .4s, color .4s, border-color .4s, opacity .4s;
}
.node .ic { width: 1.1em; height: 1.1em; flex: none; }
.node .ic circle { fill: none; stroke: var(--violeta); stroke-width: 3; }
.node .ic .track { stroke: var(--linea-2); }
.node.done { background: var(--violeta); color: var(--noche); border-color: transparent; }
.node.done .ic circle { stroke: var(--noche); }
.node.locked { color: rgba(201, 190, 255, .55); border-style: dashed; border-color: var(--linea); }
.node.ready { border-color: var(--violeta); box-shadow: 0 0 0 3px rgba(154, 124, 255, .18); }
.ot-foot { display: flex; justify-content: space-between; align-items: center; gap: 1em; min-height: 2.6em; }
.signal { display: inline-flex; align-items: center; gap: .6em; padding: .45em .8em; border-radius: 999px; border: 1px dashed var(--linea-2); font-size: .86em; color: var(--lila); transition: border-color .3s, color .3s; }
.signal i { width: .55em; height: .55em; border-radius: 50%; background: var(--aviso); }
.signal.on { border-style: solid; color: var(--hielo); }
.signal.on i { background: var(--violeta); }
.ot-toast { font-size: .86em; color: var(--lila); opacity: 0; transform: translateY(.4em); transition: opacity .4s, transform .5s var(--ease-out); }
@container (max-width: 440px) {
  .node { font-size: .74em; padding: .45em .55em; gap: .3em; }
  .ot-foot { flex-direction: column; align-items: flex-start; }
}
.ot-toast.show { opacity: 1; transform: none; }
.ot-toast b { color: var(--hielo); font-weight: 600; }

/* ---------- Proceso ---------- */
.process { position: relative; z-index: 1; }
.process-track { position: relative; }
.process-sticky { padding-block: clamp(96px, 12vw, 160px); }
.steps-wrap { position: relative; margin-top: clamp(48px, 6vw, 80px); }
.steps { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.steps-line { position: absolute; left: 20px; right: 20px; top: 19.5px; height: 1px; background: var(--linea-2); }
.steps-line i { position: absolute; inset: 0; background: var(--violeta); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }
.step { position: relative; display: grid; gap: 14px; align-content: start; transition: opacity .5s var(--ease); }
.js .step:not(.is-on) { opacity: .42; }
.step-mark {
  position: relative; z-index: 1; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--linea-2); background: var(--noche); display: grid; place-items: center;
  transition: border-color .4s;
}
.step.is-on .step-mark { border-color: var(--violeta); }
.spot-step { width: 14px; height: 14px; margin: 0; background: transparent; box-shadow: inset 0 0 0 1px var(--linea-2); }
.spot-step.is-marked { background: var(--violeta); box-shadow: none; }
.spot-step.is-here { background: transparent; }
.step .mono { color: var(--lila); margin-top: 8px; }
.step h3 { font-size: clamp(22px, 2.2vw, 28px); letter-spacing: -.02em; line-height: 1.15; }
.step p { color: var(--lila); font-size: 16px; }
.trig { position: absolute; left: 0; width: 1px; height: 1px; pointer-events: none; visibility: hidden; }

/* ---------- Bitácora ---------- */
.log .section-head { margin-bottom: clamp(40px, 5vw, 64px); }
.marquee {
  position: relative; overflow: hidden; border-top: 1px solid var(--linea);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.marquee:last-of-type { border-bottom: 1px solid var(--linea); }
.mq-track { display: flex; width: max-content; animation: mq var(--dur, 80s) linear infinite; }
.marquee.rev .mq-track { animation-direction: reverse; }
.marquee:hover .mq-track { animation-play-state: paused; }
@keyframes mq { to { transform: translateX(-50%); } }
.mq-list { display: flex; }
.mq-item { display: flex; align-items: center; gap: 14px; padding: 22px 30px; white-space: nowrap; font-size: 16px; position: relative; }
.mq-item::after { content: ""; position: absolute; right: -2px; top: 50%; width: 4px; height: 4px; margin-top: -2px; border-radius: 50%; background: var(--linea-2); }
.mq-date { color: var(--violeta); }
.mq-proj { color: var(--lila); border: 1px solid var(--linea); border-radius: 999px; padding: 4px 10px; }
.toolbox { margin-top: clamp(48px, 6vw, 72px); display: grid; grid-template-columns: minmax(0, .4fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.toolbox h3 { font-size: 22px; letter-spacing: -.015em; }
.toolbox p { color: var(--lila); font-size: 15px; margin-top: 8px; }
.tool-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tool-list li { font-family: var(--mono); font-size: 12px; letter-spacing: .04em; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--linea); color: var(--hielo); transition: border-color .2s, background-color .2s; }
.tool-list li:hover { border-color: var(--violeta); background: rgba(154, 124, 255, .08); }

/* ---------- Contacto ---------- */
.cta-title { font-size: clamp(42px, 7vw, 96px); line-height: 1; letter-spacing: -.045em; max-width: 13ch; }
.cta-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px 64px; align-items: end; margin-top: clamp(40px, 5vw, 64px); }
.cta-lead { font-size: clamp(17px, 1.5vw, 20px); line-height: 1.6; max-width: 46ch; }
.contact { display: grid; gap: 14px; justify-items: start; }
.copy-field {
  display: inline-flex; align-items: center; gap: 10px; max-width: 100%;
  padding: 6px 6px 6px 20px; border-radius: 999px; border: 1px solid rgba(244, 243, 255, .4);
}
.copy-field span { font-family: var(--mono); font-size: 15px; overflow-wrap: anywhere; }
.copy-btn { border: 0; cursor: pointer; border-radius: 999px; min-height: 40px; padding: 0 16px; background: rgba(244, 243, 255, .16); font-size: 13px; font-weight: 600; transition: background-color .2s; }
.copy-btn:hover { background: rgba(244, 243, 255, .28); }
.contact-note { font-size: 14px; opacity: .85; }

/* ---------- Pie ---------- */
.footer { position: relative; z-index: 1; padding-block: clamp(120px, 16vw, 220px) 32px; }
.foot-logo { width: min(100%, 980px); height: auto; overflow: visible; color: var(--blanco); }
.foot-logo .dot { fill: var(--violeta); transform-box: fill-box; transform-origin: center; }
.foot-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-top: clamp(96px, 13vw, 168px); padding-top: 32px; border-top: 1px solid var(--linea); }
.foot-grid .mono { color: var(--lila); margin-bottom: 14px; }
.foot-grid ul { display: grid; gap: 8px; }
.foot-grid a { text-decoration: none; color: var(--hielo); }
.foot-grid a:hover { color: var(--violeta); }
.foot-grid li span { color: var(--lila); }
.foot-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; margin-top: 64px; color: var(--lila); }
.foot-base a { text-decoration: none; }
.foot-base a:hover { color: var(--hielo); }

.boing { animation: boing .7s var(--ease-out); }
@keyframes boing {
  0% { transform: scale(1.35, .62); }
  35% { transform: scale(.88, 1.12); }
  65% { transform: scale(1.05, .96); }
  100% { transform: none; }
}
.regrow { animation: regrow .55s var(--ease-out); }
@keyframes regrow { from { transform: scale(0); } to { transform: scale(1); } }

/* ---------- Entradas al hacer scroll (parten de un estado visible) ---------- */
.rv-wait { opacity: 0; transform: translateY(28px); }
.rv-in { opacity: 1; transform: none; transition: opacity .9s var(--ease), transform 1s var(--ease-out); }

/* ---------- Desktop alto: tarjetas apiladas y proceso fijado ---------- */
@media (min-width: 960px) and (min-height: 700px) {
  .case { position: sticky; top: calc(var(--nav-h) + 24px + var(--i, 0) * 18px); }
  .process-track { height: 340vh; }
  .process-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; align-items: center; padding-block: var(--nav-h) 0; }
  .process-sticky > .wrap { width: 100%; }
}

/* ---------- Tablet y celular ---------- */
@media (max-width: 959px) {
  .case-inner { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .case-visual { min-height: 380px; }
  .svc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: minmax(0, 1fr); gap: 36px; padding-left: 0; }
  .steps-line { left: 19.5px; right: auto; top: 20px; bottom: 20px; width: 1px; height: auto; }
  .steps-line i { transform-origin: 50% 0; transform: scaleY(var(--p, 0)); }
  .step { grid-template-columns: 40px minmax(0, 1fr); column-gap: 20px; }
  .step > :not(.step-mark) { grid-column: 2; }
  .step-mark { grid-row: 1 / span 3; }
  .step .mono { margin-top: 10px; }
  .trig { display: none; }
  .toolbox { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .nav-links { display: none; }
  .menu-btn { display: inline-flex; }
  .hero-body { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { padding-left: 0; border-left: 0; }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--linea-clara); }
  .cta-body { grid-template-columns: minmax(0, 1fr); }
  .foot-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .svc-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-foot { flex-direction: column; align-items: flex-start; }
  .status-list { flex-direction: column; gap: 8px; }
  .stat { padding-right: 12px; }
  .stat + .stat { padding-left: 12px; }
  .stat:nth-child(3) { padding-left: 0; }
  .case-visual { min-height: 0; padding: 18px; }
  .foot-grid { grid-template-columns: minmax(0, 1fr); }
  .mq-item { padding: 18px 22px; font-size: 15px; }
}

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .mq-track { animation: none; flex-wrap: wrap; width: auto; }
  .mq-list[aria-hidden="true"] { display: none; }
  .mq-list { flex-wrap: wrap; }
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .rv-wait { opacity: 1; transform: none; }
  .js .hint { opacity: 1; }
}
