/* ============================================================
   SOLUCIONES APPS — Sistema de diseño
   Tema oscuro · acento azul · animaciones orientadas al scroll
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  /* Color de acento principal (azul del logo) — cámbialo aquí */
  --accent: #2563EB;
  --accent-hover: #3B82F6;
  --accent-soft: rgba(37, 99, 235, 0.12);
  --accent-line: rgba(37, 99, 235, 0.45);
  --accent-glow: rgba(37, 99, 235, 0.35);

  /* Fondos */
  --bg: #05060A;
  --bg-soft: #0A0D14;
  --surface: #0E1219;
  --surface-2: #131927;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);

  /* Texto */
  --text: #F2F5FA;
  --text-dim: #9AA6B8;
  --text-faint: #5C6879;

  /* Tipografía */
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Medidas */
  --header-h: 72px;
  --radius: 16px;
  --radius-sm: 12px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

[id] { scroll-margin-top: calc(var(--header-h) + 24px); }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background:
    radial-gradient(1100px 560px at 75% -10%, rgba(37, 99, 235, 0.14), transparent 60%),
    radial-gradient(900px 520px at 8% 6%, rgba(37, 99, 235, 0.07), transparent 55%),
    var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Rejilla de fondo sutil */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 0%, transparent 70%);
  pointer-events: none;
}

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

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

a { color: inherit; text-decoration: none; }

ul, ol { list-style: none; }

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #1E2431; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #2A3242; }

/* ---------- Utilidades ---------- */
.container {
  width: min(1180px, 100% - clamp(40px, 9vw, 96px));
  margin-inline: auto;
}

.section {
  position: relative;
  padding-block: clamp(84px, 11vw, 140px);
}

.section-alt {
  background:
    radial-gradient(800px 420px at 85% 10%, rgba(37, 99, 235, 0.08), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.016), rgba(255, 255, 255, 0) 40%);
  border-block: 1px solid var(--border);
}

/* Números de sección decorativos */
.section[data-number]::before {
  content: attr(data-number);
  position: absolute;
  top: clamp(20px, 4vw, 48px);
  right: clamp(14px, 4vw, 56px);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(72px, 11vw, 150px);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.055);
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.section > .container { position: relative; z-index: 1; }

.icon {
  width: 20px;
  height: 20px;
  flex: none;
  display: block;
}

.grad {
  background: linear-gradient(92deg, #93C5FD 0%, #3B82F6 55%, #60A5FA 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-hover);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent));
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  line-height: 1.12;
  font-weight: 700;
}

h2 { font-size: clamp(1.9rem, 4.4vw, 3rem); }

.section-head {
  max-width: 760px;
  margin-bottom: clamp(44px, 6vw, 72px);
}
.section-head h2 { margin-bottom: 18px; }

.section-intro {
  color: var(--text-dim);
  font-size: 1.08rem;
  max-width: 62ch;
}

.section-outro {
  margin-top: 48px;
  text-align: center;
  color: var(--text-dim);
  font-size: 1.05rem;
}
.section-outro strong { color: var(--text); font-weight: 600; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  font-family: var(--font-body);
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease), background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
  white-space: nowrap;
}

.btn .icon { width: 18px; height: 18px; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 30px -10px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 16px 40px -12px var(--accent-glow);
}

.btn-ghost {
  border-color: var(--border-strong);
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
}
.btn-ghost:hover {
  border-color: var(--accent-line);
  color: #fff;
  background: var(--accent-soft);
  transform: translateY(-2px);
}

.btn-sm { padding: 10px 18px; font-size: 0.88rem; }
.btn-lg { padding: 17px 34px; font-size: 1.05rem; border-radius: 14px; }
.btn-lg .icon { width: 22px; height: 22px; }

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.02);
  transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease, transform 0.25s var(--ease);
}
.btn-icon:hover {
  color: #fff;
  border-color: var(--accent-line);
  background: var(--accent-soft);
  transform: translateY(-2px);
}
.btn-icon .icon { width: 18px; height: 18px; }

/* ---------- Skip link ---------- */
.skip-link {
  position: fixed;
  top: -60px;
  left: 16px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--accent);
  color: #fff;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: top 0.25s ease;
}
.skip-link:focus { top: 12px; }

/* ---------- Barra de progreso ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 120;
  pointer-events: none;
}
.scroll-progress span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #60A5FA);
  box-shadow: 0 0 12px var(--accent-glow);
}

/* ---------- Header ---------- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(5, 6, 10, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.header.scrolled {
  background: rgba(5, 6, 10, 0.86);
  border-bottom-color: var(--border);
  box-shadow: 0 8px 32px -16px rgba(0, 0, 0, 0.8);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-h);
  transition: height 0.3s ease;
}
.header.scrolled .header-inner { height: 60px; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.12rem;
  letter-spacing: -0.01em;
}

.brand-logo {
  display: block;
  height: 42px;
  width: auto;
  transition: height 0.3s ease;
}
.header.scrolled .brand-logo { height: 38px; }

.nav { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 32px); }

.nav-link {
  position: relative;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-dim);
  transition: color 0.25s ease;
  padding-block: 6px;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transition: right 0.3s var(--ease);
}
.nav-link:hover, .nav-link.is-active { color: var(--text); }
.nav-link:hover::after, .nav-link.is-active::after { right: 0; }

.header-actions { display: flex; align-items: center; gap: 14px; }

/* Hamburguesa */
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 42px;
  height: 42px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 0.25s ease, background 0.25s ease;
}
.burger:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.burger span {
  display: block;
  height: 2px;
  width: 100%;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.3s var(--ease), opacity 0.2s ease;
}
.burger.is-open span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.burger.is-open span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

/* ---------- Menú móvil ---------- */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 48px;
  background: rgba(5, 6, 10, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}
.mobile-menu.is-open { opacity: 1; visibility: visible; }
.mobile-menu[hidden] { display: none; }

.mobile-menu-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.mobile-menu-nav a {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 6vw, 2rem);
  font-weight: 600;
  color: var(--text-dim);
  padding: 8px 16px;
  opacity: 0;
  transform: translateY(16px);
  transition: color 0.25s ease, opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.mobile-menu.is-open .mobile-menu-nav a { opacity: 1; transform: none; }
.mobile-menu-nav a:hover, .mobile-menu-nav a:active { color: #fff; }
.mobile-menu.is-open .mobile-menu-nav a:nth-child(1) { transition-delay: 0.08s; }
.mobile-menu.is-open .mobile-menu-nav a:nth-child(2) { transition-delay: 0.13s; }
.mobile-menu.is-open .mobile-menu-nav a:nth-child(3) { transition-delay: 0.18s; }
.mobile-menu.is-open .mobile-menu-nav a:nth-child(4) { transition-delay: 0.23s; }
.mobile-menu.is-open .mobile-menu-nav a:nth-child(5) { transition-delay: 0.28s; }
.mobile-menu.is-open .mobile-menu-nav a:nth-child(6) { transition-delay: 0.33s; }

body.menu-open { overflow: hidden; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-top: calc(var(--header-h) + clamp(48px, 8vw, 96px));
  padding-bottom: clamp(56px, 8vw, 96px);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(36px, 5vw, 64px);
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  color: var(--text-dim);
  font-size: 0.84rem;
  font-weight: 500;
  margin-bottom: 26px;
}
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-hover);
  box-shadow: 0 0 10px var(--accent-glow);
  animation: pulseDot 2.4s ease-in-out infinite;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.8); }
}

.hero h1 {
  font-size: clamp(2.35rem, 5.4vw, 4.15rem);
  margin-bottom: 24px;
  max-width: 15ch;
}

.hero-sub {
  color: var(--text-dim);
  font-size: clamp(1rem, 1.4vw, 1.13rem);
  max-width: 52ch;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 22px;
}

.hero-note {
  color: var(--text-faint);
  font-size: 0.9rem;
}

/* Visual del hero */
.hero-visual {
  position: relative;
  aspect-ratio: 560 / 480;
  max-width: 560px;
  width: 100%;
  margin-inline: auto;
}

.hero-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.hl {
  fill: none;
  stroke: url(#lineGrad);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-dasharray: 6 10;
  animation: dashFlow 3.2s linear infinite;
}
@keyframes dashFlow { to { stroke-dashoffset: -16; } }

.hdot { opacity: 0; }
@supports (offset-path: path("M0 0")) {
  .hdot {
    opacity: 0.9;
    offset-rotate: 0deg;
    animation: dotTravel 7s linear infinite;
  }
  .hdot:nth-of-type(2) { animation-delay: 1.4s; }
  .hdot:nth-of-type(3) { animation-delay: 2.8s; }
  .hdot:nth-of-type(4) { animation-delay: 4.2s; }
  .hdot:nth-of-type(5) { animation-delay: 5.6s; }
}
@keyframes dotTravel {
  0% { offset-distance: 0%; opacity: 0; }
  6% { opacity: 0.95; }
  94% { opacity: 0.95; }
  100% { offset-distance: 100%; opacity: 0; }
}

.node {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 2;
}
.n-app  { left: 12.5%; top: 18.75%; }
.n-db   { left: 87.5%; top: 16.6%; }
.n-auto { left: 50%;  top: 35.4%; }
.n-wa   { left: 14.3%; top: 75%; }
.n-mail { left: 85.7%; top: 72.9%; }
.n-rep  { left: 50%;  top: 85.4%; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 12px;
  background: linear-gradient(160deg, #10151F, #0B0F17);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 500;
  box-shadow: 0 10px 30px -14px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  animation: floaty 6s ease-in-out infinite alternate;
}
.chip .icon { width: 15px; height: 15px; color: var(--accent-hover); }

.chip-auto {
  border-color: var(--accent-line);
  box-shadow: 0 0 30px -8px var(--accent-glow), inset 0 0 18px -10px var(--accent-glow);
}
.chip-auto .icon { color: #fff; }

@keyframes floaty {
  from { transform: translateY(-3px); }
  to { transform: translateY(4px); }
}
.n-app .chip   { animation-delay: 0s; }
.n-db .chip    { animation-delay: 0.8s; }
.n-auto .chip  { animation-delay: 1.6s; }
.n-wa .chip    { animation-delay: 0.4s; }
.n-mail .chip  { animation-delay: 1.2s; }
.n-rep .chip   { animation-delay: 2s; }

/* Chips flotantes decorativos */
.float-chip {
  position: absolute;
  z-index: 3;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent-hover);
  border: 1px solid var(--accent-line);
  background: rgba(10, 13, 20, 0.85);
  padding: 5px 10px;
  border-radius: 8px;
  animation: floaty 5s ease-in-out infinite alternate;
}
.fc-1 { left: -2%; top: 8%; animation-delay: 0.5s; }
.fc-2 { right: -2%; top: 42%; animation-delay: 1.4s; }
.fc-3 { right: 6%; bottom: 6%; animation-delay: 2.2s; }

/* Parallax suave del hero (controlado por JS) */
.hero-visual.is-ready .hero-lines { transform: translate3d(calc(var(--px, 0) * -8px), calc(var(--py, 0) * -8px), 0); transition: transform 0.4s ease-out; }
.hero-visual.is-ready .node { transform: translate(calc(-50% + var(--px, 0) * 10px), calc(-50% + var(--py, 0) * 10px)); transition: transform 0.4s ease-out; }
.hero-visual.is-ready .float-chip { transform: translate3d(calc(var(--px, 0) * 14px), calc(var(--py, 0) * 14px), 0); transition: transform 0.4s ease-out; }

/* ---------- Cinta de tecnologías ---------- */
.marquee-strip {
  margin-top: clamp(48px, 7vw, 84px);
  border-top: 1px solid var(--border);
  padding-top: 34px;
}

.marquee-label {
  text-align: center;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 18px;
}

.marquee {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.marquee-track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: marquee 34s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }

.marquee-track span {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-dim);
  white-space: nowrap;
  transition: color 0.25s ease;
  margin-right: 28px;
}
.marquee-track span:hover { color: #fff; }
.marquee-track i {
  font-style: normal;
  color: var(--accent);
  font-size: 0.7rem;
  margin-right: 28px;
}

@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Problema ---------- */
.problem-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
}

.p-card {
  position: relative;
  grid-column: span 2;
  padding: 28px;
  border-radius: var(--radius);
  background: linear-gradient(165deg, var(--surface), rgba(14, 18, 25, 0.6));
  border: 1px solid var(--border);
  transition: transform 0.35s var(--ease), border-color 0.35s ease, background 0.35s ease;
}
.p-card:nth-child(4), .p-card:nth-child(5) { grid-column: span 3; }
.p-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-line);
  background: linear-gradient(165deg, #111827, rgba(14, 18, 25, 0.7));
}

.p-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--accent-hover);
  margin-bottom: 18px;
}
.p-icon .icon { width: 22px; height: 22px; }

.p-num {
  position: absolute;
  top: 22px;
  right: 24px;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-faint);
}

.p-card h3 {
  font-size: 1.12rem;
  margin-bottom: 8px;
}
.p-card p { color: var(--text-dim); font-size: 0.94rem; }

/* ---------- Solución: flujo conectado ---------- */
.flow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 40px;
}

.flow-node {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 96px;
  padding: 16px 14px 14px;
  border-radius: 14px;
  background: linear-gradient(165deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border-strong);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  transition: border-color 0.3s ease, transform 0.3s var(--ease), box-shadow 0.3s ease;
}
.flow-node:hover {
  border-color: var(--accent-line);
  transform: translateY(-3px);
  box-shadow: 0 14px 34px -16px var(--accent-glow);
}

.fn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--accent-hover);
}
.fn-icon .icon { width: 19px; height: 19px; }

.flow-link {
  position: relative;
  flex: 1 1 auto;
  min-width: 28px;
  height: 2px;
}
.flow-line {
  position: absolute;
  inset: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent-line), var(--accent));
  background-size: 200% 100%;
  animation: lineFlow 2.6s linear infinite;
  opacity: 0.85;
}
@keyframes lineFlow {
  0% { background-position: 200% 0; }
  100% { background-position: 0% 0; }
}

.flow-dot {
  position: absolute;
  top: 50%;
  left: 0;
  width: 7px;
  height: 7px;
  margin-top: -3.5px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 10px var(--accent-hover), 0 0 4px var(--accent-hover);
  animation: flowX 3.4s linear infinite;
  animation-play-state: paused;
}
.flow.is-visible .flow-dot { animation-play-state: running; }
@keyframes flowX {
  0% { left: -2%; opacity: 0; }
  8% { opacity: 1; }
  92% { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}

.flow-benefits {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px 34px;
  margin-bottom: 16px;
}
.benefit {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text-dim);
  font-size: 0.95rem;
  font-weight: 500;
}
.benefit .icon { width: 17px; height: 17px; color: var(--accent-hover); }

.flow-caption {
  text-align: center;
  color: var(--text-faint);
  font-size: 0.88rem;
}

/* ---------- Servicios ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
}

.s-card {
  position: relative;
  grid-column: span 2;
  padding: 28px;
  border-radius: var(--radius);
  background: linear-gradient(165deg, var(--surface), rgba(14, 18, 25, 0.6));
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform 0.35s var(--ease), border-color 0.35s ease;
}
.s-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-line);
}
.s-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(340px 180px at 50% -10%, var(--accent-soft), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.s-card:hover::before { opacity: 1; }

.s-large { grid-column: span 4; }
.s-card > * { position: relative; z-index: 1; }

.s-top { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.s-top .p-icon { margin-bottom: 0; }

.s-card h3 { font-size: 1.14rem; margin-bottom: 12px; }
.s-card .s-desc { color: var(--text-dim); font-size: 0.94rem; margin-bottom: 18px; }

.s-list { display: grid; gap: 9px; }
.s-list li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--text-dim);
  font-size: 0.9rem;
}
.s-list .icon { width: 16px; height: 16px; color: var(--accent-hover); margin-top: 3px; }

/* Mini gráfico decorativo (tarjeta grande) */
.mini-chart {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  height: 64px;
  margin-top: 26px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.mini-chart span {
  flex: 1;
  height: var(--h);
  border-radius: 4px 4px 2px 2px;
  background: linear-gradient(180deg, #3B82F6, rgba(37, 99, 235, 0.25));
  opacity: 0.75;
  animation: growBar 0.8s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 0.06s + 0.3s);
  transform-origin: bottom;
}
.mini-chart span:nth-child(1) { --i: 0; }
.mini-chart span:nth-child(2) { --i: 1; }
.mini-chart span:nth-child(3) { --i: 2; }
.mini-chart span:nth-child(4) { --i: 3; }
.mini-chart span:nth-child(5) { --i: 4; }
.mini-chart span:nth-child(6) { --i: 5; }
.mini-chart span:nth-child(7) { --i: 6; }
@keyframes growBar { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* ---------- Proceso (storytelling) ---------- */
.process-grid {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: clamp(40px, 6vw, 88px);
  align-items: start;
}

.process-panel { position: sticky; top: calc(var(--header-h) + 28px); }

.process-panel h2 { margin-bottom: 32px; }

.stage { position: relative; min-height: 240px; margin-bottom: 28px; }

.stage-item {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.45s ease, transform 0.45s var(--ease);
  pointer-events: none;
}
.stage-item.is-active {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.stage-num {
  display: block;
  font-family: var(--font-display);
  font-size: 3.4rem;
  font-weight: 700;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--accent-line);
  margin-bottom: 14px;
}

.stage-item h3 { font-size: 1.5rem; margin-bottom: 10px; }
.stage-item p { color: var(--text-dim); max-width: 44ch; }

.process-progress {
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-bottom: 22px;
}
.process-bar {
  display: block;
  height: 100%;
  width: 20%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent), #60A5FA);
  box-shadow: 0 0 12px var(--accent-glow);
  transition: width 0.6s var(--ease);
}

.process-steps {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.process-steps li {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 0.82rem;
  font-weight: 500;
  transition: color 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}
.process-steps li.is-active {
  color: #fff;
  border-color: var(--accent-line);
  background: var(--accent-soft);
}

/* Escenas */
.process-scenes { display: grid; gap: 12px; }

.scene {
  min-height: 68vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  text-align: center;
  padding: 40px 20px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: linear-gradient(170deg, rgba(19, 25, 39, 0.55), rgba(10, 13, 20, 0.4));
  transition: border-color 0.4s ease, background 0.4s ease, box-shadow 0.4s ease;
}
.scene.is-active {
  border-color: var(--accent-line);
  background: linear-gradient(170deg, rgba(23, 31, 49, 0.7), rgba(10, 13, 20, 0.5));
  box-shadow: 0 24px 70px -30px var(--accent-glow);
}

.scene-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  border-radius: 22px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--accent-hover);
  box-shadow: 0 0 40px -12px var(--accent-glow);
  transition: transform 0.5s var(--ease);
}
.scene.is-active .scene-icon { transform: scale(1.08) rotate(-3deg); }
.scene-icon .icon { width: 34px; height: 34px; }

.scene-tag {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-hover);
}

.scene-text {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.4vw, 1.6rem);
  font-weight: 600;
  max-width: 24ch;
  color: var(--text);
}

/* ---------- Proyectos ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.proj-card {
  border-radius: var(--radius);
  background: linear-gradient(165deg, var(--surface), rgba(14, 18, 25, 0.6));
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform 0.35s var(--ease), border-color 0.35s ease, box-shadow 0.35s ease;
}
.proj-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-line);
  box-shadow: 0 24px 60px -30px rgba(37, 99, 235, 0.35);
}

.shot {
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    radial-gradient(320px 160px at 50% 0%, rgba(37, 99, 235, 0.1), transparent 70%),
    #0B0F17;
  background-size: 28px 28px, 28px 28px, auto, auto;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
/* La imagen se muestra SIEMPRE completa (sin recortes), centrada sobre fondo oscuro */
.shot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: transform 0.5s var(--ease);
}
.proj-card:hover .shot img { transform: scale(1.03); }

.proj-body { padding: 22px 24px 26px; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.tags span {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent-hover);
}

.proj-body h3 { font-size: 1.18rem; margin-bottom: 8px; }
.proj-body p { color: var(--text-dim); font-size: 0.93rem; }

/* ---------- Sobre mí ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}

.about-card {
  padding: 36px 32px;
  border-radius: 20px;
  background: linear-gradient(170deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border-strong);
  text-align: center;
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.9);
}

.avatar {
  width: 108px;
  height: 108px;
  margin: 0 auto 22px;
  border-radius: 50%;
  background: conic-gradient(from 180deg, var(--accent), #60A5FA, var(--accent));
  padding: 4px;
  position: relative;
  box-shadow: 0 0 40px -14px var(--accent-glow);
}
.avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.about-card h3 { font-size: 1.3rem; margin-bottom: 6px; }

.about-role {
  color: var(--text-dim);
  font-size: 0.92rem;
  margin-bottom: 14px;
}

.about-loc {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text-faint);
  font-size: 0.86rem;
  margin-bottom: 18px;
}
.about-loc .icon { width: 15px; height: 15px; }

.available {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  color: var(--text-dim);
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 22px;
}

.about-social {
  display: flex;
  justify-content: center;
  gap: 12px;
  border-top: 1px solid var(--border);
  padding-top: 22px;
}

.about-copy h2 { margin-bottom: 22px; }

.about-p {
  color: var(--text-dim);
  font-size: 1.03rem;
  max-width: 58ch;
  margin-bottom: 16px;
}

.fact-list { display: grid; gap: 12px; margin: 28px 0 34px; }
.fact-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--text-dim);
  font-size: 0.95rem;
}
.fact-list .icon { width: 17px; height: 17px; color: var(--accent-hover); margin-top: 4px; }

/* ---------- CTA final ---------- */
.cta {
  position: relative;
  padding-block: clamp(96px, 12vw, 150px);
  text-align: center;
  overflow: hidden;
  border-top: 1px solid var(--border);
  background:
    radial-gradient(700px 400px at 50% 0%, rgba(37, 99, 235, 0.16), transparent 65%),
    radial-gradient(500px 300px at 80% 100%, rgba(37, 99, 235, 0.07), transparent 60%),
    var(--bg-soft);
}
.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 30%, #000, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 30%, #000, transparent 75%);
  pointer-events: none;
}

.cta-inner { position: relative; z-index: 1; max-width: 760px; }

.cta h2 { font-size: clamp(2rem, 5vw, 3.3rem); margin-bottom: 20px; }

.cta-sub {
  color: var(--text-dim);
  font-size: 1.08rem;
  max-width: 52ch;
  margin: 0 auto 38px;
}

.cta-actions { margin-bottom: 26px; }

.cta-alt {
  color: var(--text-faint);
  font-size: 0.92rem;
  margin-bottom: 12px;
}
.cta-alt a {
  color: var(--text-dim);
  font-weight: 600;
  border-bottom: 1px solid var(--accent-line);
  transition: color 0.25s ease, border-color 0.25s ease;
}
.cta-alt a:hover { color: #fff; border-color: var(--accent-hover); }

.cta-note {
  color: var(--text-faint);
  font-size: 0.86rem;
  font-style: italic;
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  background: var(--bg);
  padding-top: 64px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
}

.footer-brand .brand { margin-bottom: 16px; }
.footer-brand p {
  color: var(--text-dim);
  font-size: 0.94rem;
  max-width: 34ch;
  margin-bottom: 22px;
}

.footer-social { display: flex; gap: 12px; }

.footer-col { display: flex; flex-direction: column; gap: 11px; }
.footer-col h4 {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 6px;
}
.footer-col a {
  color: var(--text-dim);
  font-size: 0.94rem;
  width: fit-content;
  transition: color 0.25s ease;
}
.footer-col a:hover { color: var(--accent-hover); }

.footer-loc { color: var(--text-faint); font-size: 0.88rem; margin-top: 4px; }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding-block: 24px;
  border-top: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 0.86rem;
}

.to-top {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
  font-weight: 500;
  transition: color 0.25s ease;
}
.to-top:hover { color: #fff; }
.to-top .icon { width: 15px; height: 15px; }

/* ---------- Sistema de revelado (scroll) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.75s var(--ease),
    transform 0.75s var(--ease);
  transition-delay: var(--d, 0s);
}
.reveal-left { transform: translateX(-30px); }
.reveal-right { transform: translateX(30px); }
.reveal-scale { transform: scale(0.93); }

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr; gap: 56px; }
  .hero h1 { max-width: 18ch; }
  .hero-visual { max-width: 520px; }
}

@media (max-width: 940px) {
  .nav { display: none; }
  .burger { display: flex; }
  .header-actions .btn { display: none; }
  .header-actions { gap: 0; }

  .process-grid { grid-template-columns: 1fr; }
  .process-panel { position: static; }
  .scene { min-height: 56vh; }

  .about-grid { grid-template-columns: 1fr; }
  .about-card { max-width: 460px; margin-inline: auto; }
}

@media (max-width: 860px) {
  /* Flujo vertical */
  .flow {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    max-width: 340px;
    margin-inline: auto;
  }
  .flow-node {
    flex-direction: row;
    justify-content: flex-start;
    min-width: 0;
    padding: 11px 16px;
    text-align: left;
  }
  .fn-icon { width: 32px; height: 32px; }
  .fn-icon .icon { width: 16px; height: 16px; }

  .flow-link {
    flex: none;
    width: 2px;
    height: 44px;
    min-width: 0;
    margin-inline: auto;
  }
  .flow-line {
    width: 2px;
    height: 100%;
    background: linear-gradient(180deg, var(--accent-line), var(--accent));
    animation-name: lineFlowV;
  }
  @keyframes lineFlowV {
    0% { background-position: 0 200%; }
    100% { background-position: 0 0%; }
  }
  .flow-dot {
    top: 0;
    left: 50%;
    margin-left: -3.5px;
    margin-top: 0;
    animation-name: flowY;
  }
  @keyframes flowY {
    0% { top: -2%; opacity: 0; }
    8% { opacity: 1; }
    92% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
  }
}

@media (max-width: 760px) {
  .problem-grid { grid-template-columns: 1fr; }
  .p-card, .p-card:nth-child(4), .p-card:nth-child(5) { grid-column: auto; }

  .services-grid { grid-template-columns: 1fr; }
  .s-card, .s-large { grid-column: auto; }

  .projects-grid { grid-template-columns: 1fr; }

  .footer-grid { grid-template-columns: 1fr; gap: 36px; }

  .float-chip { display: none; }
}

@media (max-width: 520px) {
  .hero h1 { font-size: 2.2rem; }
  .hero-actions .btn { width: 100%; }
  .section-head { margin-bottom: 40px; }
  .flow-node { font-size: 0.76rem; }
  .footer-bottom { justify-content: center; text-align: center; }
}

/* ---------- Accesibilidad: movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }

  .reveal, .reveal-left, .reveal-right, .reveal-scale {
    opacity: 1;
    transform: none;
  }

  .marquee-track { animation: none; }
  .flow-dot { animation: none; opacity: 0; }
  .hdot { animation: none; opacity: 0; }
}
