:root {
  /* Colors */
  --color-background: #050711;
  --color-surface: #0d101b;
  --color-surface-alt: #141827;
  --color-text: #f5f6fa;
  --color-text-muted: #a1a6b8;
  --color-primary: #00c16a;
  --color-primary-soft: rgba(0, 193, 106, 0.15);
  --color-primary-dark: #009353;
  --color-success: #1dd1a1;
  --color-warning: #ffb142;
  --color-danger: #ff4757;
  --color-info: #3c8dff;

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

  --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.15;
  --line-height-snug: 1.3;
  --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-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 18px;
  --radius-full: 999px;

  /* Shadows (sporty, subtle glow) */
  --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.3);
  --shadow-medium: 0 16px 40px rgba(0, 0, 0, 0.35);
  --shadow-strong: 0 24px 80px rgba(0, 0, 0, 0.45);
  --shadow-focus: 0 0 0 2px #050711, 0 0 0 4px var(--color-primary);

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

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

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

html,
body {
  margin: 0;
  padding: 0;
}

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

body {
  min-height: 100vh;
}

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

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

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

/* Remove default link underlines (re-added in base styles) */
a {
  color: inherit;
  text-decoration: none;
}

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

body {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  background: radial-gradient(circle at top, #11182f 0, #050711 52%, #000000 100%);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
}

main {
  min-height: 60vh;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--line-height-tight);
  letter-spacing: 0.02em;
}

h1 {
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  margin-bottom: var(--space-4);
}

h2 {
  font-size: clamp(2rem, 3vw, 2.5rem);
  margin-bottom: var(--space-3);
}

h3 {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  margin-bottom: var(--space-2);
}

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

p {
  margin-bottom: var(--space-4);
  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),
              opacity var(--transition-fast);
}

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

a:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
  border-radius: var(--radius-sm);
}

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

::selection {
  background: var(--color-primary);
  color: #000;
}

/* ========================================
   Accessibility & Motion
   ======================================== */

:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
}

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

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

/* Layout */

.container {
  width: 100%;
  margin-inline: auto;
  padding-inline: var(--space-4);
  max-width: 1120px;
}

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

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

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

.section--alt {
  background: radial-gradient(circle at top left, #192549 0, #0b0e19 45%, #050711 100%);
}

/* Flex helpers */

.flex {
  display: flex;
}

.flex-row {
  flex-direction: row;
}

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

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

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

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

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

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

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

/* 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: minmax(0, 1fr);
  }
}

/* Text alignment */

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

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

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

/* Spacing utilities (Y-axis) */

.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

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

/* Width helpers */

.w-full { width: 100%; }

/* 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: var(--space-2);
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  font-size: var(--font-size-sm);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    background-color var(--transition-normal),
    color var(--transition-normal),
    border-color var(--transition-normal),
    box-shadow var(--transition-fast),
    transform var(--transition-fast);
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary) 0%, #41f384 100%);
  color: #020308;
  box-shadow: 0 10px 30px rgba(0, 193, 106, 0.35);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 40px rgba(0, 193, 106, 0.45);
}

.btn-outline {
  background: transparent;
  color: var(--color-text);
  border-color: rgba(255, 255, 255, 0.18);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--color-text);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
}

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

.btn:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
}

/* Inputs & Form Fields */

.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

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

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="search"],
select,
textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(9, 12, 25, 0.9);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  transition: border-color var(--transition-fast),
              box-shadow var(--transition-fast),
              background-color var(--transition-fast);
}

input::placeholder,
textarea::placeholder {
  color: rgba(161, 166, 184, 0.6);
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary-soft), 0 0 0 4px rgba(0, 193, 106, 0.35);
  background: rgba(11, 16, 34, 1);
}

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

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

/* Card (for sections: poker area, tournaments, schedules, testimonials) */

.card {
  background: linear-gradient(145deg, rgba(16, 22, 46, 0.96), rgba(7, 9, 20, 0.98));
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.card--subtle {
  background: rgba(8, 11, 24, 0.9);
}

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

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

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

/* Tag / pill, e.g. for tournament type or sport category */

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(4, 7, 18, 0.9);
}

.tag--primary {
  border-color: rgba(0, 193, 106, 0.5);
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

.tag--danger {
  border-color: rgba(255, 71, 87, 0.4);
  background: rgba(255, 71, 87, 0.12);
  color: var(--color-danger);
}

.tag--neutral {
  border-color: rgba(255, 255, 255, 0.16);
}

/* Media wrapper: for gallery & screen previews */

.media-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: #020308;
}

.media-frame img,
.media-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Simple chip list for filters (e.g. sports category, day filters) */

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.chip {
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: var(--font-size-xs);
  cursor: pointer;
  background: rgba(5, 7, 17, 0.9);
  color: var(--color-text-muted);
  transition: background-color var(--transition-fast),
              color var(--transition-fast),
              border-color var(--transition-fast);
}

.chip.is-active {
  background: var(--color-primary-soft);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* Header / Navigation basics (for multi-page PL site) */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(18px);
  background: linear-gradient(180deg, rgba(5, 7, 17, 0.95) 0%, rgba(5, 7, 17, 0.88) 40%, rgba(5, 7, 17, 0.0) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-3);
  gap: var(--space-4);
}

.navbar-logo {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: var(--font-size-sm);
}

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

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

.navbar-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-info));
  transition: width var(--transition-normal);
}

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

.navbar-link:hover::after,
.navbar-link[aria-current="page"]::after {
  width: 100%;
}

.navbar-link[aria-current="page"] {
  color: var(--color-text);
}

/* Footer basics */

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #050711;
  padding-block: var(--space-8);
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-4);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

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

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

/* Simple badge for status ("Otwarte", "Zamknięte", etc.) */

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  background: rgba(7, 19, 16, 0.95);
  color: var(--color-success);
  border: 1px solid rgba(29, 209, 161, 0.4);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--color-success);
  box-shadow: 0 0 0 4px rgba(29, 209, 161, 0.3);
}

/* Responsive nav toggle helper (no JS styles, just base) */

.nav-toggle {
  display: none;
}

@media (max-width: 768px) {
  .navbar-menu {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(5, 7, 17, 0.95);
    color: var(--color-text);
    cursor: pointer;
  }
}
