/* ============================================
   ELITE COMPANY — Estilos base
   ============================================ */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--color-black);
  color: var(--color-white);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

/* Textura de grano sutil — fija, no repinta al hacer scroll (barato en GPU) */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
  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='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.02;
  margin: 0;
  letter-spacing: -0.025em;
}

p { margin: 0; }

::selection {
  background: var(--silver-2);
  color: var(--color-black);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--silver-2);
  outline-offset: 3px;
}

.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--space-4);
  position: relative;
}

.container--narrow { max-width: var(--content-narrow); }

.text-silver {
  background: var(--gradient-silver);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* --- Botones (con soporte para efecto magnético vía JS) --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.95em 1.9em;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  position: relative;
  transition: transform 160ms var(--ease-out-strong), background var(--dur-fast) ease, border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}

.btn--primary {
  background: var(--color-white);
  color: var(--color-black);
}
.btn--primary:hover { background: var(--silver-1); box-shadow: 0 8px 30px -8px rgba(245,245,243,0.35); }
.btn--primary:active { transform: scale(0.97) !important; }

.btn--ghost {
  background: transparent;
  color: var(--color-white);
  border-color: var(--border-hairline-strong);
}
.btn--ghost:hover { border-color: var(--silver-2); box-shadow: 0 0 24px -8px var(--silver-glow); }
.btn--ghost:active { transform: scale(0.97) !important; }

/* --- Header / navegación --- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: var(--space-2) 0;
  background: rgba(8, 9, 10, 0.7);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-fast) ease, padding var(--dur-fast) ease;
}
.site-header.is-scrolled {
  border-bottom-color: var(--border-hairline);
  padding: 0.7rem 0;
  box-shadow: 0 10px 40px -20px rgba(0,0,0,0.8);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  letter-spacing: 0.02em;
}
.brand svg { width: 28px; height: 28px; }

.nav-links {
  display: flex;
  gap: var(--space-4);
  list-style: none;
  margin: 0; padding: 0;
  font-size: var(--text-sm);
}
.nav-links a {
  position: relative;
  color: var(--color-white-dim);
  transition: color var(--dur-fast) ease;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -4px;
  width: 0; height: 1px;
  background: var(--silver-2);
  box-shadow: 0 0 8px var(--silver-glow);
  transition: width var(--dur-fast) var(--ease-out-strong);
}
.nav-links a:hover { color: var(--color-white); }
.nav-links a:hover::after { width: 100%; }

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-hairline-strong);
  border-radius: 8px;
  color: var(--color-white);
  width: 38px; height: 38px;
  cursor: pointer;
}

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .nav-cta { display: none; }
  .brand { white-space: nowrap; }
}

/* --- Fondo decorativo global: blobs de luz que flotan muy lento --- */
.ambient-glow {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.ambient-glow span {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  background: radial-gradient(circle, var(--silver-glow) 0%, transparent 70%);
  opacity: 0.5;
  will-change: transform;
}
.ambient-glow span:nth-child(1) { width: 480px; height: 480px; top: -10%; left: -8%; animation: float-a 22s ease-in-out infinite; }
.ambient-glow span:nth-child(2) { width: 560px; height: 560px; bottom: -15%; right: -10%; animation: float-b 26s ease-in-out infinite; }

@keyframes float-a {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(40px, 60px); }
}
@keyframes float-b {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-50px, -40px); }
}
@media (prefers-reduced-motion: reduce) {
  .ambient-glow span { animation: none; }
}

/* ============================================
   HERO — split screen asimétrico
   ============================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: var(--space-5);
  padding: calc(var(--space-8) + 2rem) var(--space-4) var(--space-6);
  overflow: hidden;
}

.hero__content { position: relative; z-index: 2; }

/* --- Variante con foto de fondo (banner proporcionado por el cliente) --- */
.hero__bg-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 68% center;
  z-index: 0;
}
.hero__bg-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg,
    var(--color-black) 0%,
    rgba(8,9,10,0.92) 32%,
    rgba(8,9,10,0.55) 52%,
    rgba(8,9,10,0.15) 72%,
    transparent 88%);
}
.hero--photo::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(0deg, var(--color-black) 0%, transparent 18%);
  pointer-events: none;
}

.hero--3d .hero__bg-overlay {
  background: linear-gradient(90deg,
    var(--color-black) 0%,
    rgba(8,9,10,0.95) 40%,
    rgba(8,9,10,0.75) 60%,
    rgba(8,9,10,0.5) 100%);
}

.hero__scene-wrap {
  position: absolute;
  top: 0; right: 0;
  width: 58%;
  height: 100%;
  z-index: 2;
  pointer-events: auto;
}
#hero-3d-canvas { width: 100%; height: 100%; display: block; }

@media (max-width: 980px) {
  .hero__scene-wrap { display: none; }
}

@media (max-width: 980px) {
  .hero__bg-photo { object-position: 68% center; opacity: 0.55; }
  .hero__bg-overlay { background: linear-gradient(180deg, rgba(8,9,10,0.55) 0%, var(--color-black) 75%); }
  .hero__photo-badges { display: none; }
}

.hero__eyebrow {
  position: relative;
  display: inline-block;
  padding-left: 1.3em;
  font-size: var(--text-sm);
  color: var(--color-white-dim);
  letter-spacing: 0.03em;
  margin-bottom: var(--space-3);
  text-align: left;
}
.hero__eyebrow::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--silver-2);
  box-shadow: 0 0 10px var(--silver-glow);
  animation: pulse-dot 2.4s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}
@media (prefers-reduced-motion: reduce) { .hero__eyebrow::before { animation: none; } }

.hero__title {
  font-size: clamp(3.4rem, 6.8vw, 6rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 0.98;
  max-width: 11ch;
}

.hero__title .line { display: block; overflow: hidden; }
.hero__title .line span { display: inline-block; will-change: transform; }

.hero__subtitle {
  margin-top: var(--space-3);
  max-width: 42ch;
  font-size: var(--text-lg);
  color: var(--color-white-dim);
}

.hero__cta {
  margin-top: var(--space-5);
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.hero__stats {
  display: flex;
  gap: var(--space-5);
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-hairline);
  max-width: 480px;
}
.hero__stat-value {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  background: var(--gradient-silver);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__stat-label { font-size: var(--text-xs); color: var(--color-white-faint); margin-top: 0.2rem; }

/* --- Composición visual del hero (sin fotos: geometría + vidrio + acentos plateados) --- */
.hero__visual {
  position: relative;
  z-index: 1;
  height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero__orbit {
  position: absolute;
  width: 480px; height: 480px;
  border: 1px dashed var(--border-hairline-strong);
  border-radius: 50%;
  animation: spin-slow 40s linear infinite;
}
.hero__orbit::before {
  content: '';
  position: absolute;
  top: -4px; left: 50%;
  width: 8px; height: 8px;
  margin-left: -4px;
  border-radius: 50%;
  background: var(--silver-1);
  box-shadow: 0 0 14px 2px var(--silver-glow);
}
@keyframes spin-slow { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .hero__orbit { animation: none; } }

/* --- Figura humana de malla (wireframe/circuito) --- */
.figure-wrap {
  position: relative;
  width: 320px;
  filter: drop-shadow(0 30px 60px rgba(0,0,0,0.5));
}
.figure-mesh { width: 100%; height: auto; overflow: visible; }

.figure-outline {
  fill: none;
  stroke: var(--border-active);
  stroke-width: 1.5;
}

.mesh-edge {
  stroke: url(#meshSilver);
  stroke-width: 0.6;
  opacity: 0;
  animation: edge-in 0.6s ease-out forwards;
  animation-delay: var(--d);
}
@keyframes edge-in { from { opacity: 0; } to { opacity: 0.45; } }

.mesh-node {
  fill: var(--silver-2);
  opacity: 0;
  animation: node-in 0.4s ease-out forwards, node-pulse 3s ease-in-out infinite;
  animation-delay: var(--d), calc(var(--d) + 0.6s);
}
.mesh-node--key { fill: var(--silver-1); filter: drop-shadow(0 0 4px var(--silver-glow)); }
@keyframes node-in { from { opacity: 0; } to { opacity: 0.9; } }
@keyframes node-pulse { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }

.scan-line { fill: url(#scanGrad); animation: scan-move 5s ease-in-out infinite; }
@keyframes scan-move {
  0% { transform: translateY(0); opacity: 0; }
  10% { opacity: 0.6; }
  90% { opacity: 0.6; }
  100% { transform: translateY(420px); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .mesh-edge { animation: edge-in 0.01s forwards; opacity: 0.4; }
  .mesh-node { animation: node-in 0.01s forwards; opacity: 0.8; }
  .scan-line { animation: none; opacity: 0; }
}

.hero__figure-logo {
  position: absolute;
  top: 12%;
  right: -4%;
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(15,17,19,0.9);
  border: 1px solid var(--border-active);
  box-shadow: 0 0 30px -4px var(--silver-glow), var(--shadow-elevated);
}

.hero__connector { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.connector-path { fill: none; stroke: var(--border-hairline-strong); stroke-width: 1; stroke-dasharray: 3 4; }
.connector-dot {
  fill: var(--silver-1);
  filter: drop-shadow(0 0 6px var(--silver-glow));
  offset-distance: 0%;
  animation: travel 2.8s ease-in-out infinite;
}
@keyframes travel {
  0% { offset-distance: 0%; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { offset-distance: 100%; opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .connector-dot { animation: none; opacity: 0; } }

.hero__badge {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.7em 1.1em;
  border-radius: 999px;
  background: rgba(15,17,19,0.85);
  border: 1px solid var(--border-hairline-strong);
  backdrop-filter: blur(10px);
  font-size: var(--text-xs);
  box-shadow: var(--shadow-elevated);
  animation: badge-float 5s ease-in-out infinite;
}
.hero__badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--silver-2); box-shadow: 0 0 8px var(--silver-glow); }
.hero__badge--1 { top: 6%; left: -2%; animation-delay: 0s; }
.hero__badge--2 { bottom: 10%; right: 0%; animation-delay: 1.2s; }
@keyframes badge-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
@media (prefers-reduced-motion: reduce) { .hero__badge { animation: none; } }

.hero__scroll-hint {
  position: absolute;
  bottom: var(--space-4);
  left: var(--space-4);
  z-index: 2;
  font-size: var(--text-xs);
  color: var(--color-white-faint);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.hero__scroll-hint .line { width: 32px; height: 1px; background: linear-gradient(90deg, var(--color-white-faint), transparent); }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; text-align: center; padding-top: calc(var(--space-7) + 2rem); }
  .hero__content { display: flex; flex-direction: column; align-items: center; }
  .hero__title { max-width: 16ch; }
  .hero__cta { justify-content: center; }
  .hero__stats { margin-left: auto; margin-right: auto; }
  .hero__visual { height: 380px; margin-top: var(--space-5); }
  .hero__panel { width: 260px; }
  .hero__orbit { width: 340px; height: 340px; }
  .hero__scroll-hint { display: none; }
}

/* --- Marquee de palabras clave --- */
.marquee {
  border-top: 1px solid var(--border-hairline);
  border-bottom: 1px solid var(--border-hairline);
  overflow: hidden;
  padding: var(--space-3) 0;
}
.marquee__track {
  display: flex;
  width: max-content;
  gap: var(--space-6);
  animation: marquee-scroll 32s linear infinite;
}
.marquee__track span {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--color-white-faint);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: var(--space-6);
}
.marquee__track span::after { content: '✦'; font-size: var(--text-sm); color: var(--silver-3); margin-left: var(--space-6); }
@keyframes marquee-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee__track { animation: none; } }

/* --- Secciones generales --- */
.section { padding: var(--space-8) 0; position: relative; }

.section-header { max-width: 640px; margin-bottom: var(--space-6); }
.section-header__eyebrow { font-size: var(--text-sm); color: var(--silver-2); margin-bottom: var(--space-2); }
.section-header h2 { font-size: var(--text-3xl); }
.section-header p { margin-top: var(--space-2); font-size: var(--text-lg); color: var(--color-white-dim); }

/* ============================================
   Tarjetas de servicio — spotlight border (sigue al cursor)
   ============================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border-hairline);
}
@media (max-width: 900px) { .services-grid { grid-template-columns: 1fr; } }

.service-card {
  position: relative;
  background: var(--color-black);
  padding: var(--space-5) var(--space-4);
  overflow: hidden;
  transition: background 220ms ease;
}
.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 50%), rgba(245,245,243,0.07), transparent 70%);
  opacity: 0;
  transition: opacity 260ms ease;
  pointer-events: none;
}
@media (hover: hover) and (pointer: fine) {
  .service-card:hover::before { opacity: 1; }
}

.service-card__icon {
  width: 64px; height: 64px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  margin-bottom: var(--space-4);
  background: var(--color-black-card);
  position: relative;
  z-index: 1;
}
.service-card__icon svg { width: 28px; height: 28px; stroke: var(--silver-2); }

.service-card h3 { font-size: var(--text-2xl); font-weight: 600; letter-spacing: -0.01em; line-height: 1.05; margin-bottom: var(--space-2); position: relative; z-index: 1; max-width: 14ch; }
.service-card p { color: var(--color-white-dim); font-size: var(--text-base); position: relative; z-index: 1; max-width: 32ch; }

/* --- Testimonios --- */
.testimonials-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); }
@media (max-width: 900px) { .testimonials-grid { grid-template-columns: 1fr; } }

.testimonial-card {
  border: 1px solid var(--border-hairline);
  border-radius: 20px;
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  background: var(--color-black-card);
  transition: border-color 220ms ease, transform 220ms var(--ease-out-strong);
}
@media (hover: hover) and (pointer: fine) {
  .testimonial-card:hover { transform: translateY(-4px); border-color: var(--border-hairline-strong); }
}
.testimonial-card__stars { color: var(--silver-2); letter-spacing: 0.1em; margin-bottom: var(--space-2); font-size: var(--text-sm); }
.testimonial-card__quote { color: var(--color-white-dim); font-size: var(--text-base); line-height: 1.6; flex: 1; margin-bottom: var(--space-3); }
.testimonial-card__author { display: flex; flex-direction: column; font-size: var(--text-sm); }
.testimonial-card__author span { color: var(--color-white-faint); font-size: var(--text-xs); margin-top: 0.2rem; }

/* --- Sección de proceso: línea de scroll --- */
.process-track { position: relative; max-width: 640px; margin: 0 auto; padding-left: var(--space-5); }
.process-line { position: absolute; left: 0; top: 0.4em; bottom: 0.4em; width: 4px; height: calc(100% - 0.8em); }
.process-line path { vector-effect: non-scaling-stroke; }
#process-line-fill { stroke-dasharray: 1000; stroke-dashoffset: 1000; }

.process-step { position: relative; padding: 0 0 var(--space-6) var(--space-4); }
.process-step:last-child { padding-bottom: 0; }
.process-step__number { font-family: var(--font-display); font-size: var(--text-sm); color: var(--silver-2); display: block; margin-bottom: 0.4rem; }
.process-step h3 { font-size: var(--text-xl); margin-bottom: 0.5rem; }
.process-step p { color: var(--color-white-dim); font-size: var(--text-base); max-width: 46ch; }

/* --- Variante de sección clara: para alternar negro/blanco entre secciones --- */
.section--light {
  background: var(--color-white);
  color: var(--color-black);
}
.section--light .section-header__eyebrow { color: var(--silver-3); }
.section--light .section-header p { color: rgba(10,10,10,0.6); }
.section--light .process-step p { color: rgba(10,10,10,0.6); }
.section--light .process-step__number { color: var(--silver-3); }
.section--light #process-line-path { stroke: rgba(10,10,10,0.12); }
.section--light .btn--ghost { color: var(--color-black); border-color: rgba(10,10,10,0.2); }
.section--light .btn--ghost:hover { border-color: var(--silver-3); }
.section--light .btn--primary { background: var(--color-black); color: var(--color-white); }
.section--light .btn--primary:hover { background: #1a1a1a; }
.section--light .text-silver {
  background: linear-gradient(135deg, #3a3d40 0%, #0a0a0a 45%, #3a3d40 60%, #0a0a0a 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--border-hairline);
  padding: var(--space-6) 0 var(--space-4);
  color: var(--color-white-faint);
  font-size: var(--text-sm);
}
.site-footer .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--space-3); }
