/*
 * Token della pagina iniziale, proposta B "Luminoso"
 * (anteprima-design/home-B-luminoso/home.css): vivace e caldo, coerente con
 * il design "Vivace" dell'app. Colori pieni del marchio e delle categorie,
 * carta calda nel tema chiaro, notte del logo nel tema scuro.
 *
 * Come admin-tokens.css e account-tokens.css, è l'unico file della home
 * dove i colori sono scritti per esteso (test static_css_uses_only_tokens):
 * solo dichiarazioni di proprietà `--…`. Il server aggiunge da solo il
 * blocco per prefers-color-scheme: light (web/assets.rs), quindi il tema
 * segue il selettore del sito (data-theme) e, senza JavaScript, il sistema.
 *
 * Contrasti (WCAG AA): testo su carta e superficie ≥ 4,5:1 in entrambi i
 * temi; bianco sul blu del marchio 5,1:1; i segni delle categorie sul loro
 * fondo tenue ≥ 4,5:1; inchiostro notte sui colori pieni (ambra, corallo,
 * lilla, menta, pervinca) ≥ 7:1.
 */

/* Colori fissi, uguali nei due temi (fasce scure, fasce colorate, schede
   sopra le schermate dell'app). */
:root {
  --h-blue: #3a5bff; /* blu del marchio: bianco sopra 5,1:1 */
  --h-blue-dark: #2f49d8;
  --h-green: #14b88a; /* verde del marchio */
  --h-mint: #4fdcb3;
  --h-amber: #f5bd62;
  --h-coral: #ff9a85;
  --h-lilac: #c3a6ff;
  --h-periwinkle: #8ea2ff;
  --h-night: #0b1020; /* fondo del logo */
  --h-night-2: #141b34;
  --h-night-3: #1b2444; /* campi sulle fasce scure */
  --h-night-line: #27315a;
  --h-night-line-2: #3a4570;
  --h-night-text: #f1f3fa;
  --h-night-dim: #aab4cd;
  --h-night-faint: #8792b0;
  --h-night-blue: #9aacff;
  --h-night-blue-bg: #1c285d;
  --h-night-amber-bg: #38353b;
  --h-copy-line: #6378e0;
  --h-white: #ffffff;
  --h-white-hover: #fff6e6;
  --h-paper-sheet: #fbf8f3; /* foglio del Kit di emergenza */
  --h-paper-sheet-ink: #0e1525;
  --h-paper-sheet-dim: #4a5268;
  --h-paper-sheet-label: #5d6680;
  --h-paper-sheet-dash: #d8d0c2;
  --h-handwriting: rgb(47 73 216 / 0.55);
  --h-day-1: #ffd79a; /* arco della giornata, dall'alba alla notte */
  --h-day-2: #a9d4ff;
  --h-grad-result: linear-gradient(120deg, #1c285d, #12313b);
  --h-grad-equal: linear-gradient(120deg, #93a6ff, #4fdcb3);
  --h-grad-brand: linear-gradient(90deg, #3a5bff, #14b88a);

  /* Trasparenze */
  --h-on-blue-glow: rgb(255 255 255 / 0.22);
  --h-on-blue-dots: rgb(255 255 255 / 0.16);
  --h-on-blue-ring: rgb(255 255 255 / 0.14);
  --h-on-blue-line: rgb(255 255 255 / 0.85);
  --h-on-blue-hover: rgb(255 255 255 / 0.12);
  --h-on-blue-text: rgb(255 255 255 / 0.92);
  --h-on-blue-mark: rgb(255 255 255 / 0.09);
  --h-sheet-ring: rgb(255 255 255 / 0.2);
  --h-night-halo-blue: rgb(58 91 255 / 0.35);
  --h-night-halo-green: rgb(20 184 138 / 0.25);
  --h-shot-ring: rgb(11 16 32 / 0.3);
  --h-key-edge: rgb(11 16 32 / 0.85);

  /* Ombre */
  --h-shadow-btn: 0 10px 24px -12px rgb(58 91 255 / 0.8);
  --h-shadow-btn-hover: 0 16px 30px -14px rgb(58 91 255 / 0.9);
  --h-shadow-white-btn: 0 14px 30px -14px rgb(0 0 0 / 0.5);
  --h-shadow-window: 0 50px 90px -30px rgb(5 10 40 / 0.75);
  --h-shadow-card: 0 30px 60px -24px rgb(5 10 40 / 0.8);
  --h-shadow-toast: 0 30px 50px -24px rgb(5 10 40 / 0.55), 0 0 0 1px rgb(14 21 37 / 0.06);
  --h-shadow-shot: 0 30px 60px -28px rgb(11 16 32 / 0.7);
  --h-shadow-shot-lifted: 0 34px 60px -24px rgb(11 16 32 / 0.8);
  --h-shadow-sticker: 0 14px 24px -12px rgb(11 16 32 / 0.6);
  --h-shadow-key: 0 6px 0 rgb(11 16 32 / 0.85), 0 16px 30px -10px rgb(11 16 32 / 0.5);
  --h-shadow-key-down: 0 1px 0 rgb(11 16 32 / 0.85), 0 6px 12px -6px rgb(11 16 32 / 0.5);
  --h-shadow-backup: 0 40px 80px -30px rgb(0 0 0 / 0.9);
  --h-shadow-sheet: 0 50px 80px -30px rgb(0 0 0 / 0.9);

  /* Forme e caratteri */
  --h-r-xxl: 40px;
  --h-r-xl: 28px;
  --h-r-lg: 22px;
  --h-display: 'Bricolage Grotesque', 'IBM Plex Sans', 'Segoe UI', system-ui, sans-serif;
  --h-width: 1240px;
}

/* Tema scuro "notte" (predefinito del sito senza preferenze). */
:root,
:root[data-theme='dark'] {
  --h-paper: #0b1020;
  --h-paper-2: #0e1428;
  --h-surface: #141b34;
  --h-line: #27315a;
  --h-ink: #f1f3fa;
  --h-dim: #aab4cd;
  --h-faint: #8f9abb;
  --h-blue-text: #9aacff;
  --h-tint-amber: #2b2a33;
  --h-tint-blue: #1a2552;
  --h-tint-coral: #33263a;
  --h-tint-lilac: #282650;
  --h-tint-mint: #12313b;
  --h-sign-amber: #f5bd62;
  --h-sign-blue: #9aacff;
  --h-sign-coral: #ff9a85;
  --h-sign-lilac: #c3a6ff;
  --h-shadow: 0 1px 0 rgb(255 255 255 / 0.04) inset, 0 18px 40px -18px rgb(0 0 0 / 0.7);
}

/* Tema chiaro "luminoso": carta calda. */
:root[data-theme='light'] {
  --h-paper: #fbf8f3;
  --h-paper-2: #f4eee5;
  --h-surface: #ffffff;
  --h-line: #e6dfd3;
  --h-ink: #0e1525;
  --h-dim: #4a5268;
  --h-faint: #5d6680;
  --h-blue-text: #2f49d8;
  --h-tint-amber: #fcecce;
  --h-tint-blue: #e3e8ff;
  --h-tint-coral: #ffe2da;
  --h-tint-lilac: #ece4ff;
  --h-tint-mint: #d6f5ea;
  --h-sign-amber: #8a5a00;
  --h-sign-blue: #2f49d8;
  --h-sign-coral: #b5402c;
  --h-sign-lilac: #6a3fc6;
  --h-shadow: 0 1px 2px rgb(14 21 37 / 0.06), 0 18px 40px -18px rgb(14 21 37 / 0.28);
}

/* Generato da aelyna-server (web/assets.rs): tema chiaro anche quando il sistema lo chiede e l'utente non ha scelto il tema scuro. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme='dark']) {
  --h-paper: #fbf8f3;
  --h-paper-2: #f4eee5;
  --h-surface: #ffffff;
  --h-line: #e6dfd3;
  --h-ink: #0e1525;
  --h-dim: #4a5268;
  --h-faint: #5d6680;
  --h-blue-text: #2f49d8;
  --h-tint-amber: #fcecce;
  --h-tint-blue: #e3e8ff;
  --h-tint-coral: #ffe2da;
  --h-tint-lilac: #ece4ff;
  --h-tint-mint: #d6f5ea;
  --h-sign-amber: #8a5a00;
  --h-sign-blue: #2f49d8;
  --h-sign-coral: #b5402c;
  --h-sign-lilac: #6a3fc6;
  --h-shadow: 0 1px 2px rgb(14 21 37 / 0.06), 0 18px 40px -18px rgb(14 21 37 / 0.28);
}
}
