/* =========================================================================
   INCANATOAPPS — Design System & Styles
   Tecnología contemporánea inspirada en el conocimiento peruano.
   Paleta basada en los colores reales del isotipo (navy/azul/ámbar), sobre
   neutros fríos. La terracota queda como único detalle en Identidad Peruana.
   ========================================================================= */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
ul { padding: 0; list-style: none; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
svg { display: block; }

@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; scroll-behavior: auto !important; }
}

html.intro-lock, html.intro-lock body { overflow: hidden; height: 100%; }

/* ---------- Design tokens ---------- */
:root {
  /* Neutros fríos — fondo de página + superficies (antes cálidos, ajustados para acompañar al azul protagonista) */
  --cream: #f7f8fa;
  --cream-alt: #eef1f6;
  --paper: #ffffff;
  --line: #e0e5ec;
  --line-soft: #e9edf3;
  --gray-100: #e7ebf1;
  --gray-200: #d7dee8;
  --gray-300: #b8c2d1;

  /* Ink frío (slate) — texto + secciones oscuras. Antes cálido (café), enfriado para
     acompañar al azul protagonista; mismo nivel de contraste, verificado con WCAG. */
  --ink-950: #121419;
  --ink-900: #17191f;
  --ink-800: #1e2127;
  --ink-700: #373d4a;
  --ink-500: #50586b;
  --ink-on-dark: #dfe0e4;
  --ink-on-dark-soft: #979daa;

  /* Terracotta — primary accent (buttons, links, highlights) */
  --terracotta: #de6a3c;       /* decorative fills, gradients, thin accents (not text-on-fill) */
  --terracotta-dark: #bd5228;  /* button backgrounds — passes AA with white text (4.8:1) */
  --terracotta-darker: #a8451f; /* small text on light bg: eyebrows, labels, links (6:1) */
  --terracotta-light: #f0a87e;

  /* Ámbar — sampled directly from el diamante pequeño del isotipo (assets/isotipo.png) */
  --gold: #da973b;       /* real, promediado del logo */
  --gold-dark: #9c6418;  /* oscurecido para texto pequeño / iconos blancos encima (4.9:1) */

  /* Azul — sampled del isotipo real: navy (#06254D) y azul medio (#0461C4) son valores
     reales promediados píxel a píxel del logo; 500/400 son interpolaciones entre esos
     dos y el celeste real (#28ACF5) para dar más pasos en diagramas con varios nodos. */
  --blue-700: #06254d;  /* real: montaña trasera */
  --blue-600: #0461c4;  /* real: montaña principal */
  --blue-500: #1c86e0;  /* interpolado */
  --blue-400: #4e97d9;  /* interpolado, para nodos pequeños/apagados */
  --sky-300: #28acf5;   /* real: rombo celeste del isotipo — el acento más vivo */

  --white: #ffffff;

  /* Semantic */
  --bg-page: var(--cream);
  --text-body: var(--ink-700);
  --text-heading: var(--ink-900);

  /* Type */
  --font-display: 'Space Grotesk', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: var(--font-sans);

  /* Layout */
  --container-w: 1200px;
  --gutter: clamp(20px, 5vw, 64px);
  --section-pad: clamp(48px, 6vw, 80px);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;

  /* Motion */
  --ease: cubic-bezier(.22,.61,.36,1);
  --dur-fast: 180ms;
  --dur-base: 320ms;
  --dur-slow: 640ms;
}

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

h1, h2 {
  font-family: var(--font-display);
  color: var(--text-heading);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.01em;
}
h3, h4 {
  font-family: var(--font-sans);
  color: var(--text-heading);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

h2 { font-size: clamp(1.9rem, 3.2vw, 2.9rem); }
h3 { font-size: 1.25rem; }

p { color: var(--text-body); }

.container {
  width: 100%;
  max-width: var(--container-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { position: relative; padding-block: var(--section-pad); }
.section--tight { padding-block: calc(var(--section-pad) * 0.6); }

.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.skip-link {
  position: fixed; top: -60px; left: 12px; z-index: 999;
  background: var(--ink-900); color: var(--white);
  padding: 10px 18px; border-radius: var(--radius-sm);
  transition: top var(--dur-base) var(--ease);
}
.skip-link:focus { top: 12px; }

.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.74rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--blue-700);
  background: rgba(4,97,196,0.08);
  border: 1px solid rgba(4,97,196,0.22);
  padding: 7px 14px 6px; border-radius: 999px;
  margin-bottom: 18px; display: inline-flex; align-items: center;
}
.eyebrow::before {
  content: ''; display: inline-block; width: 5px; height: 5px; border-radius: 50%;
  background: currentColor; margin-right: 7px;
}
.eyebrow--light { color: var(--gold); background: rgba(218,151,59,0.1); border-color: rgba(218,151,59,0.28); }

/* Titulares a dos tonos: segunda frase en tono suave para dar ritmo dentro de un mismo h1/h2 */
.text-soft { color: var(--ink-500); font-weight: 500; }
.innovation__text .text-soft, .cta-final__text .text-soft { color: var(--ink-on-dark-soft); }

.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head--split { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; max-width: none; }
.section-head h2 { margin-bottom: 16px; }
.section-head__lede { font-size: 1.05rem; color: var(--ink-500); }

/* ---------- Reveal-on-scroll ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease);
}
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}

@keyframes ringBreathe { 0%, 100% { opacity: 0.55; transform: scale(1); } 50% { opacity: 1; transform: scale(1.06); } }

/* ---------- Intro: el isotipo se ensambla al cargar (una vez por sesión) ---------- */
.page-intro {
  position: fixed; inset: 0; z-index: 500;
  display: flex; align-items: center; justify-content: center;
  background: var(--cream);
  transition: opacity 650ms var(--ease), visibility 650ms var(--ease);
}
.page-intro--skip { display: none; }
.page-intro--hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.page-intro__graphic { width: min(46vw, 260px); height: auto; overflow: visible; }

.page-intro__lines line {
  stroke-dasharray: 260; stroke-dashoffset: 260; opacity: 0;
  transition: stroke-dashoffset 700ms var(--ease), opacity 200ms var(--ease);
}
.page-intro.is-assembling .page-intro__lines line { stroke-dashoffset: 0; opacity: 0.55; }
.page-intro__lines line:nth-child(1) { transition-delay: 40ms; }
.page-intro__lines line:nth-child(2) { transition-delay: 90ms; }
.page-intro__lines line:nth-child(3) { transition-delay: 140ms; }
.page-intro__lines line:nth-child(4) { transition-delay: 190ms; }
.page-intro__lines line:nth-child(5) { transition-delay: 240ms; }
.page-intro__lines line:nth-child(6) { transition-delay: 290ms; }
.page-intro__lines line:nth-child(7) { transition-delay: 340ms; }
.page-intro__lines line:nth-child(8) { transition-delay: 380ms; }
.page-intro__lines line:nth-child(9) { transition-delay: 420ms; }

.page-intro__nodes circle {
  opacity: 0; transform: scale(0.2); transform-box: fill-box; transform-origin: center;
  transition: opacity 380ms var(--ease), transform 380ms cubic-bezier(.34,1.56,.64,1);
}
.page-intro.is-assembling .page-intro__nodes circle { opacity: 1; transform: scale(1); }
.page-intro__nodes circle:nth-child(1) { transition-delay: 460ms; }
.page-intro__nodes circle:nth-child(2) { transition-delay: 500ms; }
.page-intro__nodes circle:nth-child(3) { transition-delay: 500ms; }
.page-intro__nodes circle:nth-child(4) { transition-delay: 540ms; }
.page-intro__nodes circle:nth-child(5) { transition-delay: 580ms; }
.page-intro__nodes circle:nth-child(6) { transition-delay: 580ms; }
.page-intro__nodes circle:nth-child(7) { transition-delay: 620ms; }
.page-intro__nodes circle:nth-child(8) { transition-delay: 640ms; }
.page-intro__nodes circle:nth-child(9) { transition-delay: 640ms; }

.page-intro__mark {
  opacity: 0; transform: scale(0.82); transform-box: fill-box; transform-origin: center;
  transition: opacity 480ms var(--ease), transform 480ms cubic-bezier(.34,1.56,.64,1);
  transition-delay: 720ms;
  filter: drop-shadow(0 16px 30px rgba(23,25,31,0.2));
}
.page-intro.is-assembling .page-intro__mark { opacity: 1; transform: scale(1); }

@media (prefers-reduced-motion: reduce) {
  .page-intro { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-sans); font-weight: 700; font-size: 0.95rem;
  padding: 14px 26px; border-radius: 999px;
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
  white-space: nowrap;
}
.btn--primary {
  background: var(--blue-600); color: var(--white);
  box-shadow: 0 8px 24px -8px rgba(4,97,196,0.5);
}
.btn--primary:hover { background: var(--blue-700); transform: translateY(-2px); box-shadow: 0 12px 28px -8px rgba(6,37,77,0.55); }
.btn--outline {
  background: transparent; color: var(--ink-900); border: 1.5px solid rgba(23,25,31,0.25);
}
.btn--outline:hover { background: rgba(23,25,31,0.05); border-color: rgba(23,25,31,0.45); transform: translateY(-2px); }
.btn--outline-light {
  background: transparent; color: var(--white); border: 1.5px solid rgba(255,255,255,0.35);
}
.btn--outline-light:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.6); transform: translateY(-2px); }
.btn--sm { padding: 10px 20px; font-size: 0.85rem; }
.btn--block { width: 100%; }

/* =========================================================================
   HEADER
   ========================================================================= */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 250;
  padding-block: 20px;
  background: transparent;
  transition: background var(--dur-base) var(--ease), padding var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease), border-color var(--dur-base) var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(246,244,231,0.85);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  padding-block: 12px;
  border-bottom-color: var(--line);
  box-shadow: 0 8px 30px -20px rgba(30,25,15,0.18);
}

.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { height: 36px; width: auto; transition: filter var(--dur-base); }
.brand-word {
  font-family: var(--font-sans); font-weight: 500; font-size: 1.28rem; letter-spacing: -0.01em;
  color: var(--ink-900);
}
.brand-word strong { font-weight: 800; }

.main-nav ul { display: flex; align-items: center; gap: 30px; }
.nav-link {
  position: relative; font-size: 0.94rem; font-weight: 500; color: var(--ink-700);
  padding-block: 6px; transition: color var(--dur-fast) var(--ease);
}
.nav-link::after {
  content: ''; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px;
  background: var(--blue-600); transition: right var(--dur-base) var(--ease);
}
.nav-link:hover, .nav-link.is-active { color: var(--ink-900); }
.nav-link:hover::after, .nav-link.is-active::after { right: 0; }

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

.menu-toggle { display: none; position: relative; width: 40px; height: 40px; align-items: center; justify-content: center; color: var(--ink-900); z-index: 210; }
.menu-toggle__icon-close { display: none; }
body.menu-open .menu-toggle__icon-open { display: none; }
body.menu-open .menu-toggle__icon-close { display: block; }

.mobile-menu {
  position: fixed; top: 0; right: 0; height: 100%; width: min(360px, 88vw);
  background: var(--paper); z-index: 200;
  padding: 100px 32px 32px;
  transform: translateX(100%);
  transition: transform var(--dur-base) var(--ease);
  display: flex; flex-direction: column; gap: 32px;
  box-shadow: -20px 0 60px -20px rgba(30,25,15,0.25);
}
body.menu-open .mobile-menu { transform: translateX(0); }
.mobile-menu ul { display: flex; flex-direction: column; gap: 6px; }
.mobile-nav-link { display: block; padding: 12px 4px; font-family: var(--font-sans); font-weight: 600; font-size: 1.15rem; color: var(--ink-900); border-bottom: 1px solid var(--line-soft); }
.mobile-menu__social { display: flex; gap: 16px; color: var(--ink-500); }
.mobile-menu__social a { width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 50%; transition: border-color var(--dur-fast), color var(--dur-fast); }
.mobile-menu__social a:hover { color: var(--blue-700); border-color: var(--blue-400); }

.mobile-menu-backdrop {
  position: fixed; inset: 0; background: rgba(18,20,25,0.5); z-index: 190;
  opacity: 0; pointer-events: none; transition: opacity var(--dur-base) var(--ease);
}
body.menu-open .mobile-menu-backdrop { opacity: 1; pointer-events: auto; }
body.menu-open { overflow: hidden; }

/* =========================================================================
   HERO — warm cream, matching the reference's light, editorial hero
   ========================================================================= */
.hero {
  position: relative; overflow: hidden;
  padding-top: clamp(112px, 14vw, 160px);
  padding-bottom: clamp(48px, 6vw, 80px);
  background: var(--cream);
  color: var(--ink-900);
}
.hero__pattern {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(23,25,31,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23,25,31,0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(80% 70% at 50% 30%, black 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(80% 70% at 50% 30%, black 0%, transparent 75%);
  opacity: 0.7;
}
.hero__inner { position: relative; display: grid; grid-template-columns: 1.05fr 0.95fr; align-items: center; gap: clamp(24px, 5vw, 60px); }
.hero__content { max-width: 620px; }
.hero__title { font-size: clamp(2.5rem, 5.2vw, 4.4rem); font-weight: 800; color: var(--ink-900); margin-bottom: 30px; }

.hero__subtitle { font-size: clamp(1.02rem, 1.6vw, 1.2rem); color: var(--ink-700); max-width: 540px; margin-bottom: 36px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 44px; }
.hero__audience { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 0.85rem; color: var(--ink-500); }
.hero__audience i { width: 4px; height: 4px; border-radius: 50%; background: var(--ink-500); display: inline-block; }

.hero__visual { position: relative; }

/* ---------- Hero: collage de tarjetas flotantes (inspirado en referencia del cliente) ---------- */
.hero-collage { position: relative; width: 100%; max-width: 520px; aspect-ratio: 1 / 0.98; margin-inline: auto; }

.hero-collage__bloom {
  position: absolute; left: 50%; top: 48%; transform: translate(-50%, -50%);
  width: 78%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(4,97,196,0.22) 0%, rgba(4,97,196,0) 70%);
  animation: ringBreathe 7s ease-in-out infinite;
}

.hero-collage__anchor {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  z-index: 1; transition: transform 450ms var(--ease);
}
.hero-collage__anchor img { width: clamp(110px, 16vw, 150px); height: auto; filter: drop-shadow(0 20px 36px rgba(23,25,31,0.22)); }

.hero-card {
  position: absolute; z-index: 2;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 14px 16px; box-shadow: 0 16px 32px -18px rgba(23,25,31,0.22);
  transition: transform 450ms var(--ease);
  animation: floatSoft 6s ease-in-out infinite;
}
.hero-card--code   { top: 2%;  left: -2%; width: 54%; animation-delay: -1s; }
.hero-card--ai     { top: 6%;  right: -4%; width: 42%; animation-delay: -3s; }
.hero-card--tasks  { bottom: 4%; left: -4%; width: 46%; animation-delay: -2s; }
.hero-card--stack  { bottom: 0%; right: -2%; width: 40%; animation-delay: -4s; }

.hero-card__dots { display: flex; gap: 5px; margin-bottom: 10px; }
.hero-card__dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); display: block; }
.hero-card__code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.7rem; line-height: 1.6; color: var(--ink-700); white-space: pre; overflow: hidden;
}
.hero-card__code .tk-kw { color: var(--blue-700); }
.hero-card__code .tk-var { color: var(--blue-600); }
.hero-card__code .tk-fn { color: var(--gold-dark); }
.hero-card__code .tk-str { color: var(--ink-900); }

.hero-card__label { font-family: var(--font-sans); font-weight: 700; font-size: 0.82rem; color: var(--ink-900); margin-bottom: 6px; }
.hero-card__sub { font-size: 0.78rem; color: var(--ink-500); }
.hero-card__ai-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--blue-600); margin-bottom: 8px;
  animation: pulseSoft 1.8s ease-in-out infinite;
}

.hero-card__tasks { display: flex; flex-direction: column; gap: 7px; }
.hero-card__tasks li { display: flex; align-items: center; gap: 7px; font-size: 0.78rem; color: var(--ink-500); }
.hero-card__tasks li.is-done { color: var(--ink-700); text-decoration: line-through; text-decoration-color: var(--gray-200); }
.hero-card__tasks li.is-done .icon { color: var(--blue-600); flex-shrink: 0; }
.hero-card__tasks li.is-active { color: var(--ink-900); font-weight: 600; text-decoration: none; }
.hero-card__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); flex-shrink: 0; animation: pulseSoft 1.6s ease-in-out infinite; }

.hero-card__badges { display: flex; flex-wrap: wrap; gap: 6px; }
.hero-card__badges span {
  font-family: var(--font-sans); font-weight: 700; font-size: 0.72rem;
  padding: 5px 9px; border-radius: 7px; background: var(--cream-alt); color: var(--ink-700);
}

@keyframes floatSoft { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
@keyframes pulseSoft { 0%, 100% { opacity: 0.45; } 50% { opacity: 1; } }

.hero__scroll {
  position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%);
  width: 26px; height: 42px; border: 1.5px solid rgba(23,25,31,0.25); border-radius: 20px;
  display: flex; justify-content: center; padding-top: 8px;
}
.hero__scroll span { width: 4px; height: 8px; border-radius: 2px; background: var(--blue-600); animation: scrollDot 1.8s ease-in-out infinite; }
@keyframes scrollDot { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(14px); opacity: 0; } }

/* =========================================================================
   SERVICIOS
   ========================================================================= */
/* Justo debajo del hero no necesita tanto aire como el resto — el propio hero
   ya cierra con su padding-bottom + el indicador de scroll. */
.services { padding-top: clamp(32px, 4vw, 56px); }

/* Grid "bento" asimétrico: la primera card (Desarrollo de Software) es la destacada,
   ocupa 2x2 en oscuro; el resto se acomoda alrededor en distintos tamaños. */
.services-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(150px, auto); gap: 20px;
}
.service-card:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.service-card:nth-child(2) { grid-column: span 2; grid-row: span 1; }
.service-card:nth-child(3) { grid-column: span 1; grid-row: span 1; }
.service-card:nth-child(4) { grid-column: span 1; grid-row: span 1; }
.service-card:nth-child(5) { grid-column: span 2; grid-row: span 1; }
.service-card:nth-child(6) { grid-column: span 2; grid-row: span 1; }

.service-card {
  position: relative;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 32px 28px;
  display: flex; flex-direction: column; justify-content: flex-end;
  transition: transform var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease), border-color var(--dur-base) var(--ease);
}
.service-card:hover { transform: translateY(-6px); box-shadow: 0 24px 48px -24px rgba(23,25,31,0.18); border-color: var(--gray-200); }
.service-card__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 14px; margin-bottom: 22px;
  background: linear-gradient(145deg, var(--blue-700), var(--blue-600)); color: var(--white);
}
.service-card h3 { margin-bottom: 10px; }
.service-card p { font-size: 0.95rem; color: var(--ink-500); }

/* Card destacada: video real de fondo, centrado y a plena claridad, con una sola etiqueta flotante */
.service-card:nth-child(1) {
  background: var(--ink-900); border-color: var(--ink-900); overflow: hidden;
}
.service-card__bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center;
}
.service-card__tag {
  position: absolute; left: 28px; bottom: 28px; z-index: 1;
  font-family: var(--font-sans); font-weight: 700; font-size: 0.85rem;
  color: var(--white);
  background: rgba(18,20,25,0.68); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.16);
  padding: 10px 18px; border-radius: 999px;
}

/* =========================================================================
   PROCESO
   ========================================================================= */
.process { background: var(--cream-alt); }
.process-track { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; padding-top: 12px; }
.process-track__line { position: absolute; top: 34px; left: 6%; right: 6%; height: 2px; background: var(--gray-200); z-index: 0; }
.process-track__line-fill { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, var(--gold), var(--blue-600)); transition: width 1.4s var(--ease); }
.process-track.is-visible .process-track__line-fill { width: 100%; }

.process-step { position: relative; z-index: 1; padding-top: 0; }
.process-step__node {
  display: flex; align-items: center; justify-content: center;
  width: 68px; height: 68px; border-radius: 50%; margin-bottom: 22px;
  background: var(--paper); border: 2px solid var(--gray-200);
  font-family: var(--font-sans); font-weight: 800; color: var(--blue-700); font-size: 1.05rem;
  transition: border-color var(--dur-base), box-shadow var(--dur-base);
}
.process-step .process-step__icon { display: none; }
.process-step h3 { margin-bottom: 8px; }
.process-step p { font-size: 0.94rem; color: var(--ink-500); }

/* =========================================================================
   TECNOLOGÍAS
   ========================================================================= */
/* Diagrama hub-and-spoke: un nodo central (la marca) conecta con cada categoría */
.tech-diagram { position: relative; padding-top: 90px; }
.tech-diagram__hub {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 44px; height: 44px; border-radius: 50%; z-index: 2;
  background: var(--paper); border: 2px solid var(--gray-200);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 24px -10px rgba(23,25,31,0.18);
}
.tech-diagram__hub img { width: 20px; height: auto; }
.tech-diagram__stem {
  position: absolute; top: 22px; left: 50%; width: 1px; height: 48px;
  background: var(--gray-200); transform: translateX(-50%); z-index: 1;
}
.tech-diagram__trunk {
  position: absolute; top: 70px; left: 12.5%; right: 12.5%; height: 1px;
  background: var(--gray-200); z-index: 1;
}

.tech-groups { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.tech-group { position: relative; }
.tech-group__connector {
  position: absolute; top: -20px; left: 50%; width: 1px; height: 20px;
  background: var(--gray-200); transform: translateX(-50%); z-index: 1;
}
.tech-group__connector::after {
  content: ''; position: absolute; bottom: -3px; left: 50%; transform: translateX(-50%);
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--blue-600); border: 2px solid var(--cream);
}
.tech-group h3 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-500); font-weight: 700; margin-bottom: 18px; }
.tech-chips { display: flex; flex-direction: column; }
.tech-chips li {
  font-family: var(--font-sans); font-weight: 600; font-size: 0.95rem; color: var(--ink-900);
  padding: 11px 2px; border-bottom: 1px solid var(--line);
}
.tech-chips li:last-child { border-bottom: none; }

/* =========================================================================
   INNOVACIÓN (fondo oscuro cálido)
   ========================================================================= */
.innovation { background: var(--ink-950); color: var(--white); overflow: hidden; }
.innovation__pattern {
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(78,151,217,0.18) 1.5px, transparent 1.5px);
  background-size: 34px 34px;
  mask-image: radial-gradient(65% 90% at 80% 50%, black 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(65% 90% at 80% 50%, black 0%, transparent 70%);
}
.innovation__inner { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.innovation__text h2 { color: var(--white); margin-bottom: 18px; }
.innovation__text p { color: var(--ink-on-dark); font-size: 1.05rem; max-width: 460px; }
.innovation__graphic { position: relative; }
.innovation__graphic svg { width: 100%; height: auto; }
.innovation-graphic__nodes circle { animation: pulseSoft 4s ease-in-out infinite; }
.innovation-graphic__nodes circle:nth-child(2) { animation-delay: -1.3s; }
.innovation-graphic__nodes circle:nth-child(4) { animation-delay: -2.6s; }

/* Las líneas de la red se dibujan al entrar en viewport (reutiliza .is-visible del reveal) */
.innovation-graphic__lines line { stroke-dasharray: 200; stroke-dashoffset: 200; transition: stroke-dashoffset 900ms var(--ease); }
.innovation__graphic.is-visible .innovation-graphic__lines line { stroke-dashoffset: 0; }
.innovation-graphic__lines line:nth-child(1) { transition-delay: 0ms; }
.innovation-graphic__lines line:nth-child(2) { transition-delay: 70ms; }
.innovation-graphic__lines line:nth-child(3) { transition-delay: 140ms; }
.innovation-graphic__lines line:nth-child(4) { transition-delay: 210ms; }
.innovation-graphic__lines line:nth-child(5) { transition-delay: 280ms; }
.innovation-graphic__lines line:nth-child(6) { transition-delay: 350ms; }
.innovation-graphic__lines line:nth-child(7) { transition-delay: 420ms; }
.innovation-graphic__lines line:nth-child(8) { transition-delay: 490ms; }
.tag-pill {
  position: absolute; left: var(--x); top: var(--y);
  font-family: var(--font-sans); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em;
  color: var(--gold); background: rgba(218,151,59,0.12); border: 1px solid rgba(218,151,59,0.35);
  padding: 6px 12px; border-radius: 999px;
}

/* =========================================================================
   IDENTIDAD PERUANA
   ========================================================================= */
.peru-identity { background: var(--cream-alt); text-align: center; overflow: hidden; }
.peru-identity__pattern {
  position: absolute; inset: 0; opacity: 0.6;
  background-image:
    linear-gradient(135deg, var(--gray-200) 1px, transparent 1px),
    linear-gradient(45deg, var(--gray-200) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(60% 80% at 50% 50%, black 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(60% 80% at 50% 50%, black 0%, transparent 75%);
}
.peru-identity__content { position: relative; max-width: 720px; margin-inline: auto; }
.peru-identity__content h2 { position: relative; display: inline-block; margin-bottom: 20px; }
.peru-identity__content h2::after {
  content: ''; position: absolute; left: 50%; bottom: -14px; transform: translateX(-50%);
  width: 56px; height: 3px; border-radius: 2px; background: var(--terracotta);
}
.peru-identity__content p { font-size: 1.08rem; color: var(--ink-500); }

/* =========================================================================
   PROYECTOS
   ========================================================================= */

/* Resto de proyectos: cuadrícula, con el mismo lenguaje sobrio (sin sombra pesada ni rebote al hover) */
.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.project-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-md);
  overflow: hidden; display: flex; flex-direction: column;
  transition: border-color var(--dur-base) var(--ease);
}
.project-card:hover { border-color: var(--gray-200); }
.project-card__visual { aspect-ratio: 16/10; position: relative; overflow: hidden; background: var(--ink-900); }
.project-card__visual img, .project-card__visual video {
  width: 100%; height: 100%; display: block; object-fit: cover; object-position: top;
}
.project-card__visual--phone { background: linear-gradient(160deg, var(--ink-900), var(--blue-700)); }
.project-card__visual--phone img { object-fit: contain; padding: 16px 0; }
.project-card__visual--center video, .project-card__visual--center img { object-position: center; }
.project-card__body { padding: 20px 22px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.project-card__category { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--blue-700); }
.project-card__body h4 { font-size: 1.02rem; margin: 2px 0 2px; }
.project-card__body p { font-size: 0.88rem; color: var(--ink-500); flex: 1; }

/* =========================================================================
   NOSOTROS
   ========================================================================= */
.about__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.about__text p { font-size: 1.02rem; margin-top: 14px; }
.about__pillars { display: flex; flex-direction: column; gap: 0; }
.pillar { display: flex; gap: 20px; padding-block: 22px; border-top: 1px solid var(--line); }
.about__pillars .pillar:last-child { border-bottom: 1px solid var(--line); }
.pillar__index { font-family: var(--font-sans); font-weight: 800; font-size: 1.1rem; color: var(--gray-300); min-width: 34px; }
.pillar h3 { margin-bottom: 6px; }
.pillar p { font-size: 0.94rem; color: var(--ink-500); }

/* =========================================================================
   CTA FINAL + CONTACTO
   ========================================================================= */
.cta-final { background: var(--ink-950); color: var(--white); overflow: hidden; }
.cta-final__pattern {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: radial-gradient(90% 90% at 10% 20%, black 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(90% 90% at 10% 20%, black 0%, transparent 70%);
}
.cta-final__text--centered { position: relative; text-align: center; max-width: 640px; margin-inline: auto; }
.cta-final__text h2 { color: var(--white); margin-bottom: 16px; }
.cta-final__text > p { color: var(--ink-on-dark); font-size: 1.08rem; max-width: 460px; margin-inline: auto; margin-bottom: 32px; }
.cta-final__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin-bottom: 44px; }
.cta-final__contact { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 32px; }
.cta-final__contact li { display: flex; align-items: center; gap: 10px; color: var(--ink-on-dark); font-size: 0.95rem; }
.cta-final__contact .icon { color: var(--gold); flex-shrink: 0; }
.cta-final__contact a { transition: color var(--dur-fast); }
.cta-final__contact a:hover { color: var(--white); }

/* =========================================================================
   FOOTER
   ========================================================================= */
.site-footer { position: relative; background: var(--ink-950); color: var(--ink-on-dark-soft); padding-top: 64px; overflow: hidden; }
.footer__pattern {
  position: absolute; inset: 0; opacity: 0.5;
  background-image: radial-gradient(rgba(218,151,59,0.14) 1.5px, transparent 1.5px);
  background-size: 30px 30px;
  mask-image: linear-gradient(to top, black, transparent 80%);
  -webkit-mask-image: linear-gradient(to top, black, transparent 80%);
}
.footer__top { position: relative; display: grid; grid-template-columns: 1.4fr 0.85fr 0.85fr 0.85fr; gap: 40px; padding-bottom: 56px; }
.footer__brand .brand-word { color: var(--white); }
.footer__brand p { margin-block: 16px 20px; font-size: 0.92rem; max-width: 260px; }
.footer__social { display: flex; gap: 12px; }
.footer__social a {
  width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,0.14); border-radius: 50%; color: var(--ink-on-dark-soft);
  transition: border-color var(--dur-fast), color var(--dur-fast), transform var(--dur-fast);
}
.footer__social a:hover { color: var(--gold); border-color: var(--gold); transform: translateY(-2px); }
.footer__col h4 { color: var(--white); font-size: 0.9rem; margin-bottom: 18px; }
.footer__col ul { display: flex; flex-direction: column; gap: 12px; }
.footer__col a { font-size: 0.92rem; transition: color var(--dur-fast); }
.footer__col a:hover { color: var(--white); }
.footer__bottom {
  position: relative; display: flex; align-items: center; justify-content: space-between;
  padding-block: 26px; border-top: 1px solid rgba(255,255,255,0.1); font-size: 0.85rem;
}
.back-to-top {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.16);
  display: flex; align-items: center; justify-content: center; color: var(--ink-on-dark-soft);
  transition: border-color var(--dur-fast), color var(--dur-fast), transform var(--dur-fast);
}
.back-to-top:hover { color: var(--white); border-color: var(--gold); transform: translateY(-3px); }

/* =========================================================================
   RESPONSIVE
   ========================================================================= */
@media (max-width: 1080px) {
  .main-nav { display: none; }
  .header-actions .btn--primary { display: none; }
  .menu-toggle { display: flex; }

  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .service-card { grid-column: span 1 !important; grid-row: span 1 !important; }
  .service-card:nth-child(1) h3 { font-size: 1.25rem; }
  .tech-diagram { padding-top: 0; }
  .tech-diagram__hub, .tech-diagram__stem, .tech-diagram__trunk, .tech-group__connector { display: none; }
  .tech-groups { grid-template-columns: repeat(2, 1fr); }
  .process-track { grid-template-columns: repeat(2, 1fr); row-gap: 44px; }
  .process-track__line { display: none; }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .hero__inner { grid-template-columns: 1fr; text-align: left; }
  .hero__visual { width: 100%; max-width: 420px; margin-inline: auto; order: -1; margin-bottom: 12px; }
  .innovation__inner { grid-template-columns: 1fr; }
  .innovation__graphic { max-width: 420px; margin-inline: auto; }
  .about__inner { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 640px) {
  .services-grid, .tech-groups, .process-track, .projects-grid { grid-template-columns: 1fr; }
  .footer__top { grid-template-columns: 1fr 1fr; row-gap: 36px; }
  .footer__brand { grid-column: span 2; }
  .section-head--split { align-items: flex-start; }
  .hero__actions .btn, .cta-final__actions .btn { width: 100%; }
  .hero__actions, .cta-final__actions { flex-direction: column; }
}

@media (max-width: 420px) {
  .footer__top { grid-template-columns: 1fr; }
  .footer__brand { grid-column: span 1; }
}
