/* ============================================================================
   styles.css — FUNDAMENT / DESIGN SYSTEM serwisu WLR Training Group
   ----------------------------------------------------------------------------
   Linkowany jako PIERWSZY na każdej stronie. Zawiera bazę wspólną dla całości:
     • zmienne marki i motywu (:root) — kolory, typografia, geometria, cienie,
     • reset i style bazowe (body, nagłówki, linki, obrazki),
     • komponenty wielokrotnego użytku: .btn (przyciski), .badge/.chip (plakietki),
       .card (karty), .field/.input (formularze), .eyebrow, motyw „żagla", utilsy.
   Kolejność wczytywania arkuszy:  styles.css → chrome.css → (subpage.css) →
   arkusz konkretnej strony. Dzięki temu kolejne pliki mogą nadpisywać bazę.

   Marka: Reflex Blue #0055A4 · Pantone 123 Yellow #FFC423
   Grey #939598 · Magenta (Rubine) #E20077 · Lime #C2CD23
   ============================================================================ */

:root {
  /* ——— Kolory marki ——— */
  /* Brand */
  --blue:        #0055A4;
  --blue-700:    #00407c;
  --blue-900:    #062a4d;
  --blue-300:    #6ea0d6;
  --blue-tint:   #eaf1fa;
  --blue-tint-2: #f4f8fd;

  --yellow:      #FFC423;
  --yellow-soft: #ffe49a;
  --magenta:     #E20077;
  --magenta-700: #b8005f;
  --lime:        #aebd1f;        /* slightly toned from C2CD23 for legibility */
  --lime-soft:   #eef2cf;

  /* Neutrals (cool) */
  --ink:    #0d1b2e;
  --ink-2:  #33445c;
  --muted:  #6b7a90;
  --line:   #e3e9f1;
  --line-2: #eef2f7;
  --bg:     #ffffff;
  --bg-soft:#f5f8fc;
  --bg-2:   #eef3f9;

  /* Accent system - themable via Tweaks */
  --accent:        var(--magenta);
  --accent-strong: var(--magenta-700);
  --accent-contrast: #ffffff;

  /* Type */
  --font-display: "Sora", system-ui, sans-serif;
  --font-body:    "Hanken Grotesk", system-ui, sans-serif;

  /* Motif intensity (0–1) controlled by Tweaks */
  --motif: 1;

  /* Geometry */
  --r-sm: 8px;
  --r:    14px;
  --r-lg: 22px;
  --r-xl: 30px;
  --shadow-sm: 0 1px 2px rgba(13,27,46,.05), 0 1px 3px rgba(13,27,46,.06);
  --shadow:    0 6px 20px -8px rgba(13,27,46,.18);
  --shadow-lg: 0 24px 60px -20px rgba(13,27,46,.30);
  --maxw: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 17px;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
h1,h2,h3,h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.08; letter-spacing: -0.02em; margin: 0; color: var(--ink); }

::selection { background: var(--yellow); color: var(--ink); }

/* ---------- Layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.section { padding: 96px 0; }
.section--tight { padding: 64px 0; }
@media (max-width: 760px){ .section { padding: 64px 0; } .wrap { padding: 0 20px; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-display);
  font-size: 12.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--blue);
}
.eyebrow::before { content:""; width: 22px; height: 2px; background: var(--yellow); border-radius: 2px; }
.eyebrow--light { color: var(--yellow); }
.eyebrow--light::before { background: var(--yellow); }

.lead { color: var(--ink-2); font-size: 1.12rem; max-width: 60ch; }
.muted { color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content:center; gap: 9px;
  font-family: var(--font-display); font-weight: 600; font-size: 15px;
  padding: 13px 22px; border-radius: 999px;
  transition: transform .15s ease, background .2s ease, box-shadow .2s ease, color .2s;
  white-space: nowrap; line-height: 1;
}
.btn:active { transform: translateY(1px); }
.btn-accent { background: var(--accent); color: var(--accent-contrast); }
.btn-accent:hover { background: var(--accent-strong); box-shadow: 0 10px 24px -10px var(--accent); }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: var(--blue-700); box-shadow: 0 10px 24px -12px var(--blue); }
.btn-ghost { background: transparent; color: var(--blue); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--blue); background: var(--blue-tint); }
/* Logowanie wyłączone na czas wdrożenia — wyszarzony przycisk */
.hdr-login.is-disabled { opacity: .5; cursor: not-allowed; }
.hdr-login.is-disabled:hover { box-shadow: inset 0 0 0 1.5px var(--line); background: transparent; }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: #1a2c44; }
.btn-lg { padding: 16px 28px; font-size: 16px; }
.btn-sm { padding: 9px 15px; font-size: 13.5px; }
.btn-block { width: 100%; }
.btn-sq { border-radius: 7px; }

/* ---------- Badges / chips ---------- */
.badge {
  display:inline-flex; align-items:center; gap:6px;
  font-family: var(--font-display); font-weight:600; font-size:11.5px; letter-spacing:.04em;
  padding: 5px 11px; border-radius: 999px; text-transform: uppercase;
}
.badge-new   { background: var(--lime-soft); color: #5f6b00; }
.badge-online{ background: var(--blue-tint); color: var(--blue-700); }
.badge-stac  { background: var(--blue-tint); color: var(--blue-700); }
.badge-dot::before { content:""; width:6px; height:6px; border-radius:50%; background: currentColor; }

.chip {
  display:inline-flex; align-items:center; gap:7px;
  font-size: 14px; font-weight:500; padding: 9px 15px; border-radius: 999px;
  background: var(--bg-soft); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line);
  transition: all .16s ease; white-space: nowrap;
}
.chip:hover { box-shadow: inset 0 0 0 1px var(--blue-300); color: var(--blue-700); }
.chip[aria-pressed="true"]{ background: var(--blue); color:#fff; box-shadow:none; }

/* category color dots */
.cat-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; display:inline-block; }

/* ---------- Cards ---------- */
.card {
  background: #fff; border-radius: var(--r-lg);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-sm);
  transition: transform .2s ease, box-shadow .25s ease;
}

/* ---------- Forms ---------- */
.field { display:flex; flex-direction:column; gap:7px; }
.field > label { font-family: var(--font-display); font-weight:600; font-size:13.5px; color: var(--ink-2); }
.field .req { color: var(--magenta); }
.input, .select, textarea.input {
  font-family: var(--font-body); font-size: 15.5px; color: #000; font-weight: 600;
  background: var(--bg-soft); border-radius: var(--r-sm);
  padding: 12px 14px; border: 1.5px solid transparent; box-shadow: inset 0 0 0 1px var(--line);
  transition: box-shadow .15s, background .15s; width: 100%;
}
/* Placeholder ZNACZNIE jasniejszy niz wpisywany tekst — zeby podpowiedz nie mylila
   sie z realnie wpisana wartoscia. Wpisany tekst: czarny + pogrubiony (waga 600);
   placeholder: jasny slate + waga normalna (400). opacity:1 bo Firefox domyslnie
   przygasza placeholder (bez tego kolor nie bylby wierny). */
.input::placeholder, textarea.input::placeholder { color: #a6b1c2; font-weight: 400; opacity: 1; }
.input:focus, .select:focus, textarea.input:focus {
  outline: none; background: #fff; box-shadow: inset 0 0 0 2px var(--blue);
}
/* Stan bledu pola: obwodka jak przy fokusie (2px), ale czerwona zamiast granatowej. */
.input.err, .select.err, textarea.input.err { box-shadow: inset 0 0 0 2px #d92d20; background: #fff; }
.field .hint { font-size: 12.5px; color: var(--muted); }
.field .errmsg { font-size: 12.5px; color: var(--magenta); font-weight: 600; }
/* Komunikat bledu pod polem (formularze: zgloszenie, kontakt, szkolenia zamkniete). */
.field-err { color: #c0271c; font-size: 12.5px; font-weight: 600; margin-top: 6px; line-height: 1.45; }
/* Pole z bledem: gdy .field zawiera komunikat .field-err, podswietl jego input na czerwono.
   Dla formularzy z {{ form.field }} (szkolenia zamkniete, kontakt) input nie ma wlasnej
   klasy .err — :has() zalatwia to bez recznego renderu (wszystkie nowoczesne przegladarki). */
.field:has(> .field-err) .input,
.field:has(> .field-err) .select,
.field:has(> .field-err) textarea.input { box-shadow: inset 0 0 0 2px #d92d20; background: #fff; }
/* Wiersz zgody z bledem — czerwona etykieta, zeby bylo widac ktorej zgody brakuje. */
.chk-row.err label { color: #c0271c; }

/* ── Stan WYSYLANIA formularza (spinner na przycisku + blokada) ──────────────
   Ustawiane JS-em na `submit`, zdejmowane samo przy przejsciu na strone wyniku
   / ponownym renderze z bledami. Zapobiega "martwej ciszy" przy uploadzie duzych
   plikow (np. 9 MB) i podwojnemu wyslaniu. */
form.is-submitting { pointer-events: none; cursor: progress; }
.btn.is-loading { cursor: progress; }
.btn-spin {
  display: inline-block; width: 16px; height: 16px; margin-right: 9px; vertical-align: -3px;
  border: 2px solid rgba(255,255,255,.45); border-top-color: #fff; border-radius: 50%;
  animation: btnspin .6s linear infinite;
}
@keyframes btnspin { to { transform: rotate(360deg); } }

/* ---------- Sail / shard motif ----------
   Modernized abstraction of the WLR logo mark: stacked angular blades. */
.sail { position: relative; display: inline-block; line-height: 0; }
.sail svg { display:block; }

/* Decorative corner field of blades (hero / sections) */
.blades { position:absolute; pointer-events:none; opacity: var(--motif); }

/* ---------- Utilities ---------- */
.grid { display: grid; gap: 24px; }
.flex { display: flex; }
.center { display:flex; align-items:center; justify-content:center; }
.stack { display:flex; flex-direction:column; }
.divider { height:1px; background: var(--line); border:0; margin:0; }
.tnum { font-variant-numeric: tabular-nums; }
.fade-up { animation: fadeUp .6s cubic-bezier(.2,.7,.2,1) both; }
@keyframes fadeUp { from { opacity:0; transform: translateY(14px);} to {opacity:1; transform:none;} }

/* scrollbar polish */
.scroll-x { overflow-x:auto; scrollbar-width: thin; }
.scroll-x::-webkit-scrollbar { height: 8px; }
.scroll-x::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; }
