/* ==========================================================================
   ESTILOS GLOBALES - BRANDER TRUJILLO
   Ingeniero · Economista · Magíster en Gestión Pública
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg-main: #030712;
  --bg-surface: #0b1120;
  --bg-card: #0f172a;
  --bg-card-hover: #172554;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(59, 130, 246, 0.4);
  --brand-blue: #2563eb;
  --brand-blue-light: #38bdf8;
  --brand-navy: #1e3a8a;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --font-main: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-main);
  background-color: var(--bg-main);
  color: var(--text-main);
}

body {
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #030712;
}

::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 9999px;
  transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: #334155;
}

/* Selección de texto elegante */
::selection {
  background-color: rgba(59, 130, 246, 0.35);
  color: #ffffff;
}

/* Gradientes y Efectos de Fondo */
.bg-radial-gradient {
  background: radial-gradient(circle at 50% 0%, rgba(37, 99, 235, 0.18), transparent 70%);
}

.bg-radial-mesh {
  background-image:
    radial-gradient(at 100% 0%, rgba(30, 58, 138, 0.25) 0px, transparent 50%),
    radial-gradient(at 0% 100%, rgba(14, 165, 233, 0.12) 0px, transparent 50%);
}

.text-gradient {
  background: linear-gradient(135deg, #ffffff 40%, #93c5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-accent {
  background: linear-gradient(135deg, #60a5fa 0%, #38bdf8 50%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ==========================================================================
   ANIMACIONES AL HACER SCROLL (FADE-IN & SLIDE-UP)
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ==========================================================================
   TARJETAS INTERACTIVAS CON ELEVACIÓN Y TILT SUTIL
   ========================================================================== */
.card-glass,
.card-interactive {
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              background-color 0.35s ease;
  will-change: transform, box-shadow;
}

.card-glass:hover,
.card-interactive:hover {
  border-color: var(--border-glow);
  transform: translateY(-5px);
  box-shadow: 0 22px 35px -10px rgba(3, 7, 18, 0.85),
              0 0 25px -5px rgba(59, 130, 246, 0.22);
  background: rgba(15, 23, 42, 0.9);
}

/* ==========================================================================
   BOTONES CON MICRO-INTERACCIONES MODERNAS
   ========================================================================== */
.btn-primary {
  position: relative;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  font-weight: 700;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  overflow: hidden;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -4px rgba(37, 99, 235, 0.55),
              0 0 15px rgba(56, 189, 248, 0.3);
}

.btn-primary:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f1f5f9;
  font-weight: 600;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-secondary:hover {
  background: rgba(51, 65, 85, 0.85);
  border-color: rgba(147, 197, 253, 0.45);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -4px rgba(15, 23, 42, 0.6);
}

.btn-secondary:active {
  transform: translateY(0) scale(0.98);
}

/* ==========================================================================
   NAVBAR & ENLACES
   ========================================================================== */
.nav-link {
  position: relative;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, #38bdf8, #6366f1);
  transition: width 0.25s ease;
  border-radius: 2px;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link.active {
  color: #ffffff;
  font-weight: 600;
}

/* Insignias / Pills */
.badge-tech {
  background: rgba(59, 130, 246, 0.12);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.badge-public {
  background: rgba(14, 165, 233, 0.12);
  color: #7dd3fc;
  border: 1px solid rgba(14, 165, 233, 0.25);
}

.badge-eco {
  background: rgba(99, 102, 241, 0.12);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.25);
}

/* ==========================================================================
   CAMPOS DE FORMULARIO
   ========================================================================== */
.form-input {
  width: 100%;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.75rem;
  padding: 0.85rem 1.1rem;
  color: #f8fafc;
  outline: none;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.form-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.28);
  background: rgba(15, 23, 42, 0.95);
}

.form-input::placeholder {
  color: #64748b;
}

/* Transición suave para acordeones móviles */
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.accordion-content.open {
  max-height: 400px;
}