/* ==========================================================================
   Variables
   ========================================================================== */
:root {
  /* Color palette */
  --color-bg: #05040a; /* deep, modern background */
  --color-surface: #101420;
  --color-surface-elevated: #181d2b;
  --color-text: #f5f5f7;
  --color-text-muted: #b4b7c5;

  --color-primary: #ff4b6b; /* energetic accent */
  --color-primary-soft: rgba(255, 75, 107, 0.12);
  --color-primary-strong: #ff3257;

  --color-success: #37d996;
  --color-warning: #ffb347;
  --color-danger: #ff5b5b;

  /* Neutral grays for borders and subtle surfaces */
  --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;

  --border-subtle: rgba(255, 255, 255, 0.08);

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", sans-serif;
  --font-heading: system-ui, -apple-system, BlinkMacSystemFont, "Poppins", "Montserrat", "Segoe UI", sans-serif;
  --font-mono: "SF Mono", 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-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.2;
  --line-height-snug: 1.35;
  --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-7: 0.875rem;  /* 14px */
  --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-28: 3.5rem;   /* 56px */
  --space-32: 4rem;     /* 64px */
  --space-40: 5rem;     /* 80px */
  --space-48: 6rem;     /* 96px */

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

  /* Shadows - subtle neon-like for vibrant nightlife feeling */
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 20px 45px rgba(0, 0, 0, 0.7);
  --shadow-glow-primary: 0 0 24px rgba(255, 75, 107, 0.48);

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

  /* Layout */
  --container-width: 1120px;
  --container-width-wide: 1280px;
}

/* Respect prefers-reduced-motion by disabling animations/transitions where possible */
@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;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

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

ul[role='list'],
ol[role='list'] {
  list-style: none;
  padding: 0;
  margin: 0;
}

body {
  min-height: 100vh;
}

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

img {
  height: auto;
}

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

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

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

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

/* Remove default focus outlines, we will re-add accessible styles with :focus-visible */
:focus {
  outline: none;
}

/* ==========================================================================
   Base
   ========================================================================== */
body {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  background-color: var(--color-bg);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: var(--line-height-tight);
  color: var(--color-text);
}

h1 {
  font-size: clamp(2.25rem, 4vw, 3rem);
  letter-spacing: 0.02em;
  margin-bottom: var(--space-12);
}

h2 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  margin-bottom: var(--space-8);
}

h3 {
  font-size: clamp(1.4rem, 2.4vw, 1.75rem);
  margin-bottom: var(--space-6);
}

h4 {
  font-size: 1.25rem;
  margin-bottom: var(--space-4);
}

h5 {
  font-size: 1.1rem;
  margin-bottom: var(--space-3);
}

h6 {
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}

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

p:last-child {
  margin-bottom: 0;
}

strong,
b {
  font-weight: 600;
}

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

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

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

a:active {
  transform: translateY(1px);
}

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

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

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

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

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

.container--wide {
  max-width: var(--container-width-wide);
}

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

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

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

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

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

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

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

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

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

.items-start {
  align-items: flex-start;
}

.items-end {
  align-items: flex-end;
}

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

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

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

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

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

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

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

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--space-6);
  min-height: 1.5rem;
  border-radius: var(--radius-pill);
  font-size: var(--font-size-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-text);
}

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

/* Utility for subtle glass effect, useful for overlays in nightlife aesthetic */
.glass {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.06),
    rgba(255, 255, 255, 0.02)
  );
  backdrop-filter: blur(18px);
}

/* ==========================================================================
   Components
   ========================================================================== */
/* Buttons - base */
.btn {
  --btn-bg: var(--color-primary);
  --btn-bg-hover: var(--color-primary-strong);
  --btn-color: #ffffff;
  --btn-border: transparent;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  padding: 0.7rem 1.55rem;
  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(--font-size-sm);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    background-color var(--transition-base),
    color var(--transition-base),
    box-shadow var(--transition-base),
    transform var(--transition-fast),
    border-color var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.btn:hover {
  background: var(--btn-bg-hover);
  box-shadow: var(--shadow-md), var(--shadow-glow-primary);
  transform: translateY(-1px);
}

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

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

.btn--outline {
  --btn-bg: transparent;
  --btn-bg-hover: rgba(255, 255, 255, 0.05);
  --btn-color: var(--color-text);
  --btn-border: rgba(255, 255, 255, 0.35);
  box-shadow: none;
}

.btn--ghost {
  --btn-bg: transparent;
  --btn-bg-hover: rgba(255, 255, 255, 0.08);
  --btn-color: var(--color-text);
  --btn-border: transparent;
  box-shadow: none;
}

.btn--success {
  --btn-bg: var(--color-success);
  --btn-bg-hover: #26c782;
}

.btn--danger {
  --btn-bg: var(--color-danger);
  --btn-bg-hover: #ff4040;
}

.btn--sm {
  padding: 0.45rem 0.9rem;
  font-size: var(--font-size-xs);
}

.btn--lg {
  padding: 0.9rem 2rem;
  font-size: var(--font-size-base);
}

/* Inputs and form elements */
.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.field__label {
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-text);
}

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

.field__error {
  font-size: var(--font-size-sm);
  color: var(--color-danger);
}

.input,
.textarea,
.select {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background-color: rgba(12, 16, 30, 0.95);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  transition:
    border-color var(--transition-base),
    box-shadow var(--transition-base),
    background-color var(--transition-base);
}

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

.input:focus-visible,
.textarea:focus-visible,
.select:focus-visible {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary), var(--shadow-sm);
}

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

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

/* Card - used for menu highlights, schedule tiles, event offers etc. */
.card {
  background-color: var(--color-surface);
  color: var(--color-text);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  padding: var(--space-16);
  box-shadow: var(--shadow-sm);
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-base),
    border-color var(--transition-base),
    background-color var(--transition-base);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(255, 255, 255, 0.18);
}

.card--elevated {
  background-color: var(--color-surface-elevated);
  box-shadow: var(--shadow-md);
}

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

.card__title {
  font-size: var(--font-size-lg);
  font-weight: 600;
  margin-bottom: var(--space-2);
}

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

.card__body {
  font-size: var(--font-size-sm);
}

.card__meta {
  margin-top: var(--space-8);
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

/* Tag-like label for tournaments, poker nights, and sports events */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.06);
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
}

.tag--live {
  background: rgba(255, 91, 91, 0.16);
  color: var(--color-danger);
}

.tag--poker {
  background: rgba(55, 217, 150, 0.14);
  color: var(--color-success);
}

/* Media wrapper for responsive iframes (event streams, maps) */
.media-frame {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.media-frame iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ==========================================================================
   Layout helpers for hero & overlays (potlance-specific mood)
   ========================================================================== */
.hero {
  position: relative;
  padding-top: var(--space-40);
  padding-bottom: var(--space-40);
  background: radial-gradient(circle at top left, rgba(255, 75, 107, 0.36), transparent 55%),
    radial-gradient(circle at bottom right, rgba(55, 217, 150, 0.24), transparent 55%),
    linear-gradient(135deg, #05040a, #101420);
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.06) 1px, transparent 0);
  background-size: 40px 40px;
  mix-blend-mode: soft-light;
  opacity: 0.3;
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 1;
}

@media (max-width: 768px) {
  .section,
  .section--tight {
    padding-top: var(--space-24);
    padding-bottom: var(--space-24);
  }

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