/* ==========================================================================
   GRAFIT STUDIO — system designu
   Motyw: warsztat składu i przygotowania do druku — papier, atrament,
   krzyżyk pasera, czerwień korektorska. Spokojnie, precyzyjnie, bez fajerwerków.
   ========================================================================== */

:root {
  /* — Kolor — */
  --paper:        #F3F1EB;
  --paper-alt:     #EAE7DD;
  --paper-deep:    #E2DECF;
  --ink:           #1B1A17;
  --ink-soft:      #4A463F;
  --ink-faint:     #7A756A;
  --navy:          #1F3350;
  --navy-soft:     #33507A;
  --red:           #A6321E;
  --red-soft:      #C2492F;
  --line:          #D8D3C6;
  --line-strong:   #C4BEAC;
  --white:         #FFFFFF;

  /* — Typografia — */
  --font-display: 'Spectral', 'Georgia', serif;
  --font-body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', 'SF Mono', Consolas, monospace;

  /* — Skala typu (fluid) — */
  --step--1: clamp(0.83rem, 0.8rem + 0.15vw, 0.9rem);
  --step-0:  clamp(1rem, 0.96rem + 0.2vw, 1.1rem);
  --step-1:  clamp(1.2rem, 1.12rem + 0.4vw, 1.4rem);
  --step-2:  clamp(1.5rem, 1.32rem + 0.9vw, 1.9rem);
  --step-3:  clamp(1.9rem, 1.6rem + 1.5vw, 2.6rem);
  --step-4:  clamp(2.4rem, 1.9rem + 2.5vw, 3.6rem);
  --step-5:  clamp(3rem, 2.2rem + 4vw, 5rem);

  /* — Rytm i geometria — */
  --content-max: 1280px;
  --text-max: 68ch;
  --radius: 3px;
  --border: 1px solid var(--line);

  /* — Ruch — */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast: 160ms;
  --dur: 320ms;
}

/* — Reset — */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: hidden;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  font-weight: 400;
  min-height: 100vh;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }

/* — Focus widoczny (dostępność) — */
:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

/* — Typografia bazowa — */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  color: var(--ink);
  letter-spacing: -0.01em;
}
h1 { font-size: var(--step-5); font-weight: 500; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); font-family: var(--font-body); font-weight: 600; }
p { max-width: var(--text-max); }
p + p { margin-top: 1em; }

.lede {
  font-size: var(--step-1);
  color: var(--ink-soft);
  line-height: 1.55;
}

/* — Etykieta redakcyjna (eyebrow) — */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 500;
}
.eyebrow::before {
  content: '';
  width: 10px;
  height: 10px;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cg fill='none' stroke='%23A6321E' stroke-width='1.4'%3E%3Ccircle cx='10' cy='10' r='6'/%3E%3Cline x1='10' y1='0' x2='10' y2='4'/%3E%3Cline x1='10' y1='16' x2='10' y2='20'/%3E%3Cline x1='0' y1='10' x2='4' y2='10'/%3E%3Cline x1='16' y1='10' x2='20' y2='10'/%3E%3C/g%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

/* — Znaczniki cięcia (motyw krawędzi) — */
.crop-frame {
  position: relative;
}
.crop-frame::before,
.crop-frame::after,
.crop-frame > .crop-tr,
.crop-frame > .crop-br {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  pointer-events: none;
}
.crop-frame::before { top: -1px; left: -1px; border-top: 1.5px solid var(--ink); border-left: 1.5px solid var(--ink); }
.crop-frame::after { bottom: -1px; right: -1px; border-bottom: 1.5px solid var(--ink); border-right: 1.5px solid var(--ink); }

/* — Kontener — */
.wrap {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: 1.25rem;
}
@media (min-width: 640px) {
  .wrap { padding-inline: 2.5rem; }
}
@media (min-width: 1024px) {
  .wrap { padding-inline: 3.5rem; }
}

section { position: relative; }
.section {
  padding-block: clamp(3.5rem, 6vw, 7rem);
}
.section--alt { background: var(--paper-alt); }
.section--ink { background: var(--ink); color: var(--paper); }
.section--ink h2, .section--ink h3 { color: var(--paper); }

.hr {
  border: none;
  border-top: var(--border);
  margin-block: 2.5rem;
}

/* — Przyciski — */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 0.95em 1.5em;
  border-radius: var(--radius);
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
  white-space: nowrap;
}
.btn--primary {
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
}
.btn--primary:hover { background: var(--red); border-color: var(--red); transform: translateY(-1px); }
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
}
.btn--ghost:hover { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.section--ink .btn--ghost { color: var(--paper); border-color: rgba(243,241,235,0.3); }
.section--ink .btn--ghost:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn--arrow::after {
  content: '→';
  transition: transform var(--dur-fast) var(--ease);
}
.btn--arrow:hover::after { transform: translateX(3px); }

/* — Link tekstowy z podkreśleniem korektorskim — */
.text-link {
  position: relative;
  font-weight: 600;
  color: var(--ink);
  padding-bottom: 2px;
  background-image: linear-gradient(var(--red), var(--red));
  background-size: 100% 1.5px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: color var(--dur-fast) var(--ease);
}
.text-link:hover { color: var(--red); }

/* — Skip link — */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.8em 1.2em;
  z-index: 200;
  font-family: var(--font-mono);
  font-size: var(--step--1);
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* — Ujawnianie przy scrollu — */
[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 640ms var(--ease), transform 640ms var(--ease);
}
[data-reveal].is-revealed { opacity: 1; transform: translateY(0); }

/* — Utility — */
.u-mono { font-family: var(--font-mono); }
.u-center { text-align: center; }
.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;
}
