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

:root {
  /* Color Palette - Dark, modern, energetic */
  --color-bg: #05070d;
  --color-bg-elevated: #0c101a;
  --color-bg-subtle: #151927;

  --color-text: #f5f7ff;
  --color-text-muted: #a3abc4;

  --color-primary: #ff3b6d;
  --color-primary-soft: rgba(255, 59, 109, 0.14);

  --color-success: #35d69b;
  --color-success-soft: rgba(53, 214, 155, 0.16);

  --color-warning: #ffb648;
  --color-warning-soft: rgba(255, 182, 72, 0.16);

  --color-danger: #ff4e50;
  --color-danger-soft: rgba(255, 78, 80, 0.16);

  --color-border-subtle: #222638;
  --color-border-strong: #343850;

  --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, Ubuntu, "Open Sans", sans-serif;
  --font-display: "Montserrat", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-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-md: 1rem;      /* 16px */
  --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.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-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-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --radius-xl: 24px;
  --radius-pill: 999px;

  /* Shadows (subtle neon / stage lights) */
  --shadow-soft: 0 8px 18px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 18px 45px rgba(0, 0, 0, 0.55);
  --shadow-glow-primary: 0 0 24px rgba(255, 59, 109, 0.55);

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

  /* Layout */
  --max-width-page: 1120px;
}

/* Reduced motion overrides */
@media (prefers-reduced-motion: reduce) {
  :root {
    --transition-fast: 0ms;
    --transition-normal: 0ms;
    --transition-slow: 0ms;
  }
}

/* ========================================================================== */
/* 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[class], ol[class] {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

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

textarea {
  resize: vertical;
}

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

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

body {
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: var(--font-size-md);
  line-height: var(--line-height-normal);
  background-color: var(--color-bg);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  display: block;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--color-text);
}

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

h2 {
  font-size: clamp(var(--font-size-2xl), 2.4vw, var(--font-size-4xl));
  line-height: var(--line-height-snug);
  margin-bottom: var(--space-3);
}

h3 {
  font-size: var(--font-size-xl);
  line-height: var(--line-height-snug);
  margin-bottom: var(--space-2);
}

h4 {
  font-size: var(--font-size-lg);
  line-height: var(--line-height-normal);
  margin-bottom: var(--space-2);
}

p {
  margin-bottom: var(--space-3);
  color: var(--color-text-muted);
}

strong {
  font-weight: 600;
}

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

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-normal);
}

a:hover {
  color: #ff688d;
}

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

/* ========================================================================== */
/* Accessibility                                                              */
/* ========================================================================== */

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

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

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

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

/* Layout */

.container {
  width: 100%;
  max-width: var(--max-width-page);
  margin: 0 auto;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}

@media (min-width: 1024px) {
  .container {
    padding-left: var(--space-6);
    padding-right: var(--space-6);
  }
}

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

.section--tight {
  padding-top: var(--space-8);
  padding-bottom: var(--space-8);
}

/* 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-2 {
  gap: var(--space-2);
}

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

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

/* Grid helpers */

.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: 1fr;
  }
}

/* Alignment & text */

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

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

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

/* Spacing utilities (subset for common layout tasks) */

.mt-0 { margin-top: 0; }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }

.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }

.pt-4 { padding-top: var(--space-4); }
.pb-4 { padding-bottom: var(--space-4); }

/* Badges / chips (for tournament status, seating, etc.) */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  font-size: var(--font-size-xs);
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.badge--success {
  background-color: var(--color-success-soft);
  color: var(--color-success);
}

.badge--warning {
  background-color: var(--color-warning-soft);
  color: var(--color-warning);
}

.badge--danger {
  background-color: var(--color-danger-soft);
  color: var(--color-danger);
}

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

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-size: var(--font-size-sm);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  background: var(--color-primary);
  color: #0b0c12;
  box-shadow: 0 0 0 1px rgba(255, 59, 109, 0.2), var(--shadow-soft);
  transition:
    background-color var(--transition-normal),
    box-shadow var(--transition-normal),
    transform var(--transition-fast),
    border-color var(--transition-normal),
    color var(--transition-normal);
}

.button:hover {
  background-color: #fff !important;
  box-shadow: var(--shadow-glow-primary);
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(0);
  box-shadow: 0 0 0 1px rgba(255, 59, 109, 0.5);
}

.button:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.button--ghost {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border-subtle);
  box-shadow: none;
}

.button--ghost:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px rgba(255, 59, 109, 0.4);
}

.button--secondary {
  background: linear-gradient(135deg, #22273a, #151927);
  color: var(--color-text);
  border-color: var(--color-border-subtle);
}

.button--secondary:hover {
  background: linear-gradient(135deg, #272c40, #1a1f32);
}

.button--full {
  width: 100%;
}

.button[disabled],
.button--disabled {
  cursor: not-allowed;
  opacity: 0.5;
  box-shadow: none;
  transform: none;
}

/* Form inputs */

.input,
.select,
.textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-subtle);
  background-color: rgba(10, 13, 24, 0.9);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  transition:
    border-color var(--transition-normal),
    box-shadow var(--transition-normal),
    background-color var(--transition-normal);
}

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

.input:focus-visible,
.select:focus-visible,
.textarea:focus-visible {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px rgba(255, 59, 109, 0.6);
}

.input[disabled],
.select[disabled],
.textarea[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

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

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

.form-helper {
  margin-top: var(--space-1);
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.form-error {
  margin-top: var(--space-1);
  font-size: var(--font-size-xs);
  color: var(--color-danger);
}

/* Cards - for tournaments, events, schedules */

.card {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-subtle);
  background: radial-gradient(circle at top left, rgba(255, 59, 109, 0.12), transparent 55%),
              radial-gradient(circle at bottom right, rgba(53, 214, 155, 0.07), transparent 55%),
              linear-gradient(145deg, #070912, #05070d 60%, #05070d);
  padding: var(--space-5);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.card--subtle {
  background: linear-gradient(145deg, #0a0d16, #05070d);
}

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

.card-title {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-1);
}

.card-meta {
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  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 row for poker formats / event types */

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: var(--space-2);
}

.tag {
  padding: 0.1rem 0.55rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

/* Simple table styles (for schedules / seating lists) */

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

.table thead {
  background: rgba(21, 25, 39, 0.9);
}

.table th,
.table td {
  padding: 0.75rem 0.75rem;
  text-align: left;
}

.table th {
  font-weight: 500;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border-strong);
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.table tbody tr:nth-child(even) {
  background: rgba(9, 12, 24, 0.9);
}

.table tbody tr:hover {
  background: rgba(18, 24, 45, 0.95);
}

.table td {
  border-bottom: 1px solid var(--color-border-subtle);
}

/* Pills for status indicators (e.g. seats available) */

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.4rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  font-size: var(--font-size-xs);
  font-weight: 500;
}

.status-pill--open {
  background-color: var(--color-success-soft);
  color: var(--color-success);
}

.status-pill--limited {
  background-color: var(--color-warning-soft);
  color: var(--color-warning);
}

.status-pill--full {
  background-color: var(--color-danger-soft);
  color: var(--color-danger);
}

/* Hero / page header helper */

.page-hero {
  padding-top: var(--space-16);
  padding-bottom: var(--space-10);
}

.page-eyebrow {
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}

.page-title {
  font-size: clamp(var(--font-size-3xl), 3vw, var(--font-size-4xl));
  line-height: var(--line-height-tight);
  margin-bottom: var(--space-3);
}

.page-subtitle {
  max-width: 36rem;
  font-size: var(--font-size-md);
}

/* Navigation baseline (no layout constraints) */

.navbar {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(12px);
  background: linear-gradient(to bottom, rgba(5, 7, 13, 0.96), rgba(5, 7, 13, 0.8));
  border-bottom: 1px solid rgba(35, 41, 70, 0.8);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-size: var(--font-size-sm);
}

.nav-link {
  position: relative;
  color: var(--color-text-muted);
  padding: 0.25rem 0;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.2rem;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary), #ffb648);
  transition: width var(--transition-normal);
}

.nav-link:hover {
  color: var(--color-text);
}

.nav-link:hover::after,
.nav-link--active::after {
  width: 100%;
}

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

/* Footer baseline */

.site-footer {
  border-top: 1px solid var(--color-border-subtle);
  background: #04050b;
  padding-top: var(--space-6);
  padding-bottom: var(--space-6);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.site-footer a {
  color: inherit;
}

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