/* ==========================================================================
   GYPDIGITAL.CL - Hoja de Estilos Principal (Modo Oscuro + Modo Claro)
   CSS puro modular sin dependencias externas para máximo rendimiento.
   ========================================================================== */

:root {
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Modo Oscuro por defecto (Identidad GYPDIGITAL) */
  --bg: #060a13;
  --bg-alt: #0b1120;
  --surface: rgba(15, 23, 42, 0.72);
  --surface-solid: #0f172a;
  --surface-hover: rgba(20, 31, 56, 0.9);
  --border: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(1, 220, 250, 0.35);

  --text: #f8fafc;
  --text-muted: #94a3b8;
  --text-soft: #64748b;

  --cyan: #01dcfa;
  --cyan-hover: #2ee8ff;
  --cyan-soft: rgba(1, 220, 250, 0.12);
  --cyan-glow: rgba(1, 220, 250, 0.28);
  --btn-text: #04101c;

  --nav-bg: rgba(6, 10, 19, 0.78);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55);
  --shadow-card: 0 12px 32px rgba(0, 0, 0, 0.35);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --container: 1220px;
  --transition: 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="light"] {
  --bg: #f8fafc;
  --bg-alt: #eef2f7;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-solid: #ffffff;
  --surface-hover: #ffffff;
  --border: rgba(15, 23, 42, 0.1);
  --border-strong: rgba(0, 152, 199, 0.45);

  --text: #0f172a;
  --text-muted: #475569;
  --text-soft: #64748b;

  --cyan: #0098c7;
  --cyan-hover: #007ea6;
  --cyan-soft: rgba(0, 152, 199, 0.1);
  --cyan-glow: rgba(0, 152, 199, 0.22);
  --btn-text: #ffffff;

  --nav-bg: rgba(248, 250, 252, 0.86);
  --shadow-lg: 0 24px 54px rgba(15, 23, 42, 0.12);
  --shadow-card: 0 10px 28px rgba(15, 23, 42, 0.06);
}

/* Reset y base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }

/* Cambio automático de logos según tema (cero parpadeo) */
.logo-light { display: none; }
.logo-dark { display: block; }
[data-theme="light"] .logo-dark { display: none; }
[data-theme="light"] .logo-light { display: block; }

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

/* ================= FONDO AMBIENTAL ================= */
.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.28;
  transition: opacity var(--transition);
}
[data-theme="light"] .orb { opacity: 0.14; }
.orb-1 {
  width: 560px;
  height: 560px;
  top: -180px;
  right: -120px;
  background: radial-gradient(circle, #01dcfa 0%, transparent 70%);
}
.orb-2 {
  width: 480px;
  height: 480px;
  bottom: 10%;
  left: -160px;
  background: radial-gradient(circle, #0284c7 0%, transparent 70%);
}
.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: 0.35;
  mask-image: radial-gradient(ellipse 80% 55% at 50% 0%, #000 40%, transparent 100%);
}

/* ================= BOTONES ================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-weight: 700;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  padding: 0.72rem 1.35rem;
  transition: transform var(--transition), background var(--transition), box-shadow var(--transition), border-color var(--transition), color var(--transition);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--cyan);
  color: var(--btn-text);
  box-shadow: 0 8px 24px var(--cyan-glow);
}
.btn-primary:hover {
  background: var(--cyan-hover);
  box-shadow: 0 12px 30px var(--cyan-glow);
}
.btn-outline {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
  backdrop-filter: blur(10px);
}
.btn-outline:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}
.btn-sm { padding: 0.52rem 1.05rem; font-size: 0.9rem; border-radius: 10px; }
.btn-lg { padding: 0.92rem 1.65rem; font-size: 1rem; }
.btn-block { width: 100%; }

/* ================= NAVBAR ================= */
.navbar {
  position: sticky;
  top: 0;
  z-index: 90;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition), border-color var(--transition);
}
.nav-inner {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.brand-logo {
  height: 44px;
  width: auto;
  object-fit: contain;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav-links a {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color var(--transition);
  position: relative;
}
.nav-links a:hover { color: var(--cyan); }
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Botón Cambio de Tema */
.theme-toggle {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition), transform var(--transition);
}
.theme-toggle:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  transform: rotate(12deg);
}
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: block; }

/* Menú Hamburguesa Móvil */
.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
}
.menu-toggle span {
  width: 19px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-drawer {
  display: none;
  border-top: 1px solid var(--border);
  background: var(--surface-solid);
}
.mobile-drawer.open { display: block; }
.mobile-drawer-inner {
  padding: 1.25rem 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.mobile-link {
  padding: 0.65rem 0.5rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.mobile-link:hover { color: var(--cyan); }
.mobile-cta { margin-top: 0.5rem; }

/* ================= HERO ================= */
.hero {
  padding: 4.5rem 0 4rem;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 3.5rem;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.42rem 0.95rem;
  border-radius: 999px;
  background: var(--cyan-soft);
  border: 1px solid var(--border-strong);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--cyan);
  margin-bottom: 1.4rem;
}
.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 0 var(--cyan-glow);
  animation: pulseDot 2s infinite;
  flex-shrink: 0;
}
.pulse-dot.green { background: #10b981; box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }

@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 var(--cyan-glow); }
  70% { box-shadow: 0 0 0 8px rgba(1, 220, 250, 0); }
  100% { box-shadow: 0 0 0 0 rgba(1, 220, 250, 0); }
}

.hero-title {
  font-size: clamp(2.35rem, 4.6vw, 3.85rem);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 1.25rem;
}
.text-gradient {
  background: linear-gradient(120deg, var(--cyan) 0%, #38bdf8 55%, #818cf8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 0 2rem;
}
.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 2.5rem;
}
.hero-stats {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.stat-item { display: flex; flex-direction: column; }
.stat-number {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
}
.stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
}
.stat-divider {
  width: 1px;
  height: 32px;
  background: var(--border);
}

/* ================= DASHBOARD 3D ANIMADO ================= */
.dash-scene {
  perspective: 1200px;
  position: relative;
  padding: 1.25rem 0.5rem 2.2rem;
}
.dash-tilt-wrap {
  position: relative;
  transform-style: preserve-3d;
  animation: dashFloat 6.5s ease-in-out infinite;
  transition: transform 0.18s ease-out;
  will-change: transform;
}
@keyframes dashFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.dash-card {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow-lg), 0 0 40px var(--cyan-soft);
  position: relative;
  overflow: hidden;
}
.dash-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
}

.dash-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.9rem;
  margin-bottom: 0.95rem;
  border-bottom: 1px solid var(--border);
}
.dash-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.dash-logo { height: 24px; width: auto; }
.dash-sep { width: 1px; height: 18px; background: var(--border); }
.dash-title { font-size: 0.86rem; font-weight: 700; color: var(--text-muted); }

.dash-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: var(--cyan-soft);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.dash-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
  margin-bottom: 0.95rem;
}
.kpi-box {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.68rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.kpi-label { font-size: 0.72rem; color: var(--text-muted); font-weight: 500; }
.kpi-val { font-size: 1.05rem; font-weight: 800; font-family: var(--font-mono); }
.kpi-trend { font-size: 0.7rem; font-weight: 700; }
.kpi-trend.up { color: #10b981; }
.kpi-trend.cyan { color: var(--cyan); }

.dash-chart-panel {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.85rem 0.95rem 0.5rem;
  margin-bottom: 0.95rem;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
}
.mono-tag {
  font-family: var(--font-mono);
  color: var(--cyan);
  font-size: 0.74rem;
}
.live-spline { width: 100%; height: 118px; display: block; }
.chart-grid-line { stroke: var(--border); stroke-dasharray: 4 4; stroke-width: 1; }

.dash-bottom-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 0.75rem;
}
.dash-mini-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.8rem 0.9rem;
}
.live-bars {
  height: 68px;
  display: flex;
  align-items: flex-end;
  gap: 7px;
  padding-top: 6px;
}
.live-bars span {
  flex: 1;
  border-radius: 5px 5px 2px 2px;
  background: linear-gradient(180deg, var(--cyan) 0%, rgba(1, 220, 250, 0.22) 100%);
  transition: height 0.9s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gauge-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.gauge-wrap {
  position: relative;
  width: 68px;
  height: 68px;
  flex-shrink: 0;
}
.gauge-svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gauge-track { fill: none; stroke: var(--border); stroke-width: 6; }
.gauge-fill {
  fill: none;
  stroke: var(--cyan);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 201;
  stroke-dashoffset: 8;
  transition: stroke-dashoffset 0.9s ease;
}
.gauge-value {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.gauge-value strong { font-size: 1.05rem; font-family: var(--font-mono); }
.gauge-value span { font-size: 0.6rem; color: var(--text-muted); margin-top: 2px; }
.gauge-meta { display: flex; flex-direction: column; }
.gauge-meta strong { font-size: 0.8rem; }
.gauge-meta span { font-size: 0.72rem; color: var(--text-muted); }

/* Satélites Flotantes */
.float-badge {
  position: absolute;
  top: -18px;
  left: -16px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  padding: 0.6rem 0.9rem;
  box-shadow: var(--shadow-card);
  transform: translateZ(36px);
  animation: badgeBob 5s ease-in-out infinite reverse;
}
.badge-kicker {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 700;
}
.float-badge strong { font-size: 0.85rem; font-family: var(--font-mono); }

.float-terminal {
  position: absolute;
  bottom: -24px;
  right: -12px;
  z-index: 3;
  width: min(310px, 86%);
  background: #070d19;
  color: #e2e8f0;
  border: 1px solid rgba(1, 220, 250, 0.35);
  border-radius: 13px;
  padding: 0.55rem 0.85rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  transform: translateZ(44px);
  animation: badgeBob 5.8s ease-in-out infinite;
}
.term-dots {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 0.35rem;
}
.term-dots span:nth-child(1) { width: 8px; height: 8px; border-radius: 50%; background: #ef4444; }
.term-dots span:nth-child(2) { width: 8px; height: 8px; border-radius: 50%; background: #f59e0b; }
.term-dots span:nth-child(3) { width: 8px; height: 8px; border-radius: 50%; background: #10b981; }
.term-label {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: #64748b;
}
.term-body {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  overflow: hidden;
}
.term-prompt { color: #01dcfa; font-weight: 700; }
.term-cursor {
  width: 7px;
  height: 13px;
  background: #01dcfa;
  display: inline-block;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }
@keyframes badgeBob {
  0%, 100% { transform: translateY(0) translateZ(36px); }
  50% { transform: translateY(-7px) translateZ(36px); }
}

/* ================= BARRA DE CONFIANZA ================= */
.trust-bar {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
}
.trust-label {
  text-align: center;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--text-soft);
  margin: 0 0 1.1rem;
}
.trust-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem 2.2rem;
}
.trust-logos span {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: color var(--transition);
}
.trust-logos span:hover { color: var(--cyan); }

/* ================= SECCIONES GENERALES ================= */
.section { padding: 5.5rem 0; }
.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3.25rem;
}
.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--cyan);
  margin-bottom: 0.65rem;
  text-transform: uppercase;
}
.section-title {
  font-size: clamp(1.85rem, 3.4vw, 2.65rem);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin: 0 0 0.85rem;
}
.section-title.align-left { text-align: left; }
.section-subtitle {
  font-size: 1.04rem;
  color: var(--text-muted);
  margin: 0;
}

/* ================= SERVICIOS ================= */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.35rem;
}
.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.75rem 1.5rem;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.service-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lg), 0 0 28px var(--cyan-soft);
}
.service-card.featured {
  border-color: var(--border-strong);
  background: linear-gradient(180deg, var(--cyan-soft) 0%, var(--surface) 45%);
}
.service-badge {
  position: absolute;
  top: -12px;
  right: 18px;
  background: var(--cyan);
  color: var(--btn-text);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 0.24rem 0.7rem;
  border-radius: 999px;
}
.service-icon {
  width: 48px;
  height: 48px;
  border-radius: 13px;
  background: var(--cyan-soft);
  border: 1px solid var(--border-strong);
  color: var(--cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.15rem;
}
.service-icon svg { width: 24px; height: 24px; }
.service-card h3 {
  font-size: 1.18rem;
  margin: 0 0 0.6rem;
  line-height: 1.25;
}
.service-card > p {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin: 0 0 1.15rem;
}
.service-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex: 1;
}
.service-list li {
  position: relative;
  padding-left: 1.25rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.service-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--cyan);
  font-weight: 800;
}

/* ================= PORTAFOLIO ================= */
.portfolio-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 2.4rem;
}
.filter-btn {
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.filter-btn:hover { border-color: var(--cyan); color: var(--cyan); }
.filter-btn.active {
  background: var(--cyan);
  color: var(--btn-text);
  border-color: var(--cyan);
  box-shadow: 0 6px 18px var(--cyan-glow);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
}
.project-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.project-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lg);
}
.project-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #090e1a;
  cursor: pointer;
}
.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.project-card:hover .project-thumb img {
  transform: scale(1.04);
}
.thumb-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 10, 19, 0.05) 30%, rgba(6, 10, 19, 0.78) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition);
}
.project-thumb:hover .thumb-overlay { opacity: 1; }
.thumb-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--cyan);
  color: var(--btn-text);
  font-weight: 800;
  font-size: 0.86rem;
  padding: 0.58rem 1.1rem;
  border-radius: 999px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.4);
}
.project-body {
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.project-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}
.project-tag {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.24rem 0.65rem;
  border-radius: 999px;
  background: var(--cyan-soft);
  color: var(--cyan);
}
.project-domain {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.project-body h3 {
  font-size: 1.18rem;
  margin: 0 0 0.45rem;
}
.project-body p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0 0 1rem;
  flex: 1;
}
.project-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.15rem;
}
.project-chips span {
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0.22rem 0.6rem;
  border-radius: 8px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.project-actions {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 0.6rem;
}

/* ================= PROCESO ================= */
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.35rem;
}
.process-step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.65rem 1.45rem;
  position: relative;
}
.step-num {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--cyan);
  background: var(--cyan-soft);
  border: 1px solid var(--border-strong);
  padding: 0.3rem 0.68rem;
  border-radius: 10px;
  margin-bottom: 1rem;
}
.process-step h3 { font-size: 1.12rem; margin: 0 0 0.5rem; }
.process-step p { font-size: 0.9rem; color: var(--text-muted); margin: 0; }

/* ================= CONTACTO ================= */
.contact-wrapper {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 2.5rem;
  align-items: start;
}
.contact-lead {
  color: var(--text-muted);
  margin: 0 0 1.8rem;
  font-size: 1.02rem;
}
.contact-cards {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}
.contact-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: border-color var(--transition), transform var(--transition);
}
.contact-card:not(.static):hover {
  border-color: var(--cyan);
  transform: translateX(4px);
}
.cc-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--cyan-soft);
  color: var(--cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.cc-icon svg { width: 22px; height: 22px; }
.cc-icon.whatsapp-icon { background: rgba(37, 211, 102, 0.14); color: #25d366; }
.contact-card strong { display: block; font-size: 0.96rem; }
.contact-card span { font-size: 0.85rem; color: var(--text-muted); }

.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-card);
}
.hp-field { position: absolute; left: -9999px; opacity: 0; pointer-events: none; }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.form-group { margin-bottom: 1.05rem; }
.form-group label {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  margin-bottom: 0.42rem;
  color: var(--text);
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.78rem 0.95rem;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px var(--cyan-soft);
}
.btn-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2.5px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}
.btn.loading .btn-spinner { display: inline-block; }
.btn.loading .btn-label { opacity: 0.85; }
@keyframes spin { to { transform: rotate(360deg); } }

.form-feedback {
  margin-top: 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 10px;
}
.form-feedback.success {
  padding: 0.85rem 1rem;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #10b981;
}
.form-feedback.error {
  padding: 0.85rem 1rem;
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
}

/* ================= FOOTER ================= */
.footer {
  padding: 3.5rem 0 2rem;
  border-top: 1px solid var(--border);
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}
.footer-logo { height: 46px; width: auto; margin-bottom: 1rem; }
.footer-brand p { color: var(--text-muted); font-size: 0.92rem; max-width: 380px; margin: 0; }
.footer-links { display: flex; flex-direction: column; gap: 0.55rem; }
.footer-links h4 { margin: 0 0 0.4rem; font-size: 0.95rem; }
.footer-links a { font-size: 0.9rem; color: var(--text-muted); transition: color var(--transition); }
.footer-links a:hover { color: var(--cyan); }
.footer-bottom {
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.86rem;
  color: var(--text-soft);
}
.footer-bottom p { margin: 0; }

/* ================= MODAL VISOR EN VIVO ================= */
.live-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.live-modal.open { display: flex; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 16, 0.82);
  backdrop-filter: blur(8px);
}
.modal-shell {
  position: relative;
  z-index: 2;
  width: min(1380px, 100%);
  height: min(90vh, 880px);
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.65);
}
.modal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.1rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
  flex-wrap: wrap;
}
.modal-title-group {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}
.modal-title-group h3 { margin: 0; font-size: 0.98rem; line-height: 1.2; }
.modal-url {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-muted);
}
.viewport-switcher {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 3px;
  gap: 3px;
}
.vp-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.vp-btn svg { width: 15px; height: 15px; }
.vp-btn.active {
  background: var(--cyan);
  color: var(--btn-text);
}
.modal-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover { border-color: var(--cyan); color: var(--cyan); }
.close-btn:hover { border-color: #ef4444; color: #ef4444; }

.modal-stage {
  position: relative;
  flex: 1;
  background: #0b1120;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  padding: 0;
}
.iframe-loader {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  color: var(--text-muted);
  font-size: 0.92rem;
  transition: opacity 0.3s ease;
}
.iframe-loader.hidden { opacity: 0; pointer-events: none; }
.spinner-ring {
  width: 38px;
  height: 38px;
  border: 3px solid var(--border);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
}
.iframe-frame {
  height: 100%;
  background: #ffffff;
  transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1), height 0.35s ease, border-radius 0.35s ease;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}
.iframe-frame.vp-desktop { width: 100%; height: 100%; border-radius: 0; }
.iframe-frame.vp-tablet { width: min(768px, 95%); height: 94%; border-radius: 16px; border: 6px solid #1e293b; }
.iframe-frame.vp-mobile { width: min(390px, 94%); height: 94%; border-radius: 26px; border: 8px solid #1e293b; }
.iframe-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.modal-footer-note {
  padding: 0.6rem 1.1rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
}
.modal-footer-note a { color: var(--cyan); font-weight: 700; }

/* ================= WHATSAPP FLOTANTE ================= */
.wa-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 80;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25d366;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 28px rgba(37, 211, 102, 0.42);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.wa-float:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 14px 34px rgba(37, 211, 102, 0.55);
}
.wa-float svg { width: 28px; height: 28px; }

/* ================= ANIMACIONES REVEAL ================= */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s ease, transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .dash-tilt-wrap, .float-badge, .float-terminal, .pulse-dot { animation: none !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ================= RESPONSIVE ================= */
@media (max-width: 1120px) {
  .hero-grid { grid-template-columns: 1fr; gap: 3rem; }
  .services-grid, .process-grid { grid-template-columns: repeat(2, 1fr); }
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .nav-links, .nav-cta { display: none; }
  .menu-toggle { display: inline-flex; }
  .contact-wrapper { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .viewport-switcher { display: none; }
}

@media (max-width: 640px) {
  .hero { padding: 3rem 0 3rem; }
  .services-grid, .process-grid, .portfolio-grid, .form-row, .dash-bottom-grid {
    grid-template-columns: 1fr;
  }
  .dash-kpis { grid-template-columns: repeat(3, 1fr); gap: 0.45rem; }
  .kpi-val { font-size: 0.9rem; }
  .float-badge { left: 4px; top: -14px; }
  .float-terminal { right: 4px; bottom: -18px; }
  .project-actions { grid-template-columns: 1fr; }
  .contact-form { padding: 1.35rem; }
  .modal-shell { height: 94vh; border-radius: 14px; }
}
