/* ============================================================================
   ATLATECH SRL — THEME IPOVEDENTI (WCAG AAA)
   ----------------------------------------------------------------------------
   Alto contrasto, font ingranditi, animazioni disabilitate, focus visibilissimo.
   Si attiva aggiungendo la classe `theme-ipovedenti` a <html>.
   Rispetta WCAG AAA: contrasto >= 7:1 su tutto il testo.
   ============================================================================ */

:root.theme-ipovedenti,
html.theme-ipovedenti {
    color-scheme: light;

    /* -------- PALETTE BASE — massimo contrasto -------- */
    --color-bg:              #FFFFFF;
    --color-bg-alt:          #F5F5F5;
    --color-bg-card:         #FFFFFF;
    --color-bg-card-hover:   #F0F0F0;
    --color-surface:         #F5F5F5;
    --color-border:          #333333;
    --color-border-hover:    #000000;
    --color-border-strong:   #000000;

    /* -------- ACCENT — alto contrasto -------- */
    --color-primary:         #0047AB;          /* Blu scuro WCAG AAA su bianco: 7.3:1 */
    --color-primary-hover:   #003380;
    --color-primary-glow:    rgba(0, 71, 171, 0.30);
    --color-primary-soft:    rgba(0, 71, 171, 0.10);

    --color-secondary:       #1A1A1A;
    --color-secondary-hover: #000000;
    --color-secondary-glow:  rgba(0, 0, 0, 0.20);

    --color-accent-1:        #5B21B6;          /* Viola scuro AAA: 8.5:1 */
    --color-accent-1-glow:   rgba(91, 33, 182, 0.25);
    --color-accent-2:        #0E7490;          /* Teal scuro AAA: 7.2:1 */
    --color-accent-2-glow:   rgba(14, 116, 144, 0.25);

    /* -------- TEXT — nero puro per massimo contrasto -------- */
    --color-text:            #000000;
    --color-text-muted:      #1A1A1A;          /* Quasi nero, non grigio */
    --color-text-dim:        #333333;
    --color-text-inverse:    #FFFFFF;

    /* -------- STATUS -------- */
    --color-success:         #1B5E20;
    --color-warning:         #7B5B00;
    --color-danger:          #B71C1C;
    --color-info:            #0047AB;

    /* -------- GRADIENTS — flat, no gradient -------- */
    --gradient-primary:      #0047AB;
    --gradient-secondary:    #1A1A1A;
    --gradient-accent-tech:  #0E7490;
    --gradient-hero:         #FFFFFF;
    --gradient-cta:          #F5F5F5;
    --gradient-card:         #FFFFFF;
    --gradient-border:       #000000;
    --gradient-shimmer:      transparent;

    /* -------- TIPOGRAFIA — font molto grande (18px+ base) -------- */
    --fs-xs:     0.9375rem;  /* 15 (era 12) */
    --fs-sm:     1.0625rem;  /* 17 (era 14) */
    --fs-base:   1.1875rem;  /* 19 (era 16) */
    --fs-md:     1.375rem;   /* 22 (era 18) */
    --fs-lg:     1.625rem;   /* 26 (era 20) */
    --fs-xl:     1.875rem;   /* 30 (era 24) */
    --fs-2xl:    2.375rem;   /* 38 (era 32) */

    /* Line height generoso */
    --lh-base:      1.8;
    --lh-relaxed:   2.0;
    --lh-heading:   1.35;

    /* Spaziatura aumentata */
    --space-4:   1.25rem;    /* 20 (era 16) */
    --space-5:   1.75rem;    /* 28 (era 24) */
    --space-6:   2.5rem;     /* 40 (era 32) */

    /* -------- SHADOWS — semplici, non decorative -------- */
    --shadow-xs:   0 1px 2px rgba(0, 0, 0, 0.15);
    --shadow-sm:   0 2px 4px rgba(0, 0, 0, 0.15);
    --shadow-md:   0 4px 8px rgba(0, 0, 0, 0.15);
    --shadow-lg:   0 8px 16px rgba(0, 0, 0, 0.15);
    --shadow-xl:   0 12px 24px rgba(0, 0, 0, 0.15);
    --shadow-glow:       none;
    --shadow-glow-soft:  none;
    --shadow-accent-glow: none;

    /* -------- GLASSMORPHISM — disabilitato -------- */
    --glass-bg:        #FFFFFF;
    --glass-bg-strong: #FFFFFF;
    --glass-border:    #333333;
    --glass-blur:      0px;
    --glass-blur-lg:   0px;

    /* -------- TRANSITIONS — disabilitate -------- */
    --dur-fast:    0.01ms;
    --dur-base:    0.01ms;
    --dur-slow:    0.01ms;
    --dur-slower:  0.01ms;
}

/* ==========================================================================
   GLOBAL — Ipovedenti: accessibilita' forte
   ========================================================================== */

/* Kill tutte le animazioni */
html.theme-ipovedenti *,
html.theme-ipovedenti *::before,
html.theme-ipovedenti *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
}

/* Focus outline ultra visibile e spesso */
html.theme-ipovedenti :focus-visible {
    outline: 4px solid #000000;
    outline-offset: 4px;
    box-shadow: 0 0 0 8px rgba(0, 71, 171, 0.45);
    border-radius: 2px;
}

/* Link sempre sottolineati */
html.theme-ipovedenti a {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
    color: var(--color-primary);
}
html.theme-ipovedenti a:hover {
    color: var(--color-primary-hover);
    text-decoration-thickness: 3px;
}
html.theme-ipovedenti a:visited {
    color: #5B21B6;
}

/* Bordi ben visibili ovunque */
html.theme-ipovedenti .card {
    border: 3px solid #333333;
    background: #FFFFFF;
    backdrop-filter: none;
}
html.theme-ipovedenti .card::before,
html.theme-ipovedenti .card::after {
    display: none;
}
html.theme-ipovedenti .card:hover {
    transform: none;
    border-color: #000000;
    box-shadow: var(--shadow-md);
}

/* Pulsanti ad alto contrasto e piu' grandi */
html.theme-ipovedenti .btn {
    min-height: 52px;
    padding: 1em 2em;
    font-size: var(--fs-sm);
    font-weight: 700;
    border-width: 2px;
}
html.theme-ipovedenti .btn-primary {
    background: #0047AB;
    color: #FFFFFF;
    border: 3px solid #003380;
    font-weight: 700;
}
html.theme-ipovedenti .btn-primary:hover {
    background: #003380;
    transform: none;
    box-shadow: var(--shadow-sm);
}

html.theme-ipovedenti .btn-outline {
    border: 3px solid #0047AB;
    color: #0047AB;
    background: transparent;
}
html.theme-ipovedenti .btn-outline:hover {
    background: rgba(0, 71, 171, 0.10);
    border-color: #003380;
    color: #003380;
    transform: none;
}

/* Sweep decorativo: off */
html.theme-ipovedenti .btn::before {
    display: none;
}
html.theme-ipovedenti .btn:hover svg {
    transform: none;
}

/* Icone piu' grandi */
html.theme-ipovedenti .card-icon {
    width: 68px;
    height: 68px;
}
html.theme-ipovedenti .card-icon svg {
    width: 34px;
    height: 34px;
}

/* Navbar: bordi chiari */
html.theme-ipovedenti .site-header,
html.theme-ipovedenti .site-header.is-scrolled {
    background: #FFFFFF;
    border-bottom: 3px solid #333333;
    backdrop-filter: none;
}

html.theme-ipovedenti .nav-menu a {
    color: #000000;
    font-weight: 600;
    font-size: var(--fs-sm);
}
html.theme-ipovedenti .nav-menu a:hover,
html.theme-ipovedenti .nav-menu a.active {
    color: #0047AB;
}

/* Badge */
html.theme-ipovedenti .badge {
    background: #F5F5F5;
    color: #000000;
    border: 2px solid #333333;
    font-size: var(--fs-sm);
    padding: 0.5em 1em;
}

/* Forms — campi piu' grandi */
html.theme-ipovedenti .form-control {
    border: 3px solid #333333;
    background: #FFFFFF;
    color: #000000;
    min-height: 52px;
    font-size: var(--fs-base);
}
html.theme-ipovedenti .form-control:focus {
    border-color: #0047AB;
    box-shadow: 0 0 0 5px rgba(0, 71, 171, 0.35);
}

/* Glow orbs: nascosti */
html.theme-ipovedenti .glow-orb {
    display: none !important;
}

/* Scrollbar: semplice e grande */
html.theme-ipovedenti ::-webkit-scrollbar {
    width: 14px;
}
html.theme-ipovedenti ::-webkit-scrollbar-thumb {
    background: #333333;
    border: 2px solid #FFFFFF;
    border-radius: 7px;
}
html.theme-ipovedenti ::-webkit-scrollbar-track {
    background: #F5F5F5;
}

/* Selection */
html.theme-ipovedenti ::selection {
    background: #0047AB;
    color: #FFFFFF;
}

/* Footer / sezioni: bordi visibili */
html.theme-ipovedenti footer,
html.theme-ipovedenti .site-footer {
    border-top: 3px solid #333333;
    background: #F5F5F5;
}

/* prefers-reduced-motion override */
@media (prefers-reduced-motion: reduce) {
    html.theme-ipovedenti *,
    html.theme-ipovedenti *::before,
    html.theme-ipovedenti *::after {
        animation: none !important;
        transition: none !important;
    }
}
