/* base.css — reset, typography, focus, accessibility primitives
   Styl portalu Dzień z Energią: nowoczesny, świeży, teal-branded.
   General Sans headings, Satoshi body. */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}

body {
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--c-fg);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  transition: background var(--t-base), color var(--t-base);
  overflow-x: hidden;
}

/* === Typografia nagłówkowa — General Sans (bold, sharp, nowoczesny) === */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--f-head);
  line-height: 1.15;
  letter-spacing: -.01em;
  color: var(--c-fg);
}
h1 { font-size: clamp(1.6rem, 3.5vw, 2.25rem); font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: clamp(1.25rem, 2.5vw, 1.65rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 700; }
h4 { font-size: .95rem; font-weight: 600; color: var(--c-fg-muted); }

p { margin: 0; }
small { font-size: .82rem; color: var(--c-fg-muted); }

/* === Linki — teal accent === */
a {
  color: inherit;
  text-decoration: none;
  transition: color var(--t-fast);
}
a:hover { color: var(--c-teal); }

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

input, textarea, select {
  font: inherit;
  color: inherit;
}

code, pre {
  font-family: var(--f-mono);
  font-size: .88em;
}

/* Focus ring — teal, rounded, z cieniem dla kontrastu na ciemnych tłach */
*:focus-visible {
  outline: 2px solid var(--c-teal-bright);
  outline-offset: 3px;
  border-radius: 2px;
  box-shadow: 0 0 0 4px rgba(13,148,136,.15);
}

/* Visually hidden (screen-readers 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;
}

/* Skip link — teal, rounded */
.skip-link {
  position: absolute;
  top: -40px; left: 1rem;
  background: var(--c-teal-deep);
  color: #fff;
  padding: .6rem 1rem;
  border-radius: var(--r-sm);
  font-family: var(--f-head);
  font-weight: 600;
  z-index: 1000;
}
.skip-link:focus { top: 1rem; color: #fff; text-decoration: none; }

/* Selection — teal highlight */
::selection {
  background: rgba(13,148,136,.15);
  color: var(--c-fg);
}

/* === Utility classes === */
.display { font-family: var(--f-head); font-weight: 800; }
.mono  { font-family: var(--f-mono); font-variant-ligatures: none; }
.overline {
  font-family: var(--f-head);
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--c-teal-deep);
  font-weight: 700;
}
.num { font-variant-numeric: lining-nums tabular-nums; font-feature-settings: "tnum"; }
.hairline { border: 0; border-top: 1px solid var(--c-divider); margin: 0; }
.rule { border: 0; border-top: 1px solid var(--c-border); margin: 0; }
.muted { color: var(--c-fg-muted); }

/* Ambient background glow — delikatna ozdoba */
body::before, body::after {
  content: ''; position: fixed; pointer-events: none; z-index: 0;
  width: 80vw; height: 80vw; max-width: 1000px; max-height: 1000px;
  background: radial-gradient(circle, var(--a-teal-06) 0%, transparent 65%);
  border-radius: 50%;
}
body::before { top: -40%; left: -20%; }
body::after { bottom: -30%; right: -15%; background: radial-gradient(circle, rgba(56,189,248,.03) 0%, transparent 60%); }

/* Scrollbar — teal-tinted */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--c-bg-mid); }
::-webkit-scrollbar-thumb { background: var(--a-teal-25); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--c-teal); }

/* === Noscript banner — ostrzeżenie o wyłączonym JS === */
.noscript-banner {
  max-width: 880px;
  margin: 2rem auto;
  padding: 1.5rem;
  border: 1px solid var(--c-amber);
  background: #fef3c7;
  color: var(--c-fg);
  border-radius: var(--r-md);
}
.noscript-banner h2 { margin: 0 0 .5rem 0; }
.noscript-banner p  { margin: 0 0 .75rem 0; }
.noscript-banner p:last-child { margin-bottom: 0; }

/* Gradient text utility (sekcja headingi) */
.h-gradient {
  background: linear-gradient(135deg, var(--c-fg) 60%, var(--c-teal));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
