/* ==================================================================
   Variables
   ================================================================== */

:root {
  /* Colors */
  --color-background: #07070a; /* deep near-black for a cinematic feel */
  --color-background-elevated: #101018;
  --color-background-soft: #151520;

  --color-text: #f5f5f7;
  --color-text-muted: #a3a3b5;
  --color-text-soft: #c0c0d0;

  /* Palette inspired by playing cards and sports */
  --color-primary: #d62828; /* bold card red */
  --color-primary-soft: rgba(214, 40, 40, 0.12);
  --color-primary-strong: #ff4b4b;

  --color-gold: #f5c451; /* upscale highlight */
  --color-gold-soft: rgba(245, 196, 81, 0.16);

  --color-success: #2cb67d;
  --color-warning: #ffb02e;
  --color-danger: #ff4d6a;

  --color-gray-50: #f9fafb;
  --color-gray-100: #f3f4f6;
  --color-gray-200: #e5e7eb;
  --color-gray-300: #d1d5db;
  --color-gray-400: #9ca3af;
  --color-gray-500: #6b7280;
  --color-gray-600: #4b5563;
  --color-gray-700: #374151;
  --color-gray-800: #1f2933;
  --color-gray-900: #111827;

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  --font-heading: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  --font-size-xs: 0.75rem;  /* 12px */
  --font-size-sm: 0.875rem; /* 14px */
  --font-size-base: 1rem;   /* 16px */
  --font-size-md: 1.0625rem;/* 17px - slightly larger for legibility */
  --font-size-lg: 1.125rem; /* 18px */
  --font-size-xl: 1.25rem;  /* 20px */
  --font-size-2xl: 1.5rem;  /* 24px */
  --font-size-3xl: 1.875rem;/* 30px */
  --font-size-4xl: 2.25rem; /* 36px */
  --font-size-5xl: 3rem;    /* 48px */

  --line-height-tight: 1.1;
  --line-height-snug: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.7;

  /* Spacing scale (0 – 96px) */
  --space-0: 0;
  --space-1: 0.125rem; /* 2px */
  --space-2: 0.25rem;  /* 4px */
  --space-3: 0.375rem; /* 6px */
  --space-4: 0.5rem;   /* 8px */
  --space-5: 0.625rem; /* 10px */
  --space-6: 0.75rem;  /* 12px */
  --space-8: 1rem;     /* 16px */
  --space-10: 1.25rem; /* 20px */
  --space-12: 1.5rem;  /* 24px */
  --space-16: 2rem;    /* 32px */
  --space-20: 2.5rem;  /* 40px */
  --space-24: 3rem;    /* 48px */
  --space-32: 4rem;    /* 64px */
  --space-40: 5rem;    /* 80px */
  --space-48: 6rem;    /* 96px */

  /* Radius */
  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 18px;
  --radius-full: 999px;

  /* Shadows - energetic but soft, for upscale cards and modals */
  --shadow-soft: 0 12px 30px rgba(0, 0, 0, 0.45);
  --shadow-elevated: 0 22px 50px rgba(0, 0, 0, 0.65);
  --shadow-focus: 0 0 0 2px rgba(7, 7, 10, 0.9), 0 0 0 4px rgba(245, 196, 81, 0.75);

  /* Transitions */
  --transition-fast: 120ms ease-out;
  --transition-base: 180ms ease-out;
  --transition-slow: 260ms ease-out;

  /* Layout */
  --container-max-width: 1120px;
  --container-padding-x: 1.25rem;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  :root {
    --transition-fast: 0.01ms linear;
    --transition-base: 0.01ms linear;
    --transition-slow: 0.01ms linear;
  }
}

/* ==================================================================
   Reset / Normalize
   ================================================================== */

/* Box sizing */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Remove default margin */
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

/* Lists */
ul[role="list"],
ol[role="list"] {
  list-style: none;
  padding-left: 0;
}

/* Set core defaults */
html {
  scroll-behavior: smooth;
  text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  text-rendering: optimizeLegibility;
}

/* Images and media */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

/* Inherit fonts for form controls */
input,
button,
textarea,
select {
  font: inherit;
}

/* Remove default button styles baseline */
button {
  border: none;
  padding: 0;
  background: none;
}

/* Remove default list padding */
ul,
ol {
  padding-left: 1.25rem;
}

/* Remove default link styles baseline (will be redefined in Base) */
a {
  color: inherit;
  text-decoration: none;
}

/* Balanced wrapping for nicer headings where supported */
h1,
h2,
h3,
h4,
h5,
h6 {
  text-wrap: balance;
}

/* Prefer readable text wrapping */
p,
li {
  text-wrap: pretty;
}

/* ==================================================================
   Base Styles
   ================================================================== */

body {
  font-family: var(--font-sans);
  font-size: var(--font-size-md);
  line-height: var(--line-height-relaxed);
  background-color: var(--color-background);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
}

/* Typography - headings with a bold, energetic hierarchy */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--color-text);
}

h1 {
  font-size: clamp(2.5rem, 4vw, var(--font-size-5xl));
  line-height: var(--line-height-tight);
  margin-bottom: var(--space-16);
}

h2 {
  font-size: clamp(2rem, 3vw, var(--font-size-4xl));
  line-height: var(--line-height-snug);
  margin: var(--space-24) 0 var(--space-10);
}

h3 {
  font-size: clamp(1.5rem, 2.4vw, var(--font-size-3xl));
  line-height: var(--line-height-snug);
  margin: var(--space-20) 0 var(--space-8);
}

h4 {
  font-size: var(--font-size-2xl);
  line-height: var(--line-height-snug);
  margin: var(--space-16) 0 var(--space-6);
}

h5 {
  font-size: var(--font-size-xl);
  line-height: var(--line-height-normal);
  margin: var(--space-12) 0 var(--space-4);
}

h6 {
  font-size: var(--font-size-lg);
  line-height: var(--line-height-normal);
  margin: var(--space-10) 0 var(--space-2);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--color-text-muted);
}

/* Paragraphs - comfortable reading width */

p {
  margin-bottom: var(--space-8);
  }

p + p {
  margin-top: var(--space-4);
}

small {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

strong {
  font-weight: 600;
}

/* Links - bold, card-inspired hover */

a {
  color: var(--color-gold);
  text-decoration: none;
  position: relative;
  transition: color var(--transition-base);
}

a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.15em;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-gold));
  transform-origin: left;
  transform: scaleX(0);
  transition: transform var(--transition-base);
}

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

a:hover::after {
  transform: scaleX(1);
}

/* Horizontal rule */

hr {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin: var(--space-20) 0;
}

/* Code */

code,
pre {
  font-family: var(--font-mono);
}

/* ==================================================================
   Accessibility & Focus
   ================================================================== */

:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid transparent;
  box-shadow: var(--shadow-focus);
  border-radius: 4px;
}

/* ==================================================================
   Utilities
   ================================================================== */

/* Container */

.container {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding-x);
  padding-right: var(--container-padding-x);
  max-width: var(--container-max-width);
}

/* Flex helpers */

.flex {
  display: flex;
}

.inline-flex {
  display: inline-flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.flex-wrap {
  flex-wrap: wrap;
}

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

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

.gap-md {
  gap: var(--space-8);
}

.gap-lg {
  gap: var(--space-12);
}

/* Grid helpers */

.grid {
  display: grid;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-12);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-16);
}

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

/* Spacing utilities (margin / padding, only a few core ones) */

.mt-0 { margin-top: 0; }
.mt-sm { margin-top: var(--space-8); }
.mt-md { margin-top: var(--space-16); }
.mt-lg { margin-top: var(--space-24); }

.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--space-8); }
.mb-md { margin-bottom: var(--space-16); }
.mb-lg { margin-bottom: var(--space-24); }

.py-section {
  padding-top: var(--space-32);
  padding-bottom: var(--space-32);
}

@media (min-width: 1024px) {
  .py-section {
    padding-top: var(--space-40);
    padding-bottom: var(--space-40);
  }
}

/* Text alignment */

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

/* 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: 0;
}

/* ==================================================================
   Components
   ================================================================== */

/* Buttons - bold, casino-inspired primary CTA */

.button,
button,
input[type="button"],
input[type="submit"],
input[type="reset"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  background-image: linear-gradient(135deg, var(--color-primary), var(--color-gold));
  color: #0b0b10;
  font-weight: 600;
  font-size: var(--font-size-sm);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    filter var(--transition-fast),
    background-position var(--transition-fast);
  background-size: 140% 140%;
  background-position: 0% 50%;
  box-shadow: 0 16px 40px rgba(214, 40, 40, 0.55);
}

.button-secondary {
  background: radial-gradient(circle at top left, var(--color-gold-soft), rgba(0, 0, 0, 0))
    var(--color-background-elevated);
  color: var(--color-text);
  border-color: rgba(245, 196, 81, 0.45);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.button-ghost {
  background: transparent;
  color: var(--color-text-soft);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: none;
}

.button:hover,
button:hover,
input[type="button"]:hover,
input[type="submit"]:hover,
input[type="reset"]:hover {
  transform: translateY(-1px);
  background-position: 100% 50%;
  filter: brightness(1.02);
  box-shadow: 0 22px 50px rgba(214, 40, 40, 0.7);
}

.button-secondary:hover {
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75);
}

.button-ghost:hover {
  background-color: rgba(255, 255, 255, 0.04);
}

.button:active,
button:active,
input[type="button"]:active,
input[type="submit"]:active,
input[type="reset"]:active {
  transform: translateY(0);
  filter: brightness(0.98);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}

.button:disabled,
button:disabled,
input[type="button"]:disabled,
input[type="submit"]:disabled,
input[type="reset"]:disabled,
.button[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.5;
  box-shadow: none;
}

.button-icon {
  display: inline-flex;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-full);
  align-items: center;
  justify-content: center;
  padding: 0;
}

/* Inputs & form controls */

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="password"],
input[type="search"],
select,
textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background-color: rgba(7, 7, 10, 0.9);
  color: var(--color-text);
  outline: none;
  transition:
    border-color var(--transition-base),
    box-shadow var(--transition-base),
    background-color var(--transition-base);
}

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

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
select:focus,
textarea:focus {
  border-color: rgba(245, 196, 81, 0.85);
  box-shadow: 0 0 0 1px rgba(245, 196, 81, 0.85), 0 12px 30px rgba(0, 0, 0, 0.75);
  background-color: #0b0b12;
}

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

label {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: 500;
  margin-bottom: var(--space-4);
  color: var(--color-text-soft);
}

/* Cards - for menus, events, and feature sections */

.card {
  position: relative;
  padding: var(--space-16);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at top left, rgba(245, 196, 81, 0.18), transparent 55%),
    radial-gradient(circle at bottom right, rgba(214, 40, 40, 0.18), transparent 55%),
    var(--color-background-elevated);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px);
  transition:
    transform var(--transition-base),
    box-shadow var(--transition-base),
    border-color var(--transition-base);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-elevated);
  border-color: rgba(245, 196, 81, 0.45);
}

.card-header {
  margin-bottom: var(--space-8);
}

.card-title {
  font-family: var(--font-heading);
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-4);
}

.card-subtitle {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.card-body {
  font-size: var(--font-size-base);
}

/* Badges - for event labels, tournament types, etc. */

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--color-text-soft);
  background-color: rgba(7, 7, 10, 0.8);
}

.badge-live {
  background-color: rgba(214, 40, 40, 0.18);
  border-color: rgba(214, 40, 40, 0.7);
  color: var(--color-primary-strong);
}

.badge-vip {
  background-color: rgba(245, 196, 81, 0.16);
  border-color: rgba(245, 196, 81, 0.8);
  color: var(--color-gold);
}

/* Hero overlay utility - for imagery-heavy sections */

.hero-overlay {
  position: relative;
  isolation: isolate;
}

.hero-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(7, 7, 10, 0.5), rgba(7, 7, 10, 0.95)),
    radial-gradient(circle at top, rgba(245, 196, 81, 0.16), transparent 60%);
  mix-blend-mode: multiply;
  z-index: -1;
}

/* Media Queries for root font adjustments (upscale but readable) */

@media (max-width: 480px) {
  :root {
    --font-size-md: 1rem;
  }
}

@media (min-width: 1200px) {
  :root {
    --font-size-md: 1.0625rem;
  }
}
