/* ============================================
   SPACE GAMES BRAND TOKENS (Brand Kit Page 03, 05, 06)
   ============================================ */
:root {
  /* Color Palette (Page 03) */
  --space-primary: hsl(207, 86%, 57%);      /* #2B9CEA - Primary Blue */
  --space-secondary: hsl(258, 90%, 66%);    /* #8B5CF6 - Secondary Purple */
  --space-tertiary: hsl(0, 0%, 100%);       /* #ffffff - White */
  --space-on-primary: hsl(207, 82%, 98%);   /* #F4FAFE - Light blue tint */
  --space-on-secondary: hsl(260, 82%, 98%); /* #F7F4FE - Light purple tint */
  --space-on-tertiary: hsl(0, 0%, 7%);      /* #121212 - Dark Charcoal/Black */
  
  /* Global Layout Tokens */
  --bg-dark: #000000;
  --card-border: #000000;
  --border-width: 3px;
  
  /* Shape Radius (Page 05) */
  --radius-none: 0px;
  --radius-sm: 8px;      /* Buttons, inputs, chips, tags */
  --radius-md: 16px;     /* Cards, dialogs, modals */
  --radius-lg: 24px;     /* Containers, feature cards */
  --radius-xl: 32px;     /* Hero sections, promotional panels */
  --radius-full: 9999px; /* Pills, badges, avatars */
  
  /* Spacing Scale (Page 06) */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 32px;
  --space-xl: 40px;
  --space-2xl: 48px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Radium Custom Text Selection Colors */
::selection {
  background: #00FFCC; /* Radium Cyan */
  color: #000000;
}
::-moz-selection {
  background: #00FFCC;
  color: #000000;
}

/* Radium Pink Selection for blue backgrounds and dark sections */
.blue ::selection,
.trust-section ::selection,
.join-section ::selection,
.footer ::selection {
  background: #FF007F; /* Radium Magenta/Pink */
  color: #ffffff;
}
.blue ::-moz-selection,
.trust-section ::-moz-selection,
.join-section ::-moz-selection,
.footer ::-moz-selection {
  background: #FF007F;
  color: #ffffff;
}

/* Radium Yellow Selection for white, pastel and company sections */
.white ::selection,
.working-section ::selection,
.hero ::selection {
  background: #FBE13F; /* Radium Yellow */
  color: #000000;
}
.white ::-moz-selection,
.working-section ::-moz-selection,
.hero ::-moz-selection {
  background: #FBE13F;
  color: #000000;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-dark);
  color: var(--space-on-tertiary);
  padding: 16px 12px;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  -webkit-font-smoothing: antialiased;
}

/* Container for all stacked cards */
.page-container {
  width: 100%;
  max-width: 1240px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Typography Hierarchy (Page 04) */
h1, h2, h3, h4, .font-headline {
  font-family: 'Bebas Neue', Impact, Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.05;
  color: #000000;
}

p, a, button, input, .font-body {
  font-family: 'Plus Jakarta Sans', Arial, sans-serif;
}

/* ============================================
   NEO-BRUTALIST CARD COMPONENT
   ============================================ */
.card {
  background: var(--space-tertiary);
  border: var(--border-width) solid var(--card-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
              box-shadow 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Hover effect for interactive elements */
.card-interactive:hover {
  transform: translate(-3px, -3px);
  box-shadow: 6px 6px 0px #000000;
}

.card-interactive:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0px #000000;
}

/* Pill & Standard Button System (Page 05 & 08) */
.btn-action {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(12px, 1.2vw, 14px); /* Responsive button typography */
  font-weight: 700;
  text-transform: uppercase;
  padding: 14px clamp(16px, 2vw, 28px);
  border-radius: var(--radius-sm); /* 8px small radius for buttons */
  border: var(--border-width) solid var(--card-border);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap; /* Prevent button text wrapping */
  flex-shrink: 0;
}

.btn-dark {
  background: #000000;
  color: #ffffff;
}

.btn-dark:hover {
  background: #222222;
  transform: translateY(-2px);
}

.btn-light {
  background: #ffffff;
  color: #000000;
}

.btn-light:hover {
  background: #f0f0f0;
  transform: translateY(-2px);
}

.btn-blue {
  background: var(--space-primary);
  color: #ffffff;
}

.btn-blue:hover {
  background: hsl(207, 86%, 50%);
  transform: translateY(-2px);
}

/* Pill buttons for special CTA states */
.btn-pill-action {
  border-radius: var(--radius-full);
  padding: 12px 24px;
}

/* Card Learn More Link (Black Pill / 9999px) */
.learn-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #000000;
  color: #ffffff;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  width: fit-content;
  transition: all 0.2s ease;
}

.learn-more-btn svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.learn-more-btn:hover {
  background: #222222;
  transform: translateY(-1px);
}

.learn-more-btn:hover svg {
  transform: translateX(4px);
}

/* Card Metadata Tag (Non-interactive) */
.card-tag {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  width: fit-content;
  border: 2px solid #000000;
  box-shadow: 2px 2px 0px #000000;
  background: #ffffff;
  color: #000000;
  user-select: none;
}

/* ============================================
   SVG MASKED IMAGE CONTAINER
   ============================================ */
.masked-image-container {
  position: relative;
  width: 100%;
  height: 100%;
  border: var(--border-width) solid #000000;
  border-radius: var(--radius-md);
  box-shadow: 10px 10px 0px #000000; /* Neo-brutalist solid shadow */
  overflow: hidden;
  background-color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.masked-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

/* ============================================
   1. NAVBAR
   ============================================ */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-md);
  background: var(--space-tertiary);
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.brand-logo-img {
  height: 48px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  text-decoration: none;
  color: #000000;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--space-primary);
}

.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

/* ============================================
   9. FOOTER
   ============================================ */
.footer {
  background-color: var(--space-on-tertiary); /* Dark Charcoal */
  color: var(--space-tertiary);
  padding: 64px 64px 32px 64px;
  display: flex;
  flex-direction: column;
  gap: 48px;
  border: var(--border-width) solid var(--space-tertiary); /* White outline on black footer */
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 40px;
}

.footer-brand-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-logo-img {
  height: 52px;
  width: auto;
  display: block;
}

.footer-links-grid-wrap {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.footer-column {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-col-title {
  font-size: 16px;
  font-weight: 400;
  color: var(--space-tertiary);
  margin-bottom: 4px;
}

.footer-link {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-weight: 500;
  transition: color 0.2s ease, transform 0.2s ease;
  width: fit-content;
}

.footer-link:hover {
  color: var(--space-primary);
  transform: translateX(3px);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-copy {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 500;
}

.footer-socials {
  display: flex;
  gap: 12px;
}

.social-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--space-tertiary);
  color: var(--space-on-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.social-btn svg {
  width: 14px;
  height: 14px;
}

.social-btn:hover {
  transform: scale(1.1);
  background-color: var(--space-primary);
  color: #ffffff;
}

/* ============================================
   RESPONSIVE MEDIA QUERIES
   ============================================ */
@media (max-width: 1024px) {
  .footer-top {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .footer-links-grid-wrap {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

@media (max-width: 768px) {
  body {
    padding: 8px 6px;
  }
  .page-container {
    gap: 8px;
  }
  .navbar {
    padding: 16px var(--space-sm);
  }
  .nav-links {
    display: none; /* Mobile menu toggled by class */
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #ffffff;
    border-bottom: var(--border-width) solid var(--card-border);
    flex-direction: column;
    padding: 24px;
    gap: 18px;
    z-index: 100;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  }
  .nav-links.active {
    display: flex;
  }
  .nav-hamburger {
    display: block;
  }
  .footer {
    padding: var(--space-lg) var(--space-sm) var(--space-sm) var(--space-sm);
  }
  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .footer-links-grid-wrap {
    grid-template-columns: 1fr;
  }
}
