/* AVENTECH Innovation — base.css
   Bazowa typografia, layout dokumentu, utility classes.
   Korzysta wyłącznie ze zmiennych z tokens.css.
*/

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
  line-height: var(--lh-base);
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* === Nagłówki === */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
  color: var(--color-text);
}

h1 { font-size: var(--fs-4xl); margin-bottom: var(--space-4); }
h2 { font-size: var(--fs-3xl); margin-bottom: var(--space-4); }
h3 { font-size: var(--fs-2xl); margin-bottom: var(--space-3); }
h4 { font-size: var(--fs-xl);  margin-bottom: var(--space-2); }

/* === Tekst === */
p {
  margin-bottom: var(--space-4);
}

ul, ol {
  margin-bottom: var(--space-4);
}

a {
  color: var(--color-accent);
  transition: color var(--transition-base);
}

a:hover {
  color: var(--color-orange);
}

/* === Layout: główny <main> === */
main {
  flex: 1;
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--space-8) var(--container-padding);
}

/* === Utility: container === */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-padding);
}

/* === Utility: pionowy padding sekcji === */
.section-py {
  padding-block: var(--space-16);
}

@media (max-width: 768px) {
  .section-py {
    padding-block: var(--space-10);
  }
}

/* === Utility: ukrycie wizualne (a11y) === */
.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;
}

/* === Focus visible — globalnie === */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Element bez :focus-visible (np. po kliknięciu myszą) — bez outline */
:focus:not(:focus-visible) {
  outline: none;
}

/* === Selekcja tekstu === */
::selection {
  background: var(--color-accent);
  color: var(--color-text-inverse);
}
