/* AA-safe red for solid fills carrying white text.
   The brand red #FB0149 with #fff measures 4.03:1 and fails WCAG AA; this is the
   same hue at 94% and measures 4.61:1. Used only where red is a text background —
   the brand red is unchanged wherever it is an accent, border or glow. */
:root { --red-cta: #E90144; }

/* Self-hosted fonts — served first-party, no Google/third-party requests */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/inter-latin-400-normal.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+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/inter-latin-500-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/inter-latin-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Sora';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/sora-latin-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Sora';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/sora-latin-700-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Sora';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('/fonts/sora-latin-800-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/jetbrains-mono-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/jetbrains-mono-latin-500-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/jetbrains-mono-latin-700-normal.woff2') format('woff2');
}

/* latin-ext (Central European incl. Polish diacritics: ą ć ę ł ń ó ś ź ż) */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/inter-latin-ext-400-normal.woff2') format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/inter-latin-ext-500-normal.woff2') format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/inter-latin-ext-600-normal.woff2') format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Sora';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/sora-latin-ext-600-normal.woff2') format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Sora';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/sora-latin-ext-700-normal.woff2') format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Sora';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('/fonts/sora-latin-ext-800-normal.woff2') format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/jetbrains-mono-latin-ext-400-normal.woff2') format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/jetbrains-mono-latin-ext-500-normal.woff2') format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/jetbrains-mono-latin-ext-700-normal.woff2') format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------------------------------------------------------------------------
   Metric-matched fallbacks (Task 10 — CLS).

   Every face above uses font-display:swap, so the page first paints in Arial and
   then reflows when the real font arrives — that swap was the largest layout
   shift on the homepage (.hero-inner jumping 24px).

   These faces wrap the local fallback and stretch it to the web font's own
   metrics, so the pre-swap and post-swap text occupy the same box. The numbers
   are measured, not copied: rendered advance width of a 110-character sample at
   100px in each web font vs Arial, in Chromium, with ascent/descent taken from
   the same TextMetrics and expressed relative to the size-adjusted em.

     Sora           108.17% of Arial
     Inter          105.57%
     JetBrains Mono 114.82%
   --------------------------------------------------------------------------- */
@font-face {
  font-family: 'Sora Fallback';
  src: local('Arial'), local('Helvetica'), local('Liberation Sans');
  size-adjust: 108.17%;
  ascent-override: 89.67%;
  descent-override: 26.81%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'Inter Fallback';
  src: local('Arial'), local('Helvetica'), local('Liberation Sans');
  size-adjust: 105.57%;
  ascent-override: 91.88%;
  descent-override: 22.73%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'JetBrains Mono Fallback';
  src: local('Arial'), local('Helvetica'), local('Liberation Sans');
  size-adjust: 114.82%;
  ascent-override: 88.83%;
  descent-override: 26.13%;
  line-gap-override: 0%;
}

/* ---------------------------------------------------------------------------
   Reduced motion (Task 20).

   Sub-pages never honoured prefers-reduced-motion — 33+ elements still ran
   0.6–0.9s transitions. This lives here because /fonts.css is the one
   stylesheet linked from every page (FooterNew adds it as a catch-all for the
   pages that don't link it themselves).

   Durations collapse to 0.01ms rather than `none`: transitionend/animationend
   still fire, so any JS waiting on them keeps working, while nothing is
   perceptibly in motion. Anything that starts hidden and animates in is forced
   visible, or reducing motion would simply hide content.
   --------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
    animation-delay: 0s !important;
    scroll-behavior: auto !important;
  }
  .reveal, .glc-reveal, [data-fx],
  .fx-rise .fx-w, .fx-wipe .fx-wi, .fx-type .fx-w {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    clip-path: none !important;
  }
}
