/* ==========================================================
   LEAF GAMES & SOFTWARE v2 — Stylesheet istituzionale
   Palette: grafite #0f172a + oro #d4af37
   Tipografia: Inter (body) + Manrope (display)
   ========================================================== */

:root {
    /* Surfaces grafite/slate */
    --bg:         #0f172a;     /* slate-900 - primary background */
    --bg-2:       #1e293b;     /* slate-800 - elevated card */
    --bg-3:       #334155;     /* slate-700 - borders */
    --bg-card:    rgba(30, 41, 59, 0.55);
    --bg-card-h:  rgba(30, 41, 59, 0.85);

    /* Text */
    --text:        #f1f5f9;    /* slate-100 */
    --text-muted:  #94a3b8;    /* slate-400 */
    --text-dim:    #64748b;    /* slate-500 */

    /* Borders */
    --border:        rgba(212, 175, 55, 0.10);
    --border-strong: rgba(212, 175, 55, 0.25);

    /* Accent — oro */
    --gold:       #d4af37;
    --gold-2:     #fbbf24;
    --gold-3:     #f59e0b;
    --gold-glow:  rgba(212, 175, 55, 0.35);

    /* Success/Error (minimal use) */
    --success: #10b981;
    --error:   #ef4444;

    /* Type */
    --font-sans:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Inter', var(--font-sans);
    --font-mono:    ui-monospace, SFMono-Regular, Menlo, monospace;

    /* Radius */
    --r-sm: 6px;
    --r-md: 12px;
    --r-lg: 20px;
    --r-xl: 28px;

    /* Shadow */
    --shadow-sm: 0 4px 12px rgba(0,0,0,0.35);
    --shadow-md: 0 12px 32px rgba(0,0,0,0.45);
    --shadow-lg: 0 20px 60px rgba(0,0,0,0.55);
    --shadow-gold: 0 0 60px var(--gold-glow);

    /* Layout */
    --container: 1200px;
    --container-narrow: 760px;
    --header-h: 76px;

    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}
img, svg, video { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
a { color: var(--gold); text-decoration: none; transition: color .2s; }
a:hover { color: var(--gold-2); }
::selection { background: var(--gold); color: #0f172a; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #0a1020; }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, var(--gold), #b8941f); border-radius: 10px; }
[x-cloak] { display: none !important; }

.skip-link {
    position: absolute; left: -9999px; top: 0;
    background: var(--gold); color: #0f172a;
    padding: 8px 14px; border-radius: 0 0 8px 0; z-index: 9999;
    font-weight: 600;
}
.skip-link:focus { left: 0; }

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}
.container.narrow {
    max-width: var(--container-narrow);
}
.container.split {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 48px;
    align-items: start;
}
@media (max-width: 800px) {
    .container.split { grid-template-columns: 1fr; }
}

/* Typography */
h1, h2, h3, h4, h5 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.01em;
    margin: 0 0 16px;
    color: var(--text);
}
h1 { font-size: clamp(36px, 5.5vw, 64px); font-weight: 800; }
h2 { font-size: clamp(28px, 3.5vw, 44px); }
h3 { font-size: clamp(20px, 2vw, 26px); }
h4 { font-size: 18px; }
p  { margin: 0 0 16px; }
p.large { font-size: 20px; line-height: 1.55; color: var(--text); }
p.lead { font-size: 20px; line-height: 1.55; }

.kicker {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 16px;
    padding: 6px 14px;
    border: 1px solid var(--border-strong);
    border-radius: 100px;
}

.text-gold {
    background: linear-gradient(135deg, var(--gold-2) 0%, var(--gold) 50%, #b8941f 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.back-link {
    display: inline-block;
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 16px;
}
.back-link:hover { color: var(--gold); }

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--border);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-h);
    gap: 24px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
}
.brand:hover { color: var(--gold); }
.brand-wordmark {
    display: flex;
    flex-direction: column;
    line-height: 1;
}
.brand-name {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 18px;
    letter-spacing: 0.08em;
    color: var(--text);
}
.brand-name.big { font-size: 64px; letter-spacing: 0.15em; }
.brand-sub {
    font-size: 10px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-top: 4px;
}
.site-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}
.nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 28px;
}
.nav-list a {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    transition: color .2s;
}
.nav-list a:hover, .nav-list a.active {
    color: var(--gold);
}
.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}
.lang-switch {
    color: var(--text-dim);
    font-size: 13px;
}
.lang-switch a {
    color: var(--text-muted);
    font-weight: 600;
    padding: 4px 6px;
}
.lang-switch a.active { color: var(--gold); }
.hamburger {
    display: none;
    background: none;
    border: 0;
    width: 44px;          /* iOS HIG min tap target */
    height: 44px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    touch-action: manipulation; /* iOS: no 300ms tap delay */
    -webkit-tap-highlight-color: transparent;
    position: relative;
    z-index: 220;
}
.hamburger span {
    height: 2px;
    width: 22px;
    background: var(--text);
    border-radius: 2px;
    transition: transform .25s var(--ease-out), opacity .2s linear;
}
.site-header.is-open .hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-header.is-open .hamburger span:nth-child(2) { opacity: 0; }
.site-header.is-open .hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
    .site-nav { display: none; }
    .hamburger { display: flex; }
}

/* Backdrop overlay (click-outside-to-close) */
.mobile-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 190;
    touch-action: manipulation;
}

/* Mobile drawer fuori da <header> per iOS Safari fix */
.mobile-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    /* width: keep slide right-from-right, drawer occupies most of viewport */
    width: min(420px, 92vw);
    height: 100vh;           /* fallback */
    height: 100dvh;          /* iOS Safari dynamic viewport: no chrome jump */
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 200;
    padding: 84px 24px 32px;
    transform: translateX(100%);
    transition: transform .32s var(--ease-out);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;     /* allow vertical scroll inside */
    visibility: hidden;      /* prevent screen-reader focus when closed */
}
.mobile-drawer.is-open {
    transform: translateX(0);
    visibility: visible;
}

/* Body scroll lock when drawer is open (iOS-safe: position:fixed) */
body.drawer-lock {
    position: fixed;
    inset: 0;
    overflow: hidden;
    width: 100%;
}

.drawer-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,.06);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: background .2s ease;
}
.drawer-close:hover, .drawer-close:focus-visible {
    background: rgba(212,175,55,.18);
    outline: none;
}

.drawer-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.drawer-nav a {
    color: var(--text);
    font-size: 22px;
    font-weight: 600;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(212,175,55,.15);
}
.drawer-nav a:active { color: var(--gold); }
.drawer-lang {
    margin-top: 32px;
    color: var(--text-muted);
}

/* Brand logo image (replaces inline SVG placeholder) */
.brand-mark .brand-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
    display: block;
}

/* ============================================================
   Animazione foglie cascading one-shot al load (intro-leaves)
   GPU-accelerated, no jank, prefers-reduced-motion-aware
   ============================================================ */
#leafFall {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9000;
    overflow: hidden;
    /* container removed (display:none) automatically by JS after animation */
}
#leafFall .leaf-particle {
    position: absolute;
    top: -8vh;
    will-change: transform, opacity;
    opacity: 0;
    animation-name: leafFallAnim;
    animation-timing-function: cubic-bezier(.45,.05,.55,.95);
    animation-fill-mode: forwards;
    transform: translate3d(0,-100px,0) rotate(0deg);
}
@keyframes leafFallAnim {
    0%   { transform: translate3d(0,-100px,0) rotate(0deg);    opacity: 0; }
    8%   { opacity: .95; }
    50%  { transform: translate3d(var(--lx, 30px),50vh,0) rotate(180deg); opacity: .9; }
    100% { transform: translate3d(var(--lx2, -10px),105vh,0) rotate(540deg); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
    #leafFall { display: none !important; }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 600;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    text-decoration: none;
    transition: all .25s var(--ease-out);
    cursor: pointer;
    background: transparent;
    color: var(--text);
}
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-lg { padding: 16px 28px; font-size: 16px; }
.btn-primary {
    background: linear-gradient(135deg, var(--gold) 0%, #b8941f 100%);
    color: #0f172a;
    border-color: var(--gold);
    box-shadow: 0 4px 24px rgba(212, 175, 55, 0.25);
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 32px rgba(212, 175, 55, 0.40);
    color: #0f172a;
}
.btn-ghost {
    background: transparent;
    color: var(--text);
}
.btn-ghost:hover {
    background: rgba(212, 175, 55, 0.08);
    border-color: var(--gold);
    color: var(--gold);
}
.btn-arrow svg {
    transition: transform .25s var(--ease-out);
}
.btn-arrow:hover svg {
    transform: translateX(4px);
}

/* HERO */
.hero {
    position: relative;
    padding: 100px 0 80px;
    overflow: hidden;
}
.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
}
.hero-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(212, 175, 55, 0.10), transparent 60%),
        radial-gradient(circle at 80% 70%, rgba(22, 163, 74, 0.06), transparent 60%),
        url('/assets/img/heroes/home-hero.webp');
    background-size: auto, auto, cover;
    background-position: center;
    background-blend-mode: normal, normal, soft-light;
    opacity: 1;
}
.hero-bg #hero-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
.hero-vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(15, 23, 42, 0.4) 70%, var(--bg) 100%);
    pointer-events: none;
}
.hero-inner {
    position: relative;
    z-index: 1;
    text-align: center;
}
.hero-title {
    font-size: clamp(40px, 6vw, 88px);
    font-weight: 800;
    line-height: 1.05;
    margin: 16px 0 24px;
    letter-spacing: -0.02em;
}
.hero-title .line {
    display: block;
}
.hero-subtitle {
    font-size: clamp(16px, 1.6vw, 20px);
    color: var(--text-muted);
    max-width: 720px;
    margin: 0 auto 36px;
}
.hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 80px;
}
.hero-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
    padding: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    backdrop-filter: blur(8px);
}
@media (max-width: 700px) {
    .hero-stats { grid-template-columns: repeat(2, 1fr); }
}
.hero-stat-value {
    font-family: var(--font-display);
    font-size: clamp(24px, 3vw, 36px);
    font-weight: 800;
    color: var(--gold);
}
.hero-stat-label {
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    margin-top: 6px;
}

/* Page hero (interne) */
.page-hero {
    padding: 96px 0 56px;
    border-bottom: 1px solid var(--border);
    position: relative;
    isolation: isolate;
    overflow: hidden;
}
/* Per-page hero background images (DALL-E generated, brand-coherent) */
.page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--hero-bg, none);
    background-size: cover;
    background-position: center;
    opacity: .42;
    z-index: -2;
    transform: scale(1.04);
    transition: transform .8s ease, opacity .8s ease;
}
.page-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(11,18,32,.45) 0%, rgba(11,18,32,.85) 75%, rgba(11,18,32,1) 100%);
    z-index: -1;
}
[data-page="services"]      .page-hero { --hero-bg: url('/assets/img/heroes/services-hero.webp'); }
[data-page="service"]       .page-hero { --hero-bg: url('/assets/img/heroes/services-hero.webp'); }
[data-page="portfolio"]     .page-hero,
[data-page="project"]       .page-hero { --hero-bg: url('/assets/img/heroes/portfolio-hero.webp'); }
[data-page="about"]         .page-hero { --hero-bg: url('/assets/img/heroes/about-hero.webp'); }
[data-page="contact"]       .page-hero,
[data-page="quote"]         .page-hero { --hero-bg: url('/assets/img/heroes/contact-hero.webp'); }
[data-page="blog"]          .page-hero,
[data-page="article"]       .page-hero { --hero-bg: url('/assets/img/heroes/blog-hero.webp'); }
[data-page="careers"]       .page-hero { --hero-bg: url('/assets/img/heroes/careers-hero.webp'); }

.page-title {
    font-size: clamp(36px, 5vw, 64px);
    margin-bottom: 16px;
}
.page-subtitle {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 760px;
}

/* Section */
.section {
    padding: 80px 0;
}
.section-head {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 56px;
}
.section-title {
    font-size: clamp(28px, 4vw, 44px);
    margin-bottom: 16px;
}
.section-subtitle {
    color: var(--text-muted);
}
.section-cta {
    text-align: center;
    margin-top: 48px;
}

/* Cards grid (services preview homepage) */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}
.card {
    padding: 32px 28px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    transition: all .3s var(--ease-out);
}
.card:hover {
    transform: translateY(-4px);
    border-color: var(--gold);
    box-shadow: var(--shadow-md);
}
.card-num {
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--gold);
    margin-bottom: 16px;
}
.card h3 { margin-bottom: 12px; }
.card p { color: var(--text-muted); margin-bottom: 16px; font-size: 15px; }
.card-link { font-size: 13px; color: var(--gold); font-weight: 600; }

/* Services list page */
.services-list {
    display: flex;
    flex-direction: column;
    gap: 80px;
}
.service-row {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 32px;
    padding-bottom: 60px;
    border-bottom: 1px solid var(--border);
}
.service-row:last-child { border-bottom: 0; }
.service-num {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--gold);
    padding-top: 16px;
}
.service-body h2 { margin-bottom: 16px; }
.service-hook {
    font-size: 22px;
    color: var(--text);
    font-style: italic;
    margin-bottom: 32px;
    line-height: 1.4;
}
.service-hook.large { font-size: 28px; line-height: 1.3; margin: 24px 0 40px; }
.service-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    margin-bottom: 32px;
}
.service-grid.wide {
    grid-template-columns: 1fr;
    gap: 24px;
}
@media (max-width: 700px) {
    .service-grid { grid-template-columns: 1fr; }
    .service-row { grid-template-columns: 1fr; }
}
.service-block h3, .service-block h4 {
    margin-bottom: 12px;
    color: var(--gold);
}
.service-block p {
    color: var(--text-muted);
    font-size: 15px;
}
.service-features {
    list-style: none;
    padding: 0;
    margin: 24px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 16px 32px;
}
.service-features.grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
}
.service-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text);
}

/* Works grid */
.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}
.works-grid.wide {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}
.work-card {
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    overflow: hidden;
    transition: all .3s var(--ease-out);
    color: var(--text);
}
.work-card:hover {
    transform: translateY(-4px);
    border-color: var(--gold);
    box-shadow: var(--shadow-md);
    color: var(--text);
}
.work-thumb {
    aspect-ratio: 16 / 10;
    background: var(--bg-3);
    overflow: hidden;
}
.work-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.85) brightness(0.95);
    transition: all .4s var(--ease-out);
}
.work-card:hover .work-thumb img {
    filter: saturate(1) brightness(1);
    transform: scale(1.03);
}
.work-info {
    padding: 24px;
}
.work-tag {
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gold);
    font-weight: 600;
}
.work-info h3 { margin: 8px 0 8px; font-size: 20px; }
.work-meta {
    color: var(--text-dim);
    font-size: 13px;
    margin-bottom: 8px;
}
.work-info p { color: var(--text-muted); font-size: 14px; margin: 0; }

/* Sectors grid */
.sectors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1px;
    background: var(--border);
    border-radius: var(--r-md);
    overflow: hidden;
    border: 1px solid var(--border);
}
.sector-item {
    background: var(--bg);
    padding: 28px;
    transition: background .2s;
}
.sector-item:hover { background: var(--bg-2); }
.sector-name {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}
.sector-clients {
    font-size: 13px;
    color: var(--text-muted);
}

/* CTA banner */
.cta-banner {
    text-align: center;
    padding: 64px 32px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.08), rgba(15, 23, 42, 0.5));
    border: 1px solid var(--border-strong);
    border-radius: var(--r-lg);
}
.cta-banner.small { padding: 48px 24px; }
.cta-banner h2 { margin-bottom: 12px; }
.cta-banner p { color: var(--text-muted); margin-bottom: 24px; }

/* About */
.about-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 64px;
    align-items: center;
    margin-bottom: 80px;
}
@media (max-width: 800px) { .about-grid { grid-template-columns: 1fr; gap: 32px; } }
.about-text p { font-size: 17px; }
.about-visual {
    position: relative;
    text-align: center;
}
.about-visual-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.25), transparent 70%);
    filter: blur(60px);
}
.about-card {
    position: relative;
    padding: 48px;
    background: var(--bg-card);
    border: 1px solid var(--gold);
    border-radius: var(--r-lg);
}
.about-meta {
    margin-top: 16px;
    color: var(--gold);
    font-weight: 600;
}
.about-piva {
    margin-top: 8px;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 12px;
}
.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}
.value-item {
    padding: 28px;
    background: var(--bg-card);
    border-left: 3px solid var(--gold);
    border-radius: 0 var(--r-md) var(--r-md) 0;
}
.value-item h4 {
    color: var(--gold);
    margin-bottom: 8px;
}
.value-item p {
    color: var(--text-muted);
    font-size: 14px;
    margin: 0;
}

/* Forms */
.form-card {
    padding: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: var(--r-lg);
}
.form-card label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 16px;
}
.form-card label.checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}
.form-card input, .form-card select, .form-card textarea {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 12px 16px;
    background: var(--bg);
    border: 1px solid var(--border-strong);
    border-radius: var(--r-sm);
    color: var(--text);
    font-family: inherit;
    font-size: 15px;
    transition: border-color .2s;
}
.form-card input:focus, .form-card select:focus, .form-card textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}
.form-card button {
    width: 100%;
    margin-top: 16px;
}
.alert {
    padding: 12px 16px;
    border-radius: var(--r-sm);
    margin-bottom: 16px;
}
.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}
.empty-state.large {
    font-size: 18px;
    border: 1px dashed var(--border-strong);
    border-radius: var(--r-md);
}

/* Contact info */
.contact-info .info-block {
    margin-bottom: 32px;
}
.contact-info h4 {
    color: var(--gold);
    margin-bottom: 4px;
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.contact-info p, .contact-info a {
    color: var(--text);
    font-size: 16px;
}

/* Footer */
.site-footer {
    padding: 80px 0 32px;
    background: #0a1020;
    border-top: 1px solid var(--border);
    margin-top: 80px;
}
.footer-top {
    display: grid;
    grid-template-columns: 1.2fr 2fr;
    gap: 64px;
}
@media (max-width: 800px) { .footer-top { grid-template-columns: 1fr; } }
.footer-tagline {
    margin-top: 12px;
    color: var(--text);
    font-style: italic;
}
.footer-legal {
    margin-top: 24px;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.7;
}
.footer-cols {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}
@media (max-width: 700px) { .footer-cols { grid-template-columns: repeat(2, 1fr); } }
.footer-col h4 {
    color: var(--gold);
    font-size: 13px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 16px;
}
.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-col li { margin-bottom: 8px; }
.footer-col a {
    color: var(--text-muted);
    font-size: 14px;
}
.footer-col a:hover { color: var(--gold); }
.footer-bottom {
    margin-top: 64px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}
.footer-bottom p {
    margin: 0;
    color: var(--text-dim);
    font-size: 13px;
}
.footer-social {
    display: flex;
    gap: 24px;
}
.footer-social a {
    color: var(--text-muted);
    font-size: 13px;
}

/* Cookie banner */
.cookie-banner {
    position: fixed;
    bottom: 16px;
    left: 16px;
    right: 16px;
    z-index: 90;
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid var(--gold);
    border-radius: var(--r-md);
    padding: 16px 24px;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(12px);
}
.cookie-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}
.cookie-banner p { margin: 0; font-size: 14px; color: var(--text); }
.cookie-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
.cookie-details-link { font-size: 13px; color: var(--text-muted); }

/* Article body (blog) */
.article-body {
    color: var(--text);
    font-size: 17px;
    line-height: 1.7;
}
.article-body h2 { margin-top: 48px; }
.article-body h3 { margin-top: 32px; }
.article-body blockquote {
    border-left: 3px solid var(--gold);
    padding-left: 24px;
    margin: 24px 0;
    color: var(--text-muted);
    font-style: italic;
}
.article-body code {
    background: var(--bg-2);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 14px;
}
.article-body pre {
    background: var(--bg-2);
    padding: 16px;
    border-radius: var(--r-sm);
    overflow-x: auto;
    border: 1px solid var(--border);
}

.project-hero-img {
    width: 100%;
    border-radius: var(--r-md);
    margin-bottom: 32px;
    border: 1px solid var(--border);
}

/* Intro overlay home */
.intro-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: radial-gradient(ellipse at center, #1e293b 0%, #0f172a 60%, #050a14 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity .8s var(--ease-out);
}
.intro-overlay.fading { opacity: 0; pointer-events: none; }
.intro-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
.intro-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--text);
    padding: 24px;
}
.intro-mark {
    width: 96px;
    height: 96px;
    margin: 0 auto 24px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--gold) 0%, rgba(212, 175, 55, 0.3) 70%);
    box-shadow: 0 0 80px rgba(212, 175, 55, 0.5);
}
.intro-title {
    font-family: var(--font-display);
    font-size: 56px;
    font-weight: 800;
    letter-spacing: 0.15em;
    margin: 0;
}
.intro-sub {
    color: var(--gold);
    letter-spacing: 0.3em;
    font-size: 12px;
    margin-top: 8px;
    text-transform: uppercase;
}
.intro-tagline {
    margin-top: 16px;
    color: var(--text-muted);
    font-style: italic;
}
.intro-enter {
    margin-top: 32px;
    padding: 14px 28px;
    background: transparent;
    color: var(--gold);
    border: 1px solid var(--gold);
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all .25s var(--ease-out);
}
.intro-enter:hover {
    background: var(--gold);
    color: #0f172a;
    box-shadow: 0 0 32px rgba(212, 175, 55, 0.4);
}
.intro-skip {
    position: absolute;
    bottom: 32px;
    right: 32px;
    background: transparent;
    color: var(--text-muted);
    border: 0;
    font-size: 13px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.intro-skip:hover { color: var(--gold); }


/* ==========================================================
   F2 — Hero foglia oro morph + layout grid + estensioni
   ========================================================== */
.hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 48px;
    align-items: center;
}
@media (max-width: 960px) {
    .hero-grid { grid-template-columns: 1fr; gap: 32px; }
    .hero-art { order: -1; max-width: 420px; margin: 0 auto; }
}
.hero-copy { position: relative; z-index: 2; }

.hero-art {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1200px;
}
.hero-leaf-svg {
    width: 100%;
    max-width: 540px;
    height: auto;
    filter: drop-shadow(0 30px 60px rgba(212,175,55,0.15));
    opacity: 0;
    transform: translateY(20px) rotate(-3deg) scale(0.95);
    transition: opacity 1.2s cubic-bezier(0.2,0.65,0.2,1), transform 1.6s cubic-bezier(0.2,0.65,0.2,1);
}
.hero-art.is-in .hero-leaf-svg {
    opacity: 1;
    transform: translateY(0) rotate(0) scale(1);
}

.hero-leaf-shape {
    transform-origin: 0 380px;
    animation: leaf-breathe 8s ease-in-out infinite;
}
@keyframes leaf-breathe {
    0%, 100% { transform: rotate(0) scale(1); filter: brightness(1); }
    50%      { transform: rotate(-1.5deg) scale(1.02); filter: brightness(1.08); }
}

.hero-leaf-vein {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: leaf-vein-draw 2.4s ease-out 0.4s forwards;
}
.hero-leaf-vein-main { animation-delay: 0.6s; }
.hero-leaf-vein-1    { animation-delay: 1.0s; }
.hero-leaf-vein-2    { animation-delay: 1.3s; }
.hero-leaf-vein-3    { animation-delay: 1.6s; }
@keyframes leaf-vein-draw {
    to { stroke-dashoffset: 0; }
}

.hero-leaf-dust circle { animation: dust-twinkle 4s ease-in-out infinite; }
.hero-leaf-dust circle:nth-child(2) { animation-delay: -1.2s; }
.hero-leaf-dust circle:nth-child(3) { animation-delay: -2.4s; }
.hero-leaf-dust circle:nth-child(4) { animation-delay: -0.8s; }
.hero-leaf-dust circle:nth-child(5) { animation-delay: -3s; }
@keyframes dust-twinkle {
    0%, 100% { opacity: 0.55; transform: translateY(0); }
    50%      { opacity: 1; transform: translateY(-3px); }
}

.hero-leaf-halo {
    transform-origin: 300px 300px;
    animation: halo-pulse 6s ease-in-out infinite;
}
@keyframes halo-pulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50%      { opacity: 1; transform: scale(1.05); }
}

@media (prefers-reduced-motion: reduce) {
    .hero-leaf-svg { opacity: 1; transform: none; transition: none; }
    .hero-leaf-vein { stroke-dashoffset: 0; animation: none; }
    .hero-leaf-shape, .hero-leaf-halo, .hero-leaf-dust circle { animation: none; }
}

/* ==========================================================
   F2 — Cards services/sectors arricchite
   ========================================================== */
.card .card-icon {
    display: inline-flex;
    width: 48px; height: 48px;
    align-items: center;
    justify-content: center;
    border-radius: var(--r-md);
    background: linear-gradient(135deg, rgba(212,175,55,0.18), rgba(212,175,55,0.04));
    border: 1px solid var(--border-strong);
    margin-bottom: 14px;
}
.card .card-icon img { width: 28px; height: 28px; }

.service-hero {
    padding: 80px 0 32px;
    border-bottom: 1px solid var(--border);
}
.service-hero .kicker { color: var(--gold); }
.service-section { padding: 48px 0; border-bottom: 1px solid var(--border); }
.service-section h2 { color: var(--gold-2); margin-bottom: 14px; font-size: 1.6rem; }
.service-section p { color: var(--text-muted); max-width: 65ch; line-height: 1.65; }
.service-features { display: grid; grid-template-columns: repeat(auto-fill,minmax(220px,1fr)); gap: 14px; margin-top: 18px; }
.service-feature { padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--bg-card); color: var(--text); font-size: 0.95rem; }

.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 22px;
}
.work-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.work-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-md);
}
.work-thumb img { display: block; width: 100%; height: 200px; object-fit: cover; }
.work-info { padding: 16px 18px 18px; }
.work-tag { color: var(--gold); font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; }
.work-info h3 { margin: 6px 0 8px; color: var(--text); font-size: 1.1rem; }
.work-info p { color: var(--text-muted); font-size: 0.92rem; line-height: 1.5; }

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 22px;
}
.blog-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 22px;
    transition: border-color .25s ease, transform .25s ease;
}
.blog-card:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.blog-tag { color: var(--gold); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; }
.blog-card h3 { margin: 8px 0 10px; color: var(--text); font-size: 1.2rem; line-height: 1.3; }
.blog-card h3 a { color: inherit; text-decoration: none; }
.blog-card h3 a:hover { color: var(--gold); }
.blog-meta { color: var(--text-dim); font-size: 0.8rem; margin-top: 12px; }
.blog-excerpt { color: var(--text-muted); font-size: 0.92rem; line-height: 1.55; margin-top: 6px; }

.article-wrap { max-width: 760px; margin: 0 auto; padding: 60px 0 80px; }
.article-wrap h1 { font-size: 2.4rem; line-height: 1.15; color: var(--text); margin-bottom: 14px; }
.article-meta { color: var(--text-dim); font-size: 0.9rem; margin-bottom: 32px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.article-content h2 { color: var(--gold-2); font-size: 1.45rem; margin-top: 36px; margin-bottom: 12px; }
.article-content h3 { color: var(--text); font-size: 1.15rem; margin-top: 24px; margin-bottom: 8px; }
.article-content p { color: var(--text-muted); line-height: 1.75; margin-bottom: 16px; font-size: 1.02rem; }
.article-content ul, .article-content ol { margin: 12px 0 20px 24px; color: var(--text-muted); line-height: 1.7; }
.article-content li { margin-bottom: 8px; }
.article-content code { background: var(--bg-2); padding: 2px 6px; border-radius: 4px; font-family: var(--font-mono); font-size: 0.9em; color: var(--gold); }
.article-content pre { background: var(--bg-2); padding: 16px; border-radius: var(--r-md); overflow-x: auto; border-left: 3px solid var(--gold); }
.article-content blockquote { border-left: 3px solid var(--gold); padding-left: 16px; margin: 20px 0; color: var(--text); font-style: italic; }
.article-tldr {
    background: linear-gradient(135deg, rgba(212,175,55,0.08), rgba(212,175,55,0.02));
    border: 1px solid var(--border-strong);
    border-radius: var(--r-md);
    padding: 18px 22px;
    margin: 24px 0 30px;
}
.article-tldr-label { color: var(--gold); font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; }
.article-tldr p { color: var(--text); margin-top: 6px; margin-bottom: 0; line-height: 1.6; }

.faq { margin-top: 40px; }
.faq h2 { color: var(--gold-2); }
.faq-item { padding: 16px 0; border-bottom: 1px solid var(--border); }
.faq-item h3 { color: var(--text); font-size: 1.05rem; margin-bottom: 6px; }
.faq-item p  { color: var(--text-muted); line-height: 1.6; margin: 0; }

.form-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-field label { color: var(--text); font-size: 0.92rem; }
.form-field input, .form-field select, .form-field textarea {
    background: var(--bg-2);
    color: var(--text);
    border: 1px solid var(--border-strong);
    border-radius: var(--r-sm);
    padding: 10px 12px;
    font-family: inherit;
    font-size: 0.98rem;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--gold-glow);
}
.form-field textarea { min-height: 130px; resize: vertical; }
.form-hp { position: absolute; left: -9999px; top: -9999px; opacity: 0; pointer-events: none; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 600px) { .form-grid-2 { grid-template-columns: 1fr; } }
.form-consent {
    display: flex; gap: 10px; align-items: flex-start;
    color: var(--text-muted); font-size: 0.9rem;
    margin: 14px 0;
}
.form-consent input { margin-top: 4px; }
.form-success {
    background: rgba(16,185,129,0.08); border: 1px solid #10b981;
    color: #6ee7b7; padding: 14px 18px; border-radius: var(--r-md); margin-bottom: 18px;
}
.form-error {
    background: rgba(239,68,68,0.08); border: 1px solid #ef4444;
    color: #fca5a5; padding: 14px 18px; border-radius: var(--r-md); margin-bottom: 18px;
}

.legal-wrap { max-width: 780px; margin: 0 auto; padding: 60px 0 80px; }
.legal-wrap h1 { color: var(--text); font-size: 2.1rem; margin-bottom: 8px; }
.legal-wrap h2 { color: var(--gold-2); font-size: 1.3rem; margin-top: 32px; margin-bottom: 10px; }
.legal-wrap h3 { color: var(--text); font-size: 1.05rem; margin-top: 20px; margin-bottom: 6px; }
.legal-wrap p, .legal-wrap li { color: var(--text-muted); line-height: 1.7; }
.legal-wrap ul, .legal-wrap ol { margin: 8px 0 16px 24px; }
.legal-meta { color: var(--text-dim); font-size: 0.85rem; margin-bottom: 24px; }
.legal-toc { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-md); padding: 16px 22px; margin: 22px 0; }
.legal-toc h3 { margin-top: 0; color: var(--gold); }
.legal-toc ol { margin-bottom: 0; }
.legal-toc a { color: var(--text); text-decoration: none; }
.legal-toc a:hover { color: var(--gold); }

.sectors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}
.sector-item {
    padding: 18px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    transition: border-color .2s ease;
}
.sector-item:hover { border-color: var(--border-strong); }
.sector-name { color: var(--text); font-weight: 600; margin-bottom: 4px; }
.sector-clients { color: var(--text-muted); font-size: 0.85rem; }

.careers-empty {
    background: var(--bg-card);
    border: 1px dashed var(--border-strong);
    border-radius: var(--r-md);
    padding: 28px 32px;
    color: var(--text-muted);
    text-align: center;
}

.text-gold { color: var(--gold); }
.tag-strip { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 18px; }
.tag-pill {
    padding: 4px 10px;
    background: rgba(212,175,55,0.10);
    color: var(--gold-2);
    border-radius: 999px;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.section { padding: 72px 0; }
.section-head { margin-bottom: 36px; max-width: 760px; }
.section-cta { margin-top: 32px; text-align: center; }

.footer-newsletter {
    display: flex; gap: 8px; max-width: 360px; margin-top: 10px;
}
.footer-newsletter input[type=email] {
    flex: 1; padding: 9px 12px;
    border: 1px solid var(--border-strong);
    background: var(--bg-2); color: var(--text);
    border-radius: var(--r-sm);
}
.footer-newsletter button { padding: 9px 16px; }

/* ==========================================================
   MOBILE MENU DRAWER v2 — pattern enterprise (Linear/Stripe-like)
   - Full-screen, stagger, accordion, footer 3-col, swipe iOS
   - Self-contained: prefix .mm-*  (non collide con .mobile-drawer legacy)
   ========================================================== */

/* Hamburger morph: aggiorna stile (riusa .hamburger esistente) */
.hamburger span {
    transition: transform .35s var(--ease-out), opacity .2s linear;
}
.hamburger:hover span { background: var(--gold-2); }
.hamburger:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
    border-radius: 6px;
}

/* Backdrop con blur progressivo (sostituisce .mobile-drawer-backdrop nei flussi nuovi) */
.mm-backdrop {
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse at top right, rgba(15, 23, 42, 0.78) 0%, rgba(0, 0, 0, 0.72) 70%);
    backdrop-filter: blur(8px) saturate(140%);
    -webkit-backdrop-filter: blur(8px) saturate(140%);
    z-index: 190;
    touch-action: manipulation;
}

/* Drawer full-screen — hidden by default (display:none) per evitare
   che il contenuto fluisca in pagina se per qualunque motivo il blocco
   CSS sotto non venisse applicato. La rule e' duplicata in safety net
   a fine file con !important + media query desktop. */
.mm-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(440px, 94vw);
    height: 100vh;
    height: 100dvh;
    background:
        radial-gradient(circle at 88% -10%, rgba(212, 175, 55, 0.14) 0%, transparent 55%),
        linear-gradient(180deg, #0b1322 0%, #0f172a 60%, #0a1020 100%);
    box-shadow:
        -1px 0 0 rgba(212, 175, 55, 0.12) inset,
        -30px 0 60px -20px rgba(0, 0, 0, 0.6);
    z-index: 200;
    padding: 0 22px 0;
    transform: translateX(100%);
    transition: transform .42s cubic-bezier(.22, 1, .36, 1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    visibility: hidden;
    display: none;
    flex-direction: column;
    gap: 0;
}
.mm-drawer.is-open {
    transform: translateX(0);
    visibility: visible;
    display: flex;
}

/* Body scroll lock iOS-safe (top: -scrollY via custom prop) */
body.mm-lock {
    position: fixed;
    inset: 0;
    overflow: hidden;
    width: 100%;
    top: var(--mm-scroll-y, 0);
}

/* Head */
.mm-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0 14px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.10);
    margin-bottom: 6px;
    position: sticky;
    top: 0;
    z-index: 2;
    background: linear-gradient(180deg, rgba(11, 19, 34, 0.95) 0%, rgba(11, 19, 34, 0.0) 100%);
}
.mm-eyebrow {
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--gold);
    font-weight: 700;
    padding-left: 4px;
}
.mm-close {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 1px solid rgba(212, 175, 55, 0.22);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform .25s var(--ease-out), background .2s ease, border-color .2s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.mm-close:hover {
    background: rgba(212, 175, 55, 0.16);
    border-color: rgba(212, 175, 55, 0.45);
    transform: rotate(90deg);
}
.mm-close:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
}

/* Nav voci */
.mm-nav {
    display: flex;
    flex-direction: column;
    padding: 8px 0 16px;
}
.mm-link,
.mm-link-trigger {
    --d: 0ms;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 4px;
    color: var(--text);
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.01em;
    border: 0;
    background: transparent;
    border-bottom: 1px solid rgba(212, 175, 55, 0.10);
    text-align: left;
    width: 100%;
    cursor: pointer;
    transition:
        color .25s ease,
        transform .55s cubic-bezier(.22, 1, .36, 1),
        opacity .55s ease;
    transform: translateX(28px);
    opacity: 0;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(212, 175, 55, 0.18);
}
.mm-drawer.is-open .mm-link,
.mm-drawer.is-open .mm-link-trigger {
    transform: translateX(0);
    opacity: 1;
}
.mm-link:last-of-type,
.mm-group:last-of-type .mm-link-trigger {
    border-bottom: 0;
}
.mm-link:hover,
.mm-link:focus-visible,
.mm-link-trigger:hover,
.mm-link-trigger:focus-visible {
    color: var(--gold);
    outline: none;
}
.mm-link:focus-visible,
.mm-link-trigger:focus-visible {
    background: rgba(212, 175, 55, 0.06);
    border-radius: 8px;
}

/* Icona */
.mm-ic {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 10px;
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.16);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    transition: background .25s ease, border-color .25s ease, transform .25s ease;
}
.mm-link:hover .mm-ic,
.mm-link-trigger:hover .mm-ic {
    background: rgba(212, 175, 55, 0.18);
    border-color: rgba(212, 175, 55, 0.4);
    transform: scale(1.05);
}

/* Label flex-1 */
.mm-label {
    flex: 1;
    line-height: 1.2;
}

/* Chevron */
.mm-chev {
    color: var(--text-muted);
    transition: transform .3s var(--ease-out), color .25s ease;
}
.mm-link:hover .mm-chev,
.mm-link-trigger:hover .mm-chev {
    color: var(--gold);
    transform: translateX(4px);
}
.mm-chev-down {
    transition: transform .3s var(--ease-out), color .25s ease;
}
.mm-group.is-expanded .mm-chev-down {
    transform: rotate(180deg);
    color: var(--gold);
}
.mm-group.is-expanded .mm-link-trigger {
    color: var(--gold);
}

/* Sub-menu accordion (CSS-only collapse, no Alpine plugin needed) */
.mm-sub {
    display: flex;
    flex-direction: column;
    padding: 0 0 0 50px;
    background: rgba(0, 0, 0, 0.18);
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    border-bottom: 0 solid rgba(212, 175, 55, 0.10);
    transition:
        max-height .42s cubic-bezier(.22, 1, .36, 1),
        opacity .3s ease,
        padding .3s ease,
        border-bottom-width .3s ease;
}
.mm-sub.is-expanded {
    max-height: 600px;
    opacity: 1;
    padding: 4px 0 12px 50px;
    border-bottom-width: 1px;
}
.mm-sublink {
    color: var(--text-muted);
    font-size: 15px;
    font-weight: 500;
    padding: 10px 6px;
    border-bottom: 1px dashed rgba(212, 175, 55, 0.08);
    transition: color .2s ease, padding-left .2s ease;
    touch-action: manipulation;
}
.mm-sublink:last-child { border-bottom: 0; }
.mm-sublink:hover,
.mm-sublink:focus-visible {
    color: var(--gold-2);
    padding-left: 12px;
    outline: none;
}

/* CTA gold pill */
.mm-cta-wrap {
    margin: 18px 0 14px;
    transform: translateY(20px);
    opacity: 0;
    transition: transform .55s cubic-bezier(.22, 1, .36, 1), opacity .55s ease;
}
.mm-drawer.is-open .mm-cta-wrap {
    transform: translateY(0);
    opacity: 1;
}
.mm-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-2) 50%, var(--gold-3) 100%);
    color: #0f172a;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.01em;
    border-radius: 999px;
    box-shadow: 0 12px 28px -10px rgba(212, 175, 55, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
    transition: transform .25s var(--ease-out), box-shadow .25s ease;
    touch-action: manipulation;
}
.mm-cta:hover {
    color: #0f172a;
    transform: translateY(-2px);
    box-shadow: 0 18px 36px -10px rgba(212, 175, 55, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.14) inset;
}
.mm-cta svg {
    transition: transform .25s var(--ease-out);
}
.mm-cta:hover svg {
    transform: translateX(4px);
}

/* Footer 3 colonne */
.mm-foot {
    margin-top: auto;
    padding: 18px 0 22px;
    border-top: 1px solid rgba(212, 175, 55, 0.12);
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 18px;
    transform: translateY(20px);
    opacity: 0;
    transition: transform .55s cubic-bezier(.22, 1, .36, 1), opacity .55s ease;
}
.mm-drawer.is-open .mm-foot {
    transform: translateY(0);
    opacity: 1;
}
.mm-foot-col {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}
.mm-foot-col-end {
    text-align: right;
    align-items: flex-end;
}
.mm-foot-lbl {
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-dim);
    font-weight: 600;
}
.mm-lang {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 600;
}
.mm-lang a { color: var(--text-muted); padding: 2px 4px; border-radius: 4px; transition: color .2s ease, background .2s ease; }
.mm-lang a:hover { color: var(--gold); }
.mm-lang a.is-active { color: var(--gold); background: rgba(212, 175, 55, 0.1); }
.mm-social {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
    justify-content: center;
}
.mm-social a {
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid rgba(212, 175, 55, 0.18);
    color: var(--text-muted);
    transition: color .2s ease, border-color .2s ease, background .2s ease, transform .2s ease;
    touch-action: manipulation;
}
.mm-social a:hover {
    color: var(--gold);
    border-color: rgba(212, 175, 55, 0.5);
    background: rgba(212, 175, 55, 0.10);
    transform: translateY(-1px);
}
.mm-foot-copy {
    font-size: 11px;
    color: var(--text-dim);
    white-space: nowrap;
}

/* Hint Esc (solo desktop con tastiera) */
.mm-hint {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 6px 0 10px;
    font-size: 11px;
    color: var(--text-dim);
    letter-spacing: 0.04em;
}
.mm-hint kbd {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(212, 175, 55, 0.18);
    color: var(--text-muted);
    padding: 1px 6px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 10px;
}
@media (hover: hover) and (pointer: fine) {
    .mm-hint { display: inline-flex; }
}

/* Safe-area iOS */
@supports (padding: max(0px)) {
    .mm-drawer {
        padding-left: max(22px, env(safe-area-inset-left));
        padding-right: max(22px, env(safe-area-inset-right));
        padding-bottom: max(0px, env(safe-area-inset-bottom));
    }
    .mm-head { padding-top: max(18px, env(safe-area-inset-top)); }
}

/* Prefer-reduced-motion: niente stagger */
@media (prefers-reduced-motion: reduce) {
    .mm-drawer,
    .mm-drawer .mm-link,
    .mm-drawer .mm-link-trigger,
    .mm-drawer .mm-cta-wrap,
    .mm-drawer .mm-foot {
        transition: none !important;
        transform: none !important;
        opacity: 1 !important;
    }
}

/* Mostrare il drawer SOLO sotto i 901px (uguale a soglia hamburger) */
@media (min-width: 901px) {
    .mm-drawer,
    .mm-drawer.is-open,
    .mm-backdrop,
    .hamburger { display: none !important; }
}

/* Safety net globale: il drawer NON deve mai apparire in-flow.
   Anche se "is-open" e' true, il drawer e' position:fixed e
   display:flex; senza .is-open resta display:none. */
.mm-drawer:not(.is-open),
.mm-backdrop[x-cloak] { display: none !important; }

/* Legacy: nascondi il vecchio .mobile-drawer (sostituito da .mm-drawer) */
.mobile-drawer { display: none !important; }
.mobile-drawer-backdrop { display: none !important; }
