/* Palette allineata al sito CodevGroup (teal). Token theme-aware:
   light = base in :root, dark = override in [data-theme="dark"]. */
:root {
    --primary: #0B1124;          /* titoli/heading */
    --primary-light: #34507a;
    --accent: #007A96;           /* teal sito (light) */
    --success: #1A8855;
    --light-bg: #F4F6FB;         /* sfondo pagina base */
    --soft-bg: #EEF2F8;          /* superfici soft (righe, check, tabelle) */
    --card-bg: #FFFFFF;          /* card form-section */
    --field-bg: #FFFFFF;         /* input/editor */
    --border: #E2E8F2;
    --text: #0B1124;
    --text-light: #5A6383;
    --body-grad: linear-gradient(135deg, #F4F6FB 0%, #E3E7ED 100%);
    --hero-grad: linear-gradient(135deg, #0B2E3A 0%, #0E1428 58%, #102a4a 100%);
    --gen-grad: linear-gradient(135deg, #007A96 0%, #00B4D8 100%);
    --focus-ring: rgba(0, 122, 150, .22);
    /* Font del sito — ridefiniti qui perché il tool è standalone e NON carica /assets/css/style.css. */
    --sans:    'Inter', system-ui, -apple-system, Segoe UI, sans-serif;
    --display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
    --mono:    'JetBrains Mono', ui-monospace, Menlo, monospace;
    --ease-out: cubic-bezier(.16, 1, .3, 1);
}
[data-theme="dark"] {
    --primary: #E8ECF8;
    --accent: #00E5FF;
    --success: #3DDC97;
    --light-bg: #05070D;
    --soft-bg: #0E1428;
    --card-bg: #0E1428;
    --field-bg: #0A0F1F;
    --border: rgba(124, 170, 255, .18);
    --text: #E8ECF8;
    --text-light: #9AA3BF;
    --body-grad: linear-gradient(135deg, #05070D 0%, #0A0F1F 100%);
    --hero-grad: linear-gradient(135deg, #0B2E3A 0%, #05070D 58%, #0c1e3a 100%);
    --gen-grad: linear-gradient(135deg, #007A96 0%, #00E5FF 100%);
    --focus-ring: rgba(0, 229, 255, .25);
}

* {
    box-sizing: border-box;
}

body {
    font-family: var(--sans);
    line-height: 1.6;
    margin: 0;
    background: var(--body-grad);
    min-height: 100vh;
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* HERO SECTION */
.hero-section {
    position: relative;
    overflow: hidden;
    background: var(--hero-grad);
    color: white;
    padding: 2.4rem 0;
    margin-bottom: 1.2rem;
}

.hero-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 25%, rgba(255, 255, 255, 0.18) 0, transparent 42%),
        radial-gradient(circle at 85% 15%, rgba(255, 255, 255, 0.12) 0, transparent 38%);
    pointer-events: none;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

/* HERO — mockup A4 (CSS-only): comunica "qui si crea un documento" */
.hero-doc {
    display: flex;
    justify-content: center;
    perspective: 800px;
}
.hero-doc__sheet {
    position: relative;
    width: 116px;
    aspect-ratio: 1 / 1.414;          /* proporzione A4 */
    background: #fff;
    border-radius: 8px;
    padding: 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.18);
    transform: rotateX(8deg) rotateZ(-2deg);
    animation: docFloat 6s ease-in-out infinite;
}
.hero-doc__badge {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 0.95rem;
    background: var(--gen-grad);
    box-shadow: 0 6px 14px -4px rgba(0, 122, 150, 0.6);
}
.hero-doc__line {
    height: 6px;
    border-radius: 3px;
    background: #d7deea;             /* grigio neutro fisso: leggibile su foglio bianco in light+dark */
    width: 100%;
}
.hero-doc__line--title { width: 62%; height: 9px; background: #aebbd0; }
.hero-doc__line--short { width: 48%; }
.hero-doc__line--total { width: 40%; align-self: flex-end; height: 8px; background: var(--accent); opacity: 0.85; }
.hero-doc__rule { height: 1px; background: #e7ecf4; margin: 2px 0; }

@keyframes docFloat {
    0%, 100% { transform: rotateX(8deg) rotateZ(-2deg) translateY(0); }
    50%      { transform: rotateX(8deg) rotateZ(-2deg) translateY(-6px); }
}

.hero-title {
    font-family: var(--display);
    font-size: 2.35rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 0.45rem;
    text-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
    font-size: 1.1rem;
    opacity: 0.93;
    margin-bottom: 0.55rem;
}

.hero-description {
    font-size: 0.98rem;
    opacity: 0.84;
    max-width: 600px;
    margin: 0 auto;
}

/* FORM SECTIONS */
.form-section {
    position: relative;
    background: var(--card-bg);
    border-radius: 14px;
    padding: 1.9rem 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(11, 17, 36, 0.06), 0 8px 24px -16px rgba(11, 17, 36, 0.12);
    border: 1px solid var(--border);
    overflow: hidden;
}

/* Accento laterale teal che parte dal titolo → dà ritmo e spezza le card identiche */
.form-section::before {
    content: "";
    position: absolute;
    top: 1.9rem;
    left: 0;
    width: 3px;
    height: 1.4rem;
    border-radius: 0 3px 3px 0;
    background: var(--accent);
    opacity: 0.85;
}

.section-title {
    font-family: var(--display);
    font-size: 1.22rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.section-title i {
    font-size: 1.05rem;
    color: var(--accent);
}

/* Numero/eyebrow decorativo (01..05) — stile mono come gli eyebrow del sito */
.section-num {
    font-family: var(--mono);
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 0.14em;
    color: var(--accent);
    background: color-mix(in srgb, var(--accent) 10%, transparent);
    border-radius: 6px;
    padding: 0.22rem 0.45rem;
    line-height: 1;
}

/* FORM CONTROLS */
.form-label {
    font-weight: 500;
    font-size: 0.82rem;
    letter-spacing: 0.005em;
    color: var(--text-light);
    margin-bottom: 0.4rem;
}

.form-control {
    border: 1px solid var(--border);
    border-radius: 9px;
    padding: 0.7rem 0.9rem;
    font-size: 0.95rem;
    background: var(--field-bg);
    color: var(--text);
    transition: border-color 0.18s var(--ease-out), box-shadow 0.18s var(--ease-out);
}

.form-control:hover {
    border-color: color-mix(in srgb, var(--border) 55%, var(--accent));
}

.form-control:focus,
.form-control:focus-visible {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--focus-ring);
    outline: none;
}

/* TEXTAREA MONO */
.mono {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.55;
    background: var(--soft-bg);
    resize: vertical;
}

/* Tabelle Costi */
.tabella-costi {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tabella-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.tabella-header input {
    font-weight: 600;
    font-size: 16px;
    border: 1px solid var(--border);
    background: var(--soft-bg);
    color: var(--text);
}

.riga-costo {
    margin-bottom: 10px;
    padding: 10px;
    background: var(--soft-bg);
    border-radius: 8px;
}

.riga-costo:hover {
    background: color-mix(in srgb, var(--soft-bg) 88%, var(--accent));
}

.totale-tabella {
    text-align: right;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid var(--primary);
    font-size: 18px;
    color: var(--primary);
}

.importo-totale {
    color: var(--accent);
}

.btn-rimuovi {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-rimuovi:hover {
    background: #c82333;
    transform: translateY(-1px);
}

/* SOLUTION OPTIONS */
.solution-options {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.form-check {
    flex: 1;
    min-width: 250px;
    background: var(--soft-bg);
    border: 2px solid var(--border);
    border-radius: 10px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.form-check:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.form-check-input:checked + .form-check-label {
    color: var(--primary);
}

.form-check-input {
    width: 1.2rem;
    height: 1.2rem;
    margin-right: 0.8rem;
    accent-color: var(--accent);
}

.form-check-label {
    cursor: pointer;
    font-size: 1rem;
}

/* SEZIONI EXTRA */
.sezione-extra {
    background: var(--soft-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    position: relative;
}

.sezione-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    gap: 0.5rem;
}

.sezione-numero {
    font-weight: 600;
    color: var(--primary);
}

.btn-rimuovi {
    background: #dc3545;
    border: none;
    color: white;
    border-radius: 6px;
    padding: 0.3rem 0.8rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: opacity 0.3s;
}

.btn-rimuovi:hover {
    opacity: 0.8;
}

/* GENERATE BUTTON */
.btn-generate {
    background: var(--gen-grad);
    border: none;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 1rem 3rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.btn-generate:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 0;
    }

    .hero-title {
        font-size: 1.95rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }

    .form-section {
        padding: 1.5rem;
    }
    
    .solution-options {
        flex-direction: column;
    }
    
    .form-check {
        min-width: 100%;
    }
}

/* ANIMATIONS */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Entrata a cascata SOLO sulle 5 sezioni statiche (figli diretti del form).
   NON tocca .sezione-extra/.tabella-costi iniettate da JS dopo il load. */
#preventivo-form > .form-section {
    animation: fadeIn 0.55s var(--ease-out) both;
}
#preventivo-form > .form-section:nth-of-type(1) { animation-delay: 0.05s; }
#preventivo-form > .form-section:nth-of-type(2) { animation-delay: 0.13s; }
#preventivo-form > .form-section:nth-of-type(3) { animation-delay: 0.21s; }
#preventivo-form > .form-section:nth-of-type(4) { animation-delay: 0.29s; }
#preventivo-form > .form-section:nth-of-type(5) { animation-delay: 0.37s; }

/* LOADING STATE */
.btn-generate:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-generate.loading:after {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 8px;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
/* Editor Quill nelle sezioni */
.quill-wrapper { background: var(--field-bg); border-radius: 6px; }
.quill-wrapper .ql-toolbar.ql-snow { border-radius: 6px 6px 0 0; }
.quill-wrapper .ql-container.ql-snow { border-radius: 0 0 6px 6px; min-height: 160px; font-size: 14px; }
.quill-wrapper .ql-editor img { max-width: 100%; height: auto; }

/* =========================================================================
   DARK THEME — rifiniture su elementi custom non coperti da data-bs-theme.
   I componenti Bootstrap nativi (form-control, card, btn-outline, text-muted)
   sono gestiti da [data-bs-theme="dark"] su <html>. Qui solo il custom + Quill.
   ========================================================================= */
[data-theme="dark"] .section-title { color: var(--text); }
[data-theme="dark"] .hero-icon { background: rgba(0, 229, 255, .10); border-color: rgba(0, 229, 255, .28); }
[data-theme="dark"] .form-section { box-shadow: 0 18px 50px -30px rgba(0, 0, 0, .8); }
[data-theme="dark"] .totale-tabella { color: var(--accent); border-top-color: var(--accent); }
[data-theme="dark"] .importo-totale { color: var(--accent); }
[data-theme="dark"] #preview-frame { border-color: var(--border) !important; }

/* Quill — tema snow su fondo scuro */
[data-theme="dark"] .ql-toolbar.ql-snow,
[data-theme="dark"] .ql-container.ql-snow { border-color: var(--border); }
[data-theme="dark"] .ql-toolbar.ql-snow .ql-stroke { stroke: var(--text-light); }
[data-theme="dark"] .ql-toolbar.ql-snow .ql-fill { fill: var(--text-light); }
[data-theme="dark"] .ql-toolbar.ql-snow .ql-picker { color: var(--text-light); }
[data-theme="dark"] .ql-toolbar.ql-snow button:hover .ql-stroke,
[data-theme="dark"] .ql-toolbar.ql-snow button.ql-active .ql-stroke { stroke: var(--accent); }
[data-theme="dark"] .ql-toolbar.ql-snow button:hover .ql-fill,
[data-theme="dark"] .ql-toolbar.ql-snow button.ql-active .ql-fill { fill: var(--accent); }
[data-theme="dark"] .ql-editor { color: var(--text); }
[data-theme="dark"] .ql-editor.ql-blank::before { color: var(--text-light); }
[data-theme="dark"] .ql-picker-options { background: var(--card-bg); border-color: var(--border); }
[data-theme="dark"] .ql-snow .ql-picker.ql-expanded .ql-picker-label { border-color: var(--border); }

/* Accent Bootstrap → teal sito (i .btn-* usano le CSS var del component API 5.3) */
.btn-primary {
    --bs-btn-bg: #007A96; --bs-btn-border-color: #007A96;
    --bs-btn-hover-bg: #00667E; --bs-btn-hover-border-color: #00667E;
    --bs-btn-active-bg: #00566B; --bs-btn-active-border-color: #00566B;
    --bs-btn-disabled-bg: #007A96; --bs-btn-disabled-border-color: #007A96;
}
.btn-outline-primary {
    --bs-btn-color: var(--accent); --bs-btn-border-color: var(--accent);
    --bs-btn-hover-bg: #007A96; --bs-btn-hover-border-color: #007A96; --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: #007A96; --bs-btn-active-border-color: #007A96;
}
.form-check-input:checked { background-color: var(--accent); border-color: var(--accent); }
a { color: var(--accent); }

/* Tema toggle (accanto al lang-switch) */
.theme-switch {
    /* Posizionamento gestito dal contenitore .topbar-controls (flex) — niente position:absolute qui */
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 999px; cursor: pointer;
    background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .35);
    color: #fff; backdrop-filter: blur(4px); transition: background .18s, transform .18s;
}
.theme-switch:hover { background: rgba(255, 255, 255, .26); transform: translateY(-1px); }
.theme-switch svg { width: 17px; height: 17px; }
.theme-switch .ts-sun { display: none; }
.theme-switch .ts-moon { display: block; }
[data-theme="light"] .theme-switch .ts-sun { display: block; }
[data-theme="light"] .theme-switch .ts-moon { display: none; }
@media (max-width: 768px) { .topbar-controls { top: 12px; } .theme-switch { width: 32px; height: 32px; } }

/* =========================================================================
   UPLOAD LOGO — due slot distinti (cliente=copertina / mittente=piè di pagina)
   Dropzone a tema + mini-schema della pagina + badge destinazione.
   ========================================================================= */
.logo-slot__head { display: flex; align-items: center; gap: .5rem; margin-bottom: .4rem; flex-wrap: wrap; }
.logo-slot__body { display: flex; gap: .9rem; align-items: stretch; }

.logo-badge { font-weight: 600; font-size: .72rem; }
.logo-badge i { margin-right: .15rem; }
.logo-badge--cover  { color: var(--accent); border: 1px solid var(--accent); background: transparent; }
.logo-badge--footer { color: var(--text-light); border: 1px solid var(--border); background: transparent; }

/* mini-anteprima documento (A4 in scala): mostra DOVE finisce il logo */
.doc-mini { position: relative; flex: 0 0 auto; width: 54px; height: 76px; background: #fff;
    border: 1px solid var(--border); border-radius: 4px; box-shadow: 0 1px 3px rgba(0,0,0,.10); }
[data-theme="dark"] .doc-mini { background: #0A0F1F; }
.doc-mini__spot { position: absolute; background: var(--accent); border-radius: 2px; }
.doc-mini__spot--top { top: 8px; left: 50%; transform: translateX(-50%); width: 60%; height: 11px; opacity: .9; }
.doc-mini__spot--bottom-left { bottom: 7px; left: 7px; width: 32%; height: 7px; opacity: .55; }

/* dropzone cliccabile (la <label for> apre il file picker nativo) */
.dropzone { flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: .4rem; text-align: center; padding: 1rem; min-height: 76px;
    border: 2px dashed var(--border); border-radius: 8px; background: var(--soft-bg);
    cursor: pointer; transition: border-color .2s, background .2s; margin: 0; }
.dropzone:hover, .dropzone:focus-within, .dropzone.is-dragover {
    border-color: var(--accent); background: color-mix(in srgb, var(--soft-bg) 85%, var(--accent)); }
.dropzone__icon { font-size: 1.5rem; color: var(--accent); }
.dropzone__cta { font-size: .85rem; color: var(--text-light); line-height: 1.3; }
.dropzone__preview { display: none; max-width: 100%; max-height: 64px; width: auto; height: auto; }

/* stato CARICATO: la miniatura prende il posto di icona+testo dentro la dropzone */
.logo-slot.is-filled .dropzone__icon,
.logo-slot.is-filled .dropzone__cta { display: none; }
.logo-slot.is-filled .dropzone__preview { display: block; }

/* errore inline (al posto di alert) */
.logo-err { display: none; }
.logo-slot.is-invalid .logo-err { display: block; }
.logo-slot.is-invalid .dropzone { border-color: #dc3545; }

/* =========================================================================
   HEADER BRAND (logo del tool → torna al sito) — interfaccia, NON nel documento
   ========================================================================= */
.qp-brand {
    position: absolute; top: 14px; left: 16px; z-index: 5;
    display: inline-flex; align-items: center; padding: 4px 6px; border-radius: 10px;
    transition: opacity .18s ease, transform .18s ease, background .18s ease;
}
.qp-brand img { height: 34px; width: auto; display: block; filter: drop-shadow(0 1px 4px rgba(0,0,0,.25)); }
.qp-brand:hover { opacity: .92; transform: translateY(-1px); background: rgba(255,255,255,.08); }
.qp-brand:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(255,255,255,.35); }
@media (max-width: 768px) { .qp-brand { top: 12px; left: 12px; } .qp-brand img { height: 28px; } }
@media (max-width: 400px) { .qp-brand img { height: 24px; } }

/* =========================================================================
   ACTION BAR STICKY + tasti coerenti (Anteprima / Word / PDF)
   ========================================================================= */
.qp-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
    height: 52px; padding: 0 1.6rem; border-radius: 12px;
    font-size: 1rem; font-weight: 600; line-height: 1;
    border: 1.5px solid transparent; cursor: pointer; white-space: nowrap;
    transition: transform .18s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease, color .2s ease;
}
.qp-btn i { font-size: 1.05em; }
.qp-btn:focus-visible { outline: none; box-shadow: 0 0 0 .2rem var(--focus-ring); }
.qp-btn:active { transform: translateY(0); }
.qp-btn:disabled { opacity: .7; cursor: not-allowed; transform: none; }

.qp-btn--primary { background: var(--gen-grad); color: #fff; box-shadow: 0 6px 18px -6px rgba(0,122,150,.55); }
.qp-btn--primary:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -8px rgba(0,122,150,.6); }
.qp-btn--secondary {
    background: color-mix(in srgb, var(--accent) 12%, var(--card-bg));
    color: var(--accent); border-color: color-mix(in srgb, var(--accent) 35%, transparent);
}
.qp-btn--secondary:hover { background: color-mix(in srgb, var(--accent) 18%, var(--card-bg)); border-color: var(--accent); transform: translateY(-2px); }
.qp-btn--ghost { background: transparent; color: var(--accent); border-color: var(--accent); }
.qp-btn--ghost:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); transform: translateY(-2px); }

/* Action bar NON più sticky: è un normale blocco in fondo al form.
   Compare solo quando lo scroll arriva alle azioni (Anteprima/Word/PDF), dove ha senso. */
.qp-actionbar {
    position: static; z-index: 1030;
    margin: 1.6rem 0 0; padding: 1.1rem 1rem calc(1.1rem + env(safe-area-inset-bottom, 0px));
    background: color-mix(in srgb, var(--card-bg) 86%, transparent);
    border: 1px solid var(--border);
    border-radius: 14px;
}
.qp-actionbar__inner {
    display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: center;
    max-width: 960px; margin: 0 auto;
}
[data-theme="dark"] .qp-btn--primary { box-shadow: 0 6px 20px -8px rgba(0,229,255,.35); }
@media (max-width: 575.98px) {
    .qp-actionbar { margin: 1.2rem 0 0; }
    .qp-actionbar__inner { flex-direction: column-reverse; gap: .6rem; }
    .qp-btn { width: 100%; }
}

/* =========================================================================
   FOOTER DI PAGINA del tool (interfaccia; NON è il footer del documento PDF)
   ========================================================================= */
.qp-footer {
    margin-top: 2.4rem; border-top: 1px solid var(--border);
    background: color-mix(in srgb, var(--card-bg) 60%, var(--soft-bg)); color: var(--text-light);
}
.qp-footer__inner {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 1rem 1.5rem; padding-top: 1.8rem; padding-bottom: 1.8rem;
}
/* Brand = logo + pill "Strumento gratuito", cliccabile → torna al sito */
.qp-footer__brand {
    display: inline-flex; align-items: center; gap: .7rem;
    text-decoration: none; transition: opacity .18s var(--ease-out), transform .18s var(--ease-out);
}
.qp-footer__brand:hover { transform: translateY(-1px); }
.qp-footer__brand:hover .qp-footer__logobox {
    border-color: color-mix(in srgb, var(--accent) 45%, transparent);
    box-shadow: 0 8px 22px -10px rgba(11, 46, 90, .6);
}
/* Card blu brand: il logo (chiaro) risalta sempre, in light e dark */
.qp-footer__logobox {
    display: inline-flex; align-items: center; justify-content: center;
    padding: .5rem .8rem; border-radius: 11px;
    background: linear-gradient(135deg, #0B2E3A 0%, #102a4a 100%);
    border: 1px solid rgba(255, 255, 255, .12);
    box-shadow: 0 4px 14px -8px rgba(11, 46, 90, .5);
    transition: border-color .18s var(--ease-out), box-shadow .18s var(--ease-out);
}
.qp-footer__logo { height: 24px; width: auto; display: block; }
.qp-footer__tag {
    font-family: var(--mono); font-size: .64rem; font-weight: 400;
    letter-spacing: .1em; text-transform: uppercase; color: var(--accent);
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
    border-radius: 999px; padding: .28rem .6rem; line-height: 1; white-space: nowrap;
}
.qp-footer__copy { margin: 0; font-size: .82rem; color: var(--text-light); letter-spacing: .01em; }
@media (max-width: 575.98px) {
    .qp-footer__inner { flex-direction: column; text-align: center; gap: 1.1rem; }
}

/* =========================================================================
   RESPONSIVE — hero mockup + eyebrow (estende i media query esistenti)
   ========================================================================= */
@media (max-width: 768px) {
    .form-section { padding: 1.5rem 1.4rem; }
    .form-section::before { top: 1.5rem; }
    .hero-doc__sheet { width: 96px; }
    .section-num { font-size: 0.66rem; padding: 0.2rem 0.4rem; }
}
@media (max-width: 400px) {
    .hero-doc__sheet { width: 84px; }
}

/* =========================================================================
   REDUCED MOTION — rispetta la preferenza di sistema: niente entrata/float
   ========================================================================= */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
    #preventivo-form > .form-section { opacity: 1; transform: none; }
    .hero-doc__sheet { transform: rotateX(8deg) rotateZ(-2deg); }
}
