/*
 * Vizuální základ převzatý z webu ITV a TKM Litoměřice (technickyklub.cz):
 * tmavě modrá #1D3A6E, červená #C0392B, text #1A1A2E, plochy #F0F4F8,
 * písma Space Grotesk, DM Sans a IBM Plex Mono.
 *
 * Plochy a text jsou jedna chladná neutrální řada. Červená je jediný akcent
 * a patří hlavní akci; modrá nese značku, výběr a stav „pracuje se“.
 */

@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
  src: url('/fonts/dm-sans-latin-wght-normal.woff2') format('woff2-variations');
  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: 'DM Sans';
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
  src: url('/fonts/dm-sans-latin-ext-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, 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: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/fonts/space-grotesk-latin-wght-normal.woff2') format('woff2-variations');
  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: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/fonts/space-grotesk-latin-ext-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, 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: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/ibm-plex-mono-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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/ibm-plex-mono-latin-ext-400-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, 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: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/ibm-plex-mono-latin-500-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: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/ibm-plex-mono-latin-ext-500-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, 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 {
  color-scheme: light dark;

  --font-ui: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Space Grotesk', 'DM Sans', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* Plochy */
  --bg: #f0f4f8;
  --surface: #ffffff;
  --raised: #e7ecf2;
  --well: #e9eef4;
  --thumb: #ffffff;
  --line: rgb(26 26 46 / 0.1);
  --line-strong: rgb(26 26 46 / 0.18);

  /* Text */
  --text: #1a1a2e;
  --text-2: #4a5466;
  --text-3: #5d6678;

  /* Značka */
  --navy: #1d3a6e;
  --navy-soft: rgb(29 58 110 / 0.09);
  --accent: #c0392b;
  --accent-press: #a83024;
  --accent-ink: #b03326;
  --on-accent: #ffffff;
  --logo: #514f61;

  /* Stavy úkolů */
  --todo: #5d6678;
  --doing: #1d3a6e;
  --done: #1f7a4d;
  --done-soft: rgb(31 122 77 / 0.1);
  --danger: #b03326;

  --scrim: rgb(16 20 32 / 0.34);
  --bar: rgb(240 244 248 / 0.74);
  --shadow-1: 0 1px 2px rgb(16 20 32 / 0.05);
  --shadow-2: 0 8px 24px rgb(16 20 32 / 0.08), 0 1px 2px rgb(16 20 32 / 0.05);
  --shadow-3: 0 24px 64px rgb(16 20 32 / 0.18), 0 2px 6px rgb(16 20 32 / 0.06);
  --focus: 0 0 0 2px var(--bg), 0 0 0 4px var(--navy);

  --radius-xs: 0.375rem;
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --fast: 140ms;
  --medium: 200ms;
  --slow: 380ms;

  --topbar: 3.75rem;
  --page-x: clamp(1rem, 3vw, 2rem);
  /* Okraje stránky s ohledem na výřez a zaoblené rohy displeje. */
  --page-left: max(var(--page-x), env(safe-area-inset-left));
  --page-right: max(var(--page-x), env(safe-area-inset-right));
  --topbar-total: calc(var(--topbar) + env(safe-area-inset-top));
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0d14;
    --surface: #12151e;
    --raised: #1b1f2b;
    --well: #10131b;
    --thumb: #2d3344;
    --line: rgb(238 240 245 / 0.1);
    --line-strong: rgb(238 240 245 / 0.2);

    --text: #eef0f5;
    --text-2: #a9b0c0;
    --text-3: #8f97aa;

    --navy: #a3bdf0;
    --navy-soft: rgb(163 189 240 / 0.12);
    --accent: #c0392b;
    --accent-press: #a83024;
    --accent-ink: #f28377;
    --logo: #e3e6ee;

    --todo: #8f97aa;
    --doing: #a3bdf0;
    --done: #4cc38a;
    --done-soft: rgb(76 195 138 / 0.14);
    --danger: #f28377;

    --scrim: rgb(0 0 0 / 0.56);
    --bar: rgb(11 13 20 / 0.72);
    --shadow-1: none;
    --shadow-2: 0 8px 24px rgb(0 0 0 / 0.4);
    --shadow-3: 0 24px 64px rgb(0 0 0 / 0.6);
  }
}

@media (prefers-contrast: more) {
  :root {
    --line: var(--line-strong);
    --text-2: var(--text);
    --text-3: var(--text);
    --bar: var(--bg);
  }
}

@media (prefers-reduced-transparency: reduce) {
  :root {
    --bar: var(--bg);
  }
}
