/*
 * zarolke.pl: shared foundation for every page.
 * Colour tokens come from the app (../../index.html); their contrast is checked by tools/contrast.py.
 */

@font-face {
  font-family: "Schibsted Grotesk";
  font-weight: 400 900;
  font-display: swap;
  src: url("../fonts/sg-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Schibsted Grotesk";
  font-weight: 400 900;
  font-display: swap;
  src: url("../fonts/sg-latin.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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --paper: #f5f1ea;
  --surface: #fffdf9;
  --sunk: #e9e3d8;
  --line: #ddd5c7;
  --ink: #1d1b17;
  --ink-2: #4d4842;
  --ink-3: #6b655c;
  --brand: #ffd23f;
  --brand-hover: #f2c200;
  --on-brand: #1d1b17;
  --night: #1d1b17;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --radius: 6px;
  --radius-small: 4px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #151412;
    --surface: #1f1d1a;
    --sunk: #2b2824;
    --line: #36322d;
    --ink: #f2ede4;
    --ink-2: #cfc8bc;
    --ink-3: #a69f93;

    color-scheme: dark;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.5 "Schibsted Grotesk", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

:focus-visible {
  outline: 2px solid currentcolor;
  outline-offset: 2px;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.logo__mark {
  flex: none;
}

.top__links,
.footer__links {
  display: flex;
  flex-wrap: wrap;
  column-gap: var(--space-4);
}

.top__links {
  font-weight: 600;
}

/* The tap area grows through ::after, so the focus ring keeps hugging the word. */
.top__links a {
  position: relative;
}

.top__links a::after {
  content: "";
  position: absolute;
  inset: calc(-1 * var(--space-3)) calc(-1 * var(--space-1));
}

[aria-current="page"] {
  text-decoration: none;
}

.nowrap {
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
