/*
 * MiHakero — Design tokens
 * Fonte unica dei valori: AI/DESIGN_SYSTEM.md (v2 — beige/inchiostro/rosso, sostituisce
 * integralmente la v1 verde/bianco: valori riscritti, non estesi).
 * Consumato da public.css (frontend pubblico) e dashboard.css (area utente).
 * Non tocca --bs-dark/--bs-secondary/--bs-warning globali: sono usati anche
 * da badge semantici fuori scope da questo task (es. "Problema pagamento", CVSS).
 */

/*
 * Font locali (ex Google Fonts, ora self-hosted): stessi file .woff2 già serviti
 * in precedenza dalla CDN font di Google, solo subset "latin" (sufficiente per
 * contenuti in italiano — vedi public/assets/fonts/*/OFL.txt per la licenza
 * SIL OFL 1.1 di ciascuna famiglia). Il file Noto Sans è un variable font:
 * un solo file copre sia il peso 400 che il 600.
 */
@font-face {
    font-family: 'Zen Kaku Gothic New';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('/assets/fonts/zen-kaku-gothic-new/zen-kaku-gothic-new-500.woff2') format('woff2');
}
@font-face {
    font-family: 'Zen Kaku Gothic New';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/assets/fonts/zen-kaku-gothic-new/zen-kaku-gothic-new-700.woff2') format('woff2');
}
@font-face {
    font-family: 'Noto Sans';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/assets/fonts/noto-sans/noto-sans-variable-400-600.woff2') format('woff2');
}
@font-face {
    font-family: 'Noto Sans';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('/assets/fonts/noto-sans/noto-sans-variable-400-600.woff2') format('woff2');
}
@font-face {
    font-family: 'IBM Plex Mono';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/assets/fonts/ibm-plex-mono/ibm-plex-mono-400.woff2') format('woff2');
}
@font-face {
    font-family: 'IBM Plex Mono';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('/assets/fonts/ibm-plex-mono/ibm-plex-mono-500.woff2') format('woff2');
}
@font-face {
    font-family: 'IBM Plex Mono';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('/assets/fonts/ibm-plex-mono/ibm-plex-mono-600.woff2') format('woff2');
}

:root {
    /* Palette brand (estratta dal logo) */
    --mihakero-primary: #B80A10;      /* rosso vermiglio — CTA, hanko, evidenze */
    --mihakero-primary-dark: #8A080C; /* hover/focus */
    --mihakero-bg: #EEE7D4;           /* sfondo primario (carta/washi) */
    --mihakero-bg-alt: #F7F3E8;       /* sfondo alternato sezioni / testo su rosso */
    --mihakero-surface: #FFFDF7;      /* sfondo card su beige (bianco caldo) */
    --mihakero-ink: #1F1F1D;          /* testo principale, linee */
    --mihakero-ink-muted: #5C5850;    /* testo secondario — SOLO su sfondi chiari, vedi nota sidebar in dashboard.css */
    --mihakero-border: #D9CFB8;       /* bordo/divider (beige scurito) */

    /* Severità (per report/scan — badge e bordo sinistro 3px) */
    --mihakero-severity-critical: #B80A10;
    --mihakero-severity-high: #B80A10;
    --mihakero-severity-medium: #B8862E;
    --mihakero-severity-low: #5C5850;
    --mihakero-severity-medium-ink: #7A5A1E; /* variante scura di --mihakero-severity-medium, testo leggibile su badge Bootstrap bg-warning a bassa opacità */

    /* Radius — angolare, non arrotondato-morbido */
    --mihakero-radius-card: 6px;
    --mihakero-radius-btn: 4px;

    /* Ombre — quasi assenti */
    --mihakero-shadow-card: 0 1px 2px rgba(31, 31, 29, 0.05);

    /* Font */
    --mihakero-font-heading: 'Zen Kaku Gothic New', 'Noto Sans', system-ui, -apple-system, sans-serif;
    --mihakero-font-body: 'Noto Sans', system-ui, -apple-system, sans-serif;
    --mihakero-font-mono: 'IBM Plex Mono', 'SFMono-Regular', Consolas, Menlo, monospace;

    /* Override mirato delle sole var Bootstrap che le utility class (text-primary,
       bg-primary, border-primary, btn-check, ecc.) derivano davvero da --bs-primary-rgb */
    --bs-primary: #B80A10;
    --bs-primary-rgb: 184, 10, 16;

    /* Link testuali: sostituisce il blu di default Bootstrap col rosso brand
       (stesso principio hover usato per .btn-primary). Riguarda anche .btn-link,
       che in Bootstrap 5.3 eredita da --bs-link-color: nessuna regola dedicata lo
       gestisce diversamente nel CSS del progetto, quindi il cambio è coerente. */
    --bs-link-color: var(--mihakero-primary);
    --bs-link-color-rgb: 184, 10, 16;
    --bs-link-hover-color: var(--mihakero-primary-dark);
    --bs-link-hover-color-rgb: 138, 8, 12;
}
