/* ==========================================================================
   GARDEN STATE STRIKERS PWA — DESIGN TOKENS & BASE VARIABLES
   Derived from official GSS Crest: Deep Navy (#151438), Strikers Orange (#EE6B3B), Crisp White (#FFFFFF)
   ========================================================================== */

:root {
  /* Brand Palette */
  --gss-navy-950: #09081b;
  --gss-navy-900: #0f0e2a;
  --gss-navy-800: #151438;
  --gss-navy-700: #1e1d4f;
  --gss-navy-600: #2b2968;
  --gss-orange-600: #d95626;
  --gss-orange-500: #ee6b3b;
  --gss-orange-400: #f5885f;
  --gss-orange-glow: rgba(238, 107, 59, 0.24);
  --gss-gold-400: #fbbf24;
  --gss-emerald-400: #34d399;

  /* Surface & Glass Tokens (Dark-First Native iOS Clubhouse Aesthetic) */
  --bg-canvas: #09081b;
  --bg-elevated: #131231;
  --bg-card: rgba(24, 23, 62, 0.72);
  --bg-card-hover: rgba(33, 31, 82, 0.85);
  --bg-card-solid: #17163c;
  --bg-glass-chrome: rgba(13, 12, 34, 0.76);
  --bg-sheet: rgba(19, 18, 49, 0.94);
  --bg-pill: rgba(255, 255, 255, 0.07);
  --bg-pill-active: #ee6b3b;

  /* Borders & Hairlines */
  --border-hairline: rgba(255, 255, 255, 0.11);
  --border-strong: rgba(255, 255, 255, 0.2);
  --border-accent: rgba(238, 107, 59, 0.5);

  /* Text Hierarchy */
  --text-primary: #ffffff;
  --text-secondary: rgba(235, 235, 245, 0.74);
  --text-tertiary: rgba(235, 235, 245, 0.5);
  --text-on-accent: #ffffff;

  /* Typography Stack (Native Apple / System Stack) */
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, system-ui, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, sans-serif;

  /* Fluid Typography Scale via clamp() */
  --text-xs: clamp(0.72rem, 0.68rem + 0.2vw, 0.78rem);
  --text-sm: clamp(0.82rem, 0.79rem + 0.22vw, 0.9rem);
  --text-base: clamp(0.94rem, 0.9rem + 0.25vw, 1.02rem);
  --text-md: clamp(1.06rem, 1rem + 0.35vw, 1.18rem);
  --text-lg: clamp(1.22rem, 1.12rem + 0.5vw, 1.42rem);
  --text-xl: clamp(1.48rem, 1.32rem + 0.8vw, 1.85rem);
  --text-2xl: clamp(1.85rem, 1.55rem + 1.4vw, 2.5rem);

  /* Fluid Spacing Scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;

  /* Radii (Continuous iOS Squircle Feel) */
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;
  --radius-pill: 9999px;

  /* Shadows & Blur */
  --blur-chrome: blur(16px);
  --blur-sheet: blur(24px);
  --shadow-card: 0 12px 32px -8px rgba(4, 3, 14, 0.6), 0 1px 0 0 rgba(255, 255, 255, 0.07) inset;
  --shadow-elevated: 0 22px 48px -12px rgba(0, 0, 0, 0.75);
  --shadow-orange: 0 8px 24px -4px rgba(238, 107, 59, 0.42);

  /* iOS Safe Area Insets */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);

  /* Layout Dimensions */
  --header-height: 60px;
  --tabbar-height: 64px;
  --rail-width: 84px;
  --max-content-width: 1160px;

  /* Transitions (iOS Spring-like Cubic Bezier) */
  --ease-ios: cubic-bezier(0.22, 1, 0.36, 1);
  --duration-fast: 160ms;
  --duration-normal: 280ms;

  /* Surface sub-tokens for nested boxes & headers */
  --bg-inset-box: rgba(9, 8, 27, 0.5);
  --bg-sticky-subbar: rgba(9, 8, 27, 0.84);
  --bg-hero-gradient:
    radial-gradient(circle at 92% 14%, rgba(238, 107, 59, 0.28), transparent 48%),
    linear-gradient(145deg, rgba(28, 27, 74, 0.92) 0%, rgba(16, 15, 42, 0.95) 100%);
  --bg-welcome-gradient:
    radial-gradient(circle at 8% 12%, rgba(238, 107, 59, 0.2), transparent 44%),
    linear-gradient(155deg, rgba(25, 24, 66, 0.9) 0%, rgba(14, 13, 38, 0.94) 100%);
}

/* ==========================================================================
   LIGHT MODE THEME TOKENS (Daylight iOS Clubhouse Palette)
   ========================================================================== */
html[data-theme="light"] {
  --bg-canvas: #f4f6fb;
  --bg-elevated: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.88);
  --bg-card-hover: rgba(255, 255, 255, 0.98);
  --bg-card-solid: #ffffff;
  --bg-glass-chrome: rgba(248, 249, 253, 0.84);
  --bg-sheet: rgba(255, 255, 255, 0.96);
  --bg-pill: rgba(21, 20, 56, 0.06);
  --bg-pill-active: #ee6b3b;

  --border-hairline: rgba(21, 20, 56, 0.11);
  --border-strong: rgba(21, 20, 56, 0.2);
  --border-accent: rgba(238, 107, 59, 0.45);

  --text-primary: #12112e;
  --text-secondary: rgba(18, 17, 46, 0.75);
  --text-tertiary: rgba(18, 17, 46, 0.52);
  --text-on-accent: #ffffff;

  --gss-orange-400: #d95322;
  --gss-orange-500: #ee6b3b;
  --gss-orange-600: #c84719;

  --shadow-card: 0 10px 28px -8px rgba(18, 17, 46, 0.1), 0 1px 0 0 rgba(255, 255, 255, 0.8) inset;
  --shadow-elevated: 0 20px 44px -12px rgba(18, 17, 46, 0.22);

  --bg-inset-box: rgba(21, 20, 56, 0.045);
  --bg-sticky-subbar: rgba(244, 246, 251, 0.88);
  --bg-hero-gradient:
    radial-gradient(circle at 92% 14%, rgba(238, 107, 59, 0.18), transparent 50%),
    linear-gradient(145deg, #ffffff 0%, #f1f4fc 100%);
  --bg-welcome-gradient:
    radial-gradient(circle at 8% 12%, rgba(238, 107, 59, 0.14), transparent 46%),
    linear-gradient(155deg, #ffffff 0%, #f3f5fc 100%);
  color-scheme: light;
}

html[data-theme="light"] body {
  background-color: var(--bg-canvas);
  background-image:
    radial-gradient(circle at 12% 8%, rgba(238, 107, 59, 0.11), transparent 38%),
    radial-gradient(circle at 88% 18%, rgba(30, 29, 79, 0.08), transparent 44%),
    linear-gradient(180deg, #f8f9fd 0%, #eef1f9 100%);
}

/* Base Reset & Viewport Rules */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-family: var(--font-sans);
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  min-height: 100dvh;
  background-color: var(--bg-canvas);
  background-image:
    radial-gradient(circle at 12% 8%, rgba(238, 107, 59, 0.16), transparent 38%),
    radial-gradient(circle at 88% 18%, rgba(56, 53, 140, 0.28), transparent 44%),
    linear-gradient(180deg, #0c0b22 0%, #09081b 100%);
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Tabular Numbers for all scores, jersey numbers, years, and stats */
.tabular-nums,
.stat-value,
.jersey-num,
.timeline-year,
.record-number,
time {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

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

button,
input,
select {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
}

button {
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

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

:focus-visible {
  outline: 2px solid var(--gss-orange-500);
  outline-offset: 2px;
}

.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;
}
