/* =======================================================================
   ZENTRY SOLUTIONS — Landing styles
   Paleta: dark + azul eléctrico + gradiente violeta
   Tipografía: Inter (Google Fonts)
   ======================================================================= */

:root {
  /* ===== DARK THEME (default) ===== */
  --bg-0: #05070a;
  --bg-1: #0a0e14;
  --bg-2: #111826;
  --bg-3: #1a2332;
  --bg-4: #242f42;

  --text-0: #ffffff;
  --text-1: #e6e9ef;
  --text-2: #9ca3af;
  --text-3: #6b7280;

  --accent: #3b82f6;
  --accent-hover: #60a5fa;
  --accent-deep: #2563eb;
  --violet: #8b5cf6;
  --green: #22c55e;
  --amber: #f59e0b;
  --rose: #f43f5e;

  --grad-primary: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  --grad-subtle: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(139, 92, 246, 0.08));
  --grad-radial: radial-gradient(ellipse at top, rgba(59, 130, 246, 0.18), transparent 60%);
  --grad-shimmer: linear-gradient(90deg, #3b82f6 0%, #8b5cf6 50%, #3b82f6 100%);

  --border-1: rgba(255, 255, 255, 0.06);
  --border-2: rgba(255, 255, 255, 0.1);
  --border-3: rgba(255, 255, 255, 0.16);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px rgba(59, 130, 246, 0.25);

  --nav-bg: rgba(10, 14, 20, 0.72);
  --nav-bg-scrolled: rgba(10, 14, 20, 0.92);
  --grid-color: rgba(255, 255, 255, 0.03);

  --logo-filter: brightness(0) invert(1);
  --logo-opacity: 0.95;
  --footer-logo-opacity: 0.8;

  /* Radii */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;
  --r-pill: 999px;

  /* Spacing */
  --container: 1200px;
  --section-y: clamp(4rem, 9vw, 8rem);

  /* Easings */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ===== LIGHT THEME OVERRIDE ===== */
html[data-theme="light"] {
  --bg-0: #ffffff;
  --bg-1: #fbfcfe;
  --bg-2: #ffffff;
  --bg-3: #f1f5f9;
  --bg-4: #e2e8f0;

  --text-0: #0f172a;
  --text-1: #1e293b;
  --text-2: #475569;
  --text-3: #64748b;

  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-deep: #1e40af;
  --violet: #7c3aed;

  --grad-primary: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  --grad-subtle: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(124, 58, 237, 0.05));
  --grad-radial: radial-gradient(ellipse at top, rgba(37, 99, 235, 0.10), transparent 60%);
  --grad-shimmer: linear-gradient(90deg, #2563eb 0%, #7c3aed 50%, #2563eb 100%);

  --border-1: rgba(15, 23, 42, 0.06);
  --border-2: rgba(15, 23, 42, 0.1);
  --border-3: rgba(15, 23, 42, 0.18);

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 6px 20px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 60px rgba(15, 23, 42, 0.12);
  --shadow-glow: 0 0 40px rgba(37, 99, 235, 0.2);

  --nav-bg: rgba(255, 255, 255, 0.75);
  --nav-bg-scrolled: rgba(255, 255, 255, 0.92);
  --grid-color: rgba(15, 23, 42, 0.04);

  --logo-filter: none;
  --logo-opacity: 1;
  --footer-logo-opacity: 0.9;
}

/* Smooth theme transitions */
html, body, .card, .product, .client, .timeline__num, .nav, .contact__form,
.field input, .field textarea, .about__stack, .tags span, .cta-final__inner,
.footer, .btn--ghost {
  transition:
    background-color 0.4s var(--ease),
    color 0.4s var(--ease),
    border-color 0.4s var(--ease),
    box-shadow 0.4s var(--ease);
}

/* ===== SCROLL PROGRESS BAR ===== */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0;
  background: var(--grad-primary);
  z-index: 100;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.5);
  transition: width 0.08s linear;
  pointer-events: none;
}

/* ===== WHATSAPP FAB ===== */
.wa-fab {
  position: fixed;
  right: clamp(16px, 3vw, 28px);
  bottom: clamp(16px, 3vw, 28px);
  width: 58px; height: 58px;
  border-radius: 50%;
  background: #25d366;
  display: grid; place-items: center;
  color: #fff;
  box-shadow: 0 12px 30px rgba(37, 211, 102, 0.4), 0 0 0 0 rgba(37, 211, 102, 0.55);
  z-index: 90;
  text-decoration: none;
  transform: scale(0);
  opacity: 0;
  transition: transform 0.5s var(--ease), box-shadow 0.25s, opacity 0.5s var(--ease);
  animation: waPulse 2.4s ease-out infinite 1s;
}
.wa-fab.is-visible {
  transform: scale(1);
  opacity: 1;
}
.wa-fab:hover {
  color: #fff;
  transform: scale(1.08);
  box-shadow: 0 14px 40px rgba(37, 211, 102, 0.55), 0 0 0 14px rgba(37, 211, 102, 0);
}
.wa-fab svg {
  width: 30px; height: 30px;
}
.wa-fab__tooltip {
  position: absolute;
  right: calc(100% + 14px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--bg-2);
  color: var(--text-0);
  border: 1px solid var(--border-2);
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
  font-size: 0.88rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
  box-shadow: var(--shadow-md);
}
.wa-fab__tooltip::after {
  content: "";
  position: absolute;
  top: 50%; left: 100%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-left-color: var(--bg-2);
}
.wa-fab:hover .wa-fab__tooltip {
  opacity: 1;
  transform: translateY(-50%) translateX(-4px);
}
@keyframes waPulse {
  0%, 60%, 100% { box-shadow: 0 12px 30px rgba(37, 211, 102, 0.4), 0 0 0 0 rgba(37, 211, 102, 0.55); }
  30%          { box-shadow: 0 12px 30px rgba(37, 211, 102, 0.4), 0 0 0 18px rgba(37, 211, 102, 0); }
}
@media (max-width: 600px) {
  .wa-fab { width: 52px; height: 52px; }
  .wa-fab svg { width: 26px; height: 26px; }
  .wa-fab__tooltip { display: none; }
}

/* ===== PARTICLES CANVAS ===== */
.particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

/* ===== BUTTON RIPPLE ===== */
.btn .ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  animation: ripple 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  background: rgba(255, 255, 255, 0.35);
  pointer-events: none;
  z-index: 0;
}
html[data-theme="light"] .btn--ghost .ripple { background: rgba(15, 23, 42, 0.12); }
@keyframes ripple {
  to { transform: scale(3.5); opacity: 0; }
}

/* -------- RESET -------- */

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-1);
  color: var(--text-1);
  line-height: 1.6;
  font-weight: 400;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(59, 130, 246, 0.10), transparent 60%),
    radial-gradient(900px 500px at 90% 0%, rgba(139, 92, 246, 0.08), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* Cursor glow — sigue al mouse suavemente */
.cursor-glow {
  position: fixed;
  top: 0; left: 0;
  width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.22) 0%, rgba(139, 92, 246, 0.10) 40%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%) translate3d(var(--mx, 50vw), var(--my, 50vh), 0);
  z-index: 0;
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity 0.6s var(--ease);
  will-change: transform;
}
.cursor-glow.is-active { opacity: 1; }

/* Grain overlay — sutil */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 99;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='200' height='200' filter='url(%23n)' opacity='0.8'/></svg>");
  background-size: 200px 200px;
}

@media (prefers-reduced-motion: reduce) {
  .cursor-glow, .grain { display: none; }
}

main { position: relative; z-index: 1; }

img, svg { display: block; max-width: 100%; }

h1, h2, h3, h4 {
  margin: 0 0 0.6em;
  color: var(--text-0);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

h1 { font-size: clamp(2.5rem, 5.5vw, 4.25rem); }
h2 { font-size: clamp(2rem, 3.5vw, 2.75rem); }
h3 { font-size: 1.25rem; letter-spacing: -0.01em; }

p { margin: 0 0 1em; color: var(--text-2); }

a { color: var(--text-1); text-decoration: none; transition: color 0.2s var(--ease); }
a:hover { color: var(--accent-hover); }

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

.skip-link {
  position: absolute; top: -100px; left: 1rem;
  padding: 0.5rem 1rem; background: var(--accent); color: #fff;
  border-radius: var(--r-sm); z-index: 100;
  transition: top 0.2s;
}
.skip-link:focus { top: 1rem; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2rem);
}

/* -------- NAV -------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  background: var(--nav-bg);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
.nav.is-scrolled {
  border-bottom-color: var(--border-1);
  background: var(--nav-bg-scrolled);
}
.nav__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 70px; gap: 2rem;
}
.nav__brand {
  display: inline-flex; align-items: center; gap: 0.65rem;
  font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em;
  color: var(--text-0);
  transition: transform 0.3s var(--ease);
}
.nav__brand:hover { transform: translateY(-1px); }

.nav__logo {
  height: 28px;
  width: auto;
  filter: var(--logo-filter);
  opacity: var(--logo-opacity);
  transition: opacity 0.25s, filter 0.4s;
}
.nav__brand:hover .nav__logo { opacity: 1; }

.footer__logo {
  height: 42px;
  width: auto;
  filter: var(--logo-filter);
  opacity: var(--footer-logo-opacity);
  transition: opacity 0.25s, filter 0.4s;
  margin-bottom: 0.75rem;
}

.brand__mark {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid var(--border-2);
  border-radius: 10px;
}
.brand__accent { color: var(--accent); }

.nav__links {
  display: flex; align-items: center; gap: 2rem;
}
.nav__links > a:not(.nav-cta) {
  color: var(--text-2); font-size: 0.95rem; font-weight: 500;
  position: relative;
  padding: 0.25rem 0;
}
.nav__links > a:not(.nav-cta):hover { color: var(--text-0); }
.nav__links > a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--grad-primary);
  border-radius: 2px;
  transition: width 0.35s var(--ease);
}
.nav__links > a:not(.nav-cta):hover::after { width: 100%; }

/* Theme toggle */
.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 36px; height: 36px;
  border: 1px solid var(--border-2);
  background: transparent;
  border-radius: 999px;
  cursor: pointer;
  color: var(--text-1);
  transition: background 0.25s, border-color 0.25s, transform 0.2s;
  padding: 0;
}
.theme-toggle:hover {
  background: var(--bg-3);
  border-color: var(--border-3);
  transform: scale(1.05);
}
.theme-toggle svg {
  width: 18px; height: 18px;
  transition: transform 0.5s var(--ease), opacity 0.3s;
}
.theme-toggle .icon-moon { display: block; }
.theme-toggle .icon-sun  { display: none; }
html[data-theme="light"] .theme-toggle .icon-moon { display: none; }
html[data-theme="light"] .theme-toggle .icon-sun  { display: block; }
.theme-toggle:hover svg { transform: rotate(18deg); }

.nav__toggle {
  display: none;
  width: 40px; height: 40px; border: 1px solid var(--border-2);
  background: transparent; border-radius: 8px;
  flex-direction: column; justify-content: center; align-items: center;
  gap: 4px; cursor: pointer; padding: 0;
}
.nav__toggle span {
  display: block; width: 18px; height: 1.6px;
  background: var(--text-1); border-radius: 2px;
  transition: transform 0.25s, opacity 0.2s;
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.6px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.6px) rotate(-45deg); }

.nav__mobile {
  display: none;
  flex-direction: column;
  padding: 1rem 1.5rem 1.5rem;
  gap: 0.2rem;
  border-top: 1px solid var(--border-1);
  background: rgba(10, 14, 20, 0.96);
}
.nav__mobile a {
  padding: 0.85rem 0;
  color: var(--text-1);
  font-size: 1.05rem;
  font-weight: 500;
  border-bottom: 1px solid var(--border-1);
}
.nav__mobile a:last-child { border-bottom: none; }

@media (max-width: 800px) {
  .nav__links { display: none; }
  .nav__toggle { display: flex; }
  .nav__mobile.is-open { display: flex; }
}

/* -------- BUTTONS -------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  font-size: 0.95rem; font-weight: 600;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s var(--ease), background 0.2s, border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.btn:active { transform: scale(0.97); }
.btn--sm { padding: 0.55rem 1.1rem; font-size: 0.875rem; }
.btn--lg { padding: 1rem 1.75rem; font-size: 1rem; }
.btn--block { width: 100%; }

/* Shimmer effect at hover */
.btn--primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.25) 45%, transparent 55%);
  transform: translateX(-100%);
  transition: transform 0.7s var(--ease);
  z-index: -1;
}
.btn--primary:hover::after { transform: translateX(100%); }

.btn--primary {
  background: var(--grad-primary);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 24px -8px rgba(59, 130, 246, 0.55);
}
.btn--primary:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 12px 32px -8px rgba(59, 130, 246, 0.75);
}

.btn--ghost {
  background: transparent;
  color: var(--text-1);
  border-color: var(--border-3);
}
.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-0);
  border-color: var(--border-3);
}
html[data-theme="light"] .btn--ghost:hover { background: rgba(15, 23, 42, 0.04); }

/* ===== NAV CTA — Contacto del nav =====
   Versión minimal: solo texto con fondo sólido invertido por tema.
   Padding simétrico generoso, sin arrow ni pseudo-elementos. */
.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.6rem;
  min-height: 38px;
  border-radius: var(--r-pill);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
  background: var(--text-1);
  color: var(--bg-1);
  border: none;
  box-sizing: border-box;
  transition:
    transform 0.25s var(--ease),
    box-shadow 0.25s var(--ease),
    background 0.3s var(--ease),
    color 0.3s var(--ease);
}
html[data-theme="light"] .nav-cta {
  background: var(--text-0);
  color: #fff;
}
.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px -10px rgba(0, 0, 0, 0.5);
  color: var(--bg-1);
}
html[data-theme="light"] .nav-cta:hover {
  box-shadow: 0 10px 22px -10px rgba(15, 23, 42, 0.35);
  color: #fff;
}
.nav-cta:active { transform: translateY(0); }

/* -------- HERO -------- */

.hero {
  position: relative;
  padding: clamp(4rem, 9vw, 7rem) 0 clamp(3rem, 6vw, 5rem);
  overflow: hidden;
}
.hero__bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(800px 400px at 50% 0%, rgba(59, 130, 246, 0.16), transparent 70%),
    radial-gradient(600px 400px at 30% 100%, rgba(139, 92, 246, 0.14), transparent 70%);
  pointer-events: none;
  animation: meshMove 18s ease-in-out infinite alternate;
}
.hero::before, .hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}
.hero::before {
  width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.35), transparent 65%);
  top: -120px; left: -80px;
  animation: blob1 14s ease-in-out infinite alternate;
}
.hero::after {
  width: 360px; height: 360px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.32), transparent 65%);
  bottom: -100px; right: -60px;
  animation: blob2 16s ease-in-out infinite alternate;
}
@keyframes meshMove {
  0%   { background-position: 0% 0%, 0% 100%; }
  100% { background-position: 100% 30%, 80% 70%; }
}
@keyframes blob1 {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(80px, 60px) scale(1.15); }
}
@keyframes blob2 {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-80px, -50px) scale(1.2); }
}

/* Animated grid mesh overlay */
.hero__inner::before {
  content: "";
  position: absolute;
  inset: -50% -20% 0 -20%;
  background-image:
    linear-gradient(var(--grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
  background-size: 50px 50px;
  -webkit-mask-image: radial-gradient(ellipse at center, black, transparent 70%);
  mask-image: radial-gradient(ellipse at center, black, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.hero__inner > * { position: relative; z-index: 1; }

@media (prefers-reduced-motion: reduce) {
  .hero__bg, .hero::before, .hero::after { animation: none; }
}
.hero__inner { position: relative; text-align: center; max-width: 920px; margin: 0 auto; }
.hero__title {
  font-size: clamp(2.75rem, 6.5vw, 4.5rem);
  margin: 1.5rem 0 1.25rem;
}
.grad {
  background: var(--grad-shimmer);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: shimmer 4s linear infinite;
}
@keyframes shimmer {
  to { background-position: 200% center; }
}
@media (prefers-reduced-motion: reduce) {
  .grad { animation: none; }
}

/* ===== ROTATOR (palabras que cambian en el hero) ===== */
.rotator {
  display: inline-block;
  position: relative;
  height: 1em;
  min-width: 6ch;
  vertical-align: baseline;
  text-align: left;
}
.rotator__word {
  position: absolute;
  top: 0; left: 0;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(40%);
  filter: blur(6px);
  transition:
    opacity 0.55s var(--ease),
    transform 0.55s var(--ease),
    filter 0.55s var(--ease);
  will-change: transform, opacity, filter;
}
.rotator__word.is-active {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}
.rotator__word.is-leaving {
  opacity: 0;
  transform: translateY(-60%);
  filter: blur(6px);
}
@media (prefers-reduced-motion: reduce) {
  .rotator__word { transition: opacity 0.2s; filter: none; transform: none; }
  .rotator__word.is-leaving { transform: none; filter: none; }
}

/* ===== SCROLL HINT ===== */
.scroll-hint {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  margin-top: 1.25rem;
  margin-bottom: 2.25rem;
  color: var(--text-3);
  text-decoration: none;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 600;
  transition: color 0.25s, transform 0.35s var(--ease);
}
.scroll-hint:hover {
  color: var(--accent-hover);
  transform: translateY(3px);
}
.scroll-hint__track {
  position: relative;
  width: 22px;
  height: 38px;
  border: 2px solid currentColor;
  border-radius: 12px;
  opacity: 0.55;
  transition: opacity 0.25s;
}
.scroll-hint:hover .scroll-hint__track { opacity: 1; }
.scroll-hint__dot {
  position: absolute;
  left: 50%;
  top: 8px;
  transform: translateX(-50%);
  width: 3px;
  height: 8px;
  background: currentColor;
  border-radius: 2px;
  animation: scroll-hint 1.8s ease-in-out infinite;
}
@keyframes scroll-hint {
  0%   { transform: translate(-50%, 0);    opacity: 0; }
  30%  { opacity: 1; }
  100% { transform: translate(-50%, 14px); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-hint__dot { animation: none; }
}
.hero__lead {
  font-size: clamp(1.05rem, 1.8vw, 1.2rem);
  color: var(--text-2);
  max-width: 640px;
  margin: 0 auto 2rem;
}
.hero__cta {
  display: flex; justify-content: center; gap: 0.85rem;
  flex-wrap: wrap;
  margin-bottom: 4rem;
}
.hero__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 720px;
  margin: 0 auto;
  padding-top: 3rem;
  border-top: 1px solid var(--border-1);
}
.hero__stats > div {
  display: flex; flex-direction: column; align-items: center;
}
.hero__stats strong {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  color: var(--text-0);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.hero__stats span {
  color: var(--text-3);
  font-size: 0.875rem;
  text-align: center;
}
@media (max-width: 600px) {
  .hero__stats { grid-template-columns: 1fr; gap: 1rem; padding-top: 2rem; }
}

/* -------- PILL / EYEBROW / SECTION HEAD -------- */

.pill {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.45rem 1rem;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: var(--r-pill);
  font-size: 0.85rem; font-weight: 500;
  color: var(--accent-hover);
}
.pill__dot {
  width: 6px; height: 6px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--green);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 1rem;
}

.section__head {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 4rem;
}
.section__head h2 { margin-bottom: 1rem; }
.section__head p { color: var(--text-2); font-size: 1.1rem; }

/* -------- SECTIONS -------- */

section { padding: var(--section-y) 0; }

.services { background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.01)); }

.grid { display: grid; gap: 1.25rem; }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 960px) {
  .grid--4, .grid--3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .grid--4, .grid--3 { grid-template-columns: 1fr; }
}

/* -------- CARDS -------- */

.card {
  background: var(--bg-2);
  border: 1px solid var(--border-1);
  border-radius: var(--r-lg);
  padding: 2rem 1.75rem;
  transition: transform 0.3s var(--ease), border-color 0.3s, background 0.3s;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.services .grid { align-items: stretch; }
.card p { flex: 1; }
.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-3);
  background: var(--bg-3);
}
.card__icon {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  background: var(--grad-subtle);
  border: 1px solid var(--border-2);
  border-radius: var(--r-md);
  color: var(--accent-hover);
  margin-bottom: 1.25rem;
  transition: transform 0.45s var(--ease), background 0.3s, border-color 0.3s;
}
.card:hover .card__icon {
  transform: rotate(-8deg) scale(1.08);
  background: var(--grad-primary);
  border-color: transparent;
  color: #fff;
}
.card__icon svg {
  transition: transform 0.45s var(--ease);
}
.card h3 { color: var(--text-0); margin-bottom: 0.5rem; }
.card p { color: var(--text-2); font-size: 0.95rem; margin: 0; line-height: 1.6; }

/* -------- PRODUCTS -------- */

.products { background: rgba(0, 0, 0, 0.1); }
.product {
  position: relative;
  background: var(--bg-2);
  border: 1px solid var(--border-1);
  border-radius: var(--r-lg);
  padding: 2rem 1.75rem 1.5rem;
  color: var(--text-1);
  display: flex; flex-direction: column;
  overflow: hidden;
  transition: transform 0.3s var(--ease), border-color 0.3s, background 0.3s, box-shadow 0.4s;
  isolation: isolate;
}
/* Cada producto tiene su propia paleta — evita el "todo azul" */
.product--axiom   { --prod-c1: #3b82f6; --prod-c2: #2563eb; --prod-rgb: 59, 130, 246; }
.product--sia     { --prod-c1: #22c55e; --prod-c2: #15803d; --prod-rgb: 34, 197, 94; }
.product--vigia   { --prod-c1: #f43f5e; --prod-c2: #be123c; --prod-rgb: 244, 63, 94; }
.product--factura { --prod-c1: #f59e0b; --prod-c2: #d97706; --prod-rgb: 245, 158, 11; }
.product--soon    { --prod-c1: #6b7280; --prod-c2: #374151; --prod-rgb: 107, 114, 128; }

/* Gradient conic animado rotando en el borde (solo hover), usa el color propio del producto */
.product::before {
  content: "";
  position: absolute;
  inset: -2px;
  background: conic-gradient(
    from var(--angle, 0deg),
    transparent 0deg,
    var(--prod-c1, #3b82f6) 60deg,
    var(--prod-c2, #8b5cf6) 120deg,
    transparent 200deg
  );
  border-radius: inherit;
  z-index: -2;
  opacity: 0;
  transition: opacity 0.4s;
  animation: rotate 4s linear infinite;
}
@property --angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}
@keyframes rotate { to { --angle: 360deg; } }
.product::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--bg-2);
  border-radius: inherit;
  z-index: -1;
  transition: background 0.3s;
}
.product:hover::before { opacity: 1; }
.product:hover::after { background: var(--bg-3); }

/* Spotlight cursor-aware — usa el color propio del producto */
.product[data-spotlight] {
  background-image: radial-gradient(
    280px circle at var(--mx, 50%) var(--my, 50%),
    rgba(var(--prod-rgb, 59, 130, 246), 0.18),
    transparent 55%
  );
  background-repeat: no-repeat;
}
html[data-theme="light"] .product[data-spotlight] {
  background-image: radial-gradient(
    280px circle at var(--mx, 50%) var(--my, 50%),
    rgba(var(--prod-rgb, 59, 130, 246), 0.12),
    transparent 55%
  );
}

.product:hover {
  transform: translateY(-6px);
  border-color: transparent;
  box-shadow: 0 24px 50px -20px rgba(var(--prod-rgb, 59, 130, 246), 0.45);
}
/* Título del producto adopta el color del badge al hover — cada card es único */
.product:hover h3 { color: var(--prod-c1); }
html[data-theme="light"] .product:hover h3 { color: var(--prod-c2); }
.product:hover .product__link { color: var(--prod-c1); }
html[data-theme="light"] .product:hover .product__link { color: var(--prod-c2); }

@media (prefers-reduced-motion: reduce) {
  .product::before { animation: none; }
}

/* ===== ARENA DE ORBES (productos flotando, chocando entre sí) ===== */
/* Full-bleed: ocupa todo el ancho del viewport, rompe el container */
.products .container:has(.arena) { max-width: none; padding: 0; }
.products .section__head { max-width: 700px; margin: 0 auto 4rem; padding: 0 1.5rem; }
.arena {
  position: relative;
  width: 100%;
  margin: 0;
  height: clamp(560px, 72vh, 720px);
  border-radius: 0;
  background:
    radial-gradient(circle at 18% 30%, rgba(59, 130, 246, 0.16), transparent 55%),
    radial-gradient(circle at 82% 70%, rgba(139, 92, 246, 0.16), transparent 55%),
    linear-gradient(135deg, var(--bg-2), var(--bg-1));
  border-top: 1px solid var(--border-1);
  border-bottom: 1px solid var(--border-1);
  overflow: hidden;
  isolation: isolate;
}
html[data-theme="light"] .arena {
  background:
    radial-gradient(circle at 20% 30%, rgba(37, 99, 235, 0.10), transparent 60%),
    radial-gradient(circle at 80% 70%, rgba(124, 58, 237, 0.10), transparent 60%),
    linear-gradient(135deg, var(--bg-3), var(--bg-1));
}
/* Grid sutil de fondo tipo blueprint */
.arena::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse at center, black, transparent 75%);
  mask-image: radial-gradient(ellipse at center, black, transparent 75%);
  pointer-events: none;
  z-index: 0;
}
/* Grid fallback (sin JS o antes de inicializar) */
.arena:not(.js-arena) {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  height: auto;
  padding: 2rem;
}
.arena:not(.js-arena) .orb {
  position: relative;
  width: auto; height: 180px;
  border-radius: var(--r-lg);
}
.arena:not(.js-arena) .arena__detail { display: none; }

@media (max-width: 800px) {
  .arena { height: clamp(520px, 90vh, 700px); }
}

/* Orb — producto circular flotante */
.orb {
  position: absolute;
  width: 170px; height: 170px;
  border-radius: 50%;
  display: grid; place-items: center;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(135deg, var(--prod-c1, #3b82f6), var(--prod-c2, #2563eb));
  box-shadow:
    0 20px 40px -16px rgba(var(--prod-rgb, 59, 130, 246), 0.55),
    inset 0 -8px 20px rgba(0, 0, 0, 0.2),
    inset 0 2px 6px rgba(255, 255, 255, 0.25);
  transition:
    transform 0.5s var(--ease),
    opacity 0.4s var(--ease),
    filter 0.4s var(--ease),
    box-shadow 0.4s;
  will-change: transform;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}
.orb::before {
  content: "";
  position: absolute;
  top: 14px; left: 20px;
  width: 40%;
  height: 30%;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.55), transparent 70%);
  border-radius: 50%;
  filter: blur(6px);
  pointer-events: none;
  transition: opacity 0.3s;
}
.orb:hover { color: #fff; }

.orb__content {
  position: relative;
  text-align: center;
  padding: 0.5rem;
  z-index: 1;
}
.orb__badge {
  width: 42px; height: 42px;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 10px;
  display: grid; place-items: center;
  margin: 0 auto 0.6rem;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -0.02em;
  backdrop-filter: blur(4px);
}
.orb__badge--svg { padding: 4px; background: rgba(255, 255, 255, 0.9); }
.orb__badge--svg img { width: 100%; height: 100%; object-fit: contain; }
.orb__name {
  font-size: 1.08rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.01em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

/* Estados interactivos — sólo aplican cuando JS está activo (.js-arena) */
.arena.js-arena.is-hovering .orb:not(.is-focused) {
  opacity: 0.28;
  filter: blur(4px) saturate(0.5);
  transform: var(--current-transform, translate(0, 0)) scale(0.94);
}
.arena.js-arena .orb.is-focused {
  z-index: 5;
  box-shadow:
    0 32px 60px -18px rgba(var(--prod-rgb, 59, 130, 246), 0.75),
    0 0 0 2px rgba(255, 255, 255, 0.6),
    inset 0 -8px 20px rgba(0, 0, 0, 0.2);
  filter: none;
}

/* Panel de detalle — oculto por defecto, aparece SOLO al hover de un orbe */
.arena__detail {
  position: absolute;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%) translateY(24px);
  padding: 1.35rem 1.65rem;
  background: rgba(10, 14, 20, 0.82);
  border: 1px solid var(--border-2);
  border-radius: var(--r-lg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 10;
  color: var(--text-1);
  width: min(560px, calc(100% - 48px));
  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.45s var(--ease),
    opacity 0.35s var(--ease);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.6);
}
html[data-theme="light"] .arena__detail {
  background: rgba(255, 255, 255, 0.92);
  color: var(--text-1);
  box-shadow: 0 20px 50px -20px rgba(15, 23, 42, 0.25);
}
.arena.js-arena.is-hovering .arena__detail {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

/* Texto que "se forma" letra por letra — efecto typewriter via CSS + data-len */
.arena__detail-title,
.arena__detail-desc,
.arena__detail-tag {
  display: block;
  overflow: hidden;
}
.arena__detail-title > span,
.arena__detail-desc > span,
.arena__detail-tag > span {
  display: inline-block;
  opacity: 0;
  transform: translateY(100%);
  transition:
    opacity 0.35s var(--ease),
    transform 0.45s var(--ease);
}
.arena.js-arena.is-hovering .arena__detail-title > span,
.arena.js-arena.is-hovering .arena__detail-tag > span {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 80ms;
}
.arena.js-arena.is-hovering .arena__detail-desc > span {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 180ms;
}
.arena.js-arena.is-hovering .arena__detail-link {
  animation: arena-link-in 0.5s var(--ease) 260ms backwards;
}
@keyframes arena-link-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.arena__detail-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 0.4rem;
}
.arena__detail-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.4rem;
  color: var(--text-0);
}
.arena__detail-desc {
  margin: 0 0 0.75rem;
  font-size: 0.92rem;
  color: var(--text-2);
  line-height: 1.5;
}
.arena__detail-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
  transition: gap 0.25s;
}
.arena__detail-link:hover { gap: 0.6rem; }
.arena__detail-link[hidden] { display: none; }

/* Hint que invita al hover (visible cuando no hay hover) */
.arena__hint {
  position: absolute;
  left: 50%;
  top: 24px;
  transform: translateX(-50%);
  padding: 0.5rem 1rem;
  background: rgba(10, 14, 20, 0.5);
  border: 1px solid var(--border-1);
  border-radius: var(--r-pill);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  pointer-events: none;
}
html[data-theme="light"] .arena__hint {
  background: rgba(255, 255, 255, 0.6);
  color: var(--text-2);
}
.arena__hint::before {
  content: "⌘";
  display: inline-block;
  margin-right: 0.4rem;
  font-weight: 700;
  color: var(--accent);
}
.arena.js-arena.is-hovering .arena__hint {
  opacity: 0;
  transform: translateX(-50%) translateY(-8px);
}

@media (max-width: 720px) {
  .orb { width: 130px; height: 130px; }
  .orb__badge { width: 36px; height: 36px; font-size: 0.9rem; margin-bottom: 0.4rem; }
  .orb__name { font-size: 0.92rem; }
  .arena__detail { left: 12px; right: 12px; bottom: 12px; padding: 0.9rem 1rem; width: auto; }
  .arena__detail-title { font-size: 1.05rem; }
  .arena__hint { font-size: 0.72rem; padding: 0.4rem 0.8rem; top: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .orb { transition: opacity 0.3s, filter 0.3s; }
}
.product__badge {
  position: relative;
  width: 52px; height: 52px;
  border-radius: 12px;
  display: grid; place-items: center;
  font-weight: 800; font-size: 1.1rem;
  color: #fff;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
  transition: transform 0.45s var(--ease), box-shadow 0.3s;
}
.product:hover .product__badge {
  transform: rotate(-6deg) scale(1.06);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.35);
}
.product__badge.axiom   { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.product__badge.neural  { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.product__badge.sia     { background: linear-gradient(135deg, #22c55e, #15803d); }
.product__badge.vigia   { background: linear-gradient(135deg, #f43f5e, #be123c); }
.product__badge.factura { background: linear-gradient(135deg, #f59e0b, #d97706); }
.product__badge.soon    { background: linear-gradient(135deg, #6b7280, #374151); }

.product h3 { position: relative; margin-bottom: 0.5rem; transition: color 0.25s; }
.product p { position: relative; color: var(--text-2); font-size: 0.95rem; flex-grow: 1; }
.product__link {
  position: relative;
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 600;
  margin-top: 0.75rem;
}
.product--soon { cursor: default; }
.product--soon:hover { transform: none; border-color: var(--border-1); background: var(--bg-2); }
.product--soon:hover::before { opacity: 0; }

/* -------- CLIENTS -------- */

.clients__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem;
  max-width: 960px;
  margin: 0 auto;
}
.client {
  display: flex; align-items: flex-start; gap: 1.75rem;
  padding: 2.25rem 2rem;
  background: var(--bg-2);
  border: 1px solid var(--border-1);
  border-radius: var(--r-xl);
  transition: transform 0.35s var(--ease), border-color 0.25s, background 0.25s, box-shadow 0.3s;
  position: relative;
  overflow: hidden;
}
.client::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--grad-subtle);
  opacity: 0;
  transition: opacity 0.35s;
  pointer-events: none;
}
.client:hover {
  transform: translateY(-4px);
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: 0 20px 40px -20px rgba(59, 130, 246, 0.35);
}
.client:hover::before { opacity: 1; }
.client__logo {
  width: 88px; height: 88px;
  display: grid; place-items: center;
  background: var(--grad-subtle);
  border: 1px solid var(--border-2);
  border-radius: var(--r-md);
  font-weight: 800;
  color: var(--accent-hover);
  flex-shrink: 0;
  overflow: hidden;
  transition: transform 0.35s var(--ease), border-color 0.25s;
  position: relative;
  z-index: 1;
}
.client:hover .client__logo {
  transform: scale(1.05) rotate(-3deg);
  border-color: rgba(59, 130, 246, 0.35);
}
.client__info {
  position: relative;
  z-index: 1;
  flex: 1;
}
.client__info strong {
  font-size: 1.15rem;
  display: block;
  margin-bottom: 0.4rem;
}
.client__info span {
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text-2);
  display: block;
}
/* Variants: logos reales como <img> */
.client__logo--img {
  background: var(--bg-1);
  padding: 10px;
}
.client__logo--img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
@media (max-width: 720px) {
  .clients__grid { grid-template-columns: 1fr; }
  .client { padding: 1.5rem; gap: 1.25rem; }
  .client__logo { width: 64px; height: 64px; }
}
/* Algunos logos son light (oro/claros) — sobre dark van bien, sobre light necesitan fondo oscuro */
html[data-theme="light"] .client__logo--light {
  background: var(--bg-1);
  border-color: var(--border-2);
}
html[data-theme="dark"] .client__logo--light,
:root .client__logo--light {
  background: #0a0e14;
}

/* Badge con SVG dentro (Vigía) */
.product__badge--svg {
  background: rgba(15, 23, 42, 0.5) !important;
  padding: 4px;
  overflow: hidden;
}
html[data-theme="light"] .product__badge--svg {
  background: rgba(15, 23, 42, 0.04) !important;
  border: 1px solid var(--border-2);
}
.product__badge--svg img {
  width: 100%; height: 100%;
  object-fit: contain;
}
.client__info strong { color: var(--text-0); display: block; margin-bottom: 2px; }
.client__info span { color: var(--text-3); font-size: 0.88rem; }

@media (max-width: 600px) { .clients__grid { grid-template-columns: 1fr; } }

/* -------- ABOUT -------- */

.about__inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 3rem;
  align-items: flex-start;
}
.about__text h2 { margin-top: 0.5rem; }
.about__text p { margin-bottom: 1.25rem; font-size: 1.02rem; }
.about__meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem 2rem;
  margin: 2rem 0 0;
  padding-top: 2rem;
  border-top: 1px solid var(--border-1);
}
.about__meta dt { color: var(--text-3); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.25rem; }
.about__meta dd { margin: 0; color: var(--text-1); font-weight: 500; }

.about__stack {
  background: var(--bg-2);
  border: 1px solid var(--border-1);
  border-radius: var(--r-lg);
  padding: 2rem 2rem 2.5rem;
  position: sticky;
  top: 100px;
}
.about__stack h3 {
  margin-top: 0;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-3);
  font-weight: 600;
}
.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }

/* Tech badges — cuadrados con logo centrado, tooltip al hover */
.tech {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  border-radius: 16px;
  padding: 12px;
  cursor: default;
  position: relative;
  transition: background 0.25s, color 0.25s, border-color 0.25s, box-shadow 0.25s, transform 0.25s;
  font-size: 0.8rem;
  color: var(--text-1);
  font-weight: 600;
}
.tech img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.88;
  transition: opacity 0.25s, filter 0.3s;
}
/* En dark mode, algunos logos blanco se pierden: auto-tint si es negro puro */
html[data-theme="dark"] .tech img,
:root .tech img {
  filter: brightness(1) contrast(1);
}
/* Tech--text: badges con iniciales (SRI, Kushki) */
.tech--text {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-0);
  background: linear-gradient(135deg, var(--bg-3), var(--bg-4));
}
.tech--text::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--grad-subtle);
  opacity: 0;
  border-radius: inherit;
  transition: opacity 0.3s;
  z-index: 0;
  pointer-events: none;
}
.tech--text > * { position: relative; z-index: 1; }
.tech:hover {
  background: var(--bg-2);
  border-color: rgba(59, 130, 246, 0.45);
  box-shadow: 0 12px 28px -12px rgba(59, 130, 246, 0.45);
  color: var(--accent-hover);
}
.tech:hover img { opacity: 1; }
.tech--text:hover::before { opacity: 0.6; }

/* Tooltip con nombre */
.tech::after {
  content: attr(data-name);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--bg-2);
  color: var(--text-0);
  border: 1px solid var(--border-2);
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  box-shadow: var(--shadow-md);
  z-index: 3;
}
.tech::before {
  /* triangulito para el tooltip (solo cuando hover) */
  content: "";
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 8px; height: 8px;
  background: var(--bg-2);
  border-right: 1px solid var(--border-2);
  border-bottom: 1px solid var(--border-2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 2;
}
.tech:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.tech:hover::before { opacity: 1; }
/* tech--text no necesita ::before del tooltip (lo usa para el glow bg) — reescribir */
.tech--text::before { content: "" !important; position: absolute; inset: 0; background: var(--grad-subtle); opacity: 0; border-radius: inherit; bottom: auto; left: auto; transform: none; width: auto; height: auto; border: none; box-shadow: none; }
.tech--text:hover::before { opacity: 0.6; }

/* ===== TAGS PYRAMID — scroll-linked formation =====
   Los tags (logos) arrancan dispersos y se acomodan en pirámide
   conforme el scroll progreso la sección Sobre. */
.tags--pyramid {
  position: relative;
  min-height: 380px;
  display: block;
  padding: 0;
  padding-top: 20px;
  overflow: visible;
}
html.js .tags--pyramid .tech {
  position: absolute;
  left: 50%;
  top: 0;
  transform:
    translate(-50%, 0)
    translate(var(--x, 0px), var(--y, 0px))
    rotate(var(--r, 0deg))
    scale(var(--s, 1));
  opacity: var(--op, 1);
  filter: blur(var(--blur, 0px));
  will-change: transform, opacity, filter;
}
/* En pyramid el hover cambia color/borde + scale sutil, no posición */
html.js .tags--pyramid .tech:hover {
  transform:
    translate(-50%, 0)
    translate(var(--x, 0px), var(--y, 0px))
    rotate(var(--r, 0deg))
    scale(calc(var(--s, 1) * 1.08));
  z-index: 2;
}
@media (max-width: 720px) {
  .tags--pyramid { min-height: 320px; }
  .tech { width: 56px; height: 56px; padding: 10px; border-radius: 14px; }
  .tech--text { font-size: 0.72rem; }
}
@media (prefers-reduced-motion: reduce) {
  html.js .tags--pyramid .tech {
    filter: none;
    transform: translate(-50%, 0) translate(var(--x, 0px), var(--y, 0px));
  }
}

@media (max-width: 900px) {
  .about__inner { grid-template-columns: 1fr; gap: 2rem; }
  .about__stack { position: static; }
}

/* -------- CONTACT -------- */

.contact { background: linear-gradient(180deg, rgba(59, 130, 246, 0.03), transparent 40%); }
.contact__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 3rem;
  align-items: start;
}
.contact__form {
  background: var(--bg-2);
  border: 1px solid var(--border-1);
  border-radius: var(--r-lg);
  padding: 2rem;
}
.field { margin-bottom: 1.25rem; }
.field label {
  display: block;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-1);
  margin-bottom: 0.5rem;
}
.field .opt { color: var(--text-3); font-weight: 400; }
.field input, .field textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  background: var(--bg-1);
  border: 1px solid var(--border-2);
  border-radius: var(--r-md);
  color: var(--text-1);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg-0);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
.field textarea { resize: vertical; min-height: 110px; }

.contact__info {
  display: flex; flex-direction: column; gap: 0.25rem;
  padding: 0.5rem 0;
}
.info__block {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border-1);
}
.info__block:last-child { border-bottom: none; }
.info__label {
  display: block;
  color: var(--text-3);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.4rem;
}
.info__block a { color: var(--text-0); font-weight: 500; }
.info__block a:hover { color: var(--accent-hover); }

@media (max-width: 860px) {
  .contact__grid { grid-template-columns: 1fr; gap: 2rem; }
}

/* -------- FOOTER -------- */

.footer {
  padding: 4rem 0 2rem;
  border-top: 1px solid var(--border-1);
  background: var(--bg-0);
  margin-top: 4rem;
}
.footer__inner {
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border-1);
}
.footer__brand .brand__name { font-size: 1.4rem; font-weight: 800; color: var(--text-0); }
.footer__brand p { color: var(--text-3); font-size: 0.92rem; margin-top: 0.5rem; }
.footer__cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.footer__cols strong {
  display: block;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-1);
  margin-bottom: 1rem;
}
.footer__cols a, .footer__cols span {
  display: block;
  color: var(--text-3);
  font-size: 0.92rem;
  padding: 0.3rem 0;
  text-decoration: none;
}
.footer__cols a:hover { color: var(--text-0); }
.footer__bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 1.5rem;
  color: var(--text-3);
  font-size: 0.85rem;
  flex-wrap: wrap;
  gap: 1rem;
}

@media (max-width: 800px) {
  .footer__inner { grid-template-columns: 1fr; gap: 2rem; }
  .footer__cols { grid-template-columns: repeat(2, 1fr); }
  .footer__bottom { flex-direction: column; text-align: center; }
}

/* -------- REVEAL ON SCROLL -------- */

/* Progressive enhancement: solo ocultamos si JS está activo.
   Sin JS → todo visible por defecto (fallback accesible). */
html.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
html.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Word reveal: cada palabra del título entra con stagger */
html.js .word-reveal__w {
  display: inline-block;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  transition-delay: var(--d, 0ms);
}
html.js .word-reveal.is-visible .word-reveal__w {
  opacity: 1;
  transform: translateY(0);
}

/* 3D Tilt base — el JS inyecta --tx, --ty */
[data-tilt] {
  transform-style: preserve-3d;
  transform:
    perspective(1000px)
    rotateX(var(--rx, 0deg))
    rotateY(var(--ry, 0deg))
    translateZ(0);
  transition: transform 0.4s var(--ease);
  will-change: transform;
}
[data-tilt]:hover {
  transition: transform 0.08s linear;
}

/* ======= PROCESO — 5 steps en grid horizontal con icons + connector ======= */

.process {
  background: linear-gradient(180deg, transparent, rgba(59, 130, 246, 0.035), transparent);
  position: relative;
}
.process__track {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  height: 20px;
  color: var(--accent);
  opacity: 0;
  transition: opacity 1s var(--ease);
}
.process__grid.is-in + .process__track,
.process:has(.is-visible) .process__track { opacity: 0.55; }
.process__path { width: 100%; height: 100%; }

.process__grid {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: 1100px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.25rem;
  position: relative;
}
.process__step {
  position: relative;
  padding: 2rem 1.25rem 1.75rem;
  background: var(--bg-2);
  border: 1px solid var(--border-1);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform 0.35s var(--ease), border-color 0.3s, background 0.3s, box-shadow 0.3s;
  /* stagger extra via --step */
  transition-delay: calc(var(--step, 0) * 100ms);
}
.process__step::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--grad-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s var(--ease);
  transition-delay: calc(var(--step, 0) * 100ms + 400ms);
}
.process__step.is-visible::before { transform: scaleX(1); }
.process__step:hover {
  transform: translateY(-6px);
  border-color: rgba(59, 130, 246, 0.35);
  background: var(--bg-3);
  box-shadow: 0 20px 40px -16px rgba(59, 130, 246, 0.35);
}
.process__num {
  position: absolute;
  right: 0.9rem;
  top: 0.5rem;
  font-size: 3.4rem;
  font-weight: 800;
  color: var(--text-1);
  opacity: 0.13;
  letter-spacing: -0.04em;
  line-height: 1;
  transition: opacity 0.3s, transform 0.4s var(--ease);
  pointer-events: none;
}
html[data-theme="light"] .process__num { opacity: 0.10; }
.process__step:hover .process__num {
  opacity: 0.28;
  transform: scale(1.1) rotate(-4deg);
}
html[data-theme="light"] .process__step:hover .process__num { opacity: 0.22; }
.process__icon {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: var(--r-md);
  background: var(--grad-subtle);
  border: 1px solid var(--border-2);
  color: var(--accent-hover);
  margin-bottom: 1rem;
  transition: transform 0.45s var(--ease), background 0.3s, color 0.3s, border-color 0.3s;
}
.process__icon svg { width: 22px; height: 22px; }
.process__step:hover .process__icon {
  transform: rotate(-8deg) scale(1.08);
  background: var(--grad-primary);
  border-color: transparent;
  color: #fff;
}
.process__step h3 {
  margin: 0 0 0.4rem;
  font-size: 1.02rem;
  color: var(--text-0);
}
.process__step p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-2);
  line-height: 1.55;
}

@media (max-width: 1000px) {
  .process__grid { grid-template-columns: repeat(3, 1fr); }
  .process__grid > .process__step:nth-child(4) { grid-column: 1 / 3; }
  .process__grid > .process__step:nth-child(5) { grid-column: 3 / 4; }
  .process__track { display: none; }
}
@media (max-width: 640px) {
  .process__grid { grid-template-columns: 1fr; }
  .process__grid > .process__step:nth-child(4),
  .process__grid > .process__step:nth-child(5) { grid-column: auto; }
  .process__num { font-size: 2.6rem; right: 1rem; top: 0.75rem; }
}

/* ======= CTA FINAL ======= */

.cta-final {
  padding: clamp(5rem, 10vw, 8rem) 0;
  position: relative;
  overflow: hidden;
}
.cta-final__inner {
  position: relative;
  padding: clamp(3rem, 6vw, 5.5rem) clamp(1.5rem, 5vw, 4rem);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(139, 92, 246, 0.06));
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: var(--r-xl);
  max-width: 980px;
  margin: 0 auto;
  overflow: hidden;
  display: flex;
  justify-content: center;
}
.cta-final__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 640px;
  width: 100%;
}
.cta-final__content > .eyebrow {
  margin-bottom: 1.25rem;
}
.cta-final__glow {
  position: absolute;
  top: -50%; left: 50%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.25), transparent 60%);
  transform: translateX(-50%);
  filter: blur(60px);
  pointer-events: none;
  animation: pulse-glow 4s ease-in-out infinite alternate;
  z-index: 0;
}
@keyframes pulse-glow {
  0%   { opacity: 0.6; transform: translateX(-50%) scale(1); }
  100% { opacity: 1;   transform: translateX(-50%) scale(1.1); }
}
.cta-final h2 {
  font-size: clamp(1.9rem, 3.8vw, 2.9rem);
  margin: 0 0 1.25rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.cta-final p {
  color: var(--text-2);
  font-size: 1.05rem;
  max-width: 500px;
  margin: 0 auto 2.25rem;
  line-height: 1.55;
}
.cta-final__actions {
  display: flex;
  justify-content: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}
@media (max-width: 520px) {
  .cta-final__actions .btn { width: 100%; }
}

/* ======= Custom scrollbar ======= */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-0); }
::-webkit-scrollbar-thumb {
  background: var(--bg-4);
  border-radius: 10px;
  border: 2px solid var(--bg-0);
}
::-webkit-scrollbar-thumb:hover { background: var(--border-3); }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .word-reveal__w { opacity: 1; transform: none; transition: none; }
  [data-tilt]:hover { transition: none; }
  .cta-final__glow { animation: none; }
  html { scroll-behavior: auto; }
  .pill__dot { animation: none; }
}
