/* PMF Finance — Colors & Type Tokens
   ----------------------------------------------------------------
   The newspaper system. Black ink, white newsprint, red ledger-line
   accents, plus a small accent gray scale for chrome and dividers.
   Typefaces: UnifrakturMaguntia (masthead/blackletter), Franklin
   Gothic Medium (headlines/UI), Georgia/Garamond (body/serif).
   ---------------------------------------------------------------- */

@import url('https://fonts.googleapis.com/css2?family=UnifrakturMaguntia&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Libre+Franklin:wght@400;500;600;700;800;900&display=swap');

@font-face {
  font-family: 'Deutsch Gothic';
  src: url('/index/fonts/Deutsch.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  /* ---------- Brand colors (newspaper) ---------- */
  --color-newspaper-black: #000000;
  --color-newspaper-white: #FFFFFF;
  --color-newspaper-red:   #CC0000;     /* ledger-line accent */
  --color-newsprint:       #F7F4EC;     /* off-white paper tone (used in cards) */
  --color-newspaper-grey-light:  #F5F5F5;
  --color-newspaper-grey-medium: #CCCCCC;
  --color-newspaper-grey-dark:   #666666;

  /* ---------- Accent red scale ---------- */
  --color-accent-red-100: #FFE5E5;
  --color-accent-red-200: #FFB8B8;
  --color-accent-red-300: #FF8A8A;
  --color-accent-red-400: #FF5C5C;
  --color-accent-red-500: #ff3131;  /* hot red — links, alerts, "NO" cells */
  --color-accent-red-600: #CC2727;
  --color-accent-red-700: #991D1D;
  --color-accent-red-800: #661414;
  --color-accent-red-900: #330A0A;

  /* ---------- Accent gray scale ---------- */
  --color-accent-gray-100: #F7F7F7;
  --color-accent-gray-200: #E6E6E6;
  --color-accent-gray-300: #D4D4D4;
  --color-accent-gray-400: #A3A3A3;
  --color-accent-gray-500: #737373;
  --color-accent-gray-600: #525252;
  --color-accent-gray-700: #404040;
  --color-accent-gray-800: #262626;
  --color-accent-gray-900: #171717;

  /* ---------- Trade semantic ---------- */
  --color-yes-fill:   #A8C8A8;  /* muted green — YES cells */
  --color-yes-text:   #1A5A1A;
  --color-no-fill:    #C8A8A8;  /* muted red   — NO  cells */
  --color-no-text:    #5A1A1A;
  --color-warning:    #E8C878;
  --color-warning-text: #5A4A1A;

  /* ---------- Semantic FG/BG ---------- */
  --bg:        var(--color-newspaper-white);
  --bg-paper:  var(--color-newsprint);
  --bg-muted:  var(--color-newspaper-grey-light);
  --fg:        var(--color-newspaper-black);
  --fg-muted:  var(--color-newspaper-grey-dark);
  --fg-accent: var(--color-newspaper-red);
  --rule:      var(--color-newspaper-black);
  --rule-thin: var(--color-accent-gray-300);

  /* ---------- Typefaces ---------- */
  --font-masthead: "UnifrakturMaguntia", "Deutsch Gothic", "Old English Text MT", serif;
  --font-headline: "Libre Franklin", "Franklin Gothic Medium", "Arial Narrow", Arial, sans-serif;
  --font-body:     "Libre Franklin", "Franklin Gothic Medium", "Arial Narrow", Arial, sans-serif;
  --font-serif:    Georgia, Garamond, "Times New Roman", serif;
  --font-mono:     "Monaco", "Courier New", monospace;

  /* ---------- Spacing / radii / borders ---------- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  --radius-0: 0px;     /* default — newspaper has hard corners */
  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 8px;    /* used sparingly on overlay cards */

  --border-1: 1px solid var(--rule);
  --border-2: 2px solid var(--rule);
  --border-4: 4px double var(--rule);
  --border-thin: 1px solid var(--rule-thin);

  /* ---------- Elevation / shadows ---------- */
  --shadow-card:    0 4px 12px rgba(0,0,0,0.15);
  --shadow-overlay: 0 8px 24px rgba(0,0,0,0.20);
  --shadow-press-shift: 1px 1px 0 #000;        /* offset CTA shadow */

  /* Embossed retro-button highlight/shadow recipe */
  --emboss-light: rgba(255,255,255,0.5);
  --emboss-dark:  rgba(0,0,0,0.3);

  /* ---------- Touch targets ---------- */
  --touch-min: 44px;
  --touch-sm:  40px;
  --touch-lg:  48px;

  /* ---------- Motion ---------- */
  --motion-fast:   150ms ease;
  --motion-normal: 300ms ease;
  --motion-slow:   500ms ease;
}

/* ============================================================
   Semantic tag styles — mirror the newspaper voice
   ============================================================ */

body {
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.masthead {
  font-family: var(--font-masthead);
  font-weight: 400;
  font-size: clamp(48px, 8vw, 96px);
  letter-spacing: 0.01em;
  line-height: 1;
  text-align: center;
  text-shadow: 3px 3px 5px rgba(0,0,0,0.12);
  color: var(--fg);
}

h1, .h1 {
  font-family: var(--font-headline);
  font-weight: 800;
  font-size: clamp(36px, 4vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-3);
}

h2, .h2 {
  font-family: var(--font-headline);
  font-weight: 700;
  font-size: clamp(24px, 2.4vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 var(--space-3);
}

h3, .h3 {
  font-family: var(--font-headline);
  font-weight: 700;
  font-size: 20px;
  line-height: 1.25;
  margin: 0 0 var(--space-2);
}

h4, .h4 {
  font-family: var(--font-headline);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.3;
  margin: 0 0 var(--space-2);
}

p, .p {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  margin: 0 0 var(--space-3);
}

.kicker, .eyebrow {
  font-family: var(--font-headline);
  font-weight: 700;
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-accent);
}

.byline {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 14px;
  color: var(--fg-muted);
}

.meta {
  font-family: var(--font-headline);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.serif    { font-family: var(--font-serif); }
.headline-text { font-family: var(--font-headline); font-weight: 700; }

code, .code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--color-accent-gray-200);
  padding: 0.15em 0.35em;
  color: var(--fg-accent);
  border: 1px solid var(--color-accent-gray-300);
}

a { color: var(--fg-accent); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--color-accent-red-700); text-decoration-thickness: 2px; }

hr.rule        { border: 0; border-top: var(--border-2); margin: var(--space-4) 0; }
hr.rule-thin   { border: 0; border-top: var(--border-thin); margin: var(--space-4) 0; }
hr.rule-double { border: 0; border-top: var(--border-4); margin: var(--space-5) 0; }

.drop-cap::first-letter {
  float: left;
  font-family: var(--font-headline);
  font-size: 3.75rem;
  line-height: 1;
  margin: 4px 6px 0 0;
  font-weight: 800;
}
