/* =============================================
   Variables
   ============================================= */
:root {
  /* Colors */
  --color-background: #05070b;
  --color-surface: #0b1018;
  --color-surface-alt: #151b26;
  --color-text: #f5f7fb;
  --color-text-muted: #9aa3b8;
  --color-primary: #1f7aff; /* energetic sports accent */
  --color-primary-soft: rgba(31, 122, 255, 0.12);
  --color-success: #16c47f;
  --color-warning: #ffb020;
  --color-danger: #ff4d4f;

  --color-border-subtle: #1e2633;
  --color-border-strong: #323b4a;
  --color-neutral-50: #0b1018;
  --color-neutral-100: #111827;
  --color-neutral-200: #1f2937;
  --color-neutral-300: #374151;
  --color-neutral-400: #4b5563;
  --color-neutral-500: #6b7280;
  --color-neutral-600: #9ca3af;
  --color-neutral-700: #d1d5db;
  --color-neutral-800: #e5e7eb;
  --color-neutral-900: #f9fafb;

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

  --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.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: 12px;
  --radius-xl: 18px;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.25);
  --shadow-medium: 0 18px 45px rgba(0, 0, 0, 0.4);
  --shadow-inset-glow: 0 0 0 1px rgba(255, 255, 255, 0.04), 0 0 24px rgba(31, 122, 255, 0.25);

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

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

html {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
  -webkit-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%;
}

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

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

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

/* Improve text rendering */
body,
input,
button,
textarea,
select {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* =============================================
   Base Styles
   ============================================= */
body {
  min-height: 100vh;
  background-color: var(--color-background);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
}

main {
  display: block;
}

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

h1 { font-size: var(--font-size-4xl); margin-bottom: var(--space-4); }
h2 { font-size: var(--font-size-3xl); margin-bottom: var(--space-3); }
h3 { font-size: var(--font-size-2xl); margin-bottom: var(--space-3); }
h4 { font-size: var(--font-size-xl); margin-bottom: var(--space-2); }
h5 { font-size: var(--font-size-lg); margin-bottom: var(--space-2); }
h6 { font-size: var(--font-size-base); margin-bottom: var(--space-2); text-transform: uppercase; letter-spacing: 0.06em; }

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

strong,
b {
  font-weight: 600;
}

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

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

::selection {
  background: rgba(31, 122, 255, 0.35);
}

/* Links: modern underline on interaction */
a {
  position: relative;
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-base);
}

a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.1em;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, var(--color-primary), transparent 80%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-base);
}

a:hover::after,
a:focus-visible::after {
  transform: scaleX(1);
}

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

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

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

:focus {
  outline: none;
}

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

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

.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 {
    max-width: 1240px;
  }
}

.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); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

/* Grid helpers */
.grid {
  display: grid;
  gap: var(--space-4);
}

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

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

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

  .grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

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

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

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

/* 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 – primary CTAs for registration, booking, schedules */
.button,
button,
[type="button"],
[type="submit"],
[type="reset"] {
  --btn-bg: var(--color-primary);
  --btn-color: #ffffff;
  --btn-border: transparent;

  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 var(--btn-border);
  background: var(--btn-bg);
  color: var(--btn-color);
  font-size: var(--font-size-sm);
  font-weight: 600;
  letter-spacing: 0.04em;
  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);
}

.button--primary {
  --btn-bg: var(--color-primary);
  --btn-border: rgba(255, 255, 255, 0.08);
}

.button--outline {
  --btn-bg: transparent;
  --btn-color: var(--color-text);
  --btn-border: var(--color-border-strong);
}

.button--ghost {
  --btn-bg: rgba(255, 255, 255, 0.02);
  --btn-color: var(--color-text);
  --btn-border: rgba(255, 255, 255, 0.04);
}

.button:hover:not(:disabled),
button:hover:not(:disabled),
[type="button"]:hover:not(:disabled),
[type="submit"]:hover:not(:disabled),
[type="reset"]:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
  filter: brightness(1.05);
}

.button:active:not(:disabled),
button:active:not(:disabled),
[type="button"]:active:not(:disabled),
[type="submit"]:active:not(:disabled),
[type="reset"]:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: none;
}

.button:disabled,
button:disabled,
[type="button"]:disabled,
[type="submit"]:disabled,
[type="reset"]:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

/* Inputs – for forms (registration, rezerwacje stolików) */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="search"],
input[type="password"],
select,
textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-subtle);
  background-color: var(--color-surface);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-snug);
  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,
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 3px rgba(31, 122, 255, 0.3);
}

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

select {
  cursor: pointer;
}

/* Card – for tournament formats, schedules, services */
.card {
  background: radial-gradient(circle at top left, rgba(31, 122, 255, 0.18), transparent 55%),
              var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-subtle);
  padding: var(--space-5);
  box-shadow: var(--shadow-soft);
}

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

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

.card__title {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-1);
}

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

.card__body {
  font-size: var(--font-size-sm);
  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 / pill – useful for tournament type, poziom zaawansowania */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.6rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: var(--font-size-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  background-color: rgba(255, 255, 255, 0.02);
}

.tag--live {
  color: #ff4d4f;
  border-color: rgba(255, 77, 79, 0.6);
  background: rgba(255, 77, 79, 0.08);
}

.tag--poker {
  color: #16c47f;
  border-color: rgba(22, 196, 127, 0.6);
  background: rgba(22, 196, 127, 0.08);
}

.tag--sports {
  color: #1f7aff;
  border-color: rgba(31, 122, 255, 0.6);
  background: rgba(31, 122, 255, 0.08);
}

/* Page section titles (e.g., "Usługi & Aktywności") */
.section-heading {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

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

.section-heading__title {
  font-size: var(--font-size-3xl);
}

.section-heading__subtitle {
  max-width: 640px;
  color: var(--color-text-muted);
}

/* Hero overlay utilities for interactive / sports ambience */
.hero {
  position: relative;
  padding-top: var(--space-16);
  padding-bottom: var(--space-16);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top left, rgba(31, 122, 255, 0.25), transparent 60%),
    radial-gradient(circle at bottom right, rgba(22, 196, 127, 0.18), transparent 55%);
  opacity: 0.6;
  pointer-events: none;
}

.hero__inner {
  position: relative;
}

/* Tables for schedules / tournament structures */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-sm);
}

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

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

.table tbody tr + tr td {
  border-top: 1px solid var(--color-border-subtle);
}

.table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.02);
}

/* Badges for status (np. "Otwarta rejestracja", "Zakończony") */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-pill);
  font-size: var(--font-size-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.badge--success {
  background-color: rgba(22, 196, 127, 0.1);
  color: var(--color-success);
}

.badge--warning {
  background-color: rgba(255, 176, 32, 0.12);
  color: var(--color-warning);
}

.badge--danger {
  background-color: rgba(255, 77, 79, 0.12);
  color: var(--color-danger);
}

/* =============================================
   Misc helpers
   ============================================= */

.max-w-wide { max-width: 880px; }

.hide-overflow { overflow: hidden; }

.text-upper { text-transform: uppercase; }

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

.opacity-muted { opacity: 0.7; }

/* End of base.css */
