/* ============================================================
   4Beat — Design Tokens
   Spec: STATE.md (Brand v0.2, kwiecień 2026)
   ============================================================ */

:root {
  /* --- COLORS ------------------------------------------------ */
  --c-red:       #E63946;          /* 4Beat Red — akcent, alarm (decorative use only: dziadkowie SVG, borders, large display text ≥ 18pt bold) */
  --c-red-dark:  #C62D38;          /* hover state + AA-compliant red for body-size text on paper (5.24:1 vs paper, AA pass) */
  --c-red-text:  #C62D38;          /* alias: red used as small text/links on light bg (== red-dark, but semantic) */
  --c-red-deep:  #A51F2A;          /* hover-on-hover, deeper press state */
  --c-ink:       #0A0A0A;          /* text, frames */
  --c-ink-80:    rgba(10, 10, 10, .80);
  --c-ink-60:    rgba(10, 10, 10, .60);
  --c-ink-40:    rgba(10, 10, 10, .40);
  --c-ink-15:    rgba(10, 10, 10, .15);
  --c-paper:     #FAFAF7;          /* warm off-white — NEVER pure white */
  --c-paper-2:   #F2F2EE;          /* secondary surface */
  --c-line:      #E5E4DF;          /* hairlines, dividers */

  /* --- TYPOGRAPHY -------------------------------------------- */
  --f-sans: "Helvetica Neue", Helvetica, Arial, "Liberation Sans", sans-serif;
  --f-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --fs-display: clamp(3rem, 8vw, 6.5rem);     /* hero headline */
  --fs-h1:      clamp(2rem, 5vw, 3.5rem);
  --fs-h2:      clamp(1.5rem, 3vw, 2.25rem);
  --fs-h3:      clamp(1.125rem, 2vw, 1.5rem);
  --fs-body:    clamp(1rem, 1.1vw, 1.125rem);
  --fs-small:   .875rem;
  --fs-micro:   .75rem;

  --lh-display: 1.02;
  --lh-h:       1.15;
  --lh-body:    1.55;

  --ls-tight:   -.03em;             /* bold/wordmark tracking */
  --ls-normal:  -.005em;
  --ls-eyebrow: .12em;              /* uppercase eyebrow labels */

  /* --- SPACING (8px grid) ------------------------------------ */
  --s-1:  4px;
  --s-2:  8px;
  --s-3:  16px;
  --s-4:  24px;
  --s-5:  32px;
  --s-6:  48px;
  --s-7:  64px;
  --s-8:  96px;
  --s-9:  128px;
  --s-10: 160px;

  /* --- LAYOUT ------------------------------------------------ */
  --container:        1200px;
  --container-narrow: 880px;
  --pad-x:            24px;

  /* --- BORDERS / RADII --------------------------------------- */
  --r-0: 0;
  --r-1: 2px;
  --r-2: 4px;
  --r-3: 8px;
  --bw:  1px;

  /* --- MOTION ------------------------------------------------ */
  --ease:        cubic-bezier(.2, .7, .2, 1);
  --ease-out:    cubic-bezier(.16, 1, .3, 1);
  --dur-fast:    160ms;
  --dur:         280ms;
  --dur-slow:    560ms;

  /* --- Z-INDEX ----------------------------------------------- */
  --z-nav:    100;
  --z-modal:  200;
  --z-banner: 300;
}

@media (min-width: 1024px) {
  :root { --pad-x: 48px; }
}

/* ============================================================
   RESET (modern, minimal)
   ============================================================ */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; padding: 0; }

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

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

body {
  font-family: var(--f-sans);
  font-size:   var(--fs-body);
  line-height: var(--lh-body);
  color:       var(--c-ink);
  background:  var(--c-paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}

img,
picture,
video,
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;
  text-underline-offset: 3px;
}

a:hover { text-decoration: underline; }

ul, ol { list-style: none; }

::selection {
  background: var(--c-red);
  color: var(--c-paper);
}

/* ============================================================
   FOCUS — accessibility
   ============================================================ */
:focus { outline: none; }

:focus-visible {
  outline: 2px solid var(--c-red);
  outline-offset: 3px;
  border-radius: var(--r-1);
}

/* Skip-to-content */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--s-3);
  background: var(--c-ink);
  color: var(--c-paper);
  padding: var(--s-2) var(--s-3);
  z-index: var(--z-banner);
  font-size: var(--fs-small);
  transition: top var(--dur) var(--ease);
}

.skip-link:focus-visible {
  top: var(--s-3);
  outline-color: var(--c-paper);
}

/* ============================================================
   UTILITIES
   ============================================================ */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--pad-x) * 2);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

.container--narrow {
  max-width: calc(var(--container-narrow) + var(--pad-x) * 2);
}

.eyebrow {
  font-size: var(--fs-small);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--ls-eyebrow);
  color: var(--c-red-text);             /* WCAG AA: 14px bold isn't "large", needs 5.24:1 (red-dark) on paper */
}
/* On dark sections (--ink) we can use the brighter brand red — passes 4.75:1 */
.section--ink .eyebrow,
.kpi .section__head .eyebrow,
.contact__lead .eyebrow {
  color: var(--c-red);
}

.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;
}

.visually-hidden { @extend .sr-only; }
