/* ========================================================================
   Polska Social Lounge - Base Styles
   ======================================================================== */

/* ========================================================================
   1. CSS Variables
   ======================================================================== */
:root {
  /* Color Palette */
  --color-bg: #05070b; /* deep near-black */
  --color-bg-alt: #0b0f17; /* graphite */
  --color-surface: #101522; /* card surfaces */
  --color-surface-soft: #141b29;

  --color-text: #f7f7fb; /* primary text */
  --color-text-muted: #a3afc7; /* secondary text */
  --color-text-soft: #7d8aa5;

  --color-primary: #306dff; /* royal / poker blue */
  --color-primary-soft: rgba(48, 109, 255, 0.12);
  --color-primary-strong: #1250f0;

  --color-success: #32d993;
  --color-warning: #ffc857;
  --color-danger: #ff4d6a;

  --color-border-subtle: #222a3b;
  --color-border-strong: #3b4863;

  --color-silver: #c0c7d8;
  --color-silver-soft: rgba(192, 199, 216, 0.4);

  --color-overlay: rgba(0, 0, 0, 0.7);
  --color-focus-ring: rgba(48, 109, 255, 0.65);

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Inter", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  --font-display: "Poppins", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;

  --font-size-xs: 0.75rem;   /* 12px */
  --font-size-sm: 0.875rem;  /* 14px */
  --font-size-base: 1rem;    /* 16px */
  --font-size-md: 1.0625rem; /* 17px - comfortable reading */
  --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.6;
  --line-height-relaxed: 1.8;

  /* Spacing Scale (px) */
  --space-0: 0;
  --space-1: 2px;
  --space-2: 4px;
  --space-3: 6px;
  --space-4: 8px;
  --space-5: 10px;
  --space-6: 12px;
  --space-8: 16px;
  --space-10: 20px;
  --space-12: 24px;
  --space-14: 28px;
  --space-16: 32px;
  --space-20: 40px;
  --space-24: 48px;
  --space-28: 56px;
  --space-32: 64px;
  --space-40: 80px;
  --space-48: 96px;

  /* Radii */
  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 18px;
  --radius-pill: 999px;

  /* Shadows / Glows */
  --shadow-soft: 0 14px 30px rgba(0, 0, 0, 0.45);
  --shadow-card: 0 18px 45px rgba(0, 0, 0, 0.65);
  --shadow-elevated: 0 24px 70px rgba(0, 0, 0, 0.8);
  --shadow-glow-primary: 0 0 0 1px rgba(48, 109, 255, 0.2), 0 0 28px rgba(48, 109, 255, 0.45);

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

  /* Layout */
  --container-max-width: 1200px;
  --container-gutter: 20px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  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%;
}

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

button {
  cursor: pointer;
}

button:disabled,
[disabled] {
  cursor: not-allowed;
}

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

/* Remove default focus outlines; we'll restore with :focus-visible */
:focus {
  outline: none;
}

/* ========================================================================
   3. Base Styles
   ======================================================================== */
body {
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: var(--font-size-md);
  line-height: var(--line-height-normal);
  background: radial-gradient(circle at top, #141b29 0, #05070b 60%, #000 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(--line-height-snug);
  letter-spacing: 0.02em;
  color: var(--color-text);
}

h1 {
  font-size: clamp(var(--font-size-3xl), 3vw + 1rem, var(--font-size-5xl));
  margin-bottom: var(--space-16);
}

h2 {
  font-size: clamp(var(--font-size-2xl), 2.5vw + 0.5rem, var(--font-size-4xl));
  margin-bottom: var(--space-12);
}

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

h4 {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-6);
}

h5 {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-4);
}

h6 {
  font-size: var(--font-size-base);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: var(--space-3);
  color: var(--color-text-muted);
}

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

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

a {
  position: relative;
  transition: color var(--transition-normal),
              text-shadow var(--transition-normal);
}

/* Subtle poker-blue underline on hover */
a:hover {
  color: var(--color-primary);
  text-shadow: 0 0 12px rgba(48, 109, 255, 0.5);
}

a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-silver));
  opacity: 0.85;
  transition: width var(--transition-normal);
}

a:hover::after {
  width: 100%;
}

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

strong {
  font-weight: 600;
}

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

/* ========================================================================
   4. Utilities
   ======================================================================== */

/* 4.1 Layout / Container */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-gutter);
  padding-right: var(--container-gutter);
}

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

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

/* 4.2 Flexbox 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-xs { gap: var(--space-4); }
.gap-sm { gap: var(--space-6); }
.gap-md { gap: var(--space-10); }
.gap-lg { gap: var(--space-16); }
.gap-xl { gap: var(--space-24); }

/* 4.3 Grid Helpers */
.grid {
  display: grid;
  gap: var(--space-16);
}

.grid-2 {
  display: grid;
  gap: var(--space-16);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  display: grid;
  gap: var(--space-16);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

/* 4.4 Visibility - Screen Readers */
.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;
}

.sr-only-focusable:active,
.sr-only-focusable:focus {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

/* 4.5 Text Alignment */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--color-text-muted); }

/* 4.6 Spacing Utilities (Margins / Padding) */
.mt-0 { margin-top: 0; }
.mt-xs { margin-top: var(--space-4); }
.mt-sm { margin-top: var(--space-6); }
.mt-md { margin-top: var(--space-10); }
.mt-lg { margin-top: var(--space-16); }
.mt-xl { margin-top: var(--space-24); }

.mb-0 { margin-bottom: 0; }
.mb-xs { margin-bottom: var(--space-4); }
.mb-sm { margin-bottom: var(--space-6); }
.mb-md { margin-bottom: var(--space-10); }
.mb-lg { margin-bottom: var(--space-16); }
.mb-xl { margin-bottom: var(--space-24); }

.pt-0 { padding-top: 0; }
.pb-0 { padding-bottom: 0; }

/* ========================================================================
   5. Components
   ======================================================================== */

/* 5.1 Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-size: var(--font-size-sm);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-strong));
  color: #ffffff !important;
  box-shadow: var(--shadow-soft);
  transition: background var(--transition-normal),
              transform var(--transition-fast),
              box-shadow var(--transition-normal),
              border-color var(--transition-normal),
              filter var(--transition-normal);
}

.btn:hover {
  background: linear-gradient(135deg, var(--color-primary-strong), #4b84ff);
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow-primary);
  filter: brightness(1.03);
}

.btn:active {
  transform: translateY(0);
  box-shadow: var(--shadow-soft);
  filter: brightness(0.98);
}

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

.btn--ghost:hover {
  background: rgba(16, 21, 34, 0.9);
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px rgba(48, 109, 255, 0.25);
}

.btn--outline {
  background: rgba(10, 14, 26, 0.8);
  border-color: var(--color-primary);
  color: var(--color-text);
}

.btn--outline:hover {
  background: rgba(10, 14, 26, 0.95);
}

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

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

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.5;
  pointer-events: none;
}

/* 5.2 Form Elements */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="search"],
textarea,
select {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-subtle);
  background: rgba(10, 14, 26, 0.85);
  color: var(--color-text);
  font-size: var(--font-size-base);
  line-height: 1.4;
  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);
}

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

select {
  cursor: pointer;
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-focus-ring);
  background-color: rgba(16, 21, 34, 0.95);
}

/* 5.3 Card - Poker / Lounge Styled */
.card {
  position: relative;
  border-radius: var(--radius-xl);
  padding: var(--space-16);
  background: radial-gradient(circle at top left, rgba(48, 109, 255, 0.16) 0, rgba(10, 14, 26, 0.98) 44%, rgba(5, 7, 11, 0.98) 100%);
  border: 1px solid rgba(59, 72, 99, 0.65);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform var(--transition-normal),
              box-shadow var(--transition-normal),
              border-color var(--transition-normal),
              background var(--transition-normal);
}

.card::before {
  content: "";
  position: absolute;
  inset: -120px;
  background: radial-gradient(circle at top right, rgba(48, 109, 255, 0.24), transparent 55%);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-slow);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-elevated);
  border-color: var(--color-primary);
}

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

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

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

.card__subtitle {
  font-size: var(--font-size-sm);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-text-muted);
}

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

/* 5.4 Navigation Hover (for top nav, tabs, etc.) */
.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.75rem;
  font-size: var(--font-size-sm);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-muted);
  transition: color var(--transition-normal),
              text-shadow var(--transition-normal);
}

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

.nav-link:hover,
.nav-link[aria-current="page"] {
  color: var(--color-text);
  text-shadow: 0 0 10px rgba(48, 109, 255, 0.5);
}

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

/* 5.5 Image Frame / Gallery Helper */
.image-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #05070b;
  border: 1px solid rgba(192, 199, 216, 0.15);
  box-shadow: var(--shadow-soft);
}

.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform var(--transition-slow), filter var(--transition-slow);
}

.image-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at bottom, rgba(0, 0, 0, 0.55), transparent 55%);
  mix-blend-mode: multiply;
  pointer-events: none;
}

.image-frame:hover img {
  transform: scale(1.06);
  filter: saturate(1.15);
}

/* ========================================================================
   6. Accessibility & Motion
   ======================================================================== */

/* Focus-visible outline for keyboard users */
:focus-visible {
  outline: 2px solid var(--color-focus-ring);
  outline-offset: 2px;
}

button:focus-visible,
.btn:focus-visible,
[role="button"]:focus-visible,
[tabindex]:focus-visible {
  box-shadow: 0 0 0 1px rgba(5, 7, 11, 0.85), 0 0 0 3px var(--color-focus-ring);
}

/* Respect users preferring reduced motion */
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ========================================================================
   7. Page-Level Helpers (Poker / Lounge Atmosphere)
   ======================================================================== */

/* Poker table texture background helper */
.bg-table {
  background: radial-gradient(circle at top, rgba(192, 199, 216, 0.15), transparent 55%),
              repeating-linear-gradient(135deg, #0c1220 0, #0c1220 2px, #080c16 2px, #080c16 4px);
}

/* Soft blue halo section */
.section--halo {
  position: relative;
}

.section--halo::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  max-width: 70%;
  max-height: 70%;
  background: radial-gradient(circle, rgba(48, 109, 255, 0.12), transparent 65%);
  opacity: 0.9;
  filter: blur(16px);
  pointer-events: none;
  z-index: -1;
}

/* Tag / pill for details like "Wieczór pokerowy", "Dress code" */
.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-4);
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(192, 199, 216, 0.18);
  background: rgba(10, 14, 26, 0.9);
  color: var(--color-text-muted);
  font-size: var(--font-size-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.badge-primary {
  border-color: rgba(48, 109, 255, 0.8);
  background: rgba(48, 109, 255, 0.12);
  color: var(--color-silver);
}

/* Rating stars / subtle accent color */
.text-accent {
  color: var(--color-primary);
}

/* End of base.css */
