/* ============================================================================
   House style base — version 5
   The single base stylesheet of every app: colours, typeface, text sizes, shapes
   and the styling of body, headings and labels. Plain CSS, no Tailwind.
   This app loads it as the first <link> in Pages/Shared/_Layout.cshtml.

   Change values only here, in the house-style source. Fonts, colours and text sizes
   are defined NOWHERE else: not in tailwind.config, not in @theme, not in app.css.
   Those only reference var(--…).

   Source: syndel-menu (application.tailwind.css and the components); the text
   size scale (T9) was set by the owner. One brand: Syndle, nutrihub included.
   ========================================================================== */

/* Hanken Grotesk, self-hosted (S10). Variable, weight 100–900, Latin.
   Source: @fontsource-variable/hanken-grotesk 5.3.0; licence in fonts/ (SIL OFL 1.1).
   Owner decision, 31 October 2026: instead of Inter. */
@font-face {
  font-family: "Hanken Grotesk";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/hanken-grotesk-latin-wght-normal.woff2") format("woff2");
}

/* Colours in use (always via the variable, never the hex value):
     text                  var(--on-surface)
     help-text, small label var(--on-surface-variant)
     button, active, focus var(--primary), text on it var(--on-primary)
     soft orange area      var(--primary-container), text on it var(--on-primary-container)
     page / card           var(--surface) / var(--surface-raised)
     lines                 var(--outline-variant); border of a field var(--outline-variant)
     status                var(--success|warning|error) and -container / on-…-container */
:root,
[data-brand="syndle"] {
  /* --- Brand layer ---------------------------------------------------- */
  --primary: #f7630b;                        /* --color-primary */
  --on-primary: #ffffff;                     /* --color-on-primary */
  /* Soft area: syndel-menu uses bg-primary/10 with text-primary (active menu item,
     badge primary, icon button hover). */
  --primary-container: color-mix(in srgb, var(--primary) 10%, transparent);
  --on-primary-container: var(--primary);
  --brand: #f7630b;                          /* logo and accent: the same orange */
  /* The spectrum of the Syndle logo, for decoration only (progress bar, bars).
     Source: syndle-audit (Syndle house style). */
  --sp-gold: #F7A41F;
  --spectrum: linear-gradient(90deg, #E52528 0%, #EB5B26 22%, #F08222 44%,
                              #F7A41F 64%, #FECA0A 84%, #FAEA25 100%);

  --font: "Hanken Grotesk", system-ui, -apple-system, sans-serif;   /* --font-sans */
  /* Code and fixed width: Tailwind's font-mono, as syndel-menu uses it. */
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  /* --- Neutral -------------------------------------------------------- */
  --surface: #fbfaf8;                        /* --color-surface */
  --surface-raised: #ffffff;                 /* --color-surface-container-lowest */
  --qr-quiet-zone: #ffffff;                  /* light margin around a QR code, also in dark mode (ISO/IEC 18004) */
  --surface-sunken: #f6f4f1;                 /* --color-surface-container-low */
  --surface-hover: #efede9;                  /* --color-surface-container */
  --surface-selected: #e8e5e0;               /* --color-surface-container-high */

  --on-surface: #20242a;                     /* --color-on-surface */
  --on-surface-variant: #5b6068;             /* --color-on-surface-variant */
  --outline: #b6b0a8;                        /* --color-outline */
  --outline-variant: #e5e1db;                /* --color-outline-variant */

  /* --- Status --------------------------------------------------------- */
  --error: #dc2626;                          /* --color-error */
  --on-error: #ffffff;                       /* --color-on-error */
  --error-container: #fee2e2;
  --on-error-container: #7f1d1d;

  --warning: #d97706;                        /* --color-warning */
  --warning-container: #fef1dc;
  --on-warning-container: #7a3e00;

  --success: #0e9f6e;                        /* --color-success */
  --success-container: #def7ec;
  --on-success-container: #03543f;

  --focus: var(--primary);                   /* focus:ring-primary on a field */
  --scrim: rgb(0 0 0 / 0.4);                 /* modal backdrop:bg-black/40 */

  /* --- Shape ---------------------------------------------------------- */
  --r-badge: 0.25rem;                        /* Tailwind rounded: badge, field, chip */
  --r-alert: 0.375rem;                     /* rounded-md: alert, small field */
  --r-control: 0.5rem;                       /* --radius-navitem / rounded-lg: menu item, icon button */
  --r-button: 0.75rem;                       /* rounded-xl: button */
  --r-card: 1rem;                            /* --radius-card / rounded-2xl: card, modal */

  --elevation-soft: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);   /* --shadow-soft */
  --elevation-raise: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); /* --shadow-raise */
  --elevation-pop: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1); /* shadow-xl */

  /* --- Spacing: the Tailwind scale (1 = 4px) -------------------------- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

  /* --- Shell ---------------------------------------------------------- */
  --shell-sidebar: 250px;                    /* --spacing-sidebar */
  --shell-topbar: 4rem;                      /* --spacing-topbar */
  --shell-gutter: var(--space-6);            /* topbar px-6 */
  --shell-gutter-mobile: var(--space-4);
  --content-narrow: 48rem;                   /* max-w-3xl */

  /* --- Text: only these sizes, each with a role (rule T9) ------------- */
  --text-xs: 0.75rem;                        /* 12: help-text, hint, code, badge, small button */
  --text-sm: 0.875rem;                       /* 14: body, button, table, label, menu */
  --text-base: 1rem;                         /* 16: card title (h3), app name next to the logo */
  --text-lg: 1.125rem;                       /* 18: h2, header of card or modal */
  --text-2xl: 1.5rem;                        /* 24: h1, page title */
  --text-3xl: 1.875rem;                      /* 30: big-number (syndel-menu StatTile text-3xl) */
  --eyebrow: 11px;                           /* eyebrow: bold, uppercase, tracking-wide */

  /* --- Time ----------------------------------------------------------- */
  --duration-fast: 150ms;                        /* Tailwind transition-colors */
  --duration-normal: 200ms;
}

/* --- Brand IAS (Instituut Asbestslachtoffers) -----------------------------
   Source: asbestslachtoffers.nl, app/themes/ias/style.css (ver=1765274658),
   taken over on 10 November 2026. Deviates from rule T3 (Syndle only): owner
   decision for the IAS app; still to be added to the house-style source. Only the
   brand layer, the neutral tints and the shape; status and spacing stay Syndle's. */
@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("fonts/open-sans-latin-wght-normal.woff2") format("woff2");   /* @fontsource-variable/open-sans 5.3.0, SIL OFL 1.1 */
}

/* Material Symbols Outlined, locally (S10, I1): @fontsource-variable/material-symbols-outlined 5.3.9, the
   variant with the FILL axis; weight 400, SIL OFL 1.1 (fonts/LICENSE-material-symbols.txt). Source: syndel-menu. */
@font-face {
  font-family: "Material Symbols Outlined";
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url("fonts/material-symbols-outlined-latin-fill-normal.woff2") format("woff2");
}

[data-brand="ias"] {
  /* #ed7702 is the portal orange; white on it reaches 2.9:1 (T5). Owner decision
     10-11-2026: --primary slightly darker (3.4:1), --brand stays the portal orange. */
  --primary: #d46a00;
  --on-primary: #ffffff;
  --on-primary-container: var(--primary);
  --brand: #ed7702;                          /* a, .header__search, .overview-blocks__item */

  --font: "Open Sans", system-ui, -apple-system, sans-serif;   /* font-family: Open Sans */

  --surface: #f1f0ec;                        /* background of the blocks */
  --surface-raised: #ffffff;
  --surface-sunken: #eff0ec;                 /* .latest__news, .overview-blocks-alt__left */
  --on-surface: #626262;                     /* body text */
  --on-surface-variant: #626250;             /* .nav__button, .nav--mobile */
  --outline: #9d9d8b;
  --outline-variant: #ddddd8;                /* .nav, .header border */

  --r-button: 2rem;                          /* .intro__button: border-radius 2rem */
}

/* --- Dark: follows the device setting -------------------------------------
   Source: radar (feed/static/feed/radar.css, prefers-color-scheme: dark) for what
   radar has. DERIVED (no source, to be confirmed) is marked where radar had no
   counterpart; the derivation uses only colours from this file. */
@media (prefers-color-scheme: dark) {
  :root,
  [data-brand="syndle"] {
    --surface: #191614;                       /* radar --grond (ground) */
    --surface-raised: #221E1B;                /* radar --vlak (surface) */
    --surface-sunken: color-mix(in srgb, var(--surface) 50%, var(--surface-raised));      /* derived */
    --surface-hover: color-mix(in srgb, var(--on-surface) 8%, var(--surface-raised));     /* derived */
    --surface-selected: color-mix(in srgb, var(--on-surface) 14%, var(--surface-raised)); /* derived */

    --on-surface: #F4EDE6;                    /* radar --inkt (ink) */
    --on-surface-variant: #A2958A;            /* radar --zacht (soft) */
    --outline: color-mix(in srgb, var(--on-surface-variant) 50%, var(--outline-variant)); /* derived */
    --outline-variant: #3A322C;               /* radar --lijn (line) */

    --error: #F2554F;                         /* radar --rood (red) */
    --warning: #F7A41F;                       /* radar --amber */
    --success: #6FAE86;                       /* radar --groen (green) */
    --error-container: color-mix(in srgb, var(--error) 18%, var(--surface));       /* derived */
    --warning-container: color-mix(in srgb, var(--warning) 18%, var(--surface));   /* derived */
    --success-container: color-mix(in srgb, var(--success) 18%, var(--surface));   /* derived */
    --on-error-container: var(--error);       /* derived */
    --on-warning-container: var(--warning);   /* derived */
    --on-success-container: var(--success);   /* derived */

    --elevation-soft: 0 1px 2px rgb(0 0 0 / 0.4);                                   /* radar --schaduw (shadow) */
    --elevation-raise: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.4); /* derived */
    color-scheme: dark;
  }
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --duration-fast: 0ms;
    --duration-normal: 0ms;
  }
}

/* --- Base styling: applies in every app, on every screen (T9) ------------ */
/* In its own layer between Tailwind's base (preflight) and utilities: beats the
   reset, loses to a utility on the element itself. The order is fixed here
   because this file loads first. Without Tailwind every plain rule beats it;
   that is why house-style.css and app.css set no typeface, colour or text size
   of their own (T9, C6). */
@layer theme, base, house-style, components, utilities;

@layer house-style {
  html {
    scroll-padding-top: var(--shell-topbar);   /* sticky topbar does not cover the focus (A5) */
  }
  body {
    margin: 0;
    background: var(--surface);
    color: var(--on-surface);
    font-family: var(--font);
    font-size: var(--text-sm);
    font-weight: 400;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
  }
  h1 { font-size: var(--text-2xl); font-weight: 600; line-height: 1.25; }
  h2 { font-size: var(--text-lg); font-weight: 600; line-height: 1.3; }
  h3 { font-size: var(--text-base); font-weight: 600; line-height: 1.4; }
  label { font-size: var(--text-sm); font-weight: 500; }
  input, select, textarea, button { font: inherit; }

  /* Roles without their own HTML element: use the class, never a size of your own (T9). */
  /* Help text: hint, explanation, caption, code next to something. syndel-menu text-xs text-on-surface-variant. */
  .help-text, small { font-size: var(--text-xs); font-weight: 400; color: var(--on-surface-variant); }
  /* Eyebrow above a block. syndel-menu text-[11px] font-bold uppercase tracking-wide text-on-surface-variant. */
  .eyebrow { display: block; font-size: var(--eyebrow); font-weight: 700; letter-spacing: 0.025em; text-transform: uppercase;
    color: var(--on-surface-variant); }
  /* Big number: figure or count as eye-catcher. syndel-menu StatTile text-3xl font-bold. */
  .big-number { font-size: var(--text-3xl); font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
  .tabular-nums { font-variant-numeric: tabular-nums; }
}
