/* ============================================================
   JAAPSYSTEM — Design System
   Dark premium · Glassmorphism sutil · Manrope + Inter
   ============================================================ */

:root {
  /* Paleta */
  --bg-0: #0B1220;
  --bg-1: #111827;
  --bg-2: #16203a;
  --accent: #2563EB;
  --accent-2: #60A5FA;
  --white: #FFFFFF;

  --text-1: rgba(255, 255, 255, .96);
  --text-2: rgba(226, 232, 245, .72);
  --text-3: rgba(203, 213, 235, .48);

  --line: rgba(148, 178, 255, .10);
  --line-strong: rgba(148, 178, 255, .18);

  --glass: rgba(255, 255, 255, .035);
  --glass-hover: rgba(255, 255, 255, .06);

  --grad: linear-gradient(120deg, var(--accent), var(--accent-2));
  --grad-soft: linear-gradient(120deg, rgba(37, 99, 235, .35), rgba(96, 165, 250, .15));

  --radius: 20px;
  --radius-lg: 28px;

  --font-display: "Manrope", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  --ease: cubic-bezier(.22, 1, .36, 1);
  --container: 1200px;

  --shadow-glow: 0 0 60px rgba(37, 99, 235, .25);
  --shadow-card: 0 20px 60px rgba(3, 8, 20, .5);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  background: var(--bg-0);
  color: var(--text-1);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

::selection { background: rgba(37, 99, 235, .45); color: var(--white); }

/* Grano sutil */
.noise {
  position: fixed; inset: 0; z-index: 9999; pointer-events: none; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .03 0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}

.container {
  width: min(var(--container), 100% - 48px);
  margin-inline: auto;
}

/* ============ Tipografía base ============ */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 800; letter-spacing: -.02em; }

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.kicker {
  display: flex; align-items: center; gap: 12px;
  font-size: 13px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase;
  color: var(--accent-2); margin-bottom: 22px;
}
.kicker span {
  font-family: var(--font-display); font-size: 12px; color: var(--text-3);
  padding: 4px 10px; border: 1px solid var(--line-strong); border-radius: 99px;
}
.kicker::after { content: ""; height: 1px; width: 64px; background: linear-gradient(90deg, var(--accent), transparent); }

.section { padding: 140px 0; position: relative; }

.section-head { max-width: 720px; margin-bottom: 72px; }
.section-title {
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
}
.section-sub { margin-top: 20px; font-size: 18px; color: var(--text-2); max-width: 560px; }

/* ============ Botones ============ */
.btn {
  position: relative;
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 700; letter-spacing: .01em;
  border-radius: 99px; white-space: nowrap;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease),
              background .35s var(--ease), border-color .35s var(--ease);
  will-change: transform;
}
.btn-sm { padding: 10px 20px; font-size: 14px; }
.btn-lg { padding: 16px 30px; font-size: 16px; }
.btn-xl { padding: 20px 40px; font-size: 18px; }

.btn-primary {
  background: var(--grad); color: var(--white);
  box-shadow: 0 8px 28px rgba(37, 99, 235, .35), inset 0 1px 0 rgba(255,255,255,.25);
}
.btn-primary:hover { box-shadow: 0 12px 44px rgba(37, 99, 235, .55), inset 0 1px 0 rgba(255,255,255,.25); }

.btn-glass {
  background: var(--glass); color: var(--text-1);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.btn-glass:hover { background: var(--glass-hover); border-color: rgba(96, 165, 250, .4); }

.btn-ghost { color: var(--text-2); }
.btn-ghost:hover { color: var(--text-1); }

.btn-ico { width: 18px; height: 18px; transition: transform .35s var(--ease); }
.btn:hover .btn-ico { transform: translateX(4px); }

/* Punto pulsante */
.pulse-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #34D399; display: inline-block; position: relative; flex: none;
}
.pulse-dot::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 1px solid #34D399; animation: pulse 2s ease-out infinite;
}
@keyframes pulse {
  0% { transform: scale(.5); opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* ============ NAV ============ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background .4s var(--ease), border-color .4s var(--ease), backdrop-filter .4s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(11, 18, 32, .78);
  backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom-color: var(--line);
}
.nav-inner {
  width: min(var(--container), 100% - 48px); margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 76px; gap: 24px;
}

.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; overflow: hidden; box-shadow: 0 4px 18px rgba(37,99,235,.35); }
.brand-name {
  font-family: var(--font-display); font-weight: 800; font-size: 17px; letter-spacing: .04em;
}
.brand-name em { font-style: normal; font-weight: 500; color: var(--text-2); }

.nav-links { display: flex; gap: 6px; }
.nav-links a {
  position: relative; padding: 8px 14px; font-size: 14.5px; font-weight: 500;
  color: var(--text-2); border-radius: 99px;
  transition: color .3s var(--ease), background .3s var(--ease);
}
.nav-links a:hover { color: var(--text-1); background: var(--glass-hover); }

.nav-actions { display: flex; align-items: center; gap: 10px; }

.nav-burger {
  display: none; width: 42px; height: 42px; border-radius: 12px;
  border: 1px solid var(--line-strong);
  flex-direction: column; align-items: center; justify-content: center; gap: 6px;
}
.nav-burger span {
  width: 18px; height: 2px; background: var(--text-1); border-radius: 2px;
  transition: transform .35s var(--ease);
}
.nav-burger[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* ============ HERO ============ */
.hero {
  position: relative; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 150px 0 90px; overflow: hidden;
}

.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

.hero-glow {
  position: absolute; border-radius: 50%; filter: blur(120px); pointer-events: none;
}
.hero-glow-a {
  width: 620px; height: 620px; top: -180px; right: -120px;
  background: radial-gradient(circle, rgba(37, 99, 235, .28), transparent 65%);
  animation: drift 14s ease-in-out infinite alternate;
}
.hero-glow-b {
  width: 480px; height: 480px; bottom: -160px; left: -140px;
  background: radial-gradient(circle, rgba(96, 165, 250, .14), transparent 65%);
  animation: drift 18s ease-in-out infinite alternate-reverse;
}
@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(-60px, 40px) scale(1.12); }
}

.hero-grid-lines {
  position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background:
    linear-gradient(rgba(148, 178, 255, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 178, 255, .04) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 40%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 40%, black 30%, transparent 75%);
}

.hero-inner {
  position: relative; z-index: 2;
  width: min(var(--container), 100% - 48px); margin-inline: auto;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 64px; align-items: center;
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 18px; border-radius: 99px; margin-bottom: 30px;
  font-size: 13.5px; font-weight: 500; color: var(--text-2);
  background: var(--glass); border: 1px solid var(--line-strong);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}

.hero-title {
  font-size: clamp(40px, 5.4vw, 68px);
  line-height: 1.04; margin-bottom: 26px;
}
.hero-title .word { display: inline-block; }

.hero-sub {
  font-size: clamp(16px, 1.6vw, 19px); color: var(--text-2);
  max-width: 540px; margin-bottom: 40px;
}

.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 52px; }

.hero-trust { display: flex; flex-direction: column; gap: 6px; }
.hero-trust-label {
  font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
  color: var(--text-3);
}
.hero-trust-items { font-size: 14px; color: var(--text-2); font-weight: 500; }

.hero-scroll {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--text-3);
  transition: color .3s;
}
.hero-scroll:hover { color: var(--accent-2); }
.hero-scroll-line {
  width: 1px; height: 44px; overflow: hidden; position: relative;
  background: rgba(148, 178, 255, .15);
}
.hero-scroll-line::after {
  content: ""; position: absolute; left: 0; top: -50%; width: 100%; height: 50%;
  background: var(--accent-2); animation: scrollLine 2s var(--ease) infinite;
}
@keyframes scrollLine { to { top: 110%; } }

/* ---- Escena 3D del hero ---- */
.hero-scene {
  position: relative; height: 520px;
  perspective: 1400px; transform-style: preserve-3d;
}

.scene-ring {
  position: absolute; border-radius: 50%; border: 1px solid rgba(96, 165, 250, .12);
  pointer-events: none;
}
.scene-ring-a { inset: 6% -4% auto auto; width: 340px; height: 340px; animation: spin 40s linear infinite; border-style: dashed; }
.scene-ring-b { inset: auto auto 4% -6%; width: 260px; height: 260px; animation: spin 60s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }

.dashboard {
  position: absolute; inset: 8% 0 auto 4%; width: 92%;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(255,255,255,.07), rgba(255,255,255,.02) 45%, rgba(37,99,235,.06));
  border: 1px solid rgba(148, 178, 255, .16);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-card), 0 0 80px rgba(37, 99, 235, .12), inset 0 1px 0 rgba(255,255,255,.12);
  transform: rotateX(8deg) rotateY(-8deg);
  animation: floaty 7s ease-in-out infinite;
  overflow: hidden;
}
@keyframes floaty {
  0%, 100% { transform: rotateX(8deg) rotateY(-8deg) translateY(0); }
  50% { transform: rotateX(8deg) rotateY(-8deg) translateY(-16px); }
}

.dash-topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
}
.dash-dots { display: flex; gap: 6px; }
.dash-dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.14); }
.dash-dots i:first-child { background: rgba(255, 95, 87, .8); }
.dash-dots i:nth-child(2) { background: rgba(254, 188, 46, .8); }
.dash-dots i:last-child { background: rgba(40, 200, 64, .8); }
.dash-url {
  flex: 1; text-align: center; font-size: 11.5px; color: var(--text-3);
  background: rgba(255,255,255,.04); border-radius: 8px; padding: 4px 12px;
  max-width: 240px; margin-inline: auto;
}
.dash-live { display: flex; align-items: center; gap: 6px; font-size: 11px; color: #34D399; font-weight: 600; }

.dash-body { display: flex; }
.dash-side {
  display: flex; flex-direction: column; gap: 12px;
  padding: 20px 14px; border-right: 1px solid var(--line);
}
.dash-side-item {
  width: 30px; height: 30px; border-radius: 9px; background: rgba(255,255,255,.05);
}
.dash-side-item.active { background: var(--grad); box-shadow: 0 4px 14px rgba(37,99,235,.4); }

.dash-main { flex: 1; padding: 18px; display: flex; flex-direction: column; gap: 16px; }

.dash-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.dash-kpi {
  padding: 12px 14px; border-radius: 14px;
  background: rgba(255,255,255,.035); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 3px;
}
.dash-kpi-label { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.dash-kpi-value { font-family: var(--font-display); font-weight: 800; font-size: 16px; }
.dash-kpi-delta { font-size: 10.5px; color: var(--text-3); }
.dash-kpi-delta.up { color: #34D399; }

.dash-chart { border-radius: 14px; background: rgba(255,255,255,.025); border: 1px solid var(--line); padding: 10px; }
.dash-chart svg { width: 100%; height: 96px; }
.chart-line { stroke-dasharray: 700; stroke-dashoffset: 700; animation: draw 2.6s var(--ease) .6s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.chart-dot { opacity: 0; animation: fadeDot .4s ease 3s forwards; }
@keyframes fadeDot { to { opacity: 1; } }

.dash-bars { display: flex; gap: 10px; align-items: flex-end; height: 54px; padding: 0 4px; }
.dash-bars i {
  flex: 1; border-radius: 6px 6px 3px 3px;
  background: linear-gradient(to top, rgba(37,99,235,.25), rgba(96,165,250,.75));
  height: calc(var(--h) * 100%);
  transform-origin: bottom; animation: growBar 1.2s var(--ease) backwards;
}
.dash-bars i:nth-child(odd) { animation-delay: .9s; }
.dash-bars i:nth-child(even) { animation-delay: 1.15s; }
@keyframes growBar { from { transform: scaleY(0); } }

/* Tarjetas flotantes */
.float-card {
  position: absolute; z-index: 3;
  display: flex; align-items: center; gap: 12px;
  padding: 13px 18px; border-radius: 16px;
  background: rgba(17, 24, 39, .72);
  border: 1px solid rgba(148, 178, 255, .2);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 16px 40px rgba(3, 8, 20, .55), inset 0 1px 0 rgba(255,255,255,.1);
  font-size: 13px;
}
.float-card strong { display: block; font-family: var(--font-display); font-size: 13.5px; }
.float-card small { color: var(--text-3); font-size: 11px; }
.float-ico {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  display: grid; place-items: center; font-weight: 700; font-size: 13px;
}
.float-ico.ok { background: rgba(52, 211, 153, .15); color: #34D399; }
.float-ico.usr { background: rgba(96, 165, 250, .15); color: var(--accent-2); }
.float-ico.usr svg { width: 18px; height: 18px; }
.float-ico.api { background: rgba(37, 99, 235, .18); color: var(--accent-2); font-size: 11px; }

.float-deploy { top: 2%; right: 2%; animation: floaty2 6s ease-in-out infinite; }
.float-users { bottom: 10%; left: -2%; animation: floaty2 7.5s ease-in-out 1s infinite; }
.float-api { bottom: -4%; right: 12%; animation: floaty2 8.5s ease-in-out .5s infinite; }
@keyframes floaty2 {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.scene-glass {
  position: absolute; border-radius: 22px; pointer-events: none;
  background: linear-gradient(140deg, rgba(96,165,250,.10), rgba(255,255,255,.02));
  border: 1px solid rgba(148, 178, 255, .12);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.scene-glass-a { width: 130px; height: 130px; top: -4%; left: 2%; transform: rotate(-12deg); animation: floaty2 9s ease-in-out infinite; }
.scene-glass-b { width: 84px; height: 84px; bottom: 16%; right: -3%; transform: rotate(18deg); animation: floaty2 7s ease-in-out 2s infinite; }

/* ============ SERVICIOS (bento) ============ */
.bento {
  display: grid; gap: 18px;
  grid-template-columns: repeat(6, 1fr);
}
.bento-item {
  position: relative; overflow: hidden;
  grid-column: span 2;
  padding: 36px 32px;
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(255,255,255,.04), rgba(255,255,255,.015));
  border: 1px solid var(--line);
  transition: transform .5s var(--ease), border-color .5s var(--ease), background .5s var(--ease);
}
.bento-lg { grid-column: span 3; }
.bento-item:hover {
  transform: translateY(-6px);
  border-color: rgba(96, 165, 250, .35);
  background: linear-gradient(160deg, rgba(255,255,255,.06), rgba(37,99,235,.05));
}

.bento-glow {
  position: absolute; inset: 0; opacity: 0; pointer-events: none;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), rgba(96, 165, 250, .12), transparent 65%);
  transition: opacity .4s;
}
.bento-item:hover .bento-glow { opacity: 1; }

.srv-ico {
  display: grid; place-items: center;
  width: 52px; height: 52px; margin-bottom: 22px;
  border-radius: 15px; color: var(--accent-2);
  background: rgba(37, 99, 235, .12);
  border: 1px solid rgba(96, 165, 250, .2);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), background .5s;
}
.srv-ico svg { width: 26px; height: 26px; }
.bento-item:hover .srv-ico {
  transform: translateY(-4px) scale(1.06);
  background: rgba(37, 99, 235, .22);
  box-shadow: 0 10px 30px rgba(37, 99, 235, .3);
}

.bento-item h3 { font-size: 20px; margin-bottom: 10px; font-weight: 700; }
.bento-item p { font-size: 14.5px; color: var(--text-2); margin-bottom: 20px; }
.bento-tag {
  font-size: 11.5px; font-weight: 600; letter-spacing: .06em;
  color: var(--text-3); text-transform: uppercase;
  padding: 5px 12px; border: 1px solid var(--line); border-radius: 99px;
  transition: color .4s, border-color .4s;
}
.bento-item:hover .bento-tag { color: var(--accent-2); border-color: rgba(96, 165, 250, .3); }

/* ============ EXPERIENCIA ============ */
.experience { overflow: hidden; }
.exp-glow {
  position: absolute; width: 900px; height: 500px; left: 50%; top: 50%;
  transform: translate(-50%, -50%); pointer-events: none;
  background: radial-gradient(ellipse, rgba(37, 99, 235, .1), transparent 65%);
  filter: blur(60px);
}

.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
}
.stat {
  position: relative; padding: 42px 36px 48px;
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(255,255,255,.04), rgba(255,255,255,.01));
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform .5s var(--ease), border-color .5s var(--ease);
}
.stat:hover { transform: translateY(-6px); border-color: rgba(96, 165, 250, .3); }

.stat-value {
  display: flex; align-items: baseline;
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(44px, 4.6vw, 64px); line-height: 1;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat-value em { font-style: normal; font-size: .6em; }
.stat-label { display: block; margin-top: 12px; font-size: 14.5px; color: var(--text-2); font-weight: 500; }
.stat-bar {
  position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--grad); transform: scaleX(0); transform-origin: left;
  transition: transform 1.4s var(--ease) .3s;
}
.stat.in .stat-bar { transform: scaleX(1); }

/* ============ TECNOLOGÍAS ============ */
.tech-wall {
  display: grid; gap: 14px;
  grid-template-columns: repeat(7, 1fr);
}
.tech-tile {
  --brand: var(--accent-2);
  position: relative; aspect-ratio: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .025);
  border: 1px solid var(--line);
  transition: transform .45s var(--ease), border-color .45s var(--ease), background .45s;
  cursor: default; overflow: hidden;
}
.tech-tile::before {
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .45s;
  background: radial-gradient(120px circle at 50% 30%, color-mix(in srgb, var(--brand) 22%, transparent), transparent 70%);
}
.tech-tile:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--brand) 45%, transparent); }
.tech-tile:hover::before { opacity: 1; }

.tech-glyph {
  position: relative;
  font-family: var(--font-display); font-weight: 800; font-size: 24px;
  width: 52px; height: 52px; border-radius: 15px;
  display: grid; place-items: center;
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent);
  transition: transform .45s var(--ease), box-shadow .45s;
}
.tech-tile:hover .tech-glyph {
  transform: scale(1.1);
  box-shadow: 0 0 30px color-mix(in srgb, var(--brand) 40%, transparent);
}
.tech-name { position: relative; font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.tech-tile:hover .tech-name { color: var(--text-1); }

/* ============ PROCESO ============ */
.timeline-wrap { overflow-x: auto; scrollbar-width: none; }
.timeline-wrap::-webkit-scrollbar { display: none; }

.timeline {
  position: relative;
  display: grid; grid-template-columns: repeat(6, minmax(190px, 1fr));
  gap: 20px; padding-top: 54px; min-width: 1140px;
}
.timeline-track {
  position: absolute; top: 20px; left: 0; right: 0; height: 2px;
  background: rgba(148, 178, 255, .1); border-radius: 2px; overflow: hidden;
}
.timeline-progress {
  display: block; height: 100%; width: 0%;
  background: var(--grad); box-shadow: 0 0 18px rgba(96, 165, 250, .8);
}

.tl-step { position: relative; padding-right: 14px; }
.tl-node {
  position: absolute; top: -40px; left: 0;
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--bg-1); border: 2px solid rgba(148, 178, 255, .3);
  transition: background .5s, border-color .5s, box-shadow .5s;
}
.tl-step.active .tl-node {
  background: var(--accent-2); border-color: var(--accent-2);
  box-shadow: 0 0 18px rgba(96, 165, 250, .8);
}
.tl-num {
  font-family: var(--font-display); font-weight: 800; font-size: 15px;
  color: var(--accent-2); display: block; margin-bottom: 12px; opacity: .9;
}
.tl-step h3 { font-size: 18.5px; margin-bottom: 8px; }
.tl-step p { font-size: 13.5px; color: var(--text-2); }

/* ============ PORTAFOLIO ============ */
.portfolio .pf-card {
  display: grid; grid-template-columns: .85fr 1.15fr; gap: 48px; align-items: center;
  padding: clamp(32px, 5vw, 64px);
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(255,255,255,.04), rgba(255,255,255,.012));
  border: 1px solid var(--line);
  margin-bottom: 32px; overflow: hidden; position: relative;
  transition: border-color .5s var(--ease);
}
.pf-card:hover { border-color: rgba(96, 165, 250, .3); }
.pf-flip { grid-template-columns: 1.15fr .85fr; }
.pf-flip .pf-copy { order: 2; }
.pf-flip .pf-visual { order: 1; }

.pf-tag {
  display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent-2);
  padding: 6px 14px; border: 1px solid rgba(96, 165, 250, .3); border-radius: 99px;
  margin-bottom: 22px;
}
.pf-copy h3 { font-size: clamp(24px, 2.6vw, 34px); margin-bottom: 16px; line-height: 1.15; }
.pf-copy p { color: var(--text-2); font-size: 16px; margin-bottom: 26px; }
.pf-meta { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.pf-meta li {
  font-size: 12px; font-weight: 600; color: var(--text-3);
  padding: 5px 13px; background: rgba(255,255,255,.04);
  border: 1px solid var(--line); border-radius: 99px;
}

.pf-visual {
  position: relative; min-height: 340px;
  display: grid; place-items: center;
  transform-style: preserve-3d; perspective: 1000px;
}
.pf-orb {
  position: absolute; width: 70%; height: 70%; border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, .22), transparent 65%);
  filter: blur(50px); z-index: 0;
}

/* Laptop */
.mock-laptop { position: relative; z-index: 1; width: min(440px, 100%); transition: transform .6s var(--ease); }
.mock-screen {
  border-radius: 16px 16px 0 0; overflow: hidden;
  background: var(--bg-1); border: 1px solid rgba(148, 178, 255, .2); border-bottom: none;
  box-shadow: 0 30px 80px rgba(3, 8, 20, .6);
}
.ms-top { display: flex; gap: 5px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.ms-top i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.14); }
.ms-body { display: flex; min-height: 220px; }
.ms-side { display: flex; flex-direction: column; gap: 9px; padding: 14px 10px; border-right: 1px solid var(--line); }
.ms-side i { width: 22px; height: 22px; border-radius: 7px; background: rgba(255,255,255,.06); }
.ms-side i.on { background: var(--grad); }
.ms-main { flex: 1; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.ms-row { display: flex; gap: 10px; justify-content: space-between; }
.ms-chip { height: 12px; border-radius: 6px; background: rgba(255,255,255,.09); }
.ms-chip.accent { background: rgba(96, 165, 250, .5); }
.w40 { width: 40%; } .w30 { width: 30%; } .w20 { width: 20%; } .w15 { width: 15%; }
.ms-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ms-cards i { height: 44px; border-radius: 10px; background: rgba(255,255,255,.05); border: 1px solid var(--line); }
.ms-graph { flex: 1; border-radius: 10px; background: rgba(255,255,255,.03); border: 1px solid var(--line); padding: 8px; }
.ms-graph svg { width: 100%; height: 100%; min-height: 54px; }
.mock-base {
  height: 14px; border-radius: 0 0 18px 18px;
  background: linear-gradient(180deg, #1c2740, #0e1526);
  border: 1px solid rgba(148, 178, 255, .18); border-top: none;
  width: 112%; margin-left: -6%;
}

/* Phone */
.mock-phone {
  position: relative; z-index: 2; width: 190px;
  border-radius: 30px; padding: 10px;
  background: linear-gradient(160deg, #1a2340, #0d1425);
  border: 1px solid rgba(148, 178, 255, .25);
  box-shadow: 0 30px 80px rgba(3, 8, 20, .65);
  transition: transform .6s var(--ease);
}
.mp-notch {
  position: absolute; top: 16px; left: 50%; transform: translateX(-50%);
  width: 64px; height: 14px; border-radius: 8px; background: #060b16; z-index: 3;
}
.mp-screen {
  border-radius: 22px; overflow: hidden; background: var(--bg-1);
  min-height: 360px; padding: 38px 12px 14px;
  display: flex; flex-direction: column; gap: 12px;
}
.mp-header { display: flex; }
.mp-map {
  border-radius: 14px; background: rgba(37, 99, 235, .07);
  border: 1px solid var(--line); padding: 8px; flex: 1;
}
.mp-map svg { width: 100%; height: 100%; }
.mp-route { stroke-dashoffset: 240; stroke-dasharray: 5 6; animation: route 4s linear infinite; }
@keyframes route { to { stroke-dashoffset: 20; } }
.mp-list { display: flex; flex-direction: column; gap: 8px; }
.mp-list i { height: 26px; border-radius: 9px; background: rgba(255,255,255,.05); border: 1px solid var(--line); }

.mock-phone-back {
  position: absolute; z-index: 1; transform: translate(72px, 24px) rotate(9deg) scale(.92);
  opacity: .5; filter: blur(1px);
}
.mock-phone-back .mp-screen { min-height: 360px; }

/* Tablet */
.mock-tablet {
  position: relative; z-index: 1; width: min(460px, 100%);
  border-radius: 24px; padding: 14px;
  background: linear-gradient(160deg, #1a2340, #0d1425);
  border: 1px solid rgba(148, 178, 255, .22);
  box-shadow: 0 30px 80px rgba(3, 8, 20, .6);
  transition: transform .6s var(--ease);
}
.mt-screen {
  border-radius: 14px; background: var(--bg-1); min-height: 270px;
  padding: 18px; display: grid; grid-template-columns: 1.5fr 1fr; gap: 14px;
  grid-template-rows: auto 1fr;
}
.mt-screen .ms-row { grid-column: 1 / -1; }
.mt-table { display: flex; flex-direction: column; gap: 8px; }
.mt-table i { height: 24px; border-radius: 7px; background: rgba(255,255,255,.045); border: 1px solid var(--line); }
.mt-table i.head { background: rgba(37, 99, 235, .16); }
.mt-donut { display: grid; place-items: center; border-radius: 12px; background: rgba(255,255,255,.03); border: 1px solid var(--line); padding: 16px; }
.mt-donut svg { width: 110px; height: 110px; }
.donut-arc { stroke: var(--accent); animation: donut 2s var(--ease) backwards; }
@keyframes donut { from { stroke-dasharray: 0 100; } }

.pf-visual:hover .mock-laptop,
.pf-visual:hover .mock-tablet { transform: rotateY(-6deg) rotateX(4deg) translateY(-8px); }
.pf-visual:hover .mock-phone:not(.mock-phone-back) { transform: rotateY(8deg) rotateX(4deg) translateY(-10px); }

/* ============ DIFERENCIALES ============ */
.why-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  border-top: 1px solid var(--line);
}
.why-item {
  display: flex; align-items: flex-start; gap: 22px;
  padding: 34px 28px;
  border-bottom: 1px solid var(--line);
  position: relative; transition: background .45s var(--ease);
}
.why-item:nth-child(odd) { border-right: 1px solid var(--line); }
.why-item::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
  background: var(--grad); transform: scaleY(0); transform-origin: top;
  transition: transform .45s var(--ease);
}
.why-item:hover { background: rgba(96, 165, 250, .04); }
.why-item:hover::before { transform: scaleY(1); }

.why-num {
  font-family: var(--font-display); font-weight: 800; font-size: 14px;
  color: var(--text-3); padding-top: 4px; min-width: 26px;
  transition: color .4s;
}
.why-item:hover .why-num { color: var(--accent-2); }
.why-ico {
  display: grid; place-items: center; flex: none;
  width: 46px; height: 46px; border-radius: 13px;
  color: var(--accent-2); background: rgba(37, 99, 235, .1);
  border: 1px solid rgba(96, 165, 250, .18);
  transition: transform .45s var(--ease), box-shadow .45s;
}
.why-ico svg { width: 22px; height: 22px; }
.why-item:hover .why-ico { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(37, 99, 235, .3); }
.why-item h3 { font-size: 17.5px; margin-bottom: 6px; font-weight: 700; }
.why-item p { font-size: 14px; color: var(--text-2); }

/* ============ TESTIMONIOS ============ */
.tst-slider { overflow: hidden; border-radius: var(--radius-lg); position: relative; }
.tst-track {
  display: flex;
  transition: transform .8s var(--ease);
}
.tst-card {
  flex: 0 0 100%;
  padding: clamp(36px, 5vw, 64px);
  background: linear-gradient(160deg, rgba(255,255,255,.045), rgba(37,99,235,.03));
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  display: flex; flex-direction: column; gap: 26px;
}
.tst-quote { width: 40px; height: 40px; color: var(--accent); opacity: .9; }
.tst-card blockquote {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(19px, 2.2vw, 27px); line-height: 1.4; letter-spacing: -.01em;
  max-width: 800px;
}
.tst-card figcaption { display: flex; align-items: center; gap: 16px; }
.tst-avatar {
  width: 54px; height: 54px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800; font-size: 16px; color: var(--white);
  background: linear-gradient(135deg, var(--a, #2563EB), var(--b, #60A5FA));
  box-shadow: 0 6px 20px rgba(37, 99, 235, .35);
  border: 2px solid rgba(255,255,255,.15);
}
.tst-card strong { display: block; font-family: var(--font-display); font-size: 15.5px; }
.tst-card small { color: var(--text-3); font-size: 13px; }

.tst-dots { display: flex; gap: 8px; justify-content: center; margin-top: 28px; }
.tst-dots button {
  width: 26px; height: 4px; border-radius: 4px;
  background: rgba(148, 178, 255, .18);
  transition: background .4s, width .4s var(--ease);
}
.tst-dots button.active { background: var(--accent-2); width: 42px; }

/* ============ CTA FINAL ============ */
.cta {
  position: relative; padding: 180px 0; text-align: center; overflow: hidden;
}
.cta-bg { position: absolute; inset: 0; pointer-events: none; }
.cta-orb {
  position: absolute; left: 50%; top: 58%; transform: translate(-50%, -50%);
  width: 880px; height: 880px; border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, .3), rgba(37, 99, 235, .06) 45%, transparent 68%);
  filter: blur(30px);
  animation: breathe 8s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: .9; }
  50% { transform: translate(-50%, -50%) scale(1.08); opacity: 1; }
}
.cta-grid {
  position: absolute; inset: 0;
  background:
    linear-gradient(rgba(148, 178, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 178, 255, .05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 60% 60% at 50% 55%, black, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 60% 60% at 50% 55%, black, transparent 78%);
  transform: perspective(600px) rotateX(24deg) scale(1.25);
  transform-origin: center 70%;
}

.cta-inner { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; }
.cta .kicker { justify-content: center; }
.cta .kicker::after { display: none; }
.cta-title {
  font-size: clamp(44px, 7vw, 92px); line-height: 1.02; letter-spacing: -.03em;
  margin-bottom: 28px;
}
.cta-sub { font-size: 18px; color: var(--text-2); max-width: 520px; margin-bottom: 48px; }
.cta-actions { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; }

/* ============ FOOTER ============ */
.footer {
  position: relative; overflow: hidden;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, var(--bg-0), #070c17);
  padding: 90px 0 40px;
}
.footer-top {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr;
  gap: 48px; margin-bottom: 72px;
}
.footer-brand p { margin: 22px 0 26px; color: var(--text-2); font-size: 14.5px; }

.footer-social { display: flex; gap: 10px; }
.footer-social a {
  display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 12px;
  color: var(--text-2); background: rgba(255,255,255,.035);
  border: 1px solid var(--line);
  transition: color .35s, border-color .35s, transform .35s var(--ease), box-shadow .35s;
}
.footer-social a svg { width: 18px; height: 18px; }
.footer-social a:hover {
  color: var(--accent-2); border-color: rgba(96, 165, 250, .4);
  transform: translateY(-3px); box-shadow: 0 8px 22px rgba(37, 99, 235, .25);
}

.footer-col { display: flex; flex-direction: column; gap: 13px; }
.footer-col h4 {
  font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--text-3); margin-bottom: 8px;
}
.footer-col a, .footer-addr { font-size: 14.5px; color: var(--text-2); transition: color .3s, transform .3s var(--ease); }
.footer-col a:hover { color: var(--accent-2); transform: translateX(3px); }

.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px;
  padding-top: 32px; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--text-3);
}

.footer-watermark {
  position: absolute; left: 50%; bottom: -6%; transform: translateX(-50%);
  font-family: var(--font-display); font-weight: 800; letter-spacing: .06em;
  font-size: clamp(90px, 16vw, 230px); line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(148, 178, 255, .06);
  pointer-events: none; user-select: none; white-space: nowrap;
}

/* ============ Animaciones de entrada (reveal) ============ */
/* Visible por defecto; GSAP toma el control cuando carga (html.gsap-on) */
html.gsap-on .reveal { opacity: 0; }

/* ============ Responsive ============ */
@media (max-width: 1080px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-scene { height: 440px; max-width: 620px; margin-inline: auto; width: 100%; }
  .bento-item, .bento-lg { grid-column: span 3; }
  .tech-wall { grid-template-columns: repeat(5, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 780px) {
  .section { padding: 96px 0; }
  .section-head { margin-bottom: 48px; }

  .nav-links {
    position: fixed; inset: 76px 16px auto 16px; z-index: 99;
    flex-direction: column; padding: 18px;
    background: rgba(11, 18, 32, .92);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--line-strong); border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: transform .4s var(--ease), opacity .4s var(--ease);
  }
  .nav-links.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-links a { padding: 13px 16px; font-size: 16px; }
  .nav-burger { display: flex; }
  .nav-actions .btn-ghost { display: none; }

  .hero { padding-top: 120px; }
  .hero-cta .btn { flex: 1; justify-content: center; }
  .hero-scene { height: 400px; }
  .float-users { left: 0; }
  .float-api { right: 0; }
  .hero-scroll { display: none; }

  .bento-item, .bento-lg { grid-column: span 6; padding: 30px 26px; }
  .tech-wall { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .stats { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat { padding: 30px 24px 36px; }

  .pf-card, .pf-flip { grid-template-columns: 1fr !important; gap: 32px; }
  .pf-flip .pf-copy { order: 1; }
  .pf-flip .pf-visual { order: 2; }
  .pf-visual { min-height: 300px; }
  .mock-phone-back { display: none; }

  .why-grid { grid-template-columns: 1fr; }
  .why-item:nth-child(odd) { border-right: none; }
  .why-item { padding: 26px 8px; }

  .cta { padding: 130px 0; }
  .cta-actions { width: 100%; }
  .cta-actions .btn { flex: 1; justify-content: center; }

  .footer-top { grid-template-columns: 1fr 1fr; gap: 36px; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 420px) {
  .tech-wall { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
}

/* ============ Accesibilidad: reducir movimiento ============ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  html { scroll-behavior: auto; }
  html.gsap-on .reveal { opacity: 1; }
}
