/* ============================================================
   Czarna Nić - base.css
   Reset + design tokens. Kierunek: „skóra i warsztat" -
   ciemna dominanta, akcent koniaku i miedzi, hairline jako ścieg.
   Osobna marka: NIE kopiuje tokenów SiteVerse ani Parsley.
   ============================================================ */

:root {
  /* Warsztat - ciemna dominanta */
  --workshop-black:   #141210;
  --workshop-deep:    #0E0D0B;
  --leather-espresso: #2E2118;
  --espresso-2:       #241A13;

  /* Skóra - akcenty */
  --leather-cognac:   #8C5A3C;
  --cognac-deep:      #6F4630;
  --copper:           #C1702E;

  /* Nić i tekst */
  --thread-cream:     #EDE4D3;
  --cream-2:          #E3D8C4;
  --steel:            #6B6459;          /* tekst drugorzędny na jasnym */
  --muted-on-dark:    #A69D8D;          /* tekst drugorzędny na ciemnym (AA) */

  /* Ścieg - hairline jako nitka (dash, nie ciągła linia) */
  --stitch-line:      rgba(237, 228, 211, 0.16);
  --stitch-strong:    rgba(237, 228, 211, 0.34);
  --stitch-on-light:  rgba(20, 18, 16, 0.22);

  /* Typografia */
  --font-display: "Archivo", "Inter", system-ui, sans-serif;
  --font-serif:   "Instrument Serif", Georgia, serif;
  --font-sans:    "Inter", system-ui, sans-serif;
  --font-mono:    "Space Mono", ui-monospace, monospace;

  /* Skala fluid */
  --step--1: clamp(0.78rem, 0.75rem + 0.16vw, 0.87rem);
  --step-0:  clamp(1.00rem, 0.96rem + 0.22vw, 1.12rem);
  --step-1:  clamp(1.28rem, 1.17rem + 0.50vw, 1.55rem);
  --step-2:  clamp(1.65rem, 1.45rem + 1.00vw, 2.35rem);
  --step-3:  clamp(2.20rem, 1.80rem + 2.00vw, 3.70rem);
  --step-4:  clamp(2.90rem, 2.20rem + 3.80vw, 5.80rem);
  --step-5:  clamp(3.40rem, 2.20rem + 6.20vw, 8.20rem);

  /* Przestrzeń */
  --section-y: clamp(96px, 10vw, 180px);
  --gutter:    clamp(20px, 4.5vw, 72px);
  --maxw:      1400px;

  /* Precyzja rzemiosła: małe promienie, pewny easing */
  --radius-sm: 3px;
  --radius-md: 8px;
  --radius-lg: 14px;

  --ease-craft: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-1: 450ms;
  --dur-2: 650ms;
  --dur-3: 900ms;
}

/* ---------- Reset ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--thread-cream);
  background: var(--workshop-black);
  -webkit-font-smoothing: antialiased;
}

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

/* Reset `img { display: block }` wygrywałby z regułą UA dla [hidden]
   (reguły autora > UA niezależnie od specyficzności) - przywracamy. */
[hidden] { display: none !important; }

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

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

ul, ol { list-style: none; }

::selection {
  background: var(--leather-cognac);
  color: var(--thread-cream);
}

:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 3px;
}

/* ---------- Typografia bazowa ---------- */

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: 125%;
  line-height: 1.04;
  letter-spacing: -0.01em;
  text-wrap: balance;
  text-transform: uppercase;
}

h1 em, h2 em, h3 em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-stretch: 100%;
  text-transform: none;
  letter-spacing: 0;
}

p { max-width: 62ch; }

strong { font-weight: 600; }

/* ---------- Utility: ścieg ---------- */

/* Pozioma nitka - dash 7/5, nigdy ciągła linia */
.stitch-h {
  height: 1px;
  border: 0;
  background-image: repeating-linear-gradient(
    90deg,
    var(--stitch-line) 0, var(--stitch-line) 7px,
    transparent 7px, transparent 12px
  );
}

.on-light .stitch-h,
.stitch-h--dark {
  background-image: repeating-linear-gradient(
    90deg,
    var(--stitch-on-light) 0, var(--stitch-on-light) 7px,
    transparent 7px, transparent 12px
  );
}

/* Etykieta mono - jak metka skóry */
.kicker {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--copper);
}

/* Placeholder - jawne oznaczenie treści do podmiany */
.ph-note {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--muted-on-dark);
}

.on-light .ph-note { color: var(--steel); }

/* ---------- Dostępność ---------- */

.skip-link {
  position: absolute;
  top: -80px;
  left: var(--gutter);
  z-index: 100;
  padding: 10px 16px;
  background: var(--copper);
  color: var(--workshop-black);
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: top var(--dur-1) var(--ease-craft);
}

.skip-link:focus-visible { top: 12px; }

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