/* Cortex University — MODERN design tokens (register: digital/gamification).
   GAMIFICATION_USAGE_PLAN.md §1.3. Palette from the id-authenticator template +
   brand kit src-8; UI art from src-10. This is the APP register: it skins the
   whole portal chrome, dashboards, profiles and gamification surfaces.

   `<body class="reg-modern">` is the portal default (set in base.html). The
   modern register layers ON TOP of the base --bg/--fg/--accent theme system
   declared inline in base.html: because `body.reg-modern` is a descendant of
   the themed `<html>`, the overrides below win by inheritance while remaining
   fully theme-aware (light/dark) — nothing here is hard-forked from the theme.

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

@font-face {
  font-family: "Orbitron";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/static/fonts/modern/orbitron-600.woff2") format("woff2");
}
@font-face {
  font-family: "Orbitron";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/static/fonts/modern/orbitron-800.woff2") format("woff2");
}
@font-face {
  font-family: "Raleway";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/static/fonts/modern/raleway-700.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/modern/inter-400.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/static/fonts/modern/inter-600.woff2") format("woff2");
}

.reg-modern,
.modern-scope {
  --m-cyan:      #00E5FF;  /* primary accent */
  --m-cyan-deep: #0099CC;
  --m-violet:    #7B2FFF;  /* secondary accent (achievements, special) */
  --m-amber:     #FF8800;  /* highlight / gold-tier accent */
  --m-white:     #FFFFFF;
  --m-muted:     #8A9AA6;
  --m-bg:        #0A0F1C;  /* app ground */
  --m-panel:     #111827;  /* cards/panels */

  --m-font-display:  "Orbitron", "Segoe UI", monospace;          /* wordmarks, card titles, numerals */
  --m-font-head:     "Raleway", "Segoe UI", system-ui, sans-serif; /* section headings */
  --m-font-body:     "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; /* body, tables, forms */

  --m-frame-url:    url("/static/ui/modern/frames/frame-rect.png");
  --m-texture-hex:  url("/static/ui/modern/patterns/hex-mesh.png");

  /* modern grade metals (hex gems, src-7) */
  --metal-bronze:  #C97E3D;
  --metal-silver:  #D7DDE6;
  --metal-gold:    #F2C744;
  --metal-ruby:    #FF2D4E;
  --metal-diamond: #BFE9FF;
}

/* ── Wire the register into the live theme system ──────────────────────
   Fonts: body copy = Inter, section headings = Raleway; wordmarks = Orbitron
   (applied narrowly so the futuristic face never leaks into running text). */
body.reg-modern {
  --font-body: var(--m-font-body);
  --font-display: var(--m-font-head);
  /* Modern accent: neon cyan on the dark app ground; --accent-strong stays a
     deeper cyan so gradients/hovers keep contrast. Overrides base.html's blue
     by inheritance. */
  --accent: var(--m-cyan);
  --accent-strong: var(--m-cyan-deep);
}
/* Light theme needs the deeper cyan for legible links/controls on white. */
:root[data-theme="light"] body.reg-modern {
  --accent: #0087B3;
  --accent-strong: #006688;
}

body.reg-modern .brand-text,
body.reg-modern .boot-wordmark,
body.reg-modern .site-footer-brand > strong {
  font-family: var(--m-font-display);
  letter-spacing: 0.02em;
}
