/* =========================================================
   POLSKA VIBE PLACE - Base Styles
   Shared foundation for all stylesheets
   ========================================================= */

/* =========================================================
   1. CSS Variables (Design Tokens)
   ========================================================= */
:root {
  /* Color Palette - Dark, premium, lounge */
  --color-bg: #07090c;                 /* Main background - deep, almost black */
  --color-bg-alt: #10141b;             /* Sections / cards background */
  --color-bg-elevated: #171d26;        /* Elevated surfaces */

  --color-text: #f7f7f7;               /* Primary text */
  --color-text-muted: #a5acb8;         /* Secondary / muted text */
  --color-border-subtle: #2a313d;      /* Subtle borders / dividers */

  /* Brand / Accent - inspired by premium poker & lounge tones */
  --color-primary: #d4af37;            /* Gold accent for premium feel */
  --color-primary-soft: rgba(212, 175, 55, 0.12);

  --color-success: #3fd08f;            /* Positive / confirmation */
  --color-success-soft: rgba(63, 208, 143, 0.12);

  --color-warning: #ffb347;            /* Warnings / highlights */
  --color-warning-soft: rgba(255, 179, 71, 0.12);

  --color-danger: #ff4b5c;             /* Errors / critical states */
  --color-danger-soft: rgba(255, 75, 92, 0.12);

  /* Neutral Grays (for subtle UI, dividers, etc.) */
  --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: "Playfair Display", "Cormorant Garamond", "Georgia", 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.2;
  --line-height-snug: 1.35;
  --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-16: 32px;
  --space-20: 40px;
  --space-24: 48px;
  --space-32: 64px;
  --space-40: 80px;
  --space-48: 96px;

  /* Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 18px;
  --radius-full: 999px;

  /* Shadows - soft, atmospheric */
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-medium: 0 18px 45px rgba(0, 0, 0, 0.45);
  --shadow-strong: 0 25px 60px rgba(0, 0, 0, 0.65);

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

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

/* =========================================================
   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, ol {
  margin: 0;
  padding: 0;
}

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

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

img {
  height: auto;
}

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

/* Remove default list styles */
ul[role="list"],
ol[role="list"],
ul,
ol {
  list-style: none;
}

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

/* Make sure focus styles are visible even without mouse */
:focus {
  outline: none;
}

/* =========================================================
   3. Base Styles
   ========================================================= */
body {
  min-height: 100vh;
  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;
}

main {
  display: block;
}

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

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

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

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

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

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

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

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

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

strong {
  font-weight: 600;
}

em {
  font-style: italic;
}

/* Links - subtle but premium, highlight on hover */
a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-base),
              opacity var(--transition-base),
              text-shadow var(--transition-base);
}

a:hover {
  color: #ffffff;
  text-shadow: 0 0 18px rgba(212, 175, 55, 0.4);
}

a:active {
  opacity: 0.9;
}

/* =========================================================
   4. Accessibility & Focus
   ========================================================= */
: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);
  white-space: nowrap;
  border: 0;
}

/* Reduce animations & smooth scrolling if user prefers */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* =========================================================
   5. Layout Utilities
   ========================================================= */
/* Centered page container with safe padding */
.container {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: var(--space-16);
}

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

/* Full-width section with vertical spacing */
.section {
  padding-block: var(--space-32);
}

@media (min-width: 768px) {
  .section {
    padding-block: var(--space-40);
  }
}

/* Flex utilities */
.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-8);
}

.gap-md {
  gap: var(--space-12);
}

.gap-lg {
  gap: var(--space-16);
}

.gap-xl {
  gap: var(--space-24);
}

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

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

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

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

/* Text alignment utilities */
.text-center {
  text-align: center;
}

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

/* Spacing utilities (margin / padding shortcuts) */
.m-auto { margin: auto; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-sm { margin-top: var(--space-8); }
.mb-sm { margin-bottom: var(--space-8); }
.mt-md { margin-top: var(--space-16); }
.mb-md { margin-bottom: var(--space-16); }
.mt-lg { margin-top: var(--space-24); }
.mb-lg { margin-bottom: var(--space-24); }

.pt-md { padding-top: var(--space-16); }
.pb-md { padding-bottom: var(--space-16); }
.pt-lg { padding-top: var(--space-24); }
.pb-lg { padding-bottom: var(--space-24); }

/* =========================================================
   6. Core Components
   ========================================================= */
/* Button - primary CTA (rezerwacja, wieczór pokerowy, etc.) */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  padding: 0.75rem 1.8rem;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  background: linear-gradient(135deg, #f5d56b, var(--color-primary));
  color: #1b1304;
  font-size: var(--font-size-sm);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform var(--transition-fast),
              box-shadow var(--transition-fast),
              filter var(--transition-fast),
              background var(--transition-fast);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.55);
  white-space: nowrap;
}

.button:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.7);
}

.button:active {
  transform: translateY(0);
  filter: brightness(0.97);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

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

.button-secondary {
  background: transparent;
  color: var(--color-text);
  border-color: rgba(212, 175, 55, 0.5);
  box-shadow: none;
}

.button-secondary:hover {
  background: var(--color-primary-soft);
  box-shadow: var(--shadow-soft);
}

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

.button-ghost:hover {
  background: rgba(255, 255, 255, 0.04);
}

/* Input & Form Elements */
.input,
.textarea,
.select {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-subtle);
  background-color: #05070a;
  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(--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(212, 175, 55, 0.7), 0 18px 40px rgba(0, 0, 0, 0.75);
  background-color: #080b10;
}

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

.select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--color-text-muted) 52%),
                    linear-gradient(135deg, var(--color-text-muted) 48%, transparent 50%);
  background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 2.2rem;
}

/* Labels */
.label {
  display: block;
  margin-bottom: var(--space-4);
  font-size: var(--font-size-sm);
  color: var(--color-text);
}

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

.form-error {
  margin-top: var(--space-4);
  font-size: var(--font-size-xs);
  color: var(--color-danger);
}

/* Card - for menu items, poker nights, etc. */
.card {
  position: relative;
  background: radial-gradient(circle at top left, rgba(212, 175, 55, 0.08), transparent 55%),
              radial-gradient(circle at bottom right, rgba(255, 75, 92, 0.06), transparent 55%),
              var(--color-bg-alt);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.03);
  padding: var(--space-16);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.card--elevated {
  box-shadow: var(--shadow-medium);
}

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

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

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

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

/* Tag / pill for statuses like "Wieczór pokerowy", "Rezerwacja" */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.7rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

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

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

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

/* =========================================================
   7. Misc Helpers
   ========================================================= */
/* Subtle divider for dark UI */
.divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
  margin-block: var(--space-16);
}

/* Subtle overlay - can be used on hero sections / images */
.overlay-dark {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(0, 0, 0, 0.65), transparent 55%),
              linear-gradient(to bottom, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.95));
}

/* Max-width text for improved readability in content sections */
.text-prose {
  max-width: 62ch;
}

/* Z-index helpers */
.z-1 { z-index: 1; }
.z-10 { z-index: 10; }
.z-20 { z-index: 20; }

/* Cursor helper */
.cursor-pointer { cursor: pointer; }
