* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

:root {
  /* === Paleta: Butelkowa zieleń + Papier gazetowy === */
  --bg:           #F4EFE6;
  --surface:      #FFFFFF;
  --surface-warm: #FDFBF7;

  --border:       #D6CEC3;
  --border-light: #E8E3DA;

  --text-primary:   #181818;
  --text-secondary: #383838;
  --text-muted:     #6A6A6A;

  /* Butelkowa zieleń */
  --green-900: #0F2418;
  --green-800: #1B3A2D;
  --green-700: #2C5F4A;
  --green-600: #3A7055;
  --green-400: #68B093;
  --green-100: #E4F0EB;
  --green-50:  #F0F7F4;

  --error:    #B91C1C;
  --error-bg: #FEF2F2;

  /* === Typografia === */
  --font-display: var(--font-playfair), Georgia, 'Times New Roman', serif;
  --font-body:    var(--font-source-serif), Georgia, 'Times New Roman', serif;
  --font-ui:      var(--font-inter), -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* === Promienie === */
  --radius-sm:   8px;
  --radius-md:   14px;
  --radius-lg:   20px;
  --radius-xl:   28px;
  --radius-pill: 999px;

  /* === Przejścia === */
  --transition-fast: 0.16s ease;
  --transition-base: 0.2s ease;
  --transition-slow: 0.35s ease;
}

/* Ciemna paleta */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:           #0D1411;
    --surface:      #141C18;
    --surface-warm: #1A2420;
    --border:       #2C3A34;
    --border-light: #223029;
    --text-primary:   #EDE9E0;
    --text-secondary: #C0BCB4;
    --text-muted:     #7A8880;
    --green-900: #D4EDE0;
    --green-800: #B8DCCA;
    --green-700: #5BA882;
    --green-600: #6DB894;
    --green-400: #8DCEB0;
    --green-100: #1A2F24;
    --green-50:  #141F1A;
    --error:    #F87171;
    --error-bg: #2D1515;
  }
}

:root[data-theme="dark"] {
  --bg:           #0D1411;
  --surface:      #141C18;
  --surface-warm: #1A2420;
  --border:       #2C3A34;
  --border-light: #223029;
  --text-primary:   #EDE9E0;
  --text-secondary: #C0BCB4;
  --text-muted:     #7A8880;
  --green-900: #D4EDE0;
  --green-800: #B8DCCA;
  --green-700: #5BA882;
  --green-600: #6DB894;
  --green-400: #8DCEB0;
  --green-100: #1A2F24;
  --green-50:  #141F1A;
  --error:    #F87171;
  --error-bg: #2D1515;
}

:root[data-theme="light"] {
  --bg:           #F4EFE6;
  --surface:      #FFFFFF;
  --surface-warm: #FDFBF7;
  --border:       #D6CEC3;
  --border-light: #E8E3DA;
  --text-primary:   #181818;
  --text-secondary: #383838;
  --text-muted:     #6A6A6A;
  --green-900: #0F2418;
  --green-800: #1B3A2D;
  --green-700: #2C5F4A;
  --green-600: #3A7055;
  --green-400: #68B093;
  --green-100: #E4F0EB;
  --green-50:  #F0F7F4;
  --error:    #B91C1C;
  --error-bg: #FEF2F2;
}

html,
body {
  max-width: 100vw;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--bg);
  color: var(--text-primary);
  font-size: 16px;
  line-height: 1.65;
}

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

a:hover {
  color: var(--green-700);
}

/* Dostępność: widoczny focus */
:focus-visible {
  outline: 3px solid var(--green-400);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 5px;
}
::-webkit-scrollbar-track {
  background: var(--border-light);
}
::-webkit-scrollbar-thumb {
  background: var(--green-600);
  border-radius: var(--radius-pill);
}

/* === Animacje scroll (Intersection Observer) === */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* === Użyteczne klasy pomocnicze === */
.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;
}
