/* =============================================================
   VOLTIO GADGETS — Global: Variables + Reset + Base
   ============================================================= */

/* ─── Google Fonts Import ─── */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;600;700;800;900&family=Montserrat:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

/* ─── Design Tokens ─── */
:root {
  /* Backgrounds */
  --vg-bg-primary:        #12161A;
  --vg-bg-secondary:      #1A1F26;
  --vg-bg-tertiary:       #20272F;
  --vg-bg-card:           rgba(26, 31, 38, 0.75);
  --vg-bg-glass:          rgba(255, 255, 255, 0.04);
  --vg-bg-glass-hover:    rgba(255, 255, 255, 0.07);

  /* Accent / Neon */
  --vg-accent:            #00A3FF;
  --vg-accent-bright:     #00E5FF;
  --vg-accent-dark:       #0080CC;
  --vg-accent-glow:       rgba(0, 163, 255, 0.35);
  --vg-accent-dim:        rgba(0, 163, 255, 0.12);
  --vg-accent-border:     rgba(0, 163, 255, 0.20);
  --vg-accent-border-hv:  rgba(0, 163, 255, 0.60);

  /* Text */
  --vg-text-primary:      #FFFFFF;
  --vg-text-secondary:    #A0AEC0;
  --vg-text-muted:        #4A5568;
  --vg-text-disabled:     #2D3748;

  /* Status */
  --vg-success:           #00C853;
  --vg-warning:           #FFB300;
  --vg-error:             #FF3D57;
  --vg-info:              #00A3FF;

  /* Radius */
  --vg-radius-xs:         4px;
  --vg-radius-sm:         6px;
  --vg-radius-md:         12px;
  --vg-radius-lg:         20px;
  --vg-radius-xl:         32px;
  --vg-radius-full:       9999px;

  /* Shadows */
  --vg-shadow-sm:         0 2px 8px  rgba(0, 0, 0, 0.40);
  --vg-shadow-md:         0 4px 20px rgba(0, 0, 0, 0.55);
  --vg-shadow-lg:         0 8px 40px rgba(0, 0, 0, 0.70);
  --vg-shadow-neon-sm:    0 0 8px  rgba(0, 163, 255, 0.45);
  --vg-shadow-neon-md:    0 0 20px rgba(0, 163, 255, 0.55), 0 0 40px rgba(0, 163, 255, 0.20);
  --vg-shadow-neon-lg:    0 0 30px rgba(0, 229, 255, 0.65), 0 0 80px rgba(0, 163, 255, 0.30);
  --vg-shadow-card:       0 4px 24px rgba(0, 0, 0, 0.60), 0 0 1px rgba(0, 163, 255, 0.25);

  /* Typography */
  --vg-font-display:      'Orbitron',   'Montserrat', sans-serif;
  --vg-font-heading:      'Montserrat', 'Inter',      sans-serif;
  --vg-font-body:         'Inter',      'Roboto',     sans-serif;

  /* Font Sizes (fluid) */
  --vg-text-xs:           0.75rem;
  --vg-text-sm:           0.875rem;
  --vg-text-base:         1rem;
  --vg-text-lg:           1.125rem;
  --vg-text-xl:           1.25rem;
  --vg-text-2xl:          1.5rem;
  --vg-text-3xl:          1.875rem;
  --vg-text-4xl:          2.25rem;
  --vg-text-5xl:          3rem;

  /* Spacing */
  --vg-space-1:  4px;
  --vg-space-2:  8px;
  --vg-space-3:  12px;
  --vg-space-4:  16px;
  --vg-space-5:  20px;
  --vg-space-6:  24px;
  --vg-space-8:  32px;
  --vg-space-10: 40px;
  --vg-space-12: 48px;
  --vg-space-16: 64px;
  --vg-space-20: 80px;
  --vg-space-24: 96px;

  /* Layout */
  --vg-container-max:   1280px;
  --vg-container-wide:  1440px;
  --vg-container-narrow: 768px;

  /* Transitions */
  --vg-transition-fast:   0.18s cubic-bezier(0.4, 0, 0.2, 1);
  --vg-transition-smooth: 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  --vg-transition-slow:   0.55s cubic-bezier(0.4, 0, 0.2, 1);

  /* Z-index */
  --vg-z-base:    1;
  --vg-z-overlay: 100;
  --vg-z-modal:   200;
  --vg-z-header:  300;
  --vg-z-toast:   400;
}

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

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

body {
  background-color: var(--vg-bg-primary);
  color:            var(--vg-text-primary);
  font-family:      var(--vg-font-body);
  font-size:        var(--vg-text-base);
  font-weight:      400;
  line-height:      1.65;
  -webkit-font-smoothing:  antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
}

/* ─── Textura de circuitos en fondo ─── */
body::before {
  content:    '';
  position:   fixed;
  inset:      0;
  background-image:  url('../img/circuit-texture.svg');
  background-size:   600px 600px;
  background-repeat: repeat;
  opacity:    0.025;
  pointer-events: none;
  z-index:    0;
}

/* ─── Contenedor principal sobre textura ─── */
#page,
.site {
  position: relative;
  z-index:  var(--vg-z-base);
}

/* ─── Tipografía base ─── */
h1, h2, h3, h4, h5, h6 {
  font-family:  var(--vg-font-heading);
  font-weight:  700;
  line-height:  1.2;
  color:        var(--vg-text-primary);
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem,   4vw, var(--vg-text-5xl)); }
h2 { font-size: clamp(1.6rem, 3vw, var(--vg-text-4xl)); }
h3 { font-size: clamp(1.3rem, 2.5vw, var(--vg-text-3xl)); }
h4 { font-size: var(--vg-text-2xl); }
h5 { font-size: var(--vg-text-xl); }
h6 { font-size: var(--vg-text-lg); }

p {
  color:       var(--vg-text-secondary);
  line-height: 1.7;
  margin-bottom: var(--vg-space-4);
}

p:last-child { margin-bottom: 0; }

a {
  color:           var(--vg-accent);
  text-decoration: none;
  transition:      color var(--vg-transition-fast);
}

a:hover {
  color: var(--vg-accent-bright);
}

img,
video {
  max-width: 100%;
  height:    auto;
  display:   block;
}

ul, ol {
  list-style: none;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size:   inherit;
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar        { width: 6px; height: 6px; }
::-webkit-scrollbar-track  { background: var(--vg-bg-primary); }
::-webkit-scrollbar-thumb  {
  background:    var(--vg-accent);
  border-radius: 3px;
  box-shadow:    var(--vg-shadow-neon-sm);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--vg-accent-bright);
}

/* ─── Selección de texto ─── */
::selection {
  background: var(--vg-accent-dim);
  color:      var(--vg-accent-bright);
}

/* ─── Focus visible (accesibilidad) ─── */
:focus-visible {
  outline: 2px solid var(--vg-accent);
  outline-offset: 3px;
  border-radius: var(--vg-radius-xs);
}

/* ─── Contenedor ─── */
.vg-container {
  width:     100%;
  max-width: var(--vg-container-max);
  margin:    0 auto;
  padding:   0 var(--vg-space-6);
}

.vg-container--wide {
  max-width: var(--vg-container-wide);
}

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

/* ─── Separador neón ─── */
.vg-divider {
  height:  1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--vg-accent-border) 30%,
    var(--vg-accent) 50%,
    var(--vg-accent-border) 70%,
    transparent 100%
  );
  margin: var(--vg-space-8) 0;
  border: none;
}

/* ─── Badge ─── */
.vg-badge {
  display:        inline-flex;
  align-items:    center;
  padding:        3px 10px;
  font-size:      var(--vg-text-xs);
  font-weight:    700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius:  var(--vg-radius-full);
  border:         1px solid currentColor;
}

.vg-badge--accent {
  color:      var(--vg-accent-bright);
  background: var(--vg-accent-dim);
  border-color: var(--vg-accent-border);
}

.vg-badge--success {
  color:      var(--vg-success);
  background: rgba(0, 200, 83, 0.1);
  border-color: rgba(0, 200, 83, 0.25);
}

.vg-badge--muted {
  color:      var(--vg-text-muted);
  background: rgba(74, 85, 104, 0.15);
  border-color: var(--vg-text-disabled);
}

/* ─── Section heading ─── */
.vg-section-title {
  font-family:    var(--vg-font-display);
  font-size:      clamp(1.5rem, 2.5vw, 2.2rem);
  font-weight:    800;
  color:          var(--vg-text-primary);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom:  var(--vg-space-2);
}

.vg-section-title span {
  background:              linear-gradient(135deg, var(--vg-accent) 0%, var(--vg-accent-bright) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip:         text;
  filter:                  drop-shadow(0 0 18px rgba(0, 229, 255, 0.35));
}

.vg-section-subtitle {
  color:     var(--vg-text-secondary);
  font-size: var(--vg-text-base);
  margin-bottom: var(--vg-space-10);
}

/* ─── Eyebrow label ─── */
.vg-eyebrow {
  font-family:    var(--vg-font-display);
  font-size:      var(--vg-text-xs);
  font-weight:    600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color:          var(--vg-accent);
  display:        flex;
  align-items:    center;
  gap:            10px;
  margin-bottom:  var(--vg-space-4);
}

.vg-eyebrow::before {
  content: '';
  display: inline-block;
  width:   28px;
  height:  2px;
  background:  var(--vg-accent);
  box-shadow:  var(--vg-shadow-neon-sm);
  flex-shrink: 0;
}

/* ─── Utilidades de animación ─── */
@keyframes vg-pulse-glow {
  0%, 100% { box-shadow: 0 0 10px rgba(0, 163, 255, 0.4); }
  50%       { box-shadow: 0 0 25px rgba(0, 229, 255, 0.7), 0 0 50px rgba(0, 163, 255, 0.3); }
}

@keyframes vg-float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-10px); }
}

@keyframes vg-scan-line {
  0%   { transform: translateY(-100%); opacity: 0; }
  10%  { opacity: 0.6; }
  90%  { opacity: 0.6; }
  100% { transform: translateY(100vh); opacity: 0; }
}

@keyframes vg-shimmer {
  0%   { transform: translateX(-100%) skewX(-20deg); }
  100% { transform: translateX(300%)  skewX(-20deg); }
}

@keyframes vg-gradient-shift {
  0%   { background-position: 0%   50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0%   50%; }
}

@keyframes vg-fade-up {
  from {
    opacity:   0;
    transform: translateY(24px);
  }
  to {
    opacity:   1;
    transform: translateY(0);
  }
}

.vg-animate-fade-up {
  animation: vg-fade-up 0.55s var(--vg-transition-smooth) both;
}

.vg-animate-float {
  animation: vg-float 4s ease-in-out infinite;
}

.vg-animate-pulse {
  animation: vg-pulse-glow 2.5s ease-in-out infinite;
}
