/*
Theme Name:     Alacaffè
Theme URI:      
Author:         Alacaffè
Author URI:     
Description:    Tema custom Alacaffè — stile Apple-inspired con palette dal logo (marrone caffè, oro, crema). Include dark mode, preventivatore integrato (richiede plugin Alacaffè Preventivatore), icone SVG. Nessun page builder richiesto.
Version:        1.0.0
Requires at least: 6.0
Tested up to:   6.5
Requires PHP:   7.4
License:        GPL v2 or later
License URI:    https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:    alacaffe
Tags:           coffee, business, dark-mode, custom-colors, custom-menu, featured-images, threaded-comments, block-styles
*/

/* =============================================================================
   ALACAFFÈ – Foglio di stile globale
   Stile: Apple-inspired (massima ariosità, tipografia generosa, transizioni soffuse)
   Palette: tonalità del logo (marrone caffè, oro, crema)
   ========================================================================== */

/* -----------------------------------------------------------------------------
   1. VARIABILI CSS (modifica queste per ribrandizzare l'intero sito)
   Light mode è di default. Dark mode si attiva con:
     - data-theme="dark" su <html>  (toggle manuale)
     - prefers-color-scheme: dark   (preferenza OS)
   -------------------------------------------------------------------------- */
:root {
    /* Colori brand — palette PDF */
    --ala-brown:        #3B2A1A;       /* Marrone Caffè */
    --ala-brown-dark:   #1A0F0A;       /* Nero Morbido scuro */
    --ala-brown-light:  #8B5E34;       /* Caramello */
    --ala-gold:         #C9A24B;       /* Oro */
    --ala-gold-light:   #DCC5A1;       /* Beige Caldo */
    --ala-cream:        #F5EFE6;       /* Avorio */
    --ala-cream-deep:   #EDE3D4;       /* Avorio più carico */

    /* Sistema testo/sfondi */
    --ink:              #1A1A1A;
    --ink-2:            #3B2A1A;
    --ink-muted:        #6B645A;
    --hairline:         #E8DDD0;
    --hairline-dark:    rgba(255,255,255,0.1);

    /* Surfaces */
    --bg:               #FFFFFF;
    --bg-soft:          #FAF7F2;
    --bg-warm:          var(--ala-cream);
    --card-bg:          #FFFFFF;
    --nav-bg:           rgba(255, 255, 255, 0.82);
    --nav-bg-scrolled:  rgba(255, 255, 255, 0.96);
    --input-bg:         #FAF7F2;

    /* Tipografia */
    --font-display:     'Cormorant Garamond', 'Playfair Display', Georgia, serif;
    --font-sans:        'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', sans-serif;
    --font-mono:        'SF Mono', Monaco, monospace;

    /* Spazi (scala 8pt) */
    --s-1:  4px;
    --s-2:  8px;
    --s-3:  16px;
    --s-4:  24px;
    --s-5:  32px;
    --s-6:  48px;
    --s-7:  64px;
    --s-8:  96px;
    --s-9:  128px;
    --s-10: 160px;

    /* Container */
    --max-narrow:  720px;
    --max-text:    980px;
    --max:        1200px;
    --max-wide:   1440px;

    /* Transizioni */
    --ease:       cubic-bezier(0.42, 0, 0.05, 0.99);
    --ease-out:   cubic-bezier(0.16, 1, 0.3, 1);
    --t-fast:     0.2s;
    --t:          0.4s;
    --t-slow:     0.8s;

    /* Radius */
    --r:    12px;
    --r-lg: 24px;
    --r-xl: 32px;

    /* Shadow */
    --shadow-sm:  0 2px 8px rgba(59, 42, 26, 0.06);
    --shadow:     0 8px 32px rgba(59, 42, 26, 0.08);
    --shadow-lg:  0 24px 64px rgba(59, 42, 26, 0.12);
}

/* -----------------------------------------------------------------------------
   1b. DARK MODE OVERRIDES
   Applicato in 2 modi:
   - via @media prefers-color-scheme (se l'utente non ha scelto)
   - via data-theme="dark" (forzato dal toggle JS)
   -------------------------------------------------------------------------- */
[data-theme="dark"] {
    /* Dark mode disabilitato — sempre light */
    --ink:              #1A1A1A;
    --ink-2:            #3B2A1A;
    --ink-muted:        #6B645A;
    --hairline:         #E8DDD0;
    --bg:               #FFFFFF;
    --bg-soft:          #FAF7F2;
    --bg-warm:          #F5EFE6;
    --card-bg:          #FFFFFF;
    --nav-bg:           rgba(255, 255, 255, 0.82);
    --nav-bg-scrolled:  rgba(255, 255, 255, 0.96);
    --input-bg:         #FAF7F2;
    --ala-gold:         #C9A24B;
    --ala-cream-deep:   #EDE3D4;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        /* Ignorato — tema sempre light */
    }
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --ink:              #F0E8DC;
        --ink-2:            #C8BFB0;
        --ink-muted:        #8E867A;
        --hairline:         #2A2520;
        --bg:               #0F0C0A;
        --bg-soft:          #1A1612;
        --bg-warm:          #1F1A14;
        --card-bg:          #1A1612;
        --nav-bg:           rgba(15, 12, 10, 0.72);
        --nav-bg-scrolled:  rgba(15, 12, 10, 0.92);
        --input-bg:         #1A1612;
        --ala-gold:         #D4B896;
        --ala-cream-deep:   #2A2520;
    }
}

/* Transizione soft quando si cambia tema */
html { transition: background-color 0.3s ease, color 0.3s ease; }
.nav, .card, .card-product, .card-feature, .feature-icon, .calc, .calc-option, .footer,
.field input, .field select, .field textarea {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* -----------------------------------------------------------------------------
   1c. ICONE SVG (sistema riutilizzabile)
   Usa: <svg class="ico"><use href="assets/img/icons.svg#i-NOME"></use></svg>
   -------------------------------------------------------------------------- */
.ico {
    width: 1em;
    height: 1em;
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
    color: currentColor;
}
.ico-lg { width: 1.5em; height: 1.5em; }
.ico-xl { width: 2em;   height: 2em; }
.ico-2xl { width: 2.5em; height: 2.5em; }

/* Wrapper feature icon */
.feature-icon .ico { width: 28px; height: 28px; }
.feature-icon { color: var(--ala-brown); }

/* Card product icon - più grande */
.card-product-img .ico { width: 80px; height: 80px; color: var(--ala-brown-light); opacity: 0.85; }
[data-theme="dark"] .card-product-img .ico { color: var(--ala-gold-light); }

/* Split visual icon - più grande ancora */
.split-visual .ico { width: 120px; height: 120px; color: var(--ala-brown-light); opacity: 0.6; }
[data-theme="dark"] .split-visual .ico { color: var(--ala-gold); opacity: 0.7; }

/* Article icon */
.article-img .ico { width: 60px; height: 60px; color: var(--ala-brown-light); opacity: 0.5; }

/* Calc option icon */
.calc-option-icon .ico { width: 32px; height: 32px; color: inherit; }
.calc-option-icon { color: var(--ala-brown); }
.calc-option.selected .calc-option-icon { color: #fff; }

/* -----------------------------------------------------------------------------
   1d. THEME TOGGLE BUTTON
   -------------------------------------------------------------------------- */
.theme-toggle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: transparent;
    color: var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}
.theme-toggle:hover {
    background: var(--bg-soft);
    border-color: var(--hairline);
}
.theme-toggle .ico {
    width: 18px;
    height: 18px;
}
.theme-toggle .ico-moon { display: none; }
[data-theme="dark"] .theme-toggle .ico-sun { display: none; }
[data-theme="dark"] .theme-toggle .ico-moon { display: inline-block; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .theme-toggle .ico-sun { display: none; }
    :root:not([data-theme="light"]) .theme-toggle .ico-moon { display: inline-block; }
}

/* -----------------------------------------------------------------------------
   2. RESET + BASE
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    font-family: var(--font-sans);
    font-size: 17px;
    line-height: 1.5;
    color: var(--ink);
    background: var(--bg);
    overflow-x: hidden;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; transition: opacity var(--t-fast) var(--ease); }
a:hover { opacity: 0.7; }

button { font-family: inherit; cursor: pointer; border: none; background: none; }

::selection { background: var(--ala-gold); color: var(--bg); }

/* -----------------------------------------------------------------------------
   3. TIPOGRAFIA (scala fluida Apple-style)
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-sans);
    font-weight: 600;
    letter-spacing: -0.022em;
    line-height: 1.07;
    color: var(--ink);
}

.h-display {
    font-size: clamp(48px, 8vw, 96px);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.02;
}

.h-hero {
    font-size: clamp(40px, 6vw, 80px);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.04;
}

.h-section {
    font-size: clamp(36px, 5vw, 64px);
    font-weight: 600;
    letter-spacing: -0.028em;
    line-height: 1.07;
}

.h-3 {
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 600;
    letter-spacing: -0.02em;
}

.h-4 {
    font-size: clamp(20px, 2.4vw, 24px);
    font-weight: 600;
    letter-spacing: -0.018em;
}

.serif {
    font-family: var(--font-display);
    font-weight: 400;
    font-style: italic;
    letter-spacing: 0;
}

.lead {
    font-size: clamp(20px, 2.4vw, 28px);
    line-height: 1.4;
    color: var(--ink-2);
    font-weight: 400;
    letter-spacing: -0.014em;
}

.eyebrow {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--ala-gold);
    margin-bottom: var(--s-3);
    display: inline-block;
}

.muted { color: var(--ink-muted); }

/* -----------------------------------------------------------------------------
   4. LAYOUT (container + sezioni)
   -------------------------------------------------------------------------- */
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--s-4); }
.container-narrow { max-width: var(--max-narrow); margin: 0 auto; padding: 0 var(--s-4); }
.container-text   { max-width: var(--max-text);   margin: 0 auto; padding: 0 var(--s-4); }
.container-wide   { max-width: var(--max-wide);   margin: 0 auto; padding: 0 var(--s-4); }

section { padding: var(--s-10) 0; position: relative; }

@media (max-width: 768px) {
    section { padding: var(--s-8) 0; }
}

.bg-cream  { background: var(--ala-cream); }
.bg-soft   { background: var(--bg-soft); }
.bg-dark   { background: var(--ala-brown-dark); color: var(--ala-cream); }
.bg-dark h1, .bg-dark h2, .bg-dark h3 { color: var(--bg); }
.bg-dark .muted { color: rgba(250,247,242,0.6); }
.bg-brown  { background: var(--ala-brown); color: var(--ala-cream); }
.bg-brown h1, .bg-brown h2, .bg-brown h3 { color: var(--bg); }

/* -----------------------------------------------------------------------------
   5. NAVIGAZIONE (sticky, blur Apple-style)
   -------------------------------------------------------------------------- */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: var(--nav-bg);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--hairline);
    height: 64px;
    transition: background var(--t) var(--ease);
}
.nav-inner {
    max-width: var(--max-wide);
    margin: 0 auto;
    padding: 0 var(--s-4);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
    font-style: italic;
    font-size: 24px;
    font-weight: 500;
    color: var(--ala-brown);
    letter-spacing: -0.01em;
}
.nav-logo img { height: 32px; width: auto; }
.nav-logo:hover { opacity: 1; }
.nav-menu {
    display: flex;
    gap: var(--s-5);
    list-style: none;
}
.nav-menu a {
    font-size: 14px;
    font-weight: 500;
    color: var(--ink);
    letter-spacing: -0.01em;
}
.nav-menu a.active { color: var(--ala-brown); }
.nav-cta {
    display: flex;
    align-items: center;
    gap: var(--s-3);
}
.nav-toggle {
    display: none;
    width: 28px;
    height: 28px;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
}
.nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: #3B2A1A;
    transition: var(--t) var(--ease);
}
@media (max-width: 900px) {
    .nav-menu { display: none; }
    .nav-toggle { display: flex; }
    .nav-cta .btn-text { display: none; }
}
/* Mobile menu overlay */
.nav-mobile {
    position: fixed;
    inset: 0;
    background: var(--bg);
    color: var(--ink);
    z-index: 99;
    transform: translateY(-100%);
    transition: transform var(--t) var(--ease);
    padding: 96px var(--s-5) var(--s-5);
    overflow-y: auto;
}
.nav-mobile.is-open { transform: translateY(0); }
.nav-mobile ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--s-4);
}
.nav-mobile a {
    font-size: 32px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--ink);
}

/* -----------------------------------------------------------------------------
   6. BOTTONI (Apple-style: pill, fill, hover gentle)
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 24px;
    border-radius: 980px; /* pill Apple */
    font-size: 15px;
    font-weight: 500;
    letter-spacing: -0.01em;
    line-height: 1;
    transition: all var(--t-fast) var(--ease);
    white-space: nowrap;
    cursor: pointer;
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--ala-brown);
    color: #fff;
}
.btn-primary:hover {
    background: var(--ala-brown-dark);
    opacity: 1;
    transform: scale(1.03);
}

.btn-secondary {
    background: transparent;
    color: var(--ala-brown);
    border-color: var(--ala-brown);
}
.btn-secondary:hover {
    background: var(--ala-brown);
    color: #fff;
    opacity: 1;
}

.btn-light {
    background: rgba(255,255,255,0.15);
    color: #fff;
    backdrop-filter: blur(20px);
}
.btn-light:hover { background: rgba(255,255,255,0.25); opacity: 1; }

.btn-text {
    padding: 0;
    background: transparent;
    color: var(--ala-brown);
    font-weight: 500;
    border-radius: 0;
}
.btn-text:hover { gap: 12px; opacity: 1; }
.btn-text::after {
    content: '→';
    display: inline-block;
    transition: transform var(--t-fast) var(--ease);
}

.btn-lg { padding: 16px 32px; font-size: 17px; }
.btn-xl { padding: 20px 40px; font-size: 18px; }

/* -----------------------------------------------------------------------------
   7. HERO (Apple-style: titolo gigante, sub gentle, centered)
   -------------------------------------------------------------------------- */
.hero {
    padding: calc(64px + var(--s-9)) 0 var(--s-9);
    text-align: center;
    position: relative;
}
.hero-eyebrow { margin-bottom: var(--s-4); }
.hero h1 { margin-bottom: var(--s-4); }
.hero p.lead { max-width: 720px; margin: 0 auto var(--s-5); }
.hero-cta {
    display: inline-flex;
    gap: var(--s-3);
    flex-wrap: wrap;
    justify-content: center;
}

.hero-visual {
    margin-top: var(--s-7);
    border-radius: var(--r-xl);
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, var(--ala-brown-dark), var(--ala-brown));
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.4);
    font-style: italic;
    font-size: 18px;
}
.hero-visual img {
    width: 100%; height: 100%; object-fit: cover;
}

/* Hero full-bleed alternativo */
.hero-fullbleed {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: #fff;
    background: var(--ala-brown-dark);
    text-align: center;
    padding: 0 var(--s-4);
}
.hero-fullbleed::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(61,36,24,0.85), rgba(92,58,43,0.4));
    z-index: 1;
}
.hero-fullbleed > * { position: relative; z-index: 2; }

/* -----------------------------------------------------------------------------
   8. SECTION HEADERS
   -------------------------------------------------------------------------- */
.section-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto var(--s-8);
}
.section-header h2 { margin-bottom: var(--s-3); }
.section-header p { font-size: 19px; color: var(--ink-muted); }

.section-header-left {
    text-align: left;
    max-width: 880px;
    margin: 0 0 var(--s-8);
}

/* -----------------------------------------------------------------------------
   9. CARDS (Apple-style: subtle, lift on hover)
   -------------------------------------------------------------------------- */
.card {
    background: var(--card-bg);
    border-radius: var(--r-lg);
    padding: var(--s-5);
    transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
    border: 1px solid var(--hairline);
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.card-feature {
    background: var(--bg-soft);
    border-radius: var(--r-xl);
    padding: var(--s-7);
    overflow: hidden;
    position: relative;
    transition: all var(--t) var(--ease);
}
.card-feature:hover { background: var(--ala-cream); }

.card-dark {
    background: var(--ala-brown-dark);
    color: var(--ala-cream);
}
.card-dark h3 { color: #fff; }

/* Card con immagine in alto */
.card-product {
    background: var(--card-bg);
    border-radius: var(--r-lg);
    overflow: hidden;
    transition: all var(--t) var(--ease);
    border: 1px solid var(--hairline);
}
.card-product:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}
.card-product-img {
    aspect-ratio: 4 / 3;
    background: var(--ala-cream-deep);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
    transition: transform var(--t) var(--ease);
}
.card-product:hover .card-product-img { transform: scale(1.05); }
.card-product-body { padding: var(--s-4) var(--s-5) var(--s-5); }
.card-product-body h3 { margin-bottom: var(--s-2); }
.card-product-body p { color: var(--ink-muted); margin-bottom: var(--s-3); font-size: 15px; }

/* -----------------------------------------------------------------------------
   10. GRIDS
   -------------------------------------------------------------------------- */
.grid { display: grid; gap: var(--s-4); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-gap-lg { gap: var(--s-5); }
.grid-gap-xl { gap: var(--s-6); }

@media (max-width: 900px) {
    .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* Split 50/50 immagine + testo */
.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: var(--s-7);
}
.split-visual {
    aspect-ratio: 1;
    border-radius: var(--r-xl);
    overflow: hidden;
    background: var(--ala-cream-deep);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 120px;
}
.split-content > .eyebrow { margin-bottom: var(--s-3); }
.split-content h2 { margin-bottom: var(--s-4); }
.split-content p.lead { margin-bottom: var(--s-5); }
.split-reverse { direction: rtl; }
.split-reverse > * { direction: ltr; }

@media (max-width: 900px) {
    .split { grid-template-columns: 1fr; gap: var(--s-5); }
    .split-reverse { direction: ltr; }
}

/* -----------------------------------------------------------------------------
   11. FEATURE BLOCK (numero + titolo + descrizione)
   -------------------------------------------------------------------------- */
.feature {
    padding: var(--s-4) 0;
}
.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: var(--ala-cream);
    color: var(--ala-brown);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: var(--s-4);
}
.feature h3 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: var(--s-2);
    letter-spacing: -0.018em;
}
.feature p { color: var(--ink-muted); font-size: 16px; line-height: 1.5; }

/* Stats / numeri grandi */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--s-5);
    text-align: center;
    padding: var(--s-7) 0;
    border-top: 1px solid var(--hairline);
    border-bottom: 1px solid var(--hairline);
}
.stat-num {
    font-size: clamp(40px, 5vw, 64px);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--ala-brown);
    line-height: 1;
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 500;
}
.stat-label {
    margin-top: var(--s-2);
    font-size: 14px;
    color: var(--ink-muted);
    letter-spacing: 0.02em;
}
@media (max-width: 700px) {
    .stats-row { grid-template-columns: repeat(2, 1fr); gap: var(--s-5); }
}

/* -----------------------------------------------------------------------------
   12. CTA BANDS (full-width)
   -------------------------------------------------------------------------- */
.cta-band {
    text-align: center;
    padding: var(--s-9) var(--s-4);
}
.cta-band h2 {
    font-size: clamp(36px, 6vw, 72px);
    margin-bottom: var(--s-3);
    letter-spacing: -0.03em;
}
.cta-band .lead { margin-bottom: var(--s-5); max-width: 600px; margin-left: auto; margin-right: auto; }

/* -----------------------------------------------------------------------------
   13. FORM
   -------------------------------------------------------------------------- */
.field {
    margin-bottom: var(--s-4);
    display: flex;
    flex-direction: column;
}
.field label {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--ink-2);
    letter-spacing: -0.01em;
}
.field input,
.field select,
.field textarea {
    padding: 14px 16px;
    background: var(--input-bg);
    border: 1px solid var(--hairline);
    border-radius: var(--r);
    font-size: 16px;
    font-family: inherit;
    color: var(--ink);
    transition: all var(--t-fast) var(--ease);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--ala-brown);
    background: var(--bg);
    box-shadow: 0 0 0 4px rgba(92,58,43,0.08);
}

/* -----------------------------------------------------------------------------
   14. PREVENTIVATORE MOCKUP (Apple-style)
   -------------------------------------------------------------------------- */
.calc {
    background: var(--bg-warm);
    border-radius: var(--r-xl);
    padding: var(--s-7);
    max-width: 880px;
    margin: 0 auto;
    border: 1px solid var(--hairline);
}
.calc-steps {
    display: flex;
    gap: var(--s-2);
    margin-bottom: var(--s-6);
}
.calc-step-pill {
    flex: 1;
    height: 4px;
    background: var(--hairline);
    border-radius: 2px;
    transition: background var(--t) var(--ease);
}
.calc-step-pill.active { background: var(--ala-brown); }
.calc-step-pill.done   { background: var(--ala-gold); }

.calc h3 { margin-bottom: var(--s-2); }
.calc-sub { color: var(--ink-muted); margin-bottom: var(--s-5); }

.calc-options {
    display: grid;
    gap: var(--s-3);
    margin-bottom: var(--s-5);
}
.calc-options.three { grid-template-columns: repeat(3, 1fr); }
.calc-options.four  { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 720px) { .calc-options.four { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 600px) {
    .calc-options.three, .calc-options.four { grid-template-columns: 1fr; }
}

.calc-option {
    background: var(--card-bg);
    border: 1px solid var(--hairline);
    border-radius: var(--r);
    padding: var(--s-4);
    text-align: center;
    cursor: pointer;
    transition: all var(--t-fast) var(--ease);
}
.calc-option:hover {
    border-color: var(--ala-gold);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}
.calc-option.selected {
    background: var(--ala-brown);
    border-color: var(--ala-brown);
    color: #fff;
}
.calc-option-icon { font-size: 32px; margin-bottom: var(--s-2); }
.calc-option-label { font-weight: 600; font-size: 15px; margin-bottom: 4px; letter-spacing: -0.01em; }
.calc-option-desc { font-size: 12px; opacity: 0.7; line-height: 1.4; }

.calc-result {
    background: var(--ala-brown-dark);
    color: var(--bg);
    padding: var(--s-6);
    border-radius: var(--r-lg);
    text-align: center;
    margin-top: var(--s-5);
}
.calc-result-label {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 11px;
    opacity: 0.7;
    margin-bottom: var(--s-2);
}
.calc-result-amount {
    font-family: var(--font-display);
    font-size: clamp(48px, 6vw, 72px);
    font-style: italic;
    font-weight: 500;
    color: var(--ala-gold-light);
    line-height: 1;
}
.calc-result-secondary {
    margin-top: var(--s-3);
    font-size: 14px;
    opacity: 0.8;
}

/* -----------------------------------------------------------------------------
   15. ARTICLE CARDS (blog)
   -------------------------------------------------------------------------- */
.article {
    display: block;
    color: inherit;
}
.article:hover { opacity: 1; }
.article-img {
    aspect-ratio: 16 / 10;
    background: var(--ala-cream-deep);
    border-radius: var(--r-lg);
    overflow: hidden;
    margin-bottom: var(--s-3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    transition: transform var(--t) var(--ease);
}
.article:hover .article-img { transform: scale(1.02); }
.article-meta {
    font-size: 13px;
    color: var(--ala-gold);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    margin-bottom: var(--s-2);
}
.article h3 {
    font-size: 22px;
    margin-bottom: var(--s-2);
    line-height: 1.2;
    letter-spacing: -0.015em;
}
.article p { color: var(--ink-muted); font-size: 15px; }

/* -----------------------------------------------------------------------------
   16. TESTIMONIAL
   -------------------------------------------------------------------------- */
.testimonial {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: var(--s-6);
}
.testimonial-quote {
    font-family: var(--font-display);
    font-style: italic;
    font-size: clamp(24px, 3vw, 36px);
    font-weight: 400;
    line-height: 1.3;
    color: var(--ink);
    margin-bottom: var(--s-4);
    letter-spacing: -0.01em;
}
.testimonial-author {
    font-size: 14px;
    color: var(--ink-muted);
    letter-spacing: 0.02em;
}
.testimonial-author strong { color: var(--ink); font-weight: 600; }

/* -----------------------------------------------------------------------------
   17. ACCORDION (FAQ)
   -------------------------------------------------------------------------- */
.accordion {
    max-width: 800px;
    margin: 0 auto;
}
.accordion details {
    border-top: 1px solid var(--hairline);
    padding: var(--s-4) 0;
}
.accordion details:last-child { border-bottom: 1px solid var(--hairline); }
.accordion summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;
    font-weight: 500;
    letter-spacing: -0.015em;
    padding: var(--s-1) 0;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
    content: '+';
    font-size: 32px;
    font-weight: 300;
    color: var(--ala-brown);
    transition: transform var(--t-fast) var(--ease);
}
.accordion details[open] summary::after { transform: rotate(45deg); }
.accordion-content {
    padding-top: var(--s-3);
    color: var(--ink-muted);
    font-size: 16px;
    line-height: 1.6;
}

/* -----------------------------------------------------------------------------
   18. FOOTER
   -------------------------------------------------------------------------- */
.footer {
    background: var(--ala-brown-dark);
    color: var(--ala-cream);
    padding: var(--s-8) 0 var(--s-4);
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--s-6);
    margin-bottom: var(--s-7);
}
.footer-brand h4 {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 28px;
    color: var(--bg);
    margin-bottom: var(--s-3);
    font-weight: 500;
}
.footer-brand p {
    opacity: 0.7;
    font-size: 15px;
    line-height: 1.6;
    max-width: 320px;
}
.footer h5 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: var(--s-4);
    color: var(--ala-gold-light);
    font-weight: 600;
}
.footer ul { list-style: none; }
.footer li { margin-bottom: var(--s-2); }
.footer li a {
    color: var(--ala-cream);
    opacity: 0.7;
    font-size: 15px;
    transition: opacity var(--t-fast);
}
.footer li a:hover { opacity: 1; }

.footer-bottom {
    border-top: 1px solid var(--hairline-dark);
    padding-top: var(--s-4);
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    opacity: 0.5;
    flex-wrap: wrap;
    gap: var(--s-3);
}
.footer-bottom-links a { margin-left: var(--s-3); }

@media (max-width: 900px) {
    .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--s-5); }
}
@media (max-width: 600px) {
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .footer-bottom-links a { margin: 0 var(--s-2); }
}

/* -----------------------------------------------------------------------------
   19. UTILITIES + ANIMAZIONI
   -------------------------------------------------------------------------- */
.text-center { text-align: center; }
.text-left { text-align: left; }

.mt-1 { margin-top: var(--s-3); }
.mt-2 { margin-top: var(--s-4); }
.mt-3 { margin-top: var(--s-5); }
.mt-4 { margin-top: var(--s-6); }
.mt-5 { margin-top: var(--s-7); }

.divider {
    width: 48px;
    height: 1px;
    background: var(--ala-gold);
    margin: var(--s-4) 0;
}
.divider-center { margin-left: auto; margin-right: auto; }

/* Fade-up on scroll (intersection observer attiva la classe via JS) */
[data-fade] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity var(--t-slow) var(--ease-out), transform var(--t-slow) var(--ease-out);
}
[data-fade].in {
    opacity: 1;
    transform: translateY(0);
}

/* Hide scrollbars in webkit but allow scroll */
.scroll-x {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.scroll-x::-webkit-scrollbar { display: none; }

/* Reduce motion preference */
/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
[data-fade]:not(.nav-mobile) {
    opacity: 1 !important;
    transform: none !important;
}

/* Nav mobile — NON deve essere resettato da data-fade */
.nav-mobile {
    transform: translateY(-100%) !important;
}
.nav-mobile.is-open {
    transform: translateY(0) !important;
}