/* ============ BASE — DRUK ============ */

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

html { scroll-behavior: smooth; overflow-x: clip; }
html[data-tier="full"] { scroll-behavior: auto; }

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.55;
  color: var(--ink);
  background: var(--cream);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
em { font-style: normal; }
::selection { background: var(--pink); color: var(--cream); }

.mono {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.s-kicker { color: var(--ink-mute); margin-bottom: 16px; }
.s-kicker--cream { color: var(--cream-mute); }

/* ============ PRINT TOOLBOX ============ */

/* Ziarno papieru — rasteryzowane raz, scrolluje z treścią (NIE fixed+blend) */
.paper {
  background-image: var(--grain), linear-gradient(var(--cream), var(--cream));
  background-blend-mode: multiply, normal;
}

/* Halftone — tylko pasy, nie całe sekcje */
.halftone {
  background-image: radial-gradient(circle, var(--ink-faint) 0 1.2px, transparent 1.3px);
  background-size: 7px 7px;
}

/* Znaczniki pasowania ⌖ w rogach sekcji */
.reg { position: relative; }
.reg::before, .reg::after {
  content: "⌖";
  position: absolute;
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--ink-mute);
  pointer-events: none;
}
.reg::before { top: 14px; left: 16px; }
.reg::after { bottom: 14px; right: 16px; }

/* Misprint — offsetowe cienie w farbach */
.misprint {
  color: var(--navy);
  text-shadow: 2px 2px 0 var(--pink), -2px -1px 0 var(--yellow);
}

/* Pasek kalibracyjny farb */
.inkbar {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: 28px;
}
.inkbar i { width: 34px; height: 16px; border: 1px solid var(--ink); border-right: none; }
.inkbar i:last-of-type { border-right: 1px solid var(--ink); }
.inkbar span { margin-left: 14px; color: var(--ink-mute); font-size: 10px; }
.inkbar--center { justify-content: center; }

/* Taśma klejąca na wycinkach */
.taped { position: relative; }
.taped::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 50%;
  translate: -50% 0;
  rotate: -3deg;
  width: 92px;
  height: 26px;
  background: rgba(255, 247, 230, .55);
  border: 1px solid rgba(27, 19, 70, .12);
  box-shadow: 0 1px 2px rgba(27, 19, 70, .08);
  pointer-events: none;
}

/* Kod kreskowy — czysty CSS */
.barcode {
  display: inline-block;
  width: 110px;
  height: 26px;
  background: repeating-linear-gradient(90deg,
    var(--ink) 0 2px, transparent 2px 4px,
    var(--ink) 4px 7px, transparent 7px 9px,
    var(--ink) 9px 10px, transparent 10px 14px,
    var(--ink) 14px 17px, transparent 17px 18px);
}

/* Postrzępione krawędzie między sekcjami */
.torn { display: block; width: 100%; height: 48px; margin-bottom: -1px; }

/* Drop cap gazetowy */
.dropcap {
  float: left;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 64px;
  line-height: .82;
  padding: 6px 10px 0 0;
  color: var(--pink);
}

/* ---------- Buttons — pieczątkowe ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 16px 30px;
  border: var(--rule-bold) var(--ink);
  transition: background-color var(--dur-snap) steps(1, end), color var(--dur-snap) steps(1, end), rotate var(--dur-snap) var(--ease-out);
}
.btn:hover { rotate: -1deg; }
.btn--ink { background: var(--ink); color: var(--cream); }
.btn--ink:hover { background: var(--pink); border-color: var(--pink); }
.btn--line { background: transparent; color: var(--ink); }
.btn--line:hover { background: var(--yellow); }

/* ---------- Loader — przygotowanie matryc ---------- */
.loader {
  position: fixed;
  inset: 0;
  z-index: var(--z-loader);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: var(--gutter);
  background: var(--cream);
  transition: opacity .5s var(--ease-hard), visibility .5s;
}
.loader.is-done { opacity: 0; visibility: hidden; }
.loader__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(64px, 14vw, 200px);
  line-height: .85;
  letter-spacing: -.03em;
  color: var(--navy);
  text-shadow: 3px 3px 0 var(--pink), -3px -2px 0 var(--yellow);
}
.loader__bar {
  display: flex;
  width: 100%;
  height: 10px;
  border: 1px solid var(--ink);
  margin: 28px 0 14px;
}
.loader__bar span {
  display: block;
  width: 33.34%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left;
}
.loader__label { color: var(--ink-mute); }

/* ---------- Nav — listwa zecerska ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: var(--z-nav);
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  background: var(--cream);
  border-bottom: var(--rule-bold) var(--ink);
  transition: transform .4s var(--ease-hard);
}
.nav.is-hidden { transform: translateY(-101%); }

.nav__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 15px var(--gutter);
  font-weight: 600;
  border-right: var(--rule) var(--ink);
}
.nav__brand em { color: var(--pink); }

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 40px);
  padding: 0 var(--gutter);
}
.nav__links a { opacity: .65; transition: opacity var(--dur-snap) ease, color var(--dur-snap) ease; }
.nav__links a:hover { opacity: 1; color: var(--pink); }

.nav__cta {
  display: flex;
  align-items: center;
  padding: 15px var(--gutter);
  background: var(--ink);
  color: var(--cream);
  font-weight: 600;
  transition: background-color var(--dur-snap) steps(1, end);
}
.nav__cta:hover { background: var(--pink); }

/* ---------- Reveals ---------- */
html[data-tier="full"] [data-reveal],
html[data-tier="lite"] [data-reveal] {
  opacity: 0;
  transform: translateY(32px);
}
html[data-tier="full"] [data-stamp],
html[data-tier="lite"] [data-stamp] {
  opacity: 0;
}

/* ---------- Focus ---------- */
:focus-visible {
  outline: 3px solid var(--pink);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
