/* Óma-Igala theme for the web portal: the Italo Festival palette (italofestival.org) over the Óma-Igala UI tokens.
   Loaded last on every layout; `html:root` / `html[data-bs-theme="dark"]` outrank the plain `:root` blocks in
   nics-ui.css, nics-chat.css and nics-email.css whatever order the pages load them in. */
html:root {
  --oma-forest-900: #041a17;
  --oma-forest-800: #06231f;
  --oma-forest-700: #0a3029;
  --oma-green: #006b35;
  --oma-green-600: #00592c;
  --oma-yellow: #ffc800;
  --oma-yellow-300: #ffd84d;
  --oma-yellow-edge: #c99a00;
  --oma-cream: #fff4d6;
  --oma-cream-200: #fbecc0;
  --oma-red: #d7191f;
  --oma-ink: #12201c;
  --oma-muted: #5b6b66;
  --oma-display: "Luckiest Guy", "Arial Black", system-ui, sans-serif;
  /* Sign-in brand panel (_Auth.cshtml): the mosaic of festival colours on green */
  --auth-art: var(--oma-green);
  --auth-red: var(--oma-red);
  --auth-yellow: var(--oma-yellow);
  --auth-gold: var(--oma-yellow-300);
  --auth-cream: var(--oma-cream);
  --auth-forest: var(--oma-forest-800);
  --auth-ink: var(--oma-forest-800);

  --n-accent: var(--oma-green);
  --n-accent-strong: var(--oma-green-600);
  --n-accent-soft: #e3f2e8;
  --n-accent-softer: #f2f9f4;
  --n-navy: var(--oma-forest-800);
  --n-canvas: #fff8e6;
  --n-surface: #ffffff;
  --n-panel: #fbf3de;
  --n-border: #eadfc2;
  --n-border-strong: #dccd9f;
  /* the left sidebar: a deeper cream panel than the page, with white for the current link */
  --n-sidebar: var(--oma-cream-200);
  --n-sidebar-hover: var(--n-panel);
  --n-sidebar-current: var(--n-surface);
  --n-text: var(--oma-ink);
  --n-text-2: var(--oma-muted);
  --n-text-3: #8a978f;
  --n-link: var(--oma-green);
  --n-on-accent: #ffffff;
  --n-highlight: var(--oma-yellow);
  --n-danger: var(--oma-red);
  --n-danger-strong: #b01218;
  --n-shadow-sm: 0 1px 2px rgba(4, 26, 23, 0.08);
  --n-shadow: 0 8px 24px rgba(4, 26, 23, 0.1);
  --n-shadow-lg: 0 20px 50px -20px rgba(4, 26, 23, 0.45);
  --n-r-card: 18px;
  --n-font: Outfit, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --nch-accent: var(--oma-green);
  --nch-accent-strong: var(--oma-green-600);
  --nch-accent-soft: #e3f2e8;
  --nch-accent-softer: #f2f9f4;
  --nch-navy: var(--oma-forest-800);
  --nch-canvas: #fff8e6;
  --nch-panel: #fbf3de;
  --nch-border: #eadfc2;
  --nch-text: var(--oma-ink);
  --nch-text-2: var(--oma-muted);
  --nch-out: #fff1bf;
  --nch-out-text: var(--oma-ink);
  --nch-out-quote: rgba(0, 107, 53, .1);
  --bs-primary: var(--oma-green);
}
html[data-bs-theme="dark"] {
  --n-accent: var(--oma-yellow);
  --n-accent-strong: var(--oma-yellow-300);
  --n-accent-soft: rgba(255, 200, 0, .12);
  --n-accent-softer: rgba(255, 200, 0, .06);
  --n-canvas: var(--oma-forest-900);
  --n-surface: var(--oma-forest-800);
  --n-panel: var(--oma-forest-700);
  --n-border: #16453c;
  --n-border-strong: #21594d;
  --n-sidebar: var(--oma-forest-800);
  --n-sidebar-hover: var(--n-accent-softer);
  --n-sidebar-current: var(--oma-forest-700);
  --n-text: var(--oma-cream);
  --n-text-2: #b7c2b5;
  --n-text-3: #8a978f;
  --n-link: var(--oma-yellow);
  --n-on-accent: var(--oma-forest-800);
  --nch-accent: var(--oma-yellow);
  --nch-accent-strong: var(--oma-yellow-300);
  --nch-accent-soft: rgba(255, 200, 0, .12);
  --nch-accent-softer: rgba(255, 200, 0, .06);
  --nch-canvas: var(--oma-forest-900);
  --nch-surface: var(--oma-forest-800);
  --nch-panel: var(--oma-forest-700);
  --nch-border: #16453c;
  --nch-text: var(--oma-cream);
  --nch-out: #0f4a32;
  --nch-out-text: var(--oma-cream);
}

/* The web chat (nics-chat.css) sets its palette on .nch itself and on its popups, which outranks the root values above,
   so map it onto the Óma-Igala tokens here; html:root / html[data-bs-theme] outrank its own light and dark blocks. */
html:root .nch, html:root .nch-pop, html:root dialog.nch-modal {
  --nch-accent: var(--n-accent);
  --nch-accent-strong: var(--n-accent-strong);
  --nch-accent-soft: var(--n-accent-soft);
  --nch-accent-softer: var(--n-accent-softer);
  --nch-surface: var(--n-surface);
  --nch-canvas: var(--n-canvas);
  --nch-panel: var(--n-panel);
  --nch-border: var(--n-border);
  --nch-text: var(--n-text);
  --nch-text-2: var(--n-text-2);
  --nch-text-3: var(--n-text-3);
  --nch-danger: var(--n-danger);
  --nch-mention: var(--n-link);
  --nch-tick-read: var(--n-accent);
  --nch-in: var(--n-surface);
  --nch-out: #fff1bf;
  --nch-out-text: var(--oma-ink);
  --nch-out-quote: rgba(0, 107, 53, .1);
}
html[data-bs-theme="dark"] .nch, html[data-bs-theme="dark"] .nch-pop, html[data-bs-theme="dark"] dialog.nch-modal {
  --nch-in: #16453c;
  --nch-out: #0f4a32;
  --nch-out-text: var(--oma-cream);
  --nch-out-quote: rgba(255, 255, 255, .08);
}

/* Headings in the festival display face, like the site's .h2. */
.n-page-title, .n-auth h1, .oma-display {
  font-family: var(--oma-display);
  font-weight: 400;
  letter-spacing: .01em;
  text-transform: uppercase;
}

/* Primary buttons: the raised festival-yellow pill (site .btn--yellow). */
.n-btn.primary, .btn-primary {
  background: var(--oma-yellow) !important;
  border-color: var(--oma-yellow) !important;
  color: var(--oma-forest-800) !important;
  box-shadow: 0 3px 0 var(--oma-yellow-edge);
}
.n-btn.primary:hover, .btn-primary:hover { background: var(--oma-yellow-300) !important; }

/* The Óma-Igala wordmark (top bar, sign-in pages) in the site's .hero__italo style: festival yellow in the display
   face on a hard green offset shadow with a soft dark one behind it. */
.n-brand-text, .n-auth-wordmark {
  font-family: var(--oma-display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .01em;
  line-height: 1.1;
  color: var(--oma-yellow);
  text-shadow: 2px 2px 0 var(--oma-green), 4px 4px 0 rgba(0, 0, 0, .25);
}
.n-auth-wordmark { text-shadow: 3px 3px 0 var(--oma-green), 6px 6px 0 rgba(0, 0, 0, .25); }

/* Elephant logo: the green mark on light pages, the gold (reversed) mark in dark mode. Markup carries both images,
   one with .oma-logo-light and one with .oma-logo-dark. Source art: packages/brand/logo. */
.oma-logo-dark { display: none !important; }
[data-bs-theme="dark"] .oma-logo-light { display: none !important; }
[data-bs-theme="dark"] .oma-logo-dark { display: block !important; }
.nch-hero-mark .nch-hero-logo { width: 76px; height: 76px; }
