/* Architektura Dzisiaj: design tokens and font faces.
   Light theme only. Every colour sits in a token so a dark block could later redefine them under one selector.
   Contrast ratios of the text/background pairs are listed in tokens.json. */

/* Archivo, SIL OFL 1.1 (see ../fonts/LICENSE-Archivo.txt). Variable: weight 400-700, width 100-125 %.
   Subset: Latin + Latin Extended-A, punctuation, arrows (Polish diacritics, m², quotation marks). */
@font-face {
  font-family: "Archivo";
  src: url("../fonts/Archivo-roman.woff2") format("woff2");
  font-weight: 400 700;
  font-stretch: 100% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("../fonts/Archivo-italic.woff2") format("woff2");
  font-weight: 400 700;
  font-stretch: 100% 125%;
  font-style: italic;
  font-display: swap;
}
/* Local fallback tuned to Archivo's metrics (measured: average advance of a Polish sample text, ascent, descent),
   so the swap from fallback to web font moves the text by well under a pixel per line. */
@font-face {
  font-family: "Archivo Fallback";
  src: local("Arial"), local("Liberation Sans"), local("Helvetica Neue"), local("Helvetica");
  size-adjust: 98.7%;
  ascent-override: 89%;
  descent-override: 21.3%;
  line-gap-override: 0%;
}

@layer tokens {
  :root {
    color-scheme: light;

    /* colour: brand and accent */
    --brand: #2ec5f0;          /* logo, small squares, current menu item: large and non-text use only */
    --brand-strong: #00698c;   /* links and small text on white (6.18:1) */
    --on-brand: #111417;       /* text on --brand (9.1:1) */
    --accent: #f0c24b;         /* draft and preview markers, warnings */
    --accent-strong: #6e4f00;  /* text on --accent and on white (7.5:1) */

    /* colour: neutrals */
    --ink: #111417;
    --ink-muted: #5a6369;      /* dates, captions (6.1:1 on white, 5.6:1 on --surface-alt) */
    --surface: #ffffff;
    --surface-alt: #f4f5f5;
    --surface-inverse: #111417;
    --on-inverse: #ffffff;
    --border: #d9dddf;         /* hairlines between items */
    --border-strong: var(--ink);
    --border-field: #6b747a;   /* form fields, 4.8:1 against white (non-text 3:1) */
    --sponsored-bg: #f7f5ef;
    --danger: #a31d1d;
    --success: #1d6a3c;
    --focus: #00698c;
    --ad-line: #8a9399;

    /* type */
    --font-sans: "Archivo", "Archivo Fallback", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    --fw-regular: 400;
    --fw-medium: 500;
    --fw-strong: 600;
    --stretch-label: 100%;     /* labels, menu, buttons: normal width (the variable axis stays available up to 125 %) */
    --track-label: 0.1em;
    --track-title: -0.022em;
    --track-card: -0.015em;
    --lh-tight: 1.08;
    --lh-snug: 1.25;
    --lh-normal: 1.5;
    --lh-body: 1.65;

    /* type scale: desktop value, "-sm" pair is the phone value (below 48em) */
    --fs-2xs: 0.6875rem;       /* 11: ad label */
    --fs-xs: 0.75rem;          /* 12: section labels, badges */
    --fs-sm: 0.8125rem;        /* 13: menu, meta, buttons, captions */
    --fs-md: 1rem;             /* 16: UI text, card lead */
    --fs-display: 3.125rem;       --fs-display-sm: 2rem;       /* article title */
    --fs-hero: 2.375rem;       --fs-hero-sm: 1.6875rem;      /* home lead */
    --fs-h1: 2.375rem;         --fs-h1-sm: 1.75rem;         /* page and section titles */
    --fs-h2: 1.75rem;          --fs-h2-sm: 1.4375rem;       /* article headings */
    --fs-h3: 1.375rem;         --fs-h3-sm: 1.1875rem;
    --fs-h4: 1.125rem;         --fs-h4-sm: 1.0625rem;
    --fs-card: 1.25rem;        --fs-card-sm: 1.125rem;      /* card title */
    --fs-rail: 1rem;           --fs-rail-sm: 1rem;            /* side rail titles */
    --fs-lead: 1.125rem;       --fs-lead-sm: 1.0625rem;     /* home lead / listing lead */
    --fs-lede: 1.25rem;        --fs-lede-sm: 1.125rem;      /* article lead (medium weight) */
    --fs-body: 1.125rem;       --fs-body-sm: 1.0625rem;     /* running text */

    /* space (4 px base) */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;

    /* shape and depth: the design is square and flat */
    --radius-0: 0;
    --radius-1: 2px;
    --radius-2: 4px;
    --shadow-1: 0 -8px 24px rgb(17 20 23 / 0.06);
    --shadow-2: 0 12px 32px rgb(17 20 23 / 0.14);
    --focus-width: 3px;
    --focus-offset: 2px;
    --dur-1: 120ms;

    /* layout */
    --container: 1176px;
    --gutter: 1rem;
    --content: 760px;          /* article column */
    --measure: 40rem;          /* running text inside it (640 px at 16 px) */
    --rail: 336px;
    --rail-gap: 5rem;
    --ad-gap: 1.5rem;
    --tap: 2.75rem;            /* 44 px touch target */
  }

  @media (min-width: 48em) {
    :root { --gutter: 1.5rem; }
  }
  @media (min-width: 64em) and (max-width: 79.999em) {
    :root { --rail-gap: 3rem; }
  }
}
