/* DUC Magazzino Libri — brand identity (Fase 9, design/2026-09-08-brief-fase9.md §2).
   Font locali (niente Google Fonts): woff2 copiati da tipografia-duc-site.
   Registrato via Css::make('duc-brand', ...) in AdminPanelProvider e via
   <link> in resources/views/scan/layout.blade.php e mappa/layout.blade.php
   — cosi' e' disponibile sia dentro il pannello Filament sia nelle pagine
   pubbliche /cerca, /s/{token}, /mappa. */

@font-face {
    font-family: 'Barlow';
    src: url('/fonts/duc/barlow-v13-latin-regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Barlow';
    src: url('/fonts/duc/barlow-v13-latin-500.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Barlow';
    src: url('/fonts/duc/barlow-v13-latin-700.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Barlow';
    src: url('/fonts/duc/barlow-v13-latin-800.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Source Serif 4';
    src: url('/fonts/duc/source-serif-4-v14-latin-regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Source Serif 4';
    src: url('/fonts/duc/source-serif-4-v14-latin-600.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Source Serif 4';
    src: url('/fonts/duc/source-serif-4-v14-latin-700.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'JetBrains Mono';
    src: url('/fonts/duc/jetbrains-mono-v24-latin-regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    --duc-blue: #1961AC;
    --duc-blue-dark: #134E8C;
    --duc-blue-soft: #E8EEF7;
}

/* --- Lockup icona + testo (topbar Filament, header mobile scan/mappa, login) --- */
.duc-lockup-corpo { display: inline-flex; align-items: center; gap: 12px; }
.duc-lockup-icona { height: 40px; width: 40px; display: block; flex-shrink: 0; }
.duc-lockup-testo { display: inline-flex; flex-direction: column; justify-content: center; line-height: 1.15; text-align: left; }
.duc-lockup-duc {
    font-family: 'Barlow', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 800;
    font-size: 20px;
    line-height: 1.0;
    letter-spacing: .01em;
    color: var(--duc-blue);
}
html.dark .duc-lockup-duc { color: #ffffff; }
.duc-lockup-sotto {
    font-family: 'Barlow', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 500;
    font-size: 13px;
    line-height: 1.2;
    letter-spacing: .02em;
    color: #5B6B76;
    margin-top: 2px;
    white-space: nowrap;
}
html.dark .duc-lockup-sotto { color: #C8D6E4; }

/* --- Login: lockup centrato e ingrandito (fi-simple-layout = /admin/login) ---
   Niente `display` sulla regola sotto per .fi-logo: Filament nasconde la
   variante light/dark non attiva con .fi-logo.fi-logo-dark{display:none} /
   .fi-logo-light:where(.dark *){display:none} (theme.css, stessa specificita'
   di un selettore a 2 classi) — un `.fi-simple-layout .fi-logo{display:flex}`
   qui vince per ordine di cascata (questo foglio carica dopo) e fa comparire
   ENTRAMBI i lockup impilati (bug trovato con Playwright su /admin/login).
   Il centering va sul contenitore (.fi-simple-header), mai su .fi-logo. */
.fi-simple-layout { background: var(--duc-blue-soft); }
html.dark .fi-simple-layout { background: var(--sfondo, #10161d); }
.fi-simple-layout .fi-simple-header { display: flex; justify-content: center; }
.fi-simple-layout .duc-lockup-corpo { justify-content: center; }
.fi-simple-layout .duc-lockup-icona { width: 64px; height: 64px; }
.fi-simple-layout .duc-lockup-duc { font-size: 26px; }

/* --- Titoli pagina Filament --- */
.fi-header-heading {
    font-family: 'Barlow', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 700;
    letter-spacing: -.01em;
    font-size: 28px;
    line-height: 1.15;
}
@media (max-width: 640px) {
    .fi-header-heading { font-size: 22px; }
}

/* --- Header mobile (scan/mappa, .top a.marchio) --- */
.top a.marchio span,
.top a.marchio {
    font-family: 'Barlow', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.top a.marchio { font-weight: 700; font-size: 16px; }
.top a.marchio img { height: 36px; width: 36px; }

/* --- Titoli libro (Trovalo, /s/{token}, /cerca) --- */
.duc-titolo-libro {
    font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif;
    font-weight: 600;
    font-size: 15px;
    line-height: 1.35;
    /* Round 2c fix MEDIUM (verify report v1-mobile.md DEFECT #2): un
       titolo libro senza spazi e >~60 caratteri causava overflow
       orizzontale dell'intera pagina /cerca su mobile (scrollWidth 1766px
       vs innerWidth 390px). overflow-wrap forza l'a-capo anche dentro una
       parola senza punti di break; min-width:0 e' necessario perche' il
       contenitore e' quasi sempre un figlio flex/grid, dove il default
       min-width:auto impedirebbe comunque il wrap indipendentemente da
       overflow-wrap (la riga si allargherebbe per contenere la parola). */
    overflow-wrap: anywhere;
    word-break: break-word;
    min-width: 0;
}

/* --- Codici scatola / ISBN --- */
.duc-mono {
    font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
    letter-spacing: .02em;
}
