/* ============================================================
   IRPL — Instytut Rozwoju i Promocji Lotnictwa
   Foundations: fonts, color tokens, type scale
   Import this file first in any IRPL artifact.
   ============================================================ */

/* Lato — body, buttons & UI (sans-serif). Hosted locally (RODO: brak transferu IP do Google).
   Subsety latin + latin-ext (ogonki PL); wagi 300/400/700/900 + italic 400/700.
   Headings stay in Cormorant; the logotype stays in Caudex. */
@font-face {
  font-family: "Lato";
  src: url("fonts/Lato-Light-lat.woff2") format("woff2");
  font-weight: 300; font-style: normal; font-display: swap;
  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: "Lato";
  src: url("fonts/Lato-Light-ext.woff2") format("woff2");
  font-weight: 300; font-style: normal; font-display: swap;
  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: "Lato";
  src: url("fonts/Lato-Regular-lat.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
  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: "Lato";
  src: url("fonts/Lato-Regular-ext.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
  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: "Lato";
  src: url("fonts/Lato-RegularItalic-lat.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
  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: "Lato";
  src: url("fonts/Lato-RegularItalic-ext.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
  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: "Lato";
  src: url("fonts/Lato-Bold-lat.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
  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: "Lato";
  src: url("fonts/Lato-Bold-ext.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
  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: "Lato";
  src: url("fonts/Lato-Black-lat.woff2") format("woff2");
  font-weight: 900; font-style: normal; font-display: swap;
  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: "Lato";
  src: url("fonts/Lato-Black-ext.woff2") format("woff2");
  font-weight: 900; font-style: normal; font-display: swap;
  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;
}

/* ---------- FONTS ---------- */
/* Caudex — reserved for the logotype / wordmark and rare display moments */
@font-face {
  font-family: "Caudex";
  src: url("fonts/Caudex-Regular.ttf") format("truetype");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Caudex";
  src: url("fonts/Caudex-Bold.ttf") format("truetype");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Caudex";
  src: url("fonts/Caudex-Italic.ttf") format("truetype");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Caudex";
  src: url("fonts/Caudex-BoldItalic.ttf") format("truetype");
  font-weight: 700; font-style: italic; font-display: swap;
}

/* Cormorant — the working voice: headings, body, official documents */
@font-face {
  font-family: "Cormorant";
  src: url("fonts/Cormorant-Light.ttf") format("truetype");
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Cormorant";
  src: url("fonts/Cormorant-Regular.ttf") format("truetype");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Cormorant";
  src: url("fonts/Cormorant-Medium.ttf") format("truetype");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Cormorant";
  src: url("fonts/Cormorant-SemiBold.ttf") format("truetype");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Cormorant";
  src: url("fonts/Cormorant-Bold.ttf") format("truetype");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Cormorant";
  src: url("fonts/Cormorant-Italic.ttf") format("truetype");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Cormorant";
  src: url("fonts/Cormorant-MediumItalic.ttf") format("truetype");
  font-weight: 500; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Cormorant";
  src: url("fonts/Cormorant-SemiBoldItalic.ttf") format("truetype");
  font-weight: 600; font-style: italic; font-display: swap;
}

:root {
  /* ---------- BRAND CORE (do not alter — see Identyfikacja Wizualna) ---------- */
  --granat:    #002868; /* Pantone 282 C — navy, primary */
  --czerwien:  #BF0A30; /* Pantone 193 C — red, accent  */
  --white:     #FFFFFF;

  /* ---------- NAVY SCALE (granat tints/shades, oklch-harmonized) ---------- */
  --navy-900: #001536;
  --navy-800: #001f4f;
  --navy-700: #002868; /* = --granat */
  --navy-600: #0a3a86;
  --navy-500: #1f50a3;
  --navy-400: #4a72bd;
  --navy-300: #84a0d4;
  --navy-200: #bccbe8;
  --navy-100: #e0e7f3;
  --navy-50:  #f1f4fa;

  /* ---------- RED SCALE (czerwień) ---------- */
  --red-800: #7d0820;
  --red-700: #9c0828;
  --red-600: #BF0A30; /* = --czerwien */
  --red-500: #d92646;
  --red-400: #e7596f;
  --red-200: #f5bcc6;
  --red-100: #fbe2e7;

  /* ---------- NEUTRALS (cool, faintly navy-leaning) ---------- */
  --ink:      #14181f; /* near-black text on light */
  --slate-900:#1f2733;
  --slate-700:#3b4757;
  --slate-500:#677488;
  --slate-400:#8a96a8;
  --slate-300:#b9c2cf;
  --slate-200:#dce1e9;
  --slate-100:#eef1f5;
  --paper:    #fbfcfe; /* off-white page */
  --cloud:    #f5f7fa; /* subtle panel fill */

  /* ---------- SEMANTIC ---------- */
  --color-bg:            var(--paper);
  --color-surface:       var(--white);
  --color-surface-alt:   var(--cloud);
  --color-fg:            var(--ink);
  --color-fg-muted:      var(--slate-500);
  --color-fg-subtle:     var(--slate-400);
  --color-fg-on-dark:    var(--white);
  --color-fg-on-dark-muted: var(--navy-200);

  --color-primary:       var(--granat);
  --color-primary-hover: var(--navy-800);
  --color-primary-press: var(--navy-900);
  --color-accent:        var(--czerwien);
  --color-accent-hover:  var(--red-700);
  --color-accent-press:  var(--red-800);

  --color-border:        var(--slate-200);
  --color-border-strong: var(--slate-300);
  --color-ring:          color-mix(in oklch, var(--granat) 35%, transparent);

  /* status (derived, sparing use) */
  --color-success: #1f7a4d;
  --color-warning: #b8860b;
  --color-danger:  var(--czerwien);

  /* ---------- TYPE FAMILIES ---------- */
  --font-logo:    "Caudex", "Times New Roman", serif;       /* logotype only */
  --font-display: "Cormorant", "Caudex", Georgia, serif;     /* headings */
  --font-lead:    "Cormorant", Georgia, serif;               /* lead / standfirst (optional serif) */
  --font-body:    "Lato", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif; /* body copy */
  --font-ui:      "Lato", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif; /* buttons, labels, UI */
  --font-mono:    "IBM Plex Mono", "SFMono-Regular", ui-monospace, monospace;

  /* ---------- TYPE SCALE (fluid-ish, px) ---------- */
  --text-xs:   13px;
  --text-sm:   15px;
  --text-base: 17px;  /* Lato body — sans-serif, larger x-height than Cormorant */
  --text-md:   25px;
  --text-lg:   26px;
  --text-xl:   33px;
  --text-2xl:  42px;
  --text-3xl:  54px;
  --text-4xl:  70px;
  --text-5xl:  92px;

  --leading-tight:  1.08;
  --leading-snug:   1.22;
  --leading-normal: 1.45;
  --leading-loose:  1.6;

  --tracking-tight:  -0.01em;
  --tracking-normal: 0;
  --tracking-wide:   0.04em;
  --tracking-caps:   0.14em;  /* small-caps eyebrows */

  --weight-light: 300;
  --weight-regular: 400;
  /* Body copy is Lato Regular (400). Lato offers 300/400/700/900 only —
     for emphasis/UI use 700, not 500/600. Cormorant (headings/lead) keeps 500/600. */
  --weight-body: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;

  /* ---------- SPACING (8px base, 4px half-steps) ---------- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --space-10: 128px;

  /* ---------- RADII ---------- */
  --radius-sm: 3px;
  --radius-md: 6px;
  --radius-lg: 10px;
  --radius-xl: 16px;
  --radius-pill: 999px;

  /* ---------- SHADOWS (cool, navy-tinted, restrained) ---------- */
  --shadow-xs: 0 1px 2px rgba(0, 40, 104, 0.06);
  --shadow-sm: 0 1px 3px rgba(0, 40, 104, 0.08), 0 1px 2px rgba(0, 40, 104, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 40, 104, 0.10), 0 2px 4px rgba(0, 40, 104, 0.06);
  --shadow-lg: 0 12px 32px rgba(0, 40, 104, 0.14), 0 4px 8px rgba(0, 40, 104, 0.06);

  /* ---------- MOTION ---------- */
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 120ms;
  --dur-base: 200ms;
  --dur-slow: 360ms;
}

/* ============================================================
   SEMANTIC ELEMENT DEFAULTS
   Apply by adding class "irpl" to a root container, or use
   the utility classes directly.
   ============================================================ */
.irpl {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-body);
  line-height: var(--leading-normal);
  color: var(--color-fg);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.irpl-eyebrow {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--color-accent);
}

.irpl-h1 {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  line-height: var(--leading-tight);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-tight);
  color: var(--color-primary);
}
.irpl-h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  line-height: var(--leading-snug);
  font-weight: var(--weight-semibold);
  color: var(--color-primary);
}
.irpl-h3 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  line-height: var(--leading-snug);
  font-weight: var(--weight-semibold);
  color: var(--color-fg);
}
.irpl-h4 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  line-height: var(--leading-snug);
  font-weight: var(--weight-semibold);
  color: var(--color-fg);
}
.irpl-lead {
  font-family: var(--font-lead);
  font-size: var(--text-lg);
  line-height: var(--leading-snug);
  font-weight: var(--weight-semibold);
  color: var(--color-fg-muted);
}
.irpl-p {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-body);
  line-height: var(--leading-normal);
  color: var(--color-fg);
}
.irpl-small {
  font-size: var(--text-sm);
  font-weight: var(--weight-body);
  color: var(--color-fg-muted);
}
/* UI label — Lato, bold, slight tracking */
.irpl-label {
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  letter-spacing: 0.01em;
  color: var(--color-fg);
}
.irpl-mono {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
}
