﻿/*
 * CSS custom-property mirror of the brand design tokens.
 *
 * Under Content/css rather than the React tree because Vite only bundles CSS that
 * something imports: a copy under React/src is never emitted to Content/dist and can
 * never be served. _LayoutAuth.cshtml references this file directly.
 *
 * MUST stay in step with React/src/pages/auth/tokens/{palette,shape,typography}.ts,
 * which remain the source of truth. Nothing catches drift between the two.
 */

/*
 * Self-hosted Plus Jakarta Sans, SIL Open Font License 1.1 (Content/fonts/OFL.txt).
 * No font CDN on the auth path: this is the one screen nobody can skip, so it must not
 * depend on a third-party host, and a CDN font would send every visitor's IP to Google
 * before they have logged in.
 */
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/plusjakartasans-variable-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/plusjakartasans-variable-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* Brand */
  --c2d-teal: #004650;
  --c2d-plum: #743a52;
  --c2d-mint: #bff3cc;
  --c2d-lilac: #f8dbff;
  --c2d-periwinkle: #98a2db;
  --c2d-periwinkle-light: #ccd1ed;
  --c2d-beige: #eceae7;
  --c2d-stone: #b2aa9f;

  /* Neutrals */
  --c2d-surface: #ffffff;
  --c2d-ground: #eceae7;
  --c2d-ground-subtle: #f5f5f3;
  --c2d-ink: #1e1e1c;
  /* v5 --muted. Mirrors inkSoft in React/src/pages/auth/tokens/palette.ts, which carries
     the full note: this was a generic #595959, and v5 makes it the teal-biased warm grey
     that is also the app layer's --c2d-ink-soft. Lightest permissible text colour. */
  --c2d-ink-soft: #5f6b6b;
  --c2d-ink-mute: #888888;
  --c2d-rule: #e4e1e0;
  --c2d-rule-firm: #d6d6d6;

  /* States: text / panel / border */
  --c2d-error-text: #b3261e;
  --c2d-error-panel: #fbe3df;
  --c2d-error-border: #f0c4bc;
  --c2d-warning-text: #8a5a00;
  --c2d-warning-panel: #f8e9ce;
  --c2d-warning-border: #e8cfa0;
  --c2d-success-text: #1f6b3c;
  --c2d-success-panel: #bff3cc;
  --c2d-success-border: #8fd9a6;
  --c2d-info-text: #2c4a8a;
  --c2d-info-panel: #ccd1ed;
  --c2d-info-border: #98a2db;

  /* Accents */
  --c2d-accent-primary: #743a52;
  --c2d-accent-secondary: #004650;
  /* Teal, not the reference site's mint: mint is 1.24:1, below the 3:1 WCAG 2.2 wants. */
  --c2d-focus: #004650;

  /* Shape */
  --c2d-radius-sm: 6px;
  --c2d-radius-input: 10px;
  --c2d-radius-card: 24px;
  --c2d-radius-pill: 100px;
  --c2d-border-width: 1px;
  --c2d-shadow-sm: 0 2px 5px 0 rgba(0, 0, 0, 0.16);
  --c2d-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.08);
  --c2d-shadow-lg: 0 4px 12px 0 rgba(0, 0, 0, 0.16);
  /*
   * Two widths, because the auth card is now a split panel rather than a single column.
   * --c2d-auth-card-max-width is the whole card, brand panel included;
   * --c2d-card-max-width is the FORM column inside it, and still caps the noscript
   * fallback and the app-side cards that never had a brand panel.
   */
  --c2d-auth-card-max-width: 1180px;
  --c2d-card-max-width: 440px;
  --c2d-gutter: 24px;

  /* Type */
  --c2d-font-body:
    "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

/*
 * Root reset. Every token above, and every rem in brandTheme, assumes 16px. The rest of
 * the app inherits html { font-size: 10px } from Bootstrap 3, so a layout that loads
 * this file must not also load the global bundle.
 */
html {
  font-size: 16px;
}
