/* Project Warsaw - reset, fonty, typografia bazowa, tlo globalne. */

/* --- Fonty hostowane lokalnie (bez zewnetrznych CDN, zgodne z CSP 'self') --- */
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../assets/fonts/montserrat-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../assets/fonts/montserrat-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../assets/fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../assets/fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- Reset --- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--space-m));
}

body {
  min-height: 100svh;
  background-color: var(--pw-bg-deep);
  color: var(--pw-text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  font-synthesis-weight: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
picture,
svg,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

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

button {
  cursor: pointer;
  background: none;
  border: none;
}

ul[class],
ol[class] {
  list-style: none;
  padding: 0;
}

/* Atrybut hidden musi wygrywac z display ustawionym w komponentach. */
[hidden] {
  display: none !important;
}

:target {
  scroll-margin-top: calc(var(--header-h) + var(--space-m));
}

/* --- Tlo globalne: gradient marki + delikatna poswiata --- */
.site-bg {
  position: fixed;
  inset: 0;
  z-index: var(--z-bg);
  pointer-events: none;
  background:
    radial-gradient(
      120% 80% at 12% -10%,
      color-mix(in srgb, var(--pw-blue) 16%, transparent) 0%,
      transparent 58%
    ),
    radial-gradient(
      90% 70% at 92% 8%,
      color-mix(in srgb, var(--pw-blue-deep) 14%, transparent) 0%,
      transparent 60%
    ),
    linear-gradient(168deg, var(--pw-bg-deep) 0%, var(--pw-bg) 46%, #15150f 100%);
}

.site-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.5;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.22'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

/* --- Typografia --- */
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.015em;
  text-wrap: balance;
  color: var(--pw-white);
}

h1 {
  font-size: var(--step-4);
}
h2 {
  font-size: var(--step-3);
}
h3 {
  font-size: var(--step-2);
}
h4 {
  font-size: var(--step-1);
}

p,
li {
  text-wrap: pretty;
}

a {
  color: var(--pw-blue-bright);
  text-decoration-color: color-mix(in srgb, var(--pw-blue-bright) 40%, transparent);
  text-underline-offset: 0.2em;
  transition: color var(--dur-fast) var(--ease-out);
}

a:hover {
  color: var(--pw-white);
}

strong {
  color: var(--pw-white);
  font-weight: 600;
}

code,
kbd {
  font-family: ui-monospace, "Cascadia Mono", "Consolas", monospace;
  font-size: 0.9em;
  background: rgb(255 255 255 / 0.07);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-s);
  padding: 0.1em 0.4em;
}

::selection {
  background: color-mix(in srgb, var(--pw-blue) 55%, transparent);
  color: var(--pw-white);
}

/* --- Dostepnosc --- */
:focus-visible {
  outline: 2px solid var(--pw-blue-bright);
  outline-offset: 3px;
  border-radius: var(--radius-s);
}

.skip-link {
  position: absolute;
  left: var(--space-s);
  top: var(--space-s);
  z-index: 999;
  transform: translateY(-200%);
  background: var(--pw-blue);
  color: var(--pw-white);
  font-weight: 600;
  padding: var(--space-2xs) var(--space-s);
  border-radius: var(--radius-s);
  text-decoration: none;
  transition: transform var(--dur) var(--ease-out);
}

.skip-link:focus-visible {
  transform: translateY(0);
  color: var(--pw-white);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* --- Pasek przewijania --- */
@supports selector(::-webkit-scrollbar) {
  ::-webkit-scrollbar {
    width: 11px;
    height: 11px;
  }
  ::-webkit-scrollbar-track {
    background: var(--pw-bg-deep);
  }
  ::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--pw-blue) 45%, var(--pw-bg-soft));
    border-radius: var(--radius-pill);
    border: 3px solid var(--pw-bg-deep);
  }
  ::-webkit-scrollbar-thumb:hover {
    background: var(--pw-blue);
  }
}

/* --- Ograniczenie ruchu --- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* --- Wydruk --- */
@media print {
  .site-bg,
  .site-header,
  .site-footer,
  .to-top {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
  }
}
