/* ============================================================
   ANTYAI — Colors & Type Foundations  ·  v2 INSTITUTIONAL NAVY
   Towarzystwo Walki z AI · antyai.org
   "Państwowa instytucja, nie butik."
   ============================================================ */

/* ---------- Webfonts (IBM Plex — gov-tech institutional) ---------- */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Serif:ital,wght@0,400;0,500;0,600;1,400;1,500&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  /* ============================================================
     COLOR SYSTEM — granat + neutralne urzędowe + akcenty medali
     The palette of a real institution: navy ink on white,
     state-archive greys, the red of a notarial stamp.
     ============================================================ */

  /* — Primary: granat (navy) ink — the brand's voice — */
  --navy-950: #07142E;       /* near-black navy, archive */
  --navy-900: #0B1F44;       /* PRIMARY — masthead, type, hairlines */
  --navy-800: #102A53;       /* secondary navy surface */
  --navy-700: #1B3A6B;
  --navy-600: #2E508B;
  --navy-500: #4A6EA8;
  --navy-400: #7D98C2;
  --navy-300: #B0C0D8;
  --navy-200: #D5DDEA;
  --navy-100: #E8ECF4;
  --navy-50:  #F4F6FB;       /* near-white navy tint */

  /* — Neutrals: official paper + state greys — */
  --paper-0:   #FFFFFF;      /* clean white — official documents */
  --paper-50:  #FAFBFC;      /* faintest grey wash */
  --paper-100: #F4F5F7;      /* default app surface */
  --paper-200: #E6E8EC;      /* recessed, table headers */
  --paper-300: #C8CCD3;      /* hairline contrast */

  --grey-700: #3A4150;
  --grey-500: #6B7280;
  --grey-400: #9AA0AC;
  --grey-300: #C2C6CE;

  /* — Stamp red — notarial wax. Used sparingly — */
  --stamp-700: #6B1F1C;
  --stamp-600: #8C2D2A;
  --stamp-500: #A8302A;
  --stamp-400: #C24A40;
  --stamp-100: #F2DCD8;

  /* — Tier medal accents — patynowane, oksydowane, matowe — */
  --bronze-700: #5A4527;
  --bronze-600: #7A5C36;
  --bronze-500: #8B6F47;
  --bronze-400: #A38560;
  --bronze-100: #E6DBC7;

  --silver-700: #5F636A;
  --silver-600: #7B8088;
  --silver-500: #9CA0A6;
  --silver-400: #B5B8BD;
  --silver-100: #E4E5E8;

  --gold-700:   #7A5E2C;
  --gold-600:   #98762F;
  --gold-500:   #B89146;
  --gold-400:   #C9A968;
  --gold-100:   #EFE3C4;

  /* — Verify green for "Zweryfikowany" state — */
  --verify-700: #1F4F2E;
  --verify-600: #2D6B41;
  --verify-500: #3F8A56;
  --verify-100: #DAEADD;

  /* ============================================================
     SEMANTIC COLOR TOKENS — design against these, not raw palette
     ============================================================ */
  --fg-1:        var(--navy-900);    /* primary text — navy ink */
  --fg-2:        var(--navy-800);    /* secondary text */
  --fg-3:        var(--grey-500);    /* tertiary, captions */
  --fg-4:        var(--grey-400);    /* muted, legalese */
  --fg-on-dark:  var(--paper-0);
  --fg-on-dark-2: var(--navy-200);

  --bg-1:       var(--paper-0);      /* primary surface — clean white */
  --bg-2:       var(--paper-50);     /* lifted surface */
  --bg-3:       var(--paper-100);    /* app surface, recessed */
  --bg-tint:    var(--navy-50);      /* navy-tinted block */
  --bg-inverse: var(--navy-900);     /* official, archival, masthead */

  --line-1: var(--navy-900);         /* primary hairline */
  --line-2: var(--paper-200);        /* light rule */
  --line-3: var(--paper-300);        /* mid rule */

  --accent-stamp: var(--stamp-500);
  --accent-navy:  var(--navy-900);
  --accent-bronze: var(--bronze-500);
  --accent-silver: var(--silver-500);
  --accent-gold:   var(--gold-500);

  /* ============================================================
     TYPOGRAPHY SYSTEM — IBM Plex family (gov-tech institutional)
       · Sans       — IBM Plex Sans   — display, UI, body default
       · Serif      — IBM Plex Serif  — certificate body, legal copy ONLY
       · Mono       — IBM Plex Mono   — serial numbers, hashes
     Serif use is INTENTIONALLY LIMITED — this is a state institution,
     not a Viennese tea-room.
     ============================================================ */

  --font-sans:    'IBM Plex Sans', 'Public Sans', 'Helvetica Neue', Arial, sans-serif;
  --font-serif:   'IBM Plex Serif', 'Times New Roman', Georgia, serif;
  --font-mono:    'IBM Plex Mono', 'JetBrains Mono', 'Courier New', monospace;

  /* Sizes — institutional documents need readable, not ornamental, scale */
  --fs-display-xl: 80px;
  --fs-display-lg: 60px;
  --fs-display-md: 44px;
  --fs-display-sm: 32px;
  --fs-h1:   36px;
  --fs-h2:   26px;
  --fs-h3:   20px;
  --fs-h4:   16px;
  --fs-body: 16px;
  --fs-body-sm: 14px;
  --fs-caption: 13px;
  --fs-eyebrow: 11px;
  --fs-micro: 10px;

  /* Line heights */
  --lh-tight: 1.0;
  --lh-display: 1.08;
  --lh-snug: 1.3;
  --lh-body: 1.55;
  --lh-loose: 1.7;

  /* Letter spacing — institutional copy is tracked at caps, tight at display */
  --ls-tighter: -0.02em;
  --ls-tight: -0.01em;
  --ls-normal: 0;
  --ls-wide:   0.04em;
  --ls-wider:  0.10em;
  --ls-widest: 0.18em;          /* eyebrows, masthead lines */

  /* ============================================================
     SPACING, RADII, RULES, SHADOWS
     ============================================================ */
  --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 — institutions don't round things */
  --radius-0: 0;
  --radius-1: 2px;
  --radius-2: 3px;
  --radius-3: 4px;
  --radius-pill: 999px;

  /* Border weights */
  --rule-hair: 0.5px;
  --rule-1: 1px;
  --rule-2: 2px;
  --rule-thick: 3px;

  /* Shadows — flat institutional, very subtle */
  --shadow-0: none;
  --shadow-1: 0 1px 0 rgba(11,31,68,0.06), 0 1px 2px rgba(11,31,68,0.04);
  --shadow-2: 0 1px 0 rgba(11,31,68,0.08), 0 6px 16px -4px rgba(11,31,68,0.10);
  --shadow-3: 0 2px 0 rgba(11,31,68,0.12), 0 20px 40px -12px rgba(11,31,68,0.20);
  --shadow-press: inset 0 1px 2px rgba(11,31,68,0.18);

  /* Motion */
  --ease-out: cubic-bezier(0.2, 0.6, 0.2, 1);
  --ease-in-out: cubic-bezier(0.6, 0, 0.2, 1);
  --dur-1: 120ms;
  --dur-2: 200ms;
  --dur-3: 320ms;
}

/* ============================================================
   SEMANTIC ELEMENT STYLES
   ============================================================ */

html { color-scheme: light; }
body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--fg-1);
  background: var(--bg-1);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, .display {
  font-family: var(--font-sans);
  font-weight: 600;
  color: var(--fg-1);
  letter-spacing: var(--ls-tight);
  line-height: var(--lh-display);
  margin: 0;
}

h1 { font-size: var(--fs-h1); font-weight: 700; letter-spacing: var(--ls-tighter); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); font-weight: 600; letter-spacing: var(--ls-normal); }

.display-xl { font-family: var(--font-sans); font-size: var(--fs-display-xl); font-weight: 700; line-height: var(--lh-tight); letter-spacing: var(--ls-tighter); }
.display-lg { font-family: var(--font-sans); font-size: var(--fs-display-lg); font-weight: 700; line-height: var(--lh-display); letter-spacing: var(--ls-tighter); }
.display-md { font-family: var(--font-sans); font-size: var(--fs-display-md); font-weight: 600; line-height: var(--lh-display); letter-spacing: var(--ls-tight); }

p, .body { font-family: var(--font-sans); font-size: var(--fs-body); line-height: var(--lh-body); }
.body-sm { font-size: var(--fs-body-sm); line-height: var(--lh-body); }

/* Serif body — reserved for the certificate's legal statement */
.serif {
  font-family: var(--font-serif);
  line-height: var(--lh-body);
}

.caption { font-family: var(--font-sans); font-size: var(--fs-caption); color: var(--fg-3); line-height: var(--lh-snug); }

.eyebrow {
  font-family: var(--font-sans);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--fg-2);
}

code, kbd, samp, .mono {
  font-family: var(--font-mono);
  font-size: 0.92em;
  letter-spacing: 0;
}

.serial {
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Rules / dividers */
hr, .rule {
  border: 0;
  border-top: var(--rule-1) solid var(--line-1);
  margin: var(--space-5) 0;
}
.rule-thin { border-top-color: var(--line-2); }
.rule-double { border: 0; height: 5px; border-top: 1px solid var(--line-1); border-bottom: 1px solid var(--line-1); }

::selection { background: var(--navy-900); color: var(--paper-0); }

/* ============================================================
   BACKWARD-COMPAT ALIASES
   Old v1 token names map onto v2 institutional navy palette,
   so existing preview cards / UI-kit components keep working
   without edits.
   ============================================================ */
:root {
  --ink-900: var(--navy-900);
  --ink-800: var(--navy-800);
  --ink-700: var(--navy-800);
  --ink-600: var(--grey-700);
  --ink-500: var(--grey-500);
  --ink-400: var(--grey-400);
  --ink-300: var(--grey-300);
  --ink-200: var(--paper-200);
  --ink-100: var(--paper-100);

  --paper-400: var(--paper-300);

  --font-display: var(--font-sans);
  --font-caps:    var(--font-sans);
  --font-body:    var(--font-sans);
}
