/*
 * Brand design tokens for the Kościuszki 42 Homeowners Association.
 *
 * Single source of colors, typography and corner radii for every site under tk42.pl.
 * To use in a new portal:  <link rel="stylesheet" href="https://tk42.pl/brand/tokens.css">
 * Guidelines and logo files: https://tk42.pl/brand/
 */

/* Nunito Sans (SIL Open Font License 1.1, see fonts/OFL.txt) is the closest free match to Avenir Next used in the logo.
   The files are self-hosted, so browsers never contact Google Fonts. */
@font-face {
  font-family: "Nunito Sans";
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url("fonts/nunito-sans-latin-wght-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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Nunito Sans";
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url("fonts/nunito-sans-latin-ext-wght-normal.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: "Nunito Sans";
  font-style: italic;
  font-weight: 200 1000;
  font-display: swap;
  src: url("fonts/nunito-sans-latin-wght-italic.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;
}
@font-face {
  font-family: "Nunito Sans";
  font-style: italic;
  font-weight: 200 1000;
  font-display: swap;
  src: url("fonts/nunito-sans-latin-ext-wght-italic.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;
}

:root {
  /* --- Primary colors (taken directly from the logo) --- */
  --tk-navy: #15243c;        /* navy: primary color, mark background, headings */
  --tk-orange: #e0803c;      /* roof orange: accent; graphics only on light backgrounds */
  --tk-gray: #6f7787;        /* gray: the "WSPÓLNOTA MIESZKANIOWA" tagline */
  --tk-white: #ffffff;

  /* --- Supporting shades --- */
  --tk-navy-900: #0e1829;    /* darkest background (dark mode) */
  --tk-navy-700: #1f3555;    /* lighter navy: borders on navy backgrounds */
  --tk-navy-100: #e3e8ef;    /* light navy: highlighted areas */
  --tk-navy-50: #f4f5f7;     /* page background */
  --tk-orange-700: #a9561c;  /* orange for TEXT on light backgrounds (5.2:1 contrast) */
  --tk-orange-300: #f0a46e;  /* orange for text on navy backgrounds */
  --tk-orange-50: #fbefe5;   /* very light orange: alert background */
  --tk-gray-700: #5d6575;    /* secondary text (contrast ≥ 5:1 on light backgrounds) */
  --tk-gray-300: #aab2c0;    /* secondary text on navy backgrounds */

  /* --- Color roles (light theme) --- */
  --tk-bg: var(--tk-navy-50);
  --tk-surface: var(--tk-white);
  --tk-surface-alt: var(--tk-navy-100);
  --tk-text: var(--tk-navy);
  --tk-text-muted: var(--tk-gray-700);
  --tk-border: #dde2ea;
  --tk-accent: var(--tk-orange);
  --tk-accent-text: var(--tk-orange-700);
  --tk-link: var(--tk-navy);
  --tk-link-underline: var(--tk-orange);
  --tk-focus: var(--tk-orange);
  --tk-band-bg: var(--tk-navy);       /* navy bands (header, footer) */
  --tk-band-text: var(--tk-white);
  --tk-band-muted: var(--tk-gray-300);
  --tk-band-border: var(--tk-navy-700);

  /* --- Typography --- */
  --tk-font: "Nunito Sans", "Avenir Next", Avenir, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --tk-weight-regular: 400;
  --tk-weight-semibold: 650;
  --tk-weight-bold: 750;
  --tk-label-spacing: 0.08em;         /* all-caps labels, like "WSPÓLNOTA MIESZKANIOWA" */

  /* --- Shapes: corner radii derived from the mark (radius ≈ 22% of its side) --- */
  --tk-radius-s: 8px;
  --tk-radius-m: 14px;
  --tk-radius-l: 22px;
  --tk-shadow: 0 1px 2px rgb(21 36 60 / 0.06), 0 4px 16px rgb(21 36 60 / 0.06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --tk-bg: var(--tk-navy-900);
    --tk-surface: #142238;
    --tk-surface-alt: #1a2b46;
    --tk-text: #e9edf2;
    --tk-text-muted: #9aa3b2;
    --tk-border: #26385a;
    --tk-accent-text: var(--tk-orange-300);
    --tk-link: #e9edf2;
    --tk-band-bg: #101d31;
    --tk-band-border: #26385a;
    --tk-shadow: none;
  }
}
