/* Cortex University — CLASSIC design tokens (register: old-fashion).
   GAMIFICATION_USAGE_PLAN.md §1.2. Palette from brand kit src-8, gems from
   src-6. Consumed by the printable/official surfaces — certificates, titles,
   Student ID cards, recommendation letters, transcripts — which opt in by
   carrying `.reg-classic` (or a local `.classic-scope` for embedded previews).

   Self-hosted OFL fonts only (CSP default-src 'self'); no CDN, no font-src
   relaxation needed. Fonts live under /static/fonts/classic/ — see
   /static/fonts/README.txt and /static/fonts/LICENSES/. */

@font-face {
  font-family: "Cinzel";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/static/fonts/classic/cinzel-700.woff2") format("woff2");
}
@font-face {
  font-family: "Cinzel";
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url("/static/fonts/classic/cinzel-900.woff2") format("woff2");
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/static/fonts/classic/montserrat-500.woff2") format("woff2");
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/static/fonts/classic/montserrat-600.woff2") format("woff2");
}

.reg-classic,
.classic-scope {
  --c-gold:      #D4AF37;  /* primary metal */
  --c-gold-deep: #A8842A;
  --c-navy:      #0D1B2A;  /* ground */
  --c-red:       #8B0000;  /* seals, primary buttons */
  --c-silver:    #C0C0C0;
  --c-green:     #1F4D2E;  /* ribbon/success */
  --c-parchment: #EFE3C6;  /* letter/banner fill */
  --c-ink:       #14100A;

  --c-font-display: "Cinzel", "Times New Roman", serif;          /* headers, titles, names */
  --c-font-body:    "Montserrat", "Helvetica Neue", sans-serif;  /* body, labels */

  --c-frame-url:         url("/static/ui/classic/frames/frame-rect.png");
  --c-texture-navy:      url("/static/ui/classic/patterns/damask-navy.png");
  --c-texture-parchment: url("/static/ui/classic/patterns/parchment.png");

  /* metals shared with grade renders (classic gems, src-6) */
  --metal-bronze:  #B0722D;
  --metal-silver:  #C8CDD4;
  --metal-gold:    #E8C34A;
  --metal-ruby:    #C21830;
  --metal-diamond: #DDEFF7;
}

/* ── Wire the CLASSIC register into the live theme system (P21) ──────────
   Parallel to tokens-modern.css: when the whole portal opts into the classic
   register (`<body class="reg-classic">`, set by the nav toggle / lynx_ui
   cookie), swap the running fonts to the heraldic serif/sans pair and repoint
   the shared --accent tokens to heraldic gold. Everything layers ON TOP of the
   base --bg/--fg/--border theme declared in base.html, so light + dark both
   keep working — nothing here is hard-forked from the theme. */
body.reg-classic {
  /* Body copy = Montserrat; section headings = Cinzel (the ornate register).
     Display leaks only where intended (wordmark/headings, below). */
  --font-body: var(--c-font-body);
  --font-display: var(--c-font-display);
  /* Heraldic gold accent on the dark ground; --accent-strong is the deeper
     gold so gradients/hovers keep contrast. Overrides base.html's blue by
     inheritance. */
  --accent: #C9A233;
  --accent-strong: var(--c-gold-deep);
}
/* Light theme needs a deeper gold-bronze for legible links/controls on the
   parchment/white ground (raw gold fails AA on light). */
:root[data-theme="light"] body.reg-classic {
  --accent: #8A6A12;
  --accent-strong: #6B5210;
}

/* Wordmarks + display headings take the engraved Cinzel face (applied
   narrowly so the serif never floods running table/body text). */
body.reg-classic .brand-text,
body.reg-classic .boot-wordmark,
body.reg-classic .site-footer-brand > strong,
body.reg-classic h1,
body.reg-classic h2 {
  font-family: var(--c-font-display);
  letter-spacing: 0.01em;
}
