/* ==========================================================================
   iPrintWall — base.css
   Design tokens, reset, typografia.
   System wizualny: głęboka czerń + gradient głowicy drukującej z logo.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Fonty (self-hosted — brak zapytań do zewnętrznych serwerów)
   -------------------------------------------------------------------------- */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('../fonts/manrope-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: 'Manrope';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('../fonts/manrope-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;
}

/* --------------------------------------------------------------------------
   2. Tokeny
   -------------------------------------------------------------------------- */
:root {
  /* Kolory marki — pobrane z gradientu w logo iPrintWall */
  --brand-orange:  #FF5F1F;
  --brand-red:     #F0243C;
  --brand-magenta: #E01B84;
  --brand-violet:  #7A2FF2;
  --brand-blue:    #1D5BFF;

  /* Akcent — jeden kolor wiodący */
  --accent:        #E01B84;
  --accent-bright: #FF3D9A;   /* jaśniejszy wariant do tekstu na czerni (AA) */
  --accent-deep:   #B01166;
  --accent-soft:   rgba(224, 27, 132, 0.14);

  /* Sygnaturowy gradient „głowicy drukującej” */
  --print-line: linear-gradient(180deg,
    var(--brand-orange) 0%,
    var(--brand-red) 24%,
    var(--brand-magenta) 48%,
    var(--brand-violet) 76%,
    var(--brand-blue) 100%);
  --print-line-h: linear-gradient(90deg,
    var(--brand-orange) 0%,
    var(--brand-red) 24%,
    var(--brand-magenta) 48%,
    var(--brand-violet) 76%,
    var(--brand-blue) 100%);

  /* Wariant do TEKSTU. Ten sam rytm kolorów co w gradiencie głowicy, ale
     rozjaśniony: fiolet i błękit z --print-line-h mają na czerni 3,35:1
     i 3,8:1, czyli za mało dla zwykłego tekstu (próg WCAG to 4,5:1).
     Tu każdy przystanek trzyma co najmniej 6:1. */
  --print-text: linear-gradient(90deg,
    #FF7A1F 0%,
    #FF4D63 26%,
    #FF3D9A 52%,
    #B47CFF 78%,
    #5B9CFF 100%);

  /* Powierzchnie */
  --bg:          #08080A;
  --bg-raise:    #0E0E12;
  --bg-card:     #121216;
  --bg-elevated: #17171C;

  /* Tekst */
  --fg:        #F6F6F8;
  --fg-muted:  #A0A0AC;
  --fg-dim:    #6E6E7A;

  /* Linie */
  --line:        rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);

  /* Promienie — ostre, „architektoniczne” */
  --r:    4px;
  --r-lg: 8px;

  /* Rytm */
  --gutter:  clamp(20px, 4vw, 56px);
  --maxw:    1320px;
  --maxw-wide: 1560px;
  --maxw-text: 68ch;
  --section-y: clamp(76px, 10vw, 152px);

  /* Ruch */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur: 0.5s;

  /* Warstwy */
  /* Header musi być NAD panelem mobilnym, żeby przycisk zamykania (X) był klikalny */
  --z-menu: 110;
  --z-header: 120;
  --z-lightbox: 200;
  --z-cookie: 150;
  --z-preloader: 300;

  color-scheme: dark;
}

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

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: clamp(1rem, 0.965rem + 0.17vw, 1.0625rem);
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

body.is-locked { overflow: hidden; }

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

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

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

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

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

/* Zawijanie: dlugie slowa lamiemy tylko w tekscie ciaglym.
   Naglowki nigdy — polskie zlozenia typu „podwykonawcow" rozjezdzaly sie
   w polowie wyrazu, gdy kolumna byla waska. */
p, li, figcaption { overflow-wrap: break-word; }
h1, h2, h3, h4 { overflow-wrap: normal; hyphens: manual; }

hr { border: 0; height: 1px; background: var(--line); }

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

/* --------------------------------------------------------------------------
   4. Typografia
   -------------------------------------------------------------------------- */
h1, h2, h3, h4 {
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.t-display {
  font-size: clamp(2.3rem, 1rem + 5.6vw, 5.75rem);
  line-height: 0.98;
  letter-spacing: -0.042em;
}

.t-h2 {
  font-size: clamp(1.95rem, 1.05rem + 3.4vw, 3.4rem);
  letter-spacing: -0.038em;
}

.t-h3 {
  font-size: clamp(1.2rem, 1.05rem + 0.75vw, 1.6rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.t-h4 {
  font-size: clamp(1.05rem, 1rem + 0.3vw, 1.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.t-lead {
  font-size: clamp(1.075rem, 1rem + 0.5vw, 1.3rem);
  line-height: 1.6;
  color: var(--fg-muted);
  font-weight: 400;
  max-width: var(--maxw-text);
  text-wrap: pretty;
}

.t-body { color: var(--fg-muted); max-width: var(--maxw-text); text-wrap: pretty; }

.t-small { font-size: 0.9375rem; line-height: 1.65; color: var(--fg-muted); }

.t-mono {
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
}

/* Eyebrow — etykieta sekcji z pionową kreską gradientu */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-bottom: 20px;
}
.eyebrow::before {
  content: '';
  width: 2px;
  height: 1.15em;
  background: var(--print-line);
  flex: none;
}

.accent { color: var(--accent-bright); }

/* Tekst wypełniony gradientem — używany oszczędnie */
.grad-text {
  background: var(--print-line-h);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* --------------------------------------------------------------------------
   5. Dostępność
   -------------------------------------------------------------------------- */
:where(a, button, input, textarea, select, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 400;
  padding: 12px 20px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  border-radius: var(--r);
  transform: translateY(-160%);
  transition: transform 0.2s var(--ease);
}
.skip-link:focus { transform: translateY(0); }

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

/* Ograniczenie animacji w systemie użytkownika.
   Nie wyłączamy wszystkiego na ślepo: dyskomfort powoduje RUCH, a nie
   rozjaśnianie. Zostawiamy więc płynne pojawianie się treści i cienkie
   kreski gradientu, a wycinamy przesunięcia, parallaks i zapętlone efekty. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .reveal,
  [data-parallax],
  .is-leaving main,
  .is-leaving .header,
  .is-leaving .footer { transform: none !important; }

  /* Elementy, które w kółko się poruszają */
  .hero__scroll::after { animation: none; }
}

/* --------------------------------------------------------------------------
   Akcent typograficzny — pojedyncze słowa w kolorach logo
   --------------------------------------------------------------------------
   Zasada: biel jest domyślna, akcent pojawia się rzadko i zawsze na słowie,
   które niesie sens zdania. Nigdy dwa akcenty w jednym nagłówku.

   .hl       – jednolity róż marki (kontrast AA na czerni)
   .hl-grad  – gradient w kolorach logo; domyślny wybór dla akcentów
   Uwaga: używa --print-text, a nie --print-line-h, bo ten drugi ma
   za ciemny fiolet i błękit jak na tekst
   -------------------------------------------------------------------------- */
.hl { color: var(--accent-bright); }

.hl-grad {
  background: var(--print-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  /* Zapas dla przeglądarek bez background-clip: text */
  -webkit-text-fill-color: transparent;
}
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .hl-grad { color: var(--accent-bright); -webkit-text-fill-color: currentColor; }
}

/* W tekście ciągłym akcent jest półgruby — sam kolor to za mało,
   żeby słowo czytało się jako wyróżnione. */
p .hl, li .hl,
p .hl-grad, li .hl-grad { font-weight: 600; }
