/* ================================================================
   MEDI-DENT · base.css
   Reset globalny i fundamenty typograficzne
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Jost:wght@300;400;500;600&display=swap');

/* ── RESET ──────────────────────────────────────────────────────── */

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

html {
  font-size:               16px;
  scroll-behavior:         smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x:              hidden;
}

body {
  font-family:                var(--font-body);
  font-weight:                400;
  -webkit-font-smoothing:     antialiased;
  -moz-osx-font-smoothing:    grayscale;
  background-color:           var(--color-bg-warm);
  color:                      var(--color-text);
  overflow-x:                 clip;
}

/* ── MEDIA ──────────────────────────────────────────────────────── */

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

img[loading="lazy"] {
  opacity:    0;
  transition: opacity 0.55s var(--ease-out);
}

img[loading="lazy"].is-loaded {
  opacity: 1;
}

/* ── LINKI I LISTY ──────────────────────────────────────────────── */

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

ul,
ol {
  list-style: none;
}

/* ── INTERAKTYWNE ───────────────────────────────────────────────── */

button {
  cursor:     pointer;
  font:       inherit;
  border:     none;
  background: none;
  outline:    none;
}

input,
textarea,
select {
  font: inherit;
}

/* ── NAGŁÓWKI ───────────────────────────────────────────────────── */

h1, h2, h3, h4, h5, h6 {
  font-family:     var(--font-display);
  font-weight:     300;
  line-height:     var(--leading-tight);
  letter-spacing:  var(--tracking-tight);
  color:           var(--color-navy);
}

p {
  line-height: var(--leading-normal);
}

/* ── SCROLLBAR ──────────────────────────────────────────────────── */

::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg-warm);
}

::-webkit-scrollbar-thumb {
  background: var(--color-navy-20);
  border-radius: var(--radius-pill);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-navy-40);
}

/* ── DOSTĘPNOŚĆ ─────────────────────────────────────────────────── */

.skip-link {
  position:      absolute;
  top:           -100%;
  left:          var(--space-4);
  z-index:       999;
  background:    var(--color-navy);
  color:         var(--color-white);
  padding:       var(--space-3) var(--space-5);
  font-size:     var(--text-sm);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  transition:    top 0.2s;
}

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

::selection {
  background: var(--color-navy-12);
  color:      var(--color-navy);
}

:focus-visible {
  outline:        2px solid var(--color-navy);
  outline-offset: 3px;
  border-radius:  var(--radius-sm);
}

.sr-only {
  position:  absolute;
  width:     1px;
  height:    1px;
  overflow:  hidden;
  clip:      rect(0, 0, 0, 0);
  white-space: nowrap;
}

/* ── KOMPONENTY TYPOGRAFICZNE ───────────────────────────────────── */

.label {
  display:         block;
  font-family:     var(--font-body);
  font-size:       var(--text-xs);
  font-weight:     500;
  letter-spacing:  0.14em;
  text-transform:  uppercase;
  color:           var(--color-navy-40);
}

.divider {
  display:       block;
  width:         32px;
  height:        1px;
  background:    var(--color-navy-20);
  margin-block:  var(--space-6);
}

/* Wersje na ciemnym tle */

.section--dark .label {
  color: rgba(255, 255, 255, 0.35);
}

.section--dark .divider {
  background: rgba(255, 255, 255, 0.18);
}

.section--dark h1,
.section--dark h2,
.section--dark h3 {
  color: var(--color-white);
}
