/* ==========================================================================
   A-PROBAR | CSS Global & Design System
   Archivo: css/global.css
   ========================================================================== */

:root {
  /* Colors - Theme */
  --bg-primary: #0A0E17;
  --bg-secondary: #0F172A;
  --bg-tertiary: #1E293B;
  --bg-card: rgba(17, 24, 39, 0.75);
  --bg-card-hover: rgba(30, 41, 59, 0.85);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(56, 189, 248, 0.25);

  /* Text */
  --text-main: #F8FAFC;
  --text-muted: #94A3B8;
  --text-dim: #64748B;

  /* Accents */
  --accent-cyan: #38BDF8;
  --accent-blue: #3B82F6;
  --accent-purple: #8B5CF6;
  --accent-gold: #F59E0B;
  --accent-emerald: #10B981;
  --accent-rose: #F43F5E;

  /* Meeples Palette */
  --meeple-fabian: #F59E0B;
  --meeple-fabian-glow: rgba(245, 158, 11, 0.25);
  --meeple-damian: #10B981;
  --meeple-damian-sec: #8B5CF6;
  --meeple-damian-glow: rgba(16, 185, 129, 0.25);
  --meeple-pablo: #EF4444;
  --meeple-pablo-glow: rgba(239, 68, 68, 0.25);
  --meeple-fernando: #3B82F6;
  --meeple-fernando-glow: rgba(59, 130, 246, 0.25);

  /* Typography */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Shadows & Glassmorphism */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
  --glass-blur: blur(16px);
  --transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-body);
}

body {
  min-height: 100vh;
  line-height: 1.6;
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(56, 189, 248, 0.07) 0%, transparent 40%),
    radial-gradient(circle at 85% 35%, rgba(139, 92, 246, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 50% 80%, rgba(16, 185, 129, 0.05) 0%, transparent 50%),
    linear-gradient(to bottom, #0A0E17 0%, #0F172A 100%);
  background-attachment: fixed;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

/* Typography Helpers */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-main);
  line-height: 1.2;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

img, svg {
  display: block;
  max-width: 100%;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5.5rem 0;
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 3.5rem auto;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 9999px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-cyan);
  margin-bottom: 1rem;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1.15rem;
  line-height: 1.6;
}

.highlight-text {
  background: linear-gradient(135deg, #38BDF8 0%, #818CF8 50%, #C084FC 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ==========================================================================
   Navigation Bar
   ========================================================================== */
.navbar {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  backdrop-filter: var(--glass-blur);
  background: rgba(10, 14, 23, 0.9);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 74px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-logo-svg {
  height: 46px;
  width: auto;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.8rem;
  list-style: none;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  padding: 0.3rem 0;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-main);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--accent-cyan);
  transition: var(--transition);
}

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

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1.6rem;
  cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.6rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  font-family: var(--font-body);
}

.btn-primary {
  background: linear-gradient(135deg, #2563EB 0%, #38BDF8 100%);
  color: #FFFFFF;
  box-shadow: 0 4px 15px rgba(56, 189, 248, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(56, 189, 248, 0.45);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text-main);
  backdrop-filter: var(--glass-blur);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent-cyan);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

/* Pulse animation */
.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-emerald);
  border-radius: 50%;
  display: inline-block;
  animation: pulseAnim 1.8s infinite;
}

@keyframes pulseAnim {
  0% { transform: scale(0.9); opacity: 0.7; box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.1); opacity: 1; box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.9); opacity: 0.7; }
}

/* Page Intro Header (used on subpages) */
.page-intro {
  padding: 5rem 0 3rem 0;
  text-align: center;
  position: relative;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.6) 0%, transparent 100%);
  border-bottom: 1px solid var(--border-color);
}

.page-intro .container {
  max-width: 800px;
}

.page-intro h1 {
  font-size: 3rem;
  font-weight: 900;
  margin-bottom: 1rem;
}

.page-intro p {
  color: var(--text-muted);
  font-size: 1.2rem;
  line-height: 1.6;
}

/* Footer */
.footer {
  background: #06090F;
  border-top: 1px solid var(--border-color);
  padding: 4rem 0 2rem 0;
  margin-top: 5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-col-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 1.2rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.footer-link {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-link:hover {
  color: var(--accent-cyan);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* Responsive */
@media (max-width: 768px) {
  .nav-menu {
    display: none;
    position: absolute;
    top: 74px;
    left: 0;
    right: 0;
    background: #0A0E17;
    flex-direction: column;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
  }

  .nav-menu.open {
    display: flex;
  }

  .mobile-toggle {
    display: block;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .page-intro h1 {
    font-size: 2.2rem;
  }
}
