/* =========================================================
   Base Stylesheet - Event Agency (Casino-Themed)
   Modern luxury, energetic, casino-inspired
   ========================================================= */

/* =========================================================
   1. Root Variables (Kolory, Typografia, Siatka odstępów)
   ========================================================= */
:root {
  /* Kolory główne – dopasowane do stylu: ivory, złoto, beż, teal, srebro */
  --color-background: #f7f4ef;            /* ivory white tło bazowe */
  --color-surface: #fdfbf7;               /* karty, sekcje, karty */
  --color-surface-elevated: rgba(253, 251, 247, 0.92);

  --color-text: #1f2328;                  /* główny kolor tekstu */
  --color-text-soft: #5a6069;             /* tekst pomocniczy */
  --color-text-muted: #8d93a0;

  --color-primary: #0f7d7b;               /* muted teal – CTA, linki */
  --color-primary-soft: rgba(15, 125, 123, 0.08);
  --color-primary-strong: #08605e;

  --color-accent-gold: #d7b47a;           /* soft champagne gold */
  --color-accent-gold-soft: rgba(215, 180, 122, 0.14);

  --color-accent-sand: #d2bfa2;           /* warm sand beige */
  --color-accent-silver: #c3c7ce;         /* brushed silver */

  --color-success: #2f9e66;
  --color-warning: #d38b28;
  --color-danger: #c34747;

  /* Neutralne szarości (UI, obramowania) */
  --gray-50: #f7f7f9;
  --gray-100: #ececf0;
  --gray-200: #d9dce2;
  --gray-300: #c5c9d3;
  --gray-400: #a7acb9;
  --gray-500: #878e9d;
  --gray-600: #696f7d;
  --gray-700: #4b505b;
  --gray-800: #33373f;
  --gray-900: #1d2025;

  /* Gradienty inspirowane kasynem / światłami sceny */
  --gradient-hero: linear-gradient(135deg, rgba(15, 125, 123, 0.93), rgba(215, 180, 122, 0.95));
  --gradient-overlay-soft: radial-gradient(circle at 0 0, rgba(215, 180, 122, 0.35), transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(15, 125, 123, 0.4), transparent 55%);

  /* Typografia – nowoczesna, elegancka */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", sans-serif;
  --font-display: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
  --font-accent: "Playfair Display", "Times New Roman", serif;

  /* Skala fontów (responsywna baza: 16px) */
  --font-size-xs: 0.75rem;   /* 12px */
  --font-size-sm: 0.875rem;  /* 14px */
  --font-size-base: 1rem;    /* 16px */
  --font-size-md: 1.0625rem; /* 17px */
  --font-size-lg: 1.25rem;   /* 20px */
  --font-size-xl: 1.5rem;    /* 24px */
  --font-size-2xl: 1.875rem; /* 30px */
  --font-size-3xl: 2.25rem;  /* 36px */
  --font-size-4xl: 3rem;     /* 48px */
  --font-size-display: clamp(2.5rem, 4vw, 3.75rem);

  /* Wysokości linii */
  --line-height-tight: 1.1;
  --line-height-snug: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.7;

  /* Skala odstępów (px) – wartości w rem (bazowe 16px) */
  --space-0: 0;
  --space-4: 0.25rem;   /* 4px */
  --space-8: 0.5rem;    /* 8px */
  --space-12: 0.75rem;  /* 12px */
  --space-16: 1rem;     /* 16px */
  --space-20: 1.25rem;  /* 20px */
  --space-24: 1.5rem;   /* 24px */
  --space-32: 2rem;     /* 32px */
  --space-40: 2.5rem;   /* 40px */
  --space-48: 3rem;     /* 48px */
  --space-64: 4rem;     /* 64px */
  --space-80: 5rem;     /* 80px */
  --space-96: 6rem;     /* 96px */

  /* Promienie zaokrągleń – eleganckie, ale nie przesadzone */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 18px;
  --radius-pill: 999px;

  /* Cienie – delikatne, luksusowe karty i nagłówki glassmorphism */
  --shadow-soft: 0 10px 30px rgba(13, 30, 52, 0.08);
  --shadow-medium: 0 18px 45px rgba(10, 19, 33, 0.14);
  --shadow-strong: 0 28px 65px rgba(4, 10, 20, 0.3);
  --shadow-glass: 0 18px 60px rgba(3, 9, 21, 0.35);

  /* Przejścia i animacje */
  --transition-fast: 140ms ease-out;
  --transition-base: 220ms ease-out;
  --transition-slow: 360ms ease;

  /* Inne zmienne użytkowe */
  --max-width-page: 1200px;
  --header-height: 72px;
}

/************************************************************
 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;
  min-height: 100vh;
}

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

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

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

button, input, select, textarea {
  font: inherit;
  color: inherit;
  background: none;
  border-radius: 0;
}

button {
  border: none;
  padding: 0;
  cursor: pointer;
}

textarea {
  resize: vertical;
}

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

legend {
  padding: 0;
}

/* Usunięcie migotania przy focus w niektórych przeglądarkach */
::-moz-focus-inner {
  border: 0;
}

/************************************************************
 3. Preferencje użytkownika (ruch, wygładzanie czcionek)
************************************************************/
html {
  font-smooth: always;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/************************************************************
 4. Style bazowe (Body, nagłówki, tekst, linki)
************************************************************/
body {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-relaxed);
  background-color: var(--color-background);
  color: var(--color-text);
  text-rendering: optimizeLegibility;
}

main {
  min-height: calc(100vh - var(--header-height));
}

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: var(--font-size-display);
  margin-bottom: var(--space-24);
}

h2 {
  font-size: var(--font-size-3xl);
  margin-bottom: var(--space-20);
}

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

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

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

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

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

strong, b {
  font-weight: 600;
}

em, i {
  font-style: italic;
}

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

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

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

a:active {
  transform: translateY(1px);
}

hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, rgba(195, 199, 206, 0.1), rgba(195, 199, 206, 0.6), rgba(195, 199, 206, 0.1));
  margin: var(--space-32) 0;
}

/************************************************************
 5. Dostępność – focus-visible
************************************************************/
:focus-visible {
  outline: 2px solid var(--color-accent-gold);
  outline-offset: 3px;
}

:focus {
  outline: none;
}

/************************************************************
 6. Klasy użytkowe i layout (container, flex, grid, sr-only)
************************************************************/
.container {
  width: 100%;
  max-width: var(--max-width-page);
  margin: 0 auto;
  padding-left: var(--space-16);
  padding-right: var(--space-16);
}

.container-wide {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding-left: var(--space-20);
  padding-right: var(--space-20);
}

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

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

/* Flex helpers */
.flex {
  display: 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;
}

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

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

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

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

/* Ukrycie tylko wizualne – dostępne dla screen readerów */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/************************************************************
 7. Komponenty bazowe – przyciski, pola formularzy, karty
************************************************************/
/* Przyciski – styl premium, kasynowy, CTA */
.button,
button,
input[type="button"],
input[type="submit"],
input[type="reset"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-8);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  background-image: linear-gradient(135deg, #0f7d7b, #0c5452);
  color: #ffffff!important;
  font-family: var(--font-display);
  font-size: var(--font-size-sm);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
  box-shadow: 0 10px 30px rgba(4, 27, 40, 0.4);
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-base),
    opacity var(--transition-fast);
  cursor: pointer;
}

.button:hover,
button:hover,
input[type="button"]:hover,
input[type="submit"]:hover,
input[type="reset"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 45px rgba(4, 27, 40, 0.55);
}

.button:active,
button:active,
input[type="button"]:active,
input[type="submit"]:active,
input[type="reset"]:active {
  transform: translateY(1px) scale(0.99);
  box-shadow: 0 8px 20px rgba(4, 27, 40, 0.4);
}

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

/* Wariant przycisku: ghost – szklany, do nagłówka / secondary CTA */
.button-ghost {
  background: rgba(247, 244, 239, 0.06);
  border-color: rgba(253, 251, 247, 0.5);
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(253, 251, 247, 0.24);
  backdrop-filter: blur(18px);
}

.button-ghost:hover {
  background: rgba(247, 244, 239, 0.14);
}

/* Wariant przycisku: outline – złota ramka, jasne tło */
.button-outline {
  background: #fff;
  color: var(--color-primary-strong)!important;
  border-color: rgba(215, 180, 122, 0.85);
  box-shadow: 0 10px 26px rgba(154, 112, 51, 0.23);
}

.button-outline:hover {
  background: rgba(215, 180, 122, 0.08);
  color:#fff!important;
}

/* Elementy formularza: inputs, select, textarea */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="number"],
input[type="password"],
input[type="search"],
select,
textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(151, 157, 170, 0.5);
  background-color: rgba(253, 251, 247, 0.85);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-normal);
  transition:
    border-color var(--transition-base),
    box-shadow var(--transition-base),
    background-color var(--transition-base),
    transform var(--transition-fast);
}

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 rgba(15, 125, 123, 0.6), 0 18px 40px rgba(8, 46, 55, 0.25);
  background-color: #ffffff;
}

input[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: var(--color-danger);
}

label {
  display: block;
  margin-bottom: var(--space-4);
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-text);
}

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

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

/* Karta – uniwersalny komponent na potrzeby: oferty, formaty, case studies */
.card {
  position: relative;
  border-radius: var(--radius-lg);
  background-color: var(--color-surface);
  box-shadow: var(--shadow-soft);
  padding: var(--space-24);
  overflow: hidden;
  transition:
    transform var(--transition-base),
    box-shadow var(--transition-base),
    border-color var(--transition-base),
    background var(--transition-slow);
  border: 1px solid rgba(195, 199, 206, 0.28);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 0 0, rgba(215, 180, 122, 0.12), transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(15, 125, 123, 0.12), transparent 55%);
  opacity: 0;
  transition: opacity var(--transition-slow);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-medium);
}

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

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

.card-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--font-size-xl);
}

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

/* Wariant karty: glass – do nagłówka / sticky navigation, hero overlay */
.card-glass {
  background: linear-gradient(135deg, rgba(15, 29, 46, 0.78), rgba(15, 29, 46, 0.62));
  border-color: rgba(250, 248, 244, 0.24);
  color: #fdfbf7;
  box-shadow: var(--shadow-glass);
  backdrop-filter: blur(18px);
}

.card-glass p {
  color: rgba(247, 244, 239, 0.86);
}

/* Badge – drobne wyróżniki (np. „Nowość”, „Popularne”) */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  background: rgba(215, 180, 122, 0.18);
  color: var(--color-text);
}

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

.badge-soft-silver {
  background: rgba(195, 199, 206, 0.2);
  color: var(--gray-800);
}

/************************************************************
  8. Nagłówek & stopka – style ogólne (bez konkretnego layoutu)
************************************************************/
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(22px);
  background: linear-gradient(
      to bottom,
      rgba(7, 13, 25, 0.92),
      rgba(7, 13, 25, 0.8),
      rgba(7, 13, 25, 0.65)
    );
  border-bottom: 1px solid rgba(253, 251, 247, 0.16);
  box-shadow: 0 18px 45px rgba(2, 4, 12, 0.8);
  color: #fdfbf7;
}

.site-header .nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  font-size: var(--font-size-sm);
  color: rgba(247, 244, 239, 0.8);
  padding: 0.4rem 0;
  transition: color var(--transition-fast);
}

.site-header .nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.3rem;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--color-accent-gold), var(--color-primary));
  transition: width var(--transition-base);
}

.site-header .nav-link:hover {
  color: #ffffff;
}

.site-header .nav-link:hover::after {
  width: 100%;
}

.site-header .nav-link--active {
  color: #ffffff;
}

.site-header .nav-link--active::after {
  width: 100%;
}

.announcement-bar {
  background: radial-gradient(circle at 0 0, rgba(215, 180, 122, 0.32), rgba(215, 180, 122, 0.12));
  color: #1d2025;
  font-size: var(--font-size-xs);
  padding: 0.45rem 0;
  text-align: center;
}

.site-footer {
  background: #f4efe6;
  border-top: 1px solid rgba(195, 199, 206, 0.45);
  padding-top: var(--space-40);
  padding-bottom: var(--space-24);
  color: var(--color-text-soft);
}

.site-footer h4 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--font-size-md);
}

.site-footer a {
  font-size: var(--font-size-sm);
  color: var(--color-text-soft);
}

.site-footer a:hover {
  color: var(--color-primary-strong);
}

.newsletter-invite {
  border-radius: var(--radius-lg);
  padding: var(--space-24);
  background: linear-gradient(135deg, rgba(15, 125, 123, 0.96), rgba(215, 180, 122, 0.96));
  color: #fdfbf7;
  box-shadow: var(--shadow-medium);
}

/************************************************************
 9. Hero & sekcje storytelling (ogólny szkielet)
************************************************************/
.hero {
  position: relative;
  min-height: min(680px, 100vh);
  display: flex;
  align-items: center;
  color: #ffffff;
  background-color: #050711;
  background-image: var(--gradient-hero), var(--gradient-overlay-soft);
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 15% 0%, rgba(255, 255, 255, 0.06), transparent 55%),
    radial-gradient(circle at 85% 100%, rgba(255, 255, 255, 0.08), transparent 55%),
    radial-gradient(circle at 100% 0, rgba(0, 0, 0, 0.45), transparent 55%);
  mix-blend-mode: screen;
  pointer-events: none;
}

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

.hero-kicker {
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.76);
  margin-bottom: var(--space-12);
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--font-size-display);
  line-height: var(--line-height-tight);
  margin-bottom: var(--space-16);
}

.hero-subtitle {
  font-size: var(--font-size-md);
  max-width: 36rem;
  color: rgba(245, 242, 236, 0.95);
}

.hero-cta-group {
  margin-top: var(--space-24);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-12);
}

/* Ogólne odstępy sekcji na stronach usługowych */
.section-label {
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-8);
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--font-size-3xl);
  margin-bottom: var(--space-12);
}

.bg-dark-stage .section-title,.bg-dark-stage .card-title,.bg-deep-teal .section-title,.bg-deep-teal .card-title {
  color: #fdfbf7;
}

.section-intro {
  font-size: var(--font-size-md);
  color: var(--color-text-soft);
}

/************************************************************
 10. Proste klasy stanów / tła do podstron (casino, corporate itd.)
************************************************************/
.bg-ivory {
  background-color: var(--color-background);
}

.bg-sand {
  background-color: #efe1cf;
}

.bg-deep-teal {
  background: radial-gradient(circle at 0 0, #174445, #021a1e);
  color: #fdfbf7;
}

.bg-dark-stage {
  background: radial-gradient(circle at top, #1b222f, #050711 64%);
  color: #fdfbf7;
}

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

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

.text-gold {
  color: var(--color-accent-gold);
}

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

/************************************************************
 11. Media queries – drobne korekty responsywne
************************************************************/
@media (max-width: 767px) {
  .section-padding {
    padding-top: var(--space-40);
    padding-bottom: var(--space-40);
  }

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

  h1 {
    font-size: clamp(2rem, 8vw, 2.5rem);
  }

  h2 {
    font-size: clamp(1.75rem, 6vw, 2.25rem);
  }

  .hero {
    align-items: flex-end;
    padding-top: var(--space-64);
    padding-bottom: var(--space-48);
  }

  .hero-cta-group {
    flex-direction: column;
    align-items: stretch;
  }
}
