/* ==========================================================================
   BASE STYLES
   Podstawowe style elementów HTML
   ========================================================================== */

/* ------------------------------------------------------------------
   DOCUMENT
   ------------------------------------------------------------------ */

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--font-normal);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ------------------------------------------------------------------
   HEADINGS
   ------------------------------------------------------------------ */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  color: var(--color-text);
  margin-top: 0;
  margin-bottom: var(--space-4);
}

h1 {
  font-size: var(--text-4xl);
}

h2 {
  font-size: var(--text-3xl);
}

h3 {
  font-size: var(--text-2xl);
}

h4 {
  font-size: var(--text-xl);
}

h5 {
  font-size: var(--text-lg);
}

h6 {
  font-size: var(--text-base);
}

@media (min-width: 768px) {
  h1 {
    font-size: var(--text-5xl);
  }

  h2 {
    font-size: var(--text-4xl);
  }

  h3 {
    font-size: var(--text-3xl);
  }
}

/* ------------------------------------------------------------------
   PARAGRAPHS & TEXT
   ------------------------------------------------------------------ */

p {
  margin-top: 0;
  margin-bottom: var(--space-4);
}

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

strong,
b {
  font-weight: var(--font-bold);
}

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

/* ------------------------------------------------------------------
   LINKS
   ------------------------------------------------------------------ */

a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-accent-dark);
}

a:focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring-color);
  outline-offset: var(--focus-ring-offset);
  border-radius: var(--radius-sm);
}

/* ------------------------------------------------------------------
   LISTS
   ------------------------------------------------------------------ */

ul,
ol {
  margin-top: 0;
  margin-bottom: var(--space-4);
  padding-left: var(--space-6);
}

ul ul,
ul ol,
ol ul,
ol ol {
  margin-bottom: 0;
}

li {
  margin-bottom: var(--space-2);
}

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

/* ------------------------------------------------------------------
   IMAGES
   ------------------------------------------------------------------ */

img {
  max-width: 100%;
  height: auto;
  display: block;
}

figure {
  margin: 0;
}

figcaption {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-2);
}

/* ------------------------------------------------------------------
   BLOCKQUOTES
   ------------------------------------------------------------------ */

blockquote {
  margin: 0 0 var(--space-4);
  padding: var(--space-4) var(--space-6);
  border-left: 4px solid var(--color-accent);
  background-color: var(--color-bg-alt);
  font-style: italic;
}

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

blockquote cite {
  display: block;
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  font-style: normal;
  color: var(--color-text-muted);
}

/* ------------------------------------------------------------------
   HORIZONTAL RULE
   ------------------------------------------------------------------ */

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

/* ------------------------------------------------------------------
   SELECTION
   ------------------------------------------------------------------ */

::selection {
  background-color: var(--color-accent);
  color: white;
}

/* ------------------------------------------------------------------
   FOCUS VISIBLE (Global)
   ------------------------------------------------------------------ */

:focus {
  outline: none;
}

:focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring-color);
  outline-offset: var(--focus-ring-offset);
}

/* ------------------------------------------------------------------
   SKIP LINK (Accessibility)
   ------------------------------------------------------------------ */

.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  z-index: var(--z-tooltip);
  padding: var(--space-3) var(--space-4);
  background-color: var(--color-accent);
  color: white;
  text-decoration: none;
  font-weight: var(--font-semibold);
}

.skip-link:focus {
  top: 0;
}

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



.sr-only-focusable:focus {
  position: static;
  width: auto;
  height: auto;
  padding: inherit;
  margin: inherit;
  overflow: visible;
  clip: auto;
  white-space: inherit;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}