/* global.css � shared styles, design tokens, and component defaults */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ---
   Design Tokens
   ============================================ */
:root {
  /* Dark theme (default - pages 1,3,5,7) */
  --bg-page:          #0A0A0F;
  --bg-section:       #0F0F1A;
  --bg-card:          #13131F;
  --border-card:      #252535;
  --border-hover:     #3D2F8A;
  --bg-badge:         #1C1637;
  --accent-primary:   #7C5CFC;
  --accent-secondary: #22D3EE;
  --text-heading:     #F1EEFF;
  --text-body:        #C4B5FD;
  --text-muted:       #7B6FAA;
  --bg-footer:        #070710;

  /* Shadows */
  --shadow-btn:  0 4px 16px rgba(124,92,252,0.40);
  --shadow-card: 0 1px 3px rgba(0,0,0,.5), 0 4px 12px rgba(0,0,0,.4);
  --shadow-card-hover: 0 8px 32px rgba(0,0,0,.6), 0 0 0 1px var(--accent-primary);
  --glow-cyan:   0 0 20px rgba(34,211,238,0.30);

  /* Radii */
  --radius-sm:   6px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   16px;
  --radius-pill: 50px;

  /* Compat aliases for older page CSS files */
  --primary:          #7C5CFC;
  --text-primary:     #F1EEFF;
  --bg-dark:          #0A0A0F;
  --bg-card-old:      #13131F;
  --text-secondary:   #7B6FAA;
  --gradient-primary: linear-gradient(135deg, #7C5CFC 0%, #9B89FF 100%);
  --shadow-primary:   rgba(124,92,252,0.40);
}

/* Light theme � add class="page-light" to <body> */
.page-light {
  --bg-page:          #F7F5FF;
  --bg-section:       #F0ECFF;
  --bg-card:          #FFFFFF;
  --border-card:      #DDD8F8;
  --border-hover:     #B5A4F8;
  --bg-badge:         #EDE8FE;
  --accent-primary:   #6B46FA;
  --accent-secondary: #0891B2;
  --text-heading:     #1A0F42;
  --text-body:        #3D2B8A;
  --text-muted:       #7B6FAA;
  --bg-footer:        #070710;
}

/* RESET & BASE */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  background: var(--bg-page);
  color: var(--text-body);
  padding-top: 96px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; transition: color 150ms ease; }
img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul,ol { list-style: none; }
strong,b { font-weight: 600; }

/* TYPOGRAPHY */
h1,h2,h3,h4,h5,h6 {
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-heading);
  margin-bottom: 0.5em;
}
h1 { font-size: clamp(36px, 5vw, 56px); }
h2 { font-size: clamp(26px, 4vw, 36px); }
h3 { font-size: clamp(18px, 2.5vw, 24px); font-weight: 500; }
h4 { font-size: 18px; font-weight: 500; }
p  { color: var(--text-body); line-height: 1.7; margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }

.label, .section-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-secondary);
  margin-bottom: 8px;
}

/* LAYOUT */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.section, .section-pad { padding: 96px 0; }
.section-sm { padding: 64px 0; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.highlight { color: var(--accent-primary); }

/* NAVBAR */
.main-header {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 64px;
  background: rgba(10,10,15,0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 0.5px solid var(--border-card);
  z-index: 1000;
}
.page-light .main-header {
  background: rgba(10,10,15,0.82);
  border-bottom-color: #252535;
}
.page-light .main-header .nav-links a { color: #7B6FAA; }
.page-light .main-header .nav-links a:hover { color: #F1EEFF; }
.page-light .main-header .nav-links a.active { color: #7C5CFC; }

.nav-logo, .logo {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}
.nav-logo img, .logo img {
  height: 140px;
  width: auto;
  display: block;
  object-fit: contain;
}
.footer-brand .nav-logo img {
  height: 150px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 150ms;
}
.nav-links a:hover { color: var(--text-heading); }
.nav-links a.active { color: var(--accent-primary); }
.nav-cta {
  padding: 9px 20px;
  background: var(--accent-primary) !important;
  color: #FFFFFF !important;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: transform 200ms ease, filter 200ms ease;
}
.nav-cta:hover { transform: scale(1.03); filter: brightness(1.1); color: #FFFFFF !important; }

/* BUTTONS */
.btn-primary, .btn, .cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--accent-primary);
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 500;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  transition: transform 200ms ease, filter 200ms ease, box-shadow 200ms ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary:hover, .btn:hover, .cta-primary:hover {
  transform: scale(1.03);
  filter: brightness(1.1);
  color: #FFFFFF;
  box-shadow: 0 6px 24px rgba(124,92,252,0.55);
}
.btn-outline, .btn-secondary, .cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: transparent;
  color: var(--text-body);
  font-size: 15px;
  font-weight: 500;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-hover);
  cursor: pointer;
  transition: transform 200ms ease, background 200ms ease, border-color 200ms ease, color 200ms ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn-outline:hover, .btn-secondary:hover, .cta-secondary:hover {
  transform: scale(1.03);
  background: rgba(124,92,252,0.08);
  border-color: var(--accent-primary);
  color: var(--text-heading);
}

/* CARDS */
.card {
  background: var(--bg-card);
  border: 0.5px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: border-color 250ms ease, box-shadow 250ms ease, transform 250ms ease;
}
.card.visible, .card:hover {
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-4px);
}
.card-icon {
  width: 48px; height: 48px;
  background: var(--bg-badge);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  color: var(--accent-secondary);
  margin-bottom: 16px;
  transition: transform 300ms ease;
}
.card:hover .card-icon { transform: scale(1.1) rotate(5deg); }
.card-title { font-size: 18px; font-weight: 500; color: var(--text-heading); margin-bottom: 8px; }
.card-text  { font-size: 14px; color: var(--text-muted); line-height: 1.6; }

/* SECTION HEADERS */
.section-header { margin-bottom: 48px; }
.section-header .label,
.section-header .section-label { display: block; margin-bottom: 8px; }
.section-header h2 { margin-bottom: 12px; }
.section-header p  { max-width: 560px; color: var(--text-muted); font-size: 17px; }
.section-header.center { text-align: center; }
.section-header.center p { margin: 0 auto; }

/* Draw line */
.draw-line {
  border: none; height: 1px;
  background: var(--accent-secondary);
  width: 0%;
  transition: width 600ms ease;
  margin: 24px 0;
}
.draw-line.visible { width: 100%; }

/* SCROLL ANIMATIONS */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 500ms ease, transform 500ms ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }
.fade-up:nth-child(1) { transition-delay:   0ms; }
.fade-up:nth-child(2) { transition-delay:  80ms; }
.fade-up:nth-child(3) { transition-delay: 160ms; }
.fade-up:nth-child(4) { transition-delay: 240ms; }
.fade-up:nth-child(5) { transition-delay: 320ms; }
.fade-up:nth-child(6) { transition-delay: 400ms; }

/* FOOTER */
.main-footer {
  background: var(--bg-footer);
  border-top: 0.5px solid #1e1e2e;
  padding: 64px 0 32px;
}
.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  padding-bottom: 40px;
  border-bottom: 0.5px solid #1e1e2e;
}
.footer-tagline { font-size: 13px; color: var(--text-muted); margin-top: 6px; }
.footer-col-title {
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-heading);
  margin-bottom: 16px;
}
.footer-nav-list { display: flex; flex-direction: column; gap: 10px; }
.footer-nav-list a { font-size: 14px; color: var(--text-muted); transition: color 150ms; }
.footer-nav-list a:hover { color: var(--accent-secondary); }
.footer-socials { display: flex; gap: 10px; flex-wrap: wrap; }
.footer-social-icon {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: #ffffff;
  border: 1.5px solid #e0e0e0;
  color: #555;
  font-size: 16px;
  transition: color 150ms, border-color 150ms, box-shadow 150ms, background 150ms, transform 150ms;
}
/* Per-platform brand colors */
.footer-social-icon[aria-label="X"] { color: #000000; border-color: rgba(0,0,0,0.25); }
.footer-social-icon[aria-label="LinkedIn"] { color: #0A66C2; border-color: rgba(10,102,194,0.35); }
.footer-social-icon[aria-label="Discord"] { color: #5865F2; border-color: rgba(88,101,242,0.35); }
.footer-social-icon[aria-label="Telegram"] { color: #0088cc; border-color: rgba(0,136,204,0.35); }
/* Hover � fill with brand color */
.footer-social-icon[aria-label="X"]:hover { background: #000; color: #fff; border-color: #000; box-shadow: 0 4px 16px rgba(0,0,0,0.28); transform: translateY(-3px); }
.footer-social-icon[aria-label="LinkedIn"]:hover { background: #0A66C2; color: #fff; border-color: #0A66C2; box-shadow: 0 4px 16px rgba(10,102,194,0.35); transform: translateY(-3px); }
.footer-social-icon[aria-label="Discord"]:hover { background: #5865F2; color: #fff; border-color: #5865F2; box-shadow: 0 4px 16px rgba(88,101,242,0.35); transform: translateY(-3px); }
.footer-social-icon[aria-label="Telegram"]:hover { background: #0088cc; color: #fff; border-color: #0088cc; box-shadow: 0 4px 16px rgba(0,136,204,0.35); transform: translateY(-3px); }
.footer-bottom { padding-top: 24px; text-align: center; }
.footer-bottom p { font-size: 13px; color: var(--text-muted); }

/* Legacy footer-content/footer-links for old pages */
.footer-content {
  display: flex; flex-direction: column; align-items: center;
  gap: 16px; text-align: center;
}
.footer-links { display: flex; gap: 24px; }
.footer-links a { font-size: 14px; color: var(--text-muted); transition: color 150ms; }
.footer-links a:hover { color: var(--accent-secondary); }
.social-icon {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  background: #ffffff;
  border: 0.5px solid var(--border-card);
  border-radius: 50%;
  color: #7C5CFC; font-size: 18px;
  transition: all 250ms;
}
.social-icon:hover { color: var(--accent-secondary); border-color: var(--accent-secondary); box-shadow: var(--glow-cyan); transform: translateY(-3px); }

/* Grid helpers */
.grid   { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px,1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); }
.flex   { display: flex; gap: 16px; }
.flex-center  { justify-content: center; align-items: center; }
.flex-between { justify-content: space-between; align-items: center; }
.flex-column  { flex-direction: column; }

/* HAMBURGER BUTTON */
.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1100;
  border-radius: 8px;
  transition: background 150ms;
}
.nav-burger:hover { background: rgba(124,92,252,0.1); }
.nav-burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-heading);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.page-light .nav-burger span { background: #F1EEFF; }

/* X when open */
.nav-open .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-burger span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-open .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* RESPONSIVE */
@media (max-width: 1024px) { .main-header { padding: 0 40px; } }

@media (max-width: 768px) {
  body { padding-top: 96px; }

  /* Header */
  .main-header { padding: 0 20px; height: 72px; }

  /* Show hamburger */
  .nav-burger { display: flex; }

  /* Mobile nav drawer */
  .nav-links {
    display: none;
    position: fixed;
    top: 72px;
    left: 0; right: 0;
    background: rgba(10,10,15,0.97);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 1rem 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(124,92,252,0.2);
    z-index: 1050;
  }
  .page-light .nav-links { background: rgba(10,10,15,0.97); }
  .nav-open .nav-links { display: flex; }

  .nav-links li { width: 100%; }
  .nav-links a {
    display: block;
    padding: 0.85rem 1rem;
    font-size: 15px;
    border-radius: 10px;
    color: var(--text-body);
  }
  .nav-links a:hover { background: rgba(124,92,252,0.08); color: var(--accent-primary); }
  .nav-links a.active { color: var(--accent-primary); background: rgba(124,92,252,0.06); }
  .nav-cta {
    display: block;
    text-align: center;
    margin-top: 0.5rem;
    padding: 0.85rem 1rem !important;
  }

  /* Layout */
  .container { padding: 0 16px; }
  .section, .section-pad { padding: 64px 0; }

  /* Footer */
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-brand { width: 100%; }
}

@media (max-width: 480px) {
  h1 { font-size: 28px; }
  h2 { font-size: 22px; }
  .btn-primary, .btn, .btn-outline, .btn-secondary { padding: 11px 22px; font-size: 14px; }
  .footer-socials { gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .fade-up { opacity: 1; transform: none; transition: none; }
  .draw-line { width: 100%; transition: none; }
}