/**
 * AGV — Token di design
 * Fonte: variabili Figma → CSS custom properties
 * Aggiorna questi valori in sincronia con Figma
 */

/* Karla e Source Serif 4 (licenza libera OFL), dal 05/11 nel tema invece che da Google Fonts:
   nessun dato dei visitatori va a Google prima del consenso cookie. File variabili scaricati da
   Google Fonts (un file copre tutti i pesi), solo alfabeti latin + latin-ext. */
@font-face {
    font-family: 'Karla';
    src: url('../fonts/karla-latin.woff2') format('woff2');
    font-weight: 200 800;
    font-style: normal;
    font-display: swap;
    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: 'Karla';
    src: url('../fonts/karla-latin-ext.woff2') format('woff2');
    font-weight: 200 800;
    font-style: normal;
    font-display: swap;
    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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Source Serif 4';
    src: url('../fonts/source-serif-4-latin.woff2') format('woff2');
    font-weight: 200 900;
    font-style: normal;
    font-display: swap;
    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: 'Source Serif 4';
    src: url('../fonts/source-serif-4-latin-ext.woff2') format('woff2');
    font-weight: 200 900;
    font-style: normal;
    font-display: swap;
    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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Source Serif 4';
    src: url('../fonts/source-serif-4-italic-latin.woff2') format('woff2');
    font-weight: 200 900;
    font-style: italic;
    font-display: swap;
    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: 'Source Serif 4';
    src: url('../fonts/source-serif-4-italic-latin-ext.woff2') format('woff2');
    font-weight: 200 900;
    font-style: italic;
    font-display: swap;
    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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Domaine Display di Klim, licenza web acquistata il 28/10 (ordine 26101400): solo Regular e Bold.
   I pesi intermedi (Semibold 600 dei Titolo 2) usano il Bold vero, mai un grassetto finto. */
@font-face {
    font-family: 'Domaine Display';
    src: url('../fonts/domaine-display-regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Domaine Display';
    src: url('../fonts/domaine-display-bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {

    /* COLORI
    -------------------------------------------------- */
    --color-primary:        #1F1F1F;
    --color-secondary:      #F2C94C;
    --color-accent:         #000000;
    --color-bg:             #ffffff;
    --color-bg-light:       #f5f5f5;
    --color-text:           #1f1f1f;
    --color-text-muted:     #666666;
    --color-text-gray:      #333333;
    --color-box:            #f5f5f5;
    --color-disabled:       #999999; /* voci inattive (es. EN finché non c'è il multilingua) */
    --color-button-cookie:  #dcdcdc; /* bottoni del banner cookie (05/11, scelto da Elisa) */

    /* TIPOGRAFIA
    -------------------------------------------------- */
    --font-primary:         'Karla', sans-serif;
    /* Testi: Source Serif 4 da Google Fonts (caricato in functions.php), al posto del Domaine Text
       non acquistato. 31/10: tolti i Domaine Text installati in locale dalla lista di riserva.
       30/10: provati sul testo Domaine Display e Karla 300, scartati entrambi. */
    --font-secondary:       'Source Serif 4', Georgia, serif;
    /* Titoli: Domaine Display con licenza, caricato dal tema (@font-face sopra) */
    --font-display:         'Domaine Display', 'Source Serif 4', Georgia, serif; /* 31/10: riserva Source, non più Newsreader */
    --font-weight-text:     300;     /* peso del testo corrente (29/10, era 400) */
    --font-weight-bold:     600;     /* grassetto del testo (29/10: 700 troppo pesante col testo a 300) */

    /* Font sizes */
    --text-12:              12px;
    --text-14:              14px;
    --text-16:              16px;
    /* REGOLA DI PROGETTO: testo 18px ovunque, su ogni pagina e device (disegnato in Domaine Text).
       Col Source al suo posto servono piccoli aggiustamenti: nel CSS sono segnati "ECCEZIONE Source"
       e l'elenco completo è nel brief (CLAUDE.md → "Testo: regola ed eccezioni"). */
    --text-body:            18px;
    --text-21:              21px;
    --text-48:              48px;
    --text-64:              64px;

    --leading-tight:        1.1;
    --leading-normal:       1.5;
    --leading-loose:        1.8;
    --line-height-16:       16px;
    --line-height-20:       20px;
    --line-height-24:       24px;
    --line-height-26:       26px;
    --line-height-body:     27px;    /* interlinea del testo corrente a 19px (29/10, era 26) */
    --line-height-40:       40px;
    --line-height-50:       50px;
    --line-height-56:       56px;

    --tracking-tight:       -0.02em;
    --tracking-normal:      0em;
    --tracking-wide:        0.05em;
    --tracking-wide-4_8:    4.8px;

    /* SPAZIATURE
    -------------------------------------------------- */
    --space-xs:             0.25rem;
    --space-sm:             0.5rem;
    --space-md:             1rem;
    --space-lg:             2rem;
    --space-xl:             4rem;
    --space-2xl:            8rem;

    /* GRIGLIA
    -------------------------------------------------- */
    --grid-columns:         12;
    --grid-gap:             var(--space-lg);
    --container-max:        1440px;
    --container-padding:    var(--space-lg);
    --page-margin:          120px;   /* margine laterale contenuti (Figma, desktop 1440) */
    --page-margin-wide:     80px;    /* griglie larghe: Storie, Licenze */
    --header-height:        79px;    /* l'hero inizia a y=79 */
    --header-height-inner:  81px;    /* pagine interne: header + linea nera a y=80 */

    /* BORDI E RAGGI
    -------------------------------------------------- */
    --radius-sm:            2px;
    --radius-md:            4px;
    --radius-lg:            8px;
    --radius-full:          9999px;
    --border-width:         1px;

    /* TRANSIZIONI
    -------------------------------------------------- */
    --transition-fast:      150ms ease;
    --transition-base:      300ms ease;
    --transition-slow:      500ms ease;
}
