/* =========================================================
   Stryla Spot – Base Styles
   Modern, energetic, community-focused sports & poker venue
   ========================================================= */

/* ==========================
   1. CSS Custom Properties
   ========================== */
:root {
  /* Color Palette - tuned for modern, sporty energy */
  --color-bg: #050712; /* deep navy background */
  --color-bg-alt: #0b0f1f;
  --color-surface: #111729;
  --color-surface-alt: #161d33;

  --color-text: #f5f7ff;
  --color-text-muted: #a5afc7;
  --color-border-subtle: #232a3f;

  /* Energetic accents */
  --color-primary: #2ef2a6; /* neon green */
  --color-primary-soft: rgba(46, 242, 166, 0.18);
  --color-primary-strong: #20c781;

  --color-success: #4ade80; /* soft green */
  --color-warning: #facc15; /* amber */
  --color-danger: #fb3b6a; /* sporty magenta-red */

  /* Neutral grays (for borders, subtle text on light elements) */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2933;
  --gray-900: #111827;

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  --font-display: "Montserrat", 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 Sizes (clamp for responsive scaling) */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;

  /* Line Heights */
  --leading-tight: 1.15;
  --leading-normal: 1.5;
  --leading-relaxed: 1.7;

  /* Spacing Scale (0–96px) */
  --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.25rem;  /* 20px */
  --space-6: 1.5rem;   /* 24px */
  --space-7: 1.75rem;  /* 28px */
  --space-8: 2rem;     /* 32px */
  --space-10: 2.5rem;  /* 40px */
  --space-12: 3rem;    /* 48px */
  --space-16: 4rem;    /* 64px */
  --space-20: 5rem;    /* 80px */
  --space-24: 6rem;    /* 96px */

  /* Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-pill: 999px;

  /* Shadows - subtle glow for sporty neon vibe */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(3, 7, 18, 0.65);
  --shadow-lg: 0 18px 45px rgba(15, 23, 42, 0.9);
  --shadow-primary-glow: 0 0 0 1px rgba(46, 242, 166, 0.25), 0 0 24px rgba(46, 242, 166, 0.35);

  /* Transitions */
  --transition-fast: 120ms ease-out;
  --transition-normal: 200ms ease-out;
  --transition-slow: 320ms ease-out;

  /* Layout */
  --container-max-width: 1120px;
  --container-padding-x: var(--space-4);

  /* Z-index levels */
  --z-header: 50;
  --z-overlay: 100;
  --z-modal: 1000;
}

/* Slightly larger horizontal padding on desktop */
@media (min-width: 768px) {
  :root {
    --container-padding-x: var(--space-6);
  }
}

/* ==========================
   2. Reset & Normalize
   ========================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
  text-size-adjust: 100%;
}

body {
  margin: 0;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

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

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

button {
  border: none;
  background: none;
  padding: 0;
}

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

body,
html {
  min-height: 100%;
}

/* Remove default focus outlines to replace with custom focus-visible */
:focus {
  outline: none;
}

/* ==========================
   3. Base Typography & Layout
   ========================== */
body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  background-color: var(--color-bg);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  display: block;
}

/* Headings - strong, sporty display style */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--leading-tight);
  color: var(--color-text);
}

h1 {
  font-size: clamp(2.4rem, 2.6rem + 1vw, 3.2rem);
  letter-spacing: 0.02em;
}

h2 {
  font-size: clamp(1.8rem, 1.4rem + 0.8vw, 2.3rem);
}

h3 {
  font-size: clamp(1.4rem, 1.1rem + 0.5vw, 1.8rem);
}

h4 {
  font-size: var(--text-xl);
}

h5 {
  font-size: var(--text-lg);
}

h6 {
  font-size: var(--text-base);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

p {
  margin-top: 0;
  margin-bottom: var(--space-4);
  color: var(--color-text-muted);
}

strong,
b {
  font-weight: 600;
}

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

/* Links - energetic underline on hover */
a {
  position: relative;
  cursor: pointer;
  transition: color var(--transition-normal);
}

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

a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.15em;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-danger));
  transition: width var(--transition-normal);
}

a:not(.btn):hover::after {
  width: 100%;
}

/* Lists */
ul,
ol {
  padding-left: 1.25rem;
  margin-bottom: var(--space-4);
}

li {
  margin-bottom: 0.25rem;
}

/* Horizontal rule */
hr {
  border: 0;
  border-top: 1px solid var(--color-border-subtle);
  margin: var(--space-6) 0;
}

/* ==========================
   4. Utilities
   ========================== */

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin-inline: auto;
  padding-inline: var(--container-padding-x);
}

.section {
  padding-block: var(--space-10);
}

.section--alt {
  background: radial-gradient(circle at top, rgba(46, 242, 166, 0.08), transparent 55%), var(--color-bg-alt);
}

/* Flex utilities */
.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;
}

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

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

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

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

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

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

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

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

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

.text-muted {
  color: var(--color-text-muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: linear-gradient(135deg, rgba(46, 242, 166, 0.12), rgba(15, 23, 42, 0.95));
  color: var(--color-text);
}

/* Spacing utilities (margin/padding) */
.mt-0 { margin-top: 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: 0; }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

.py-6 {
  padding-block: var(--space-6);
}

.p-4 {
  padding: var(--space-4);
}

.p-6 {
  padding: var(--space-6);
}

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

/* ==========================
   5. Components
   ========================== */

/* Buttons */
.btn {
  --btn-bg: var(--color-primary);
  --btn-color: #020617;
  --btn-border: transparent;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding-inline: 1.3rem;
  padding-block: 0.7rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--btn-border);
  background: var(--btn-bg);
  color: var(--btn-color);
  font-weight: 600;
  font-size: var(--text-sm);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color var(--transition-normal), color var(--transition-normal), box-shadow var(--transition-normal), transform var(--transition-fast), border-color var(--transition-normal);
  box-shadow: var(--shadow-sm);
}

.btn--primary {
  --btn-bg: linear-gradient(135deg, var(--color-primary), var(--color-primary-strong));
  --btn-color: #020617;
}

.btn--outline {
  --btn-bg: transparent;
  --btn-color: var(--color-text);
  --btn-border: rgba(148, 163, 184, 0.6);
}

.btn--ghost {
  --btn-bg: rgba(15, 23, 42, 0.8);
  --btn-color: var(--color-text);
  --btn-border: rgba(148, 163, 184, 0.12);
}

.btn--block {
  width: 100%;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: var(--shadow-primary-glow);
}

.btn:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

/* Inputs & form controls */
.input,
select,
textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-subtle);
  background-color: rgba(15, 23, 42, 0.9);
  color: var(--color-text);
  font-size: var(--text-sm);
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal), background-color var(--transition-normal);
}

.input::placeholder,
textarea::placeholder {
  color: var(--gray-500);
}

.input:disabled,
select:disabled,
textarea:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.input--inline {
  width: auto;
}

label {
  display: inline-block;
  margin-bottom: 0.35rem;
  font-size: var(--text-sm);
  color: var(--color-text);
}

.form-field {
  margin-bottom: var(--space-4);
}

.form-help {
  margin-top: 0.25rem;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* Cards - for tournament listings, schedules, testimonials */
.card {
  background: radial-gradient(circle at top left, rgba(46, 242, 166, 0.12), transparent 55%), var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.25);
  padding: var(--space-5);
  box-shadow: var(--shadow-md);
}

.card--subtle {
  background: var(--color-surface-alt);
}

.card__header {
  margin-bottom: var(--space-3);
}

.card__title {
  font-size: var(--text-lg);
}

.card__meta {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
}

.card__footer {
  margin-top: var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

/* Tag chips for game types, limits, sports categories */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(148, 163, 184, 0.4);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.tag--success {
  border-color: rgba(74, 222, 128, 0.5);
  color: var(--color-success);
}

.tag--danger {
  border-color: rgba(251, 59, 106, 0.5);
  color: var(--color-danger);
}

.tag--primary {
  border-color: rgba(46, 242, 166, 0.7);
  color: var(--color-primary);
}

/* Image gallery basics */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-4);
}

.gallery-grid img {
  width: 100%;
  border-radius: var(--radius-md);
  object-fit: cover;
}

/* ==========================
   6. Accessibility & Motion
   ========================== */

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

.btn:focus-visible,
.input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  box-shadow: var(--shadow-primary-glow);
  border-color: var(--color-primary);
}

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

/* ==========================
   7. Layout helpers for nav & hero
   ========================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  backdrop-filter: blur(18px);
  background: linear-gradient(to bottom, rgba(5, 7, 18, 0.9), rgba(5, 7, 18, 0.6));
  border-bottom: 1px solid rgba(15, 23, 42, 0.9);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: 0.75rem;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  list-style: none;
}

.nav-link {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.nav-link--active {
  color: var(--color-primary);
}

.hero {
  padding-block: var(--space-12);
}

.hero__kicker {
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--color-primary);
  margin-bottom: var(--space-2);
}

.hero__title {
  margin-bottom: var(--space-3);
}

.hero__subtitle {
  max-width: 38rem;
}

.hero__actions {
  margin-top: var(--space-5);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

/* ==========================
   8. Tables for schedules & calendars
   ========================== */

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.table thead {
  background-color: rgba(15, 23, 42, 0.9);
}

.table th,
.table td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid rgba(30, 41, 59, 0.9);
}

.table th {
  text-align: left;
  font-weight: 600;
  color: var(--color-text);
}

.table tbody tr:nth-child(odd) {
  background-color: rgba(15, 23, 42, 0.75);
}

.table tbody tr:nth-child(even) {
  background-color: rgba(15, 23, 42, 0.55);
}

.table tbody tr:hover {
  background-color: rgba(46, 242, 166, 0.05);
}

.table--compact th,
.table--compact td {
  padding-block: 0.45rem;
}

/* ==========================
   9. Badges for status (open tables, membership, etc.)
   ========================== */

.status-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background-color: var(--gray-500);
}

.status-dot--live {
  background-color: var(--color-danger);
  box-shadow: 0 0 0 4px rgba(251, 59, 106, 0.28);
}

.status-dot--available {
  background-color: var(--color-success);
  box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.25);
}

.status-dot--planned {
  background-color: var(--color-warning);
  box-shadow: 0 0 0 4px rgba(250, 204, 21, 0.22);
}
