/* =====================================
   Variables
   ===================================== */
:root {
  /* Colors */
  --color-background: #05060b; /* deep nightlife background */
  --color-surface: #101320;
  --color-surface-soft: #181c2a;
  --color-text: #f9fafb;
  --color-text-muted: #9ca3af;
  --color-primary: #facc15; /* poker chip / bar neon accent */
  --color-primary-soft: rgba(250, 204, 21, 0.12);
  --color-success: #22c55e;
  --color-warning: #f97316;
  --color-danger: #ef4444;

  --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, "Inter", "Segoe UI", sans-serif;
  --font-display: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

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

  --leading-tight: 1.2;
  --leading-normal: 1.5;
  --leading-relaxed: 1.7;

  /* Spacing scale (px) */
  --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-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 1rem;
  --radius-full: 999px;

  /* Shadows (subtle neon / nightlife) */
  --shadow-sm: 0 4px 10px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.6);
  --shadow-glow-primary: 0 0 25px rgba(250, 204, 21, 0.35);

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

@media (prefers-reduced-motion: reduce) {
  :root {
    --transition-fast: 0ms;
    --transition-base: 0ms;
    --transition-slow: 0ms;
  }
}

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

html {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

body {
  margin: 0;
}

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

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

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

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

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

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

/* Remove focus outline for mouse users, keep for keyboard */
:focus:not(:focus-visible) {
  outline: none;
}

html:focus-within {
  scroll-behavior: smooth;
}

/* =====================================
   Base Styles
   ===================================== */
body {
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  background: radial-gradient(circle at top, #111827 0, #020617 45%, #000000 100%);
  color: var(--color-text);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

main {
  display: block;
}

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

h1 { font-size: clamp(2.25rem, 4vw, 3rem); margin-bottom: var(--space-4); }
h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); margin-bottom: var(--space-3); }
h3 { font-size: clamp(1.5rem, 2.5vw, 1.875rem); margin-bottom: var(--space-3); }
h4 { font-size: 1.25rem; margin-bottom: var(--space-2); }
h5 { font-size: 1.125rem; margin-bottom: var(--space-2); }
h6 { font-size: 1rem; margin-bottom: var(--space-1); }

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

strong {
  font-weight: 600;
}

a {
  cursor: pointer;
  text-decoration: none;
  color: var(--color-primary);
  transition: color var(--transition-fast), opacity var(--transition-fast);
}

a:hover {
  opacity: 0.9;
}

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

code, pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

hr {
  border: none;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  margin: var(--space-6) 0;
}

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

/* Layout */
.container {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
  max-width: 1120px;
}

@media (min-width: 1200px) {
  .container-wide {
    max-width: 1280px;
  }
}

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

.section--dark {
  background: radial-gradient(circle at top, #020617 0, #020617 40%, #000000 100%);
}

.section--surface {
  background-color: var(--color-surface);
}

/* Flex utilities */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.flex-center { justify-content: center; align-items: center; }
.flex-between { justify-content: space-between; align-items: center; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }

.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(1, minmax(0, 1fr));
  gap: var(--space-6);
}

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

/* Spacing utilities (example subset) */
.mt-0 { margin-top: 0; }
.mt-4 { margin-top: var(--space-4); }
.mt-8 { margin-top: var(--space-8); }
.mb-0 { margin-bottom: 0; }
.mb-4 { margin-bottom: var(--space-4); }
.mb-8 { margin-bottom: var(--space-8); }
.pt-8 { padding-top: var(--space-8); }
.pb-8 { padding-bottom: var(--space-8); }

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

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

.bg-surface { background-color: var(--color-surface); }
.bg-surface-soft { background-color: var(--color-surface-soft); }

.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }

/* 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 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color var(--transition-base),
              color var(--transition-base),
              border-color var(--transition-base),
              box-shadow var(--transition-base),
              transform var(--transition-fast);
}

.btn-primary {
  background: linear-gradient(135deg, #facc15, #f97316);
  color: #0b0b0f;
  box-shadow: var(--shadow-md), var(--shadow-glow-primary);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.8), 0 0 30px rgba(250, 204, 21, 0.5);
}

.btn-outline {
  background: rgba(15, 23, 42, 0.85);
  color: var(--color-text);
  border-color: rgba(148, 163, 184, 0.5);
}

.btn-outline:hover {
  border-color: var(--color-primary);
  background: radial-gradient(circle at top, rgba(250, 204, 21, 0.08), rgba(15, 23, 42, 0.9));
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-muted);
}

.btn-ghost:hover {
  color: var(--color-primary);
  background: rgba(15, 23, 42, 0.8);
}

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

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

/* Form elements */
.input,
.textarea,
.select {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(148, 163, 184, 0.5);
  background-color: rgba(15, 23, 42, 0.9);
  color: var(--color-text);
  font-size: var(--text-sm);
  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:focus-visible,
.textarea:focus-visible,
.select:focus-visible {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.4);
}

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

.label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--gray-100);
}

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

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

/* Card - for event highlights, poker nights, bar offers */
.card {
  position: relative;
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  background: radial-gradient(circle at top left, rgba(250, 204, 21, 0.08), #020617 55%);
  border: 1px solid rgba(148, 163, 184, 0.24);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: radial-gradient(circle at top right, rgba(250, 204, 21, 0.16), transparent 55%);
  transition: opacity var(--transition-slow);
  pointer-events: none;
}

.card:hover::before {
  opacity: 1;
}

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

.card-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  margin-bottom: var(--space-1);
}

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

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

/* Tag / pill (e.g., "Poker Night", "Turniej", "Happy Hour") */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid rgba(250, 204, 21, 0.7);
  background-color: rgba(15, 23, 42, 0.85);
  color: var(--color-primary);
}

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

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