/* ============================================
   VARIABLES
   ============================================ */
:root {
  /* Colors - Sports Bar Sophisticated Palette */
  --color-bg-primary: #0f172a;      /* Deep navy */
  --color-bg-secondary: #1e293b;    /* Slate dark */
  --color-bg-tertiary: #14532d;     /* Deep forest green */
  --color-bg-light: #faf9f7;        /* Warm white/cream */
  --color-bg-wood: #f5f1eb;         /* Warm wood tint */
  
  --color-text-primary: #f8fafc;    /* Clean white */
  --color-text-secondary: #cbd5e1;  /* Soft gray-blue */
  --color-text-muted: #94a3b8;      /* Muted gray */
  --color-text-dark: #0f172a;       /* Dark for light bg */
  --color-text-wood: #5c4033;       /* Warm dark brown */
  
  --color-primary: #dc2626;         /* Energetic red */
  --color-primary-hover: #b91c1c;   /* Darker red */
  --color-primary-glow: rgba(220, 38, 38, 0.4);
  
  --color-success: #059669;         /* Forest success */
  --color-warning: #d97706;         /* Amber warning */
  --color-danger: #dc2626;          /* Red danger */
  
  --color-wood: #92400e;            /* Warm wood accent */
  --color-wood-light: #d4a373;      /* Light wood */
  
  /* Neutral Grays - Warm Toned */
  --gray-50: #fafaf9;
  --gray-100: #f5f5f4;
  --gray-200: #e7e5e4;
  --gray-300: #d6d3d1;
  --gray-400: #a8a29e;
  --gray-500: #78716c;
  --gray-600: #57534e;
  --gray-700: #44403c;
  --gray-800: #292524;
  --gray-900: #1c1917;

  /* Typography */
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Oswald', 'Inter', sans-serif; /* Bold, energetic for headings */
  --font-mono: 'JetBrains Mono', Consolas, monospace;
  
  --text-xs: 0.75rem;      /* 12px */
  --text-sm: 0.875rem;     /* 14px */
  --text-base: 1rem;       /* 16px */
  --text-lg: 1.125rem;     /* 18px */
  --text-xl: 1.25rem;      /* 20px */
  --text-2xl: 1.5rem;      /* 24px */
  --text-3xl: 1.875rem;    /* 30px */
  --text-4xl: 2.25rem;     /* 36px */
  --text-5xl: 3rem;        /* 48px */
  --text-6xl: 3.75rem;     /* 60px */
  
  --leading-tight: 1.1;
  --leading-snug: 1.25;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  --leading-loose: 2;

  /* Spacing Scale */
  --space-0: 0;
  --space-1: 0.25rem;      /* 4px */
  --space-2: 0.5rem;       /* 8px */
  --space-3: 0.75rem;      /* 12px */
  --space-4: 1rem;         /* 16px */
  --space-5: 1.5rem;       /* 24px */
  --space-6: 2rem;         /* 32px */
  --space-8: 3rem;         /* 48px */
  --space-10: 4rem;        /* 64px */
  --space-12: 5rem;        /* 80px */
  --space-14: 6rem;        /* 96px */

  /* Radius */
  --radius-sm: 0.25rem;    /* 4px */
  --radius-md: 0.5rem;     /* 8px */
  --radius-lg: 0.75rem;    /* 12px */
  --radius-xl: 1rem;       /* 16px */
  --radius-2xl: 1.5rem;    /* 24px */
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-glow: 0 0 20px var(--color-primary-glow);
  --shadow-inner: inset 0 2px 4px 0 rgb(0 0 0 / 0.05);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 500ms cubic-bezier(0.68, -0.55, 0.265, 1.55);

  /* Layout */
  --container-max: 1280px;
  --container-padding: var(--space-4);
}

/* ============================================
   RESET & NORMALIZE
   ============================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  min-height: 100vh;
  line-height: var(--leading-normal);
  font-family: var(--font-sans);
  background-color: var(--color-bg-primary);
  color: var(--color-text-primary);
}

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

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

button {
  cursor: pointer;
  border: none;
  background: none;
}

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

ul,
ol {
  list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--leading-tight);
  letter-spacing: -0.02em;
}

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

/* ============================================
   BASE STYLES
   ============================================ */
body {
  font-size: var(--text-base);
  font-weight: 400;
  background: linear-gradient(180deg, var(--color-bg-primary) 0%, #0a0f1d 100%);
  background-attachment: fixed;
}

/* Typography Scale */
h1, .h1 { font-size: var(--text-5xl); margin-bottom: var(--space-6); }
h2, .h2 { font-size: var(--text-4xl); margin-bottom: var(--space-5); }
h3, .h3 { font-size: var(--text-3xl); margin-bottom: var(--space-4); }
h4, .h4 { font-size: var(--text-2xl); margin-bottom: var(--space-3); }
h5, .h5 { font-size: var(--text-xl); margin-bottom: var(--space-2); }
h6, .h6 { font-size: var(--text-lg); margin-bottom: var(--space-2); }

p {
  margin-bottom: var(--space-4);
  color: var(--color-text-secondary);
  max-width: 65ch;
}

a {
  transition: color var(--transition-fast), opacity var(--transition-fast);
}

a:hover {
  color: var(--color-primary);
}

a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Light Section Overrides */
.section-light {
  background-color: var(--color-bg-light);
  color: var(--color-text-dark);
}

.section-light p {
  color: var(--gray-600);
}

.section-wood {
  background-color: var(--color-bg-wood);
  color: var(--color-text-wood);
}

/* ============================================
   UTILITIES
   ============================================ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

.container-narrow {
  max-width: 1024px;
}

.container-wide {
  max-width: 1440px;
}

/* Flex Helpers */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-4 {
  gap: var(--space-4);
}

.gap-6 {
  gap: var(--space-6);
}

/* Grid Helpers */
.grid {
  display: grid;
}

.grid-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 768px) {
  .grid-cols-2,
  .grid-cols-3 {
    grid-template-columns: 1fr;
  }
}

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

/* Focus Visible */
.focus-ring:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--color-primary-glow);
}

/* ============================================
   COMPONENTS
   ============================================ */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

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

.btn-primary {
  background-color: var(--color-primary);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover:not(:disabled) {
  background-color: var(--color-primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-text-primary);
  border: 2px solid var(--gray-600);
}

.btn-secondary:hover:not(:disabled) {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background-color: rgba(220, 38, 38, 0.1);
}

.btn-wood {
  background-color: var(--color-wood);
  color: white;
}

.btn-wood:hover:not(:disabled) {
  background-color: #78350f;
  transform: translateY(-2px);
}

.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--color-primary-glow);
}

/* Forms & Inputs */
.form-group {
  margin-bottom: var(--space-5);
}

.label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-2);
  color: var(--color-text-secondary);
}

.input,
.textarea,
.select {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background-color: var(--color-bg-secondary);
  border: 1px solid var(--gray-700);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  font-size: var(--text-base);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.input::placeholder,
.textarea::placeholder {
  color: var(--color-text-muted);
}

.input:hover,
.textarea:hover,
.select:hover {
  border-color: var(--gray-500);
}

.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

.textarea {
  min-height: 120px;
  resize: vertical;
}

/* Light background inputs */
.section-light .input,
.section-light .textarea,
.section-light .select {
  background-color: white;
  border-color: var(--gray-300);
  color: var(--color-text-dark);
}

.section-light .input:focus,
.section-light .textarea:focus,
.section-light .select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* Cards */
.card {
  background-color: var(--color-bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  box-shadow: var(--shadow-lg);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  overflow: hidden;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: rgba(220, 38, 38, 0.2);
}

.card-wood {
  background: linear-gradient(135deg, #faf9f7 0%, #f5f1eb 100%);
  border: 1px solid var(--color-wood-light);
  color: var(--color-text-wood);
}

.card-wood p {
  color: var(--gray-600);
}

/* Schedule Table (for match schedules) */
.schedule-table {
  width: 100%;
  font-size: var(--text-sm);
}

.schedule-table th {
  text-align: left;
  padding: var(--space-4);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--gray-700);
}

.schedule-table td {
  padding: var(--space-4);
  border-bottom: 1px solid var(--gray-800);
  vertical-align: middle;
}

.schedule-table tr:hover td {
  background-color: rgba(220, 38, 38, 0.05);
}

.schedule-table .time {
  font-family: var(--font-mono);
  color: var(--color-primary);
  font-weight: 600;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-primary { color: var(--color-primary); }
.text-wood { color: var(--color-wood); }
.bg-dark { background-color: var(--color-bg-primary); }
.bg-green { background-color: var(--color-bg-tertiary); }

/* Spacing Utilities */
.mt-0 { margin-top: var(--space-0); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mb-0 { margin-bottom: var(--space-0); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

.py-8 { padding-top: var(--space-8); padding-bottom: var(--space-8); }
.py-12 { padding-top: var(--space-12); padding-bottom: var(--space-12); }
