/* --- Titanium: Landing Territoriali (Standard Titanium Web Kit) --- */
/*
   Foglio condiviso dalle landing locali dei silo.
   Un solo file per tutte: le pagine non duplicano il CSS e restano leggibili.
   Il colore d'accento e' impostato inline sul body tramite --lm-accent,
   cosi' lo stesso template serve Food, Turismo, Edilizia e Sanita'.
*/

:root {
    --dm-oled: #05080e;
    --dm-slate-950: #0a0f18;
    --dm-slate-900: #0f172a;
    --dm-slate-800: #1e293b;
    --dm-slate-700: #334155;
    --dm-slate-300: #cbd5e1;
    --dm-slate-400: #94a3b8;
    --dm-slate-200: #e2e8f0;
    --dm-slate-100: #f1f5f9;
    --dm-offwhite: #f8fafc;
    --dm-radius-card: 1.25rem;
    --dm-radius-pill: 9999px;
    --bottom-nav-height: 64px;
    --lm-accent: #0284c7;
    --lm-accent-hover: #0369a1;
}

html.lenis { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }

body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--dm-offwhite);
    color: var(--dm-slate-800);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

.bg-oled { background-color: var(--dm-oled); }
.bg-offwhite { background-color: var(--dm-offwhite); }

h1, h2, h3, h4, h5, h6 { letter-spacing: -0.02em; }

/* --- Badge settore --- */
.lm-badge {
    display: inline-block;
    background: color-mix(in srgb, var(--lm-accent) 14%, transparent);
    color: var(--lm-accent);
    border: 1px solid color-mix(in srgb, var(--lm-accent) 40%, transparent);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.45rem 0.9rem;
    border-radius: 0.5rem;
}

/* --- Pulsanti --- */
.lm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.6rem;
    border-radius: var(--dm-radius-pill);
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.12s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.18s ease, border-color 0.18s ease;
}

.lm-btn:active { transform: scale(0.97); }

.lm-btn-primary {
    background: var(--lm-accent);
    color: #ffffff;
    border: 1px solid var(--lm-accent);
}

.lm-btn-primary:hover {
    background: var(--lm-accent-hover);
    border-color: var(--lm-accent-hover);
    color: #ffffff;
}

.lm-btn-outline {
    background: transparent;
    color: currentColor;
    border: 1px solid currentColor;
}

.lm-btn-outline:hover { background: rgba(255, 255, 255, 0.08); color: inherit; }

.lm-btn-outline-light {
    background: transparent;
    color: var(--dm-slate-800);
    border: 1px solid var(--dm-slate-300);
}

.lm-btn-outline-light:hover { background: var(--dm-slate-900); color: #ffffff; border-color: var(--dm-slate-900); }

/* --- Card servizi --- */
.lm-card {
    background: #ffffff;
    border: 1px solid var(--dm-slate-200);
    border-radius: var(--dm-radius-card);
    padding: 1.6rem;
    height: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.lm-card:hover {
    transform: translateY(-4px);
    border-color: color-mix(in srgb, var(--lm-accent) 45%, transparent);
    box-shadow: 0 22px 45px -18px rgba(15, 23, 42, 0.28);
}

.lm-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 0.9rem;
    background: color-mix(in srgb, var(--lm-accent) 12%, transparent);
    color: var(--lm-accent);
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.lm-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.5rem; }
.lm-card p { color: var(--dm-slate-800); font-size: 0.94rem; line-height: 1.6; margin: 0; }

/* --- Card scura (hero, CTA) --- */
.lm-card-dark {
    background: linear-gradient(150deg, var(--dm-slate-900), var(--dm-oled));
    border: 1px solid var(--dm-slate-700);
    border-radius: var(--dm-radius-card);
    padding: 1.75rem;
    height: 100%;
}

.lm-card-dark h3 { color: #ffffff; font-size: 1.05rem; font-weight: 700; margin-bottom: 0.45rem; }
.lm-card-dark p { color: var(--dm-slate-300); font-size: 0.92rem; line-height: 1.6; margin: 0; }

/* --- Passi --- */
.lm-step {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.lm-step-num {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: var(--lm-accent);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.95rem;
}

.lm-step h3 { font-size: 1.02rem; font-weight: 700; margin-bottom: 0.25rem; }
.lm-step p { color: var(--dm-slate-800); font-size: 0.92rem; line-height: 1.6; margin: 0; }

/* --- Elenco puntato --- */
.lm-list { list-style: none; padding: 0; margin: 0; }
.lm-list li {
    position: relative;
    padding-left: 1.75rem;
    margin-bottom: 0.75rem;
    color: var(--dm-slate-300);
    line-height: 1.6;
    font-size: 0.95rem;
}
.lm-list li::before {
    content: "\f272";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--lm-accent);
    font-family: "bootstrap-icons";
}
.lm-list-dark li { color: var(--dm-slate-300); }

/* --- FAQ --- */
.lm-accordion .accordion-item {
    background: #ffffff;
    border: 1px solid var(--dm-slate-200);
    border-radius: 0.9rem !important;
    margin-bottom: 0.75rem;
    overflow: hidden;
}

.lm-accordion .accordion-button {
    font-weight: 600;
    font-size: 0.98rem;
    color: var(--dm-slate-900);
    background: #ffffff;
    box-shadow: none;
    padding: 1rem 1.25rem;
}

.lm-accordion .accordion-button:not(.collapsed) {
    color: var(--lm-accent);
    background: #ffffff;
}

.lm-accordion .accordion-button:focus {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--lm-accent) 25%, transparent);
}

.lm-accordion .accordion-button::after { background-image: none; content: "\f282"; font-family: "bootstrap-icons"; }
.lm-accordion .accordion-button:not(.collapsed)::after { transform: rotate(180deg); }
.lm-accordion .accordion-body { font-size: 0.94rem; line-height: 1.7; color: var(--dm-slate-800); padding: 0 1.25rem 1.15rem; }

/* --- Navigazione intestazione --- */
.lm-header-link {
    color: var(--dm-slate-300);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.94rem;
    white-space: nowrap;
    transition: color 0.15s ease;
}

.lm-header-link:hover { color: #ffffff; }

/* --- Dock mobile --- */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-height);
    z-index: 1040;
    display: flex;
    align-items: center;
    justify-content: space-around;
    background: rgba(5, 8, 14, 0.9);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.nav-item-mobile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    color: var(--dm-slate-400);
    text-decoration: none;
    font-size: 0.68rem;
    font-weight: 600;
    flex: 1;
    height: 100%;
    background: none;
    border: 0;
}

.nav-item-mobile i { font-size: 1.25rem; }
.nav-item-mobile.active, .nav-item-mobile:hover { color: var(--lm-accent); }
.nav-item-mobile.wa { color: #25d366; }
.nav-item-mobile.wa:hover { color: #25d366; filter: brightness(1.15); }

/* --- Punti di attenzione sullo sfondo scuro --- */
.lm-dark-section { background-color: var(--dm-oled); }
.lm-muted-dark { color: var(--dm-slate-400); }
.lm-title-light { color: #ffffff; }

/* --- Logo --- */
.lm-logo { height: 34px; width: auto; }

/* --- Focus visibile --- */
a:focus-visible, button:focus-visible, .accordion-button:focus-visible {
    outline: 2px solid var(--lm-accent);
    outline-offset: 2px;
}

/* --- Spazio per la dock su schermi stretti --- */
@media (max-width: 767.98px) {
    body { padding-bottom: var(--bottom-nav-height); }
}

/* ==========================================================================
   Correzioni mobile (audit 2026-10-15)
   ========================================================================== */

/* Le ancorature interne devono fermarsi SOPRA l'intestazione.
   Senza questo le sezioni raggiunte dal menu o dalla dock finiscono
   dietro l'header sticky e il titolo resta illeggibile. */
html {
    scroll-padding-top: 7rem;
}

/* Area di tocco minima sui pulsanti dell'intestazione.
   Sotto i 768px il pollice non colpisce bene un bottone da 33px. */
@media (max-width: 767.98px) {
    header .btn,
    header button,
    header .lm-header-touch {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* Il logo non deve rubare spazio verticale sul telefono */
    header img[alt*="Digital Magix"] {
        max-height: 34px;
        width: auto;
    }
}
/* ---------------------------------------------------------------------------
   Rispetto di prefers-reduced-motion
   Le 57 landing condividono questo foglio. Senza questo blocco le micro-
   interazioni di card, pulsanti e link di sezione resterebbero animate anche
   per chi ha chiesto di ridurre il movimento. Le transizioni diventano
   istantanee invece di sparire: il riscontro al tocco resta leggibile.
   --------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .lm-btn,
  .lm-btn-primary,
  .lm-btn-outline,
  .lm-btn-outline-light,
  .lm-card,
  .lm-card-dark,
  .lm-header-link,
  .lm-step,
  .lm-accordion .accordion-button {
    transition-duration: 0.01ms !important;
  }

  /* Nessuno spostamento al passaggio del mouse o del tocco */
  .lm-btn:active,
  .lm-card:hover,
  .lm-card-dark:hover {
    transform: none !important;
  }
}