/* ============================================================
   MML — Midnight Metropolitan League
   Base Styles & Design Tokens
   ============================================================ */

/* ---- Google Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Inter:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* ============================================================
   1. DESIGN TOKENS (CSS Custom Properties)
   ============================================================ */
:root {
  /* ---- Background Colors ---- */
  --color-bg-deep:    #050508;
  --color-bg-primary: #0a0a0f;
  --color-bg-card:    #0d1520;

  /* ---- Navy Palette ---- */
  --color-navy:       #1a2744;
  --color-navy-mid:   #2a3f6e;
  --color-navy-light: #3a5590;

  /* ---- Pearl Palette ---- */
  --color-pearl:        #e8e4dc;
  --color-pearl-dim:    #b8b4ac;
  --color-pearl-bright: #f5f2eb;

  /* ---- Accent Colors ---- */
  --color-accent: #4a6fa5;
  --color-gold:   #c4a96a;

  /* ---- Semantic Aliases (used by admin templates) ---- */
  --bg-body:      var(--color-bg-deep);
  --color-cream:  var(--color-pearl);
  --color-muted:  var(--color-pearl-dim);

  /* ---- Team Colors ---- */
  --team-platinum:   #7dd3e8;
  --team-diamond:    #2a2a2a;
  --team-ome:        #e8c840;
  --team-mitsubishi: #c0392b;
  --team-marubeni:   #e8e4dc;
  --team-sj:         #1a3a6e;

  /* ---- Typography ---- */
  --font-display: 'Bebas Neue', Impact, sans-serif;
  --font-heading: 'Outfit', 'Segoe UI', sans-serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* ---- Transitions ---- */
  --transition-smooth: cubic-bezier(0.22, 1, 0.36, 1);
  --transition-fast:   150ms var(--transition-smooth);
  --transition-medium: 300ms var(--transition-smooth);
  --transition-slow:   500ms var(--transition-smooth);

  /* ---- Spacing Scale ---- */
  --space-xs:  0.25rem;   /*  4px */
  --space-sm:  0.5rem;    /*  8px */
  --space-md:  1rem;      /* 16px */
  --space-lg:  1.5rem;    /* 24px */
  --space-xl:  2rem;      /* 32px */
  --space-2xl: 3rem;      /* 48px */
  --space-3xl: 4rem;      /* 64px */
  --space-4xl: 6rem;      /* 96px */

  /* ---- Border Radius ---- */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   16px;
  --radius-2xl:  24px;
  --radius-full: 9999px;

  /* ---- Shadows ---- */
  --shadow-card:  0 4px 24px rgba(0, 0, 0, 0.35);
  --shadow-glow:  0 0 20px rgba(74, 111, 165, 0.15);
  --shadow-hover: 0 8px 32px rgba(74, 111, 165, 0.2);

  /* ---- Z-Index Scale ---- */
  --z-base:    1;
  --z-card:    10;
  --z-nav:     100;
  --z-overlay: 200;
  --z-modal:   300;
}


/* ============================================================
   2. CSS RESET
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
  line-height: 1.2;
}

p {
  overflow-wrap: break-word;
}


/* ============================================================
   3. BASE BODY STYLES
   ============================================================ */
body {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  color: var(--color-pearl);
  background-color: var(--color-bg-deep);
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-pearl-bright);
}

h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--color-pearl);
}


/* ============================================================
   4. SELECTION & SCROLLBAR
   ============================================================ */

/* ---- Text Selection ---- */
::selection {
  background-color: var(--color-accent);
  color: var(--color-pearl-bright);
}

::-moz-selection {
  background-color: var(--color-accent);
  color: var(--color-pearl-bright);
}

/* ---- Custom Scrollbar (Webkit) ---- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg-deep);
}

::-webkit-scrollbar-thumb {
  background: var(--color-navy);
  border-radius: var(--radius-full);
  border: 2px solid var(--color-bg-deep);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-navy-mid);
}

/* ---- Firefox Scrollbar ---- */
html {
  scrollbar-width: thin;
  scrollbar-color: var(--color-navy) var(--color-bg-deep);
}


/* ============================================================
   5. PARTICLE CANVAS
   ============================================================ */
#particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}


/* ============================================================
   6. UTILITY CLASSES
   ============================================================ */

/* ---- Container ---- */
.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-lg);
  padding-right: var(--space-lg);
}

/* ---- Text Alignment ---- */
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

/* ---- Fade-Up Animation ---- */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.6s var(--transition-smooth),
    transform 0.6s var(--transition-smooth);
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Staggered Delays ---- */
.fade-up:nth-child(2) { transition-delay: 0.1s; }
.fade-up:nth-child(3) { transition-delay: 0.2s; }
.fade-up:nth-child(4) { transition-delay: 0.3s; }
.fade-up:nth-child(5) { transition-delay: 0.4s; }
.fade-up:nth-child(6) { transition-delay: 0.5s; }

/* ---- Visually Hidden (Accessibility) ---- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
