/* ============================================================
   GLOBAL.CSS — Corey's Pickems / Sports Analytics LLC
   Single source of truth for all shared styles.
   Every page on the site loads this file first.

   TO CHANGE THE BRAND:
   - Colors  → update :root variables below
   - Fonts   → update --font-display, --font-body, --font-mono
   - Name    → update site.config.js
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Sans:wght@300;400;500&family=DM+Mono:wght@400;500&display=swap');

/* ── Design tokens ───────────────────────────────────────────────────────── */
:root {
  /* Brand colors */
  --accent:           #1D9E75;
  --accent-light:     #E1F5EE;
  --accent-dark:      #0F6E56;
  --accent-hover:     #188f68;

  /* Semantic colors */
  --danger:           #E24B4A;
  --danger-light:     #FCEBEB;
  --danger-dark:      #A32D2D;
  --warning-light:    #FAEEDA;
  --info-light:       #E6F1FB;
  --success-light:    #EAF3DE;

  /* Neutral palette */
  --text-primary:     #1a1a1a;
  --text-secondary:   #6b6b6b;
  --text-tertiary:    #a0a0a0;
  --border:           rgba(0,0,0,0.1);
  --border-strong:    rgba(0,0,0,0.2);
  --bg:               #f8f8f6;
  --surface:          #ffffff;
  --surface-raised:   #f1efe8;

  /* Typography */
  --font-display:     'Bebas Neue', sans-serif;
  --font-body:        'DM Sans', sans-serif;
  --font-mono:        'DM Mono', monospace;

  /* Spacing */
  --radius-sm:        4px;
  --radius-md:        8px;
  --radius-lg:        12px;
  --radius-xl:        16px;
  --radius-pill:      999px;

  /* Shadows */
  --shadow-sm:        0 1px 3px rgba(0,0,0,0.06);
  --shadow-md:        0 4px 12px rgba(0,0,0,0.08);

  /* Nav height — used to offset page content */
  --nav-height:       65px;
}
/* ── Dark mode theme ─────────────────────────────────────────────────────── */
[data-theme="dark"] {
  --accent:           #2ecc9a;
  --accent-light:     rgba(46,204,154,0.12);
  --accent-dark:      #25a97e;
  --accent-hover:     #29b589;

  --danger:           #f87171;
  --danger-light:     rgba(248,113,113,0.12);
  --danger-dark:      #ef4444;
  --warning-light:    rgba(251,191,36,0.12);
  --info-light:       rgba(96,165,250,0.12);
  --success-light:    rgba(52,211,153,0.12);

  --text-primary:     #f0f0f0;
  --text-secondary:   #a0a0a0;
  --text-tertiary:    #606060;
  --border:           rgba(255,255,255,0.08);
  --border-strong:    rgba(255,255,255,0.16);
  --bg:               #0d1117;
  --surface:          #161b22;
  --surface-raised:   #1c2330;
  --surface-hover:    rgba(255,255,255,0.04);

  --shadow-sm:        0 1px 3px rgba(0,0,0,0.4);
  --shadow-md:        0 4px 12px rgba(0,0,0,0.5);
}


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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a  { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Site logo / banner ──────────────────────────────────────────────────── */
/* Image logos: logo-light.jpg = light mode, logo-dark.jpg = dark mode      */

.site-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.site-logo span { display: none; } /* hide legacy text */
.site-logo .accent { display: none; }

.site-logo-img {
  height: 40px;
  width: auto;
  display: block;
  object-fit: contain;
}

/* Light mode: show light logo, hide dark */
.site-logo-img-light { display: block; }
.site-logo-img-dark  { display: none;  }

/* Dark mode: swap logos */
[data-theme="dark"] .site-logo-img-light { display: none;  }
[data-theme="dark"] .site-logo-img-dark  { display: block; }

/* Mobile: slightly smaller logo */
@media (max-width: 768px) {
  .site-logo-img { height: 28px; }
}

@media (max-width: 480px) {
  .site-logo-img { height: 24px; }
}

.site-logo-lg {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.site-logo-lg span   { display: none; }
.site-logo-lg .accent { display: none; }

.site-tagline {
  font-family: var(--font-body);
  font-size: 7px;
  letter-spacing: 1px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  margin-top: 2px;
}

/* ── Navigation ──────────────────────────────────────────────────────────── */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  height: var(--nav-height);
  border-bottom: 0.5px solid var(--border);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand { text-decoration: none; }

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--text-primary); }

.nav-cta {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  max-width: 60vw;
}
.nav-cta::-webkit-scrollbar { display: none; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
/* All buttons share these base styles */
.btn {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  padding: 9px 20px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: opacity 0.2s, background 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Primary — green fill */
.btn-primary {
  background: var(--accent);
  color: #fff;
  font-weight: 500;
  border: none;
}
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }

/* Ghost — outline */
.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border: 0.5px solid var(--border-strong);
}
.btn-ghost:hover:not(:disabled) { background: var(--surface-raised); }

/* Large variants */
.btn-lg {
  font-size: 15px;
  padding: 13px 28px;
  border-radius: var(--radius-md);
}

/* Full width */
.btn-full {
  width: 100%;
  padding: 12px;
  font-size: 15px;
  font-weight: 500;
}

/* Outline full width */
.btn-outline-full {
  width: 100%;
  padding: 11px;
  background: transparent;
  border: 0.5px solid var(--border-strong);
  color: var(--text-primary);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-outline-full:hover { background: var(--surface-raised); }

/* Danger full width */
.btn-danger-full {
  width: 100%;
  padding: 11px;
  background: transparent;
  border: 0.5px solid var(--danger);
  color: var(--danger);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-danger-full:hover { background: var(--danger-light); }

/* ── Form fields ─────────────────────────────────────────────────────────── */
.field {
  margin-bottom: 14px;
}

.field label {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 5px;
  letter-spacing: 0.3px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 0.5px solid var(--border-strong);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-primary);
  background: var(--surface);
  outline: none;
  transition: border-color 0.15s;
  appearance: none;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(29, 158, 117, 0.1);
}

.field-row {
  display: flex;
  gap: 10px;
}

.field-row .field { flex: 1; }

/* ── Alert / message boxes ───────────────────────────────────────────────── */
.alert {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  margin-bottom: 14px;
  text-align: center;
  display: none;
}

.alert.show   { display: block; }
.alert-error  { background: var(--danger-light);  color: var(--danger-dark); }
.alert-success{ background: var(--accent-light);  color: var(--accent-dark); }
.alert-info   { background: var(--info-light);    color: #185FA5; }

/* ── Badges & tags ───────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.badge-green  { background: var(--accent-light);   color: var(--accent-dark); }
.badge-red    { background: var(--danger-light);   color: var(--danger-dark); }
.badge-amber  { background: var(--warning-light);  color: #854F0B; }
.badge-blue   { background: var(--info-light);     color: #185FA5; }

.badge-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

/* ── Sport chips ─────────────────────────────────────────────────────────── */
.sport-chip {
  font-family: var(--font-body);
  font-size: 12px;
  padding: 6px 14px;
  border: 0.5px solid var(--border);
  border-radius: var(--radius-pill);
  white-space: nowrap;
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}

.sport-chip:hover,
.sport-chip.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

/* ── Divider ─────────────────────────────────────────────────────────────── */
.divider {
  border: none;
  border-top: 0.5px solid var(--border);
  margin: 0 40px;
}

.divider-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.divider-line {
  flex: 1;
  height: 0.5px;
  background: var(--border);
}

.divider-text {
  font-size: 12px;
  color: var(--text-tertiary);
}

/* ── Utility classes ─────────────────────────────────────────────────────── */
.text-accent    { color: var(--accent); }
.text-muted     { color: var(--text-secondary); }
.text-tertiary  { color: var(--text-tertiary); }
.text-danger    { color: var(--danger); }
.text-center    { text-align: center; }
.text-mono      { font-family: var(--font-mono); }
.text-display   { font-family: var(--font-display); }

.mb-4  { margin-bottom: 4px; }
.mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }

.w-full { width: 100%; }

/* ── Section labels & headings ───────────────────────────────────────────── */
.section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--accent);
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 12px;
}

.section-h2 {
  font-family: var(--font-display);
  font-size: 44px;
  text-align: center;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1;
}

.section-sub {
  font-size: 15px;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 44px;
}

/* ── Stats row ───────────────────────────────────────────────────────────── */
.stats-row {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin: 40px auto;
  max-width: 600px;
}

.stat-item { text-align: center; }

.stat-num {
  font-family: var(--font-display);
  font-size: 36px;
  color: var(--text-primary);
  line-height: 1;
}

.stat-label {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 4px;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav {
    padding: 0 20px;
  }

  .nav-links {
    display: none;
  }

  .stats-row {
    gap: 24px;
    flex-wrap: wrap;
    padding: 0 20px;
  }

  .divider {
    margin: 0 20px;
  }

  .section-h2 {
    font-size: 32px;
  }
}
