/* ==========================================================================
   RescueLink · wspólne tokeny ekosystemu (RescueLink / EvacLink / InfoLink)

   Kolory pochodzą z barw bezpieczeństwa (PN-EN ISO 7010, RAL):
   czerwień = sprzęt ppoż. i RescueLink, zieleń = ewakuacja i EvacLink,
   błękit = informacja i InfoLink, żółć = ostrzeżenie (tylko z czarnym tekstem).

   Promienie: --r-s 6px (tabliczki, chipy), --r-m 10px (przyciski, wiersze),
   --r-l 14px (karty, arkusze). Inne wartości nie występują.
   ========================================================================== */

@import url("/assets/fonts/fonts.css");

:root {
  color-scheme: light;

  /* Barwy bezpieczeństwa: tło tabliczki + tekst na tle strony */
  --red: #B3131B;
  --red-ink: #A3111A;
  --red-wash: #F8E7E6;
  --green: #1C7449;
  --green-ink: #186640;
  --green-wash: #E3F1E8;
  --blue: #1D4F91;
  --blue-ink: #1B4A88;
  --blue-wash: #E4ECF6;
  --yellow: #F2A900;
  --yellow-ink: #7A5200;
  --yellow-wash: #FCF1D6;
  --on-signal: #FFFFFF;
  --on-yellow: #1C1A14;

  /* Neutralne: jedna, chłodna rodzina szarości */
  --paper: #F3F4F2;
  --surface: #FCFCFB;
  --surface-2: #ECEEEB;
  --ink: #1B2023;
  --ink-2: #454E54;
  --ink-3: #616B71;
  --line: #D9DDDA;
  --line-strong: #BCC3C0;
  --shadow: 0 1px 2px rgb(27 32 35 / 0.06), 0 4px 14px rgb(27 32 35 / 0.06);
  --shadow-lift: 0 2px 6px rgb(27 32 35 / 0.08), 0 14px 36px rgb(27 32 35 / 0.12);
  --scrim: rgb(17 21 23 / 0.56);

  /* Akcent modułu (nadpisywany na <body data-module="...">) */
  --accent: var(--red);
  --accent-ink: var(--red-ink);
  --accent-wash: var(--red-wash);

  /* Typografia */
  --font: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-cond: "Barlow Semi Condensed", "Barlow", system-ui, sans-serif;
  --fs-xs: 0.8125rem;   /* 13 */
  --fs-s: 0.9375rem;    /* 15 */
  --fs-m: 1.0625rem;    /* 17, tekst bazowy w widokach terenowych */
  --fs-l: 1.25rem;      /* 20 */
  --fs-xl: 1.625rem;    /* 26 */
  --fs-2xl: 2rem;       /* 32 */

  /* Rytm */
  --gutter: 16px;
  --gap: 12px;
  --r-s: 6px;
  --r-m: 10px;
  --r-l: 14px;
  --tap: 52px;          /* cel dotyku w rękawicach */

  /* Ruch */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --t-press: 140ms;
  --t-ui: 200ms;
  --t-sheet: 320ms;

  /* Warstwy */
  --z-bar: 20;
  --z-banner: 30;
  --z-sheet: 40;
  --z-toast: 50;
}

/* Tryb nocny: systemowy, chyba że użytkownik wybrał jasny */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --red-ink: #FF8A84;
    --red-wash: #3A1A1B;
    --green-ink: #6FD39D;
    --green-wash: #14301F;
    --blue-ink: #8DB6F2;
    --blue-wash: #16263A;
    --yellow-ink: #F7C64D;
    --yellow-wash: #352A10;
    --paper: #101416;
    --surface: #181D20;
    --surface-2: #20262A;
    --ink: #E7EBE9;
    --ink-2: #AEB7BB;
    --ink-3: #8E989E;
    --line: #2A3135;
    --line-strong: #3B4449;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3);
    --shadow-lift: 0 2px 8px rgb(0 0 0 / 0.4), 0 16px 40px rgb(0 0 0 / 0.45);
    --scrim: rgb(5 7 8 / 0.7);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --red-ink: #FF8A84;
  --red-wash: #3A1A1B;
  --green-ink: #6FD39D;
  --green-wash: #14301F;
  --blue-ink: #8DB6F2;
  --blue-wash: #16263A;
  --yellow-ink: #F7C64D;
  --yellow-wash: #352A10;
  --paper: #101416;
  --surface: #181D20;
  --surface-2: #20262A;
  --ink: #E7EBE9;
  --ink-2: #AEB7BB;
  --ink-3: #8E989E;
  --line: #2A3135;
  --line-strong: #3B4449;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.3);
  --shadow-lift: 0 2px 8px rgb(0 0 0 / 0.4), 0 16px 40px rgb(0 0 0 / 0.45);
  --scrim: rgb(5 7 8 / 0.7);
}

body[data-module="evac"] { --accent: var(--green); --accent-ink: var(--green-ink); --accent-wash: var(--green-wash); }
body[data-module="info"] { --accent: var(--blue); --accent-ink: var(--blue-ink); --accent-wash: var(--blue-wash); }

/* ── Podstawa ─────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-m);
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-cond);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.005em;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

a { color: var(--accent-ink); }

button { font: inherit; color: inherit; }

img, svg, canvas { display: block; max-width: 100%; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-s);
}

.ico {
  width: 24px;
  height: 24px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* Znak marki: plik SVG jako maska, kolor z currentColor (działa w obu trybach) */
.brand-mark {
  display: block;
  height: 32px;
  aspect-ratio: 4 / 1;
  background: currentColor;
  -webkit-mask: var(--logo) left center / contain no-repeat;
  mask: var(--logo) left center / contain no-repeat;
}
.brand-mark--rescue { --logo: url("/assets/logo/rescue_link_logo_white.svg"); }
.brand-mark--evac { --logo: url("/assets/logo/evac_link_logo_grey.svg"); }
.brand-mark--info { --logo: url("/assets/logo/info_link_logo_white.svg"); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
}
