/* =====================================================================
   NOTA — "riduci movimento" volutamente NON rispettato (scelta di Filippo, 17/08/2026)
   Android attiva prefers-reduced-motion insieme al RISPARMIO ENERGETICO: il sito
   finiva degradato (servizi in colonna, hero senza viaggio) anche per chi non aveva
   chiesto nulla. Tutti i blocchi @media prefers-reduced-motion sono quindi neutralizzati
   con " and (min-width: 99999px)" (condizione mai vera) e il JS e' allineato dalla patch
   in includes/header.php. PER RIATTIVARLI: togliere " and (min-width: 99999px)" da questo
   file e rimuovere la patch in header.php.
   ===================================================================== */

/* ============================================================
   WIPPO STUDIO — STYLE.CSS v2
   Dark premium · Mobile-first · Zero dipendenze
   ============================================================ */

/* ============ DESIGN TOKENS ============ */
:root {
    /* Background scuro stratificato */
    --bg: #0a0a0f;
    --bg-elev: #111118;
    --bg-elev-2: #16161f;
    --bg-card: rgba(255, 255, 255, 0.02);
    --bg-card-hover: rgba(255, 255, 255, 0.04);

    /* Border */
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.16);
    --border-bright: rgba(255, 255, 255, 0.32);

    /* Text */
    --text: #f5f5f7;
    --text-muted: #a1a1aa;
    --text-soft: #71717a;
    --text-dim: #52525b;

    /* Brand */
    --brand: #4f7cff;
    --brand-2: #8b5cf6;
    --brand-3: #06b6d4;
    --brand-glow: rgba(79, 124, 255, 0.4);

    /* Stati */
    --success: #10b981;
    --error: #ef4444;

    /* Tipografia */
    --font-base: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
    --font-display: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    --font-mono: ui-monospace, 'SF Mono', Monaco, Consolas, monospace;

    /* Layout */
    --container: 1280px;
    --header-h: 72px;

    /* Radius */
    --r-sm: 8px;
    --r-md: 14px;
    --r-lg: 20px;
    --r-xl: 28px;
    --r-full: 999px;

    /* Easings & timings */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --t-fast: 0.2s;
    --t-base: 0.4s;
    --t-slow: 0.7s;
}

/* ============ RESET ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: var(--header-h);
}

body {
    font-family: var(--font-base);
    font-size: 16px;
    line-height: 1.55;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* clip (non hidden): blocca lo straripamento orizzontale senza creare un
       contenitore di scroll, così position: sticky continua a reggere su mobile
       (con overflow-x: hidden le sezioni pinnate non si agganciano sul telefono). */
    overflow-x: clip;
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
}

/* Background pattern subtile */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 20% 0%, rgba(79, 124, 255, 0.08), transparent 50%),
        radial-gradient(circle at 80% 100%, rgba(139, 92, 246, 0.06), transparent 50%);
    pointer-events: none;
    z-index: 0;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color var(--t-fast) var(--ease); }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul, ol { list-style: none; }

h1, h2, h3, h4 {
    font-family: var(--font-display);
    line-height: 1.05;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--text);
}

::selection { background: var(--brand); color: white; }

/* ============ UTILITY ============ */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

.honeypot {
    position: absolute;
    left: -9999px;
    width: 1px; height: 1px;
    opacity: 0;
}

/* ============ SCROLL PROGRESS BAR ============ */
.scroll-progress {
    position: fixed;
    top: 0; left: 0;
    height: 2px;
    width: 0%;
    background: linear-gradient(90deg, var(--brand), var(--brand-2), var(--brand-3));
    z-index: 9999;
    transition: width 0.1s linear;
}

/* ============ CURSORE CUSTOM ============ */
.cursor-dot, .cursor-ring {
    position: fixed;
    top: 0; left: 0;
    pointer-events: none;
    z-index: 9998;
    border-radius: 50%;
    transition: opacity 0.2s var(--ease);
    opacity: 0;
}

.cursor-dot {
    width: 6px; height: 6px;
    background: var(--brand);
    transform: translate(-50%, -50%);
}

.cursor-ring {
    width: 32px; height: 32px;
    border: 1.5px solid var(--brand);
    transform: translate(-50%, -50%);
    transition: transform 0.15s var(--ease-out), width 0.3s var(--ease), height 0.3s var(--ease), opacity 0.2s var(--ease);
}

.cursor-ring.is-hover {
    width: 56px; height: 56px;
    background: rgba(79, 124, 255, 0.1);
    border-color: var(--brand);
}

@media (hover: hover) and (pointer: fine) {
    body.cursor-active { cursor: none; }
    body.cursor-active .cursor-dot,
    body.cursor-active .cursor-ring { opacity: 1; }
    body.cursor-active a, body.cursor-active button { cursor: none; }
}

/* ============ NAVBAR — capsula orbitale ============ */
.navbar {
    position: fixed;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    width: min(calc(var(--container) - 48px), calc(100% - 24px));
    height: 62px;
    background: rgba(13, 13, 22, 0.55);
    backdrop-filter: saturate(160%) blur(18px);
    -webkit-backdrop-filter: saturate(160%) blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 999px;   /* la capsula resta tonda anche coi token radius a 0 */
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    z-index: 100;
    transition: background var(--t-base) var(--ease), border-color var(--t-base) var(--ease),
                box-shadow var(--t-base) var(--ease), top var(--t-base) var(--ease);
}

.navbar.is-scrolled {
    top: 8px;
    background: rgba(10, 10, 15, 0.82);
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: 0 14px 44px rgba(0, 0, 0, 0.5), 0 0 26px rgba(139, 92, 246, 0.10);
}

/* cometa di luce che percorre il bordo della capsula */
@property --wgr-nav-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

.navbar::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: conic-gradient(from var(--wgr-nav-angle),
        transparent 0deg, transparent 302deg,
        rgba(139, 92, 246, 0.9) 332deg, rgba(188, 210, 255, 0.95) 344deg, transparent 360deg);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    animation: wgrNavComet 8s linear infinite;
    pointer-events: none;
}

@keyframes wgrNavComet {
    to { --wgr-nav-angle: 360deg; }
}

.navbar-inner {
    height: 100%;
    padding: 0 10px 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    font-weight: 600;
    font-size: 17px;
    letter-spacing: -0.01em;
    transition: opacity var(--t-fast) var(--ease);
}

.logo:hover { opacity: 0.85; }

.logo-img {
    width: 38px;
    height: 38px;
    object-fit: contain;
    border-radius: 50%;   /* oblò, come i portali della sezione lavori */
    border: 1px solid rgba(255, 255, 255, 0.16);
    flex-shrink: 0;
    transition: border-color var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}

.logo:hover .logo-img {
    border-color: rgba(139, 92, 246, 0.7);
    box-shadow: 0 0 16px rgba(139, 92, 246, 0.45);
}

.nav-links {
    display: none;
    gap: 6px;
    align-items: center;
}

.nav-links a {
    position: relative;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    padding: 10px 14px;
    transition: color var(--t-fast) var(--ease);
}

/* stellina che si accende sotto la voce attiva o in hover */
.nav-links a::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 2px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--brand-2);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.9), 0 0 3px rgba(188, 210, 255, 0.9);
    transform: translateX(-50%) scale(0);
    transition: transform 0.35s var(--ease-spring);
}

.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a:hover::after, .nav-links a.active::after { transform: translateX(-50%) scale(1); }

.navbar-cta {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #ffffff;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 0 18px rgba(139, 92, 246, 0.30);
    transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), filter var(--t-fast) var(--ease);
}

.navbar-cta:hover {
    transform: translateY(-1px);
    filter: brightness(1.12);
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.55);
}

.navbar-cta svg { transition: transform var(--t-fast) var(--ease); }
.navbar-cta:hover svg { transform: translateX(2px); }

/* Hamburger */
.menu-toggle {
    width: 44px; height: 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: transparent;
    z-index: 101;
    transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}

.menu-toggle:hover {
    border-color: rgba(139, 92, 246, 0.6);
    box-shadow: 0 0 14px rgba(139, 92, 246, 0.3);
}

.menu-toggle span {
    display: block;
    width: 18px; height: 1.5px;
    background: var(--text);
    border-radius: 2px;
    transition: transform var(--t-base) var(--ease), opacity var(--t-fast) var(--ease);
    transform-origin: center;
}

.menu-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ============ MOBILE MENU ============ */
.backdrop {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    opacity: 0; visibility: hidden;
    transition: opacity var(--t-base) var(--ease), visibility var(--t-base) var(--ease);
    z-index: 98;
}

.backdrop.show { opacity: 1; visibility: visible; }

.mobile-menu {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: min(90%, 380px);
    background: var(--bg-elev);
    border-left: 1px solid var(--border);
    transform: translateX(100%);
    transition: transform var(--t-base) var(--ease-out);
    z-index: 99;
    display: flex;
    flex-direction: column;
}

.mobile-menu.active { transform: translateX(0); }

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    height: var(--header-h);
}

.mobile-menu-title {
    font-size: 14px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.mobile-menu-close-btn {
    width: 40px; height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text);
    transition: background var(--t-fast) var(--ease);
}

.mobile-menu-close-btn:hover { background: var(--bg-card-hover); }

.mobile-links {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 24px 0;
}

.mobile-links a {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 18px 28px;
    color: var(--text);
    font-size: 22px;
    font-weight: 500;
    letter-spacing: -0.01em;
    border-left: 2px solid transparent;
    transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease), padding-left var(--t-fast) var(--ease);
}

.mobile-links a:hover, .mobile-links a.active {
    background: var(--bg-card);
    border-left-color: var(--brand);
    padding-left: 32px;
}

.mobile-links .num {
    font-size: 12px;
    color: var(--text-soft);
    font-family: var(--font-mono);
}

.mobile-menu-footer {
    padding: 24px 28px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 13px;
}

.mobile-menu-footer a {
    color: var(--text);
    transition: color var(--t-fast) var(--ease);
}

.mobile-menu-footer a:hover { color: var(--brand); }

.mobile-menu-footer span { color: var(--text-soft); }

/* ============ BOTTONI ============ */
.btn-primary, .btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--r-full);
    transition: transform var(--t-fast) var(--ease), background var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--text);
    color: var(--bg);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s var(--ease);
}

.btn-primary:hover::before { left: 100%; }

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(255, 255, 255, 0.15);
    color: var(--bg);
}

.btn-primary svg { transition: transform var(--t-fast) var(--ease); }
.btn-primary:hover svg { transform: translateX(3px); }

.btn-primary.is-loading {
    opacity: 0.7;
    pointer-events: none;
}

.btn-lg { padding: 18px 32px; font-size: 16px; }

.btn-ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border-strong);
}

.btn-ghost:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-bright);
    color: var(--text);
    transform: translateY(-2px);
}

.btn-full { width: 100%; }

/* ============ HERO ============ */
.hero {
    position: relative;
    min-height: 100vh;
    padding: calc(var(--header-h) + 60px) 24px 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-mesh {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.mesh-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.5;
    animation: blob 20s infinite ease-in-out;
}

.mesh-blob-1 {
    width: 600px; height: 600px;
    background: radial-gradient(circle, var(--brand), transparent 70%);
    top: -200px; left: -100px;
}

.mesh-blob-2 {
    width: 500px; height: 500px;
    background: radial-gradient(circle, var(--brand-2), transparent 70%);
    bottom: -150px; right: -100px;
    animation-delay: -7s;
    animation-duration: 25s;
}

.mesh-blob-3 {
    width: 400px; height: 400px;
    background: radial-gradient(circle, var(--brand-3), transparent 70%);
    top: 40%; left: 50%;
    animation-delay: -14s;
    animation-duration: 30s;
}

@keyframes blob {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(80px, -50px) scale(1.1); }
    66% { transform: translate(-60px, 40px) scale(0.95); }
}

.hero-grid-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse at center, black, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, black, transparent 70%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1100px;
    width: 100%;
    text-align: center;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px 6px 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-full);
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 32px;
    backdrop-filter: blur(8px);
}

.hero-eyebrow .dot {
    width: 6px; height: 6px;
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 12px var(--success);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.85); }
}

.hero-title {
    font-size: clamp(40px, 8vw, 96px);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 0.98;
    margin-bottom: 56px;
}

.reveal-line {
    display: block;
    overflow: hidden;
}

.reveal-line > span {
    display: inline-block;
    transform: translateY(110%);
    opacity: 0;
    animation: revealUp 0.75s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.reveal-line:nth-child(1) > span { animation-delay: 0.05s; }
.reveal-line:nth-child(2) > span { animation-delay: 0.15s; }
.reveal-line:nth-child(3) > span { animation-delay: 0.25s; }

@keyframes revealUp {
    to { transform: translateY(0); opacity: 1; }
}

/* Parola in gradiente animato — in tema col viaggio cosmico del sito */
.hero-grad {
    display: inline-block;
    font-style: normal;
    line-height: 1.05;
    /* padding-bottom: evita che il background-clip tagli i discendenti (g) */
    padding-bottom: 0.12em;
    margin-bottom: -0.12em;
    background: linear-gradient(135deg, #bcd2ff, #8b5cf6 45%, #4f7cff);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: gradientShift 6s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero-sub {
    font-size: clamp(20px, 2.6vw, 30px);
    color: var(--text-muted);
    max-width: 800px;
    margin: 0 auto 48px;
    line-height: 1.45;
    letter-spacing: -0.01em;
}

.hero-sub s {
    color: var(--text-soft);
    text-decoration-color: var(--brand);
    text-decoration-thickness: 2px;
}

.hero-sub strong {
    color: var(--text);
    font-weight: 700;
}

.hero-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 28px;
    flex-wrap: wrap;
    margin-bottom: 80px;
}

/* bottone pieno: gradiente brand con glow, il protagonista */
.hero-btn-primo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 19px 42px;
    font-weight: 700;
    font-size: 17.5px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.35);
    transition: transform .3s var(--ease-out), box-shadow .3s ease;
}
.hero-btn-primo:hover { transform: translateY(-3px); box-shadow: 0 16px 52px rgba(99, 102, 241, 0.5); }
.hero-btn-primo svg { transition: transform .3s; }
.hero-btn-primo:hover svg { transform: translateX(5px); }

/* bottone-rotta: solo testo con la linea di luce sotto, stile opposto al primo */
.hero-btn-secondo {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 19px 4px 21px;
    font-weight: 700;
    font-size: 17.5px;
    color: var(--text);
}
.hero-btn-secondo::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 13px;
    height: 2px;
    width: 100%;
    background: linear-gradient(90deg, #8b5cf6, transparent);
    transition: filter .3s;
}
.hero-btn-secondo svg { transition: transform .3s; }
.hero-btn-secondo:hover svg { transform: translateX(5px); }
.hero-btn-secondo:hover::after { filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.7)); }

.scroll-indicator {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-soft);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    z-index: 2;
    transition: color var(--t-fast) var(--ease);
}

.scroll-indicator:hover { color: var(--text); }

.scroll-indicator svg {
    animation: bobUp 2s infinite ease-in-out;
}

@keyframes bobUp {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
}

/* ============ SECTION HEAD ============ */
.section-head {
    margin-bottom: 48px;
    max-width: 800px;
}

.section-head-center {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.section-label {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--brand);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    padding: 6px 14px;
    background: rgba(79, 124, 255, 0.1);
    border: 1px solid rgba(79, 124, 255, 0.2);
    border-radius: var(--r-full);
    margin-bottom: 20px;
}

.section-title {
    font-size: clamp(32px, 5.5vw, 64px);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.035em;
}

/* Variante gradient animato */
/* Nota: quando A1 (script.js) spezza il titolo in righe .wgr-line con overflow hidden,
   il background-clip: text sull'h2 non trova più testo diretto e il titolo sparisce (Chrome).
   Il gradiente va quindi applicato anche alle righe stesse (regola sotto). */
.section-title-gradient .wgr-line > span {
    background: linear-gradient(135deg, #ffffff 0%, #ffffff 35%, #8b5cf6 65%, #4f7cff 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: gradientShift 6s ease infinite;
    /* spazio per i discendenti (g, p, q) dentro la riga clippata */
    padding-bottom: 0.12em;
    margin-bottom: -0.12em;
}

/* …e quando le righe ci sono, l'h2 non deve dipingere nulla: in Chrome il suo
   background-clip: text può ridipingere il testo "fantasma" in posizione sbagliata
   sopra le righe (titoli sovrapposti/garbled). */
.section-title-gradient:has(.wgr-line) { background: none; animation: none; }

.section-title-gradient {
    background: linear-gradient(135deg, #ffffff 0%, #ffffff 35%, #8b5cf6 65%, #4f7cff 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: gradientShift 6s ease infinite;
    /* Evita il taglio dei discendenti (g, p, q, ',') */
    line-height: 1.08;
    padding-bottom: 0.1em;
}

/* ============ STUDIO — IL VENETO E LA BASE ============ */
/* La sezione (200vh, sfondo trasparente) risale sopra gli ultimi 200vh dell'hero
   con margin-top negativo: il Veneto che si vede è QUELLO dell'hero (Three.js),
   che nell'"atto Studio" scivola a sinistra-centro (vedi modulo cinematic in
   index.php). I blocchi a destra si accendono alle soglie data-soglia con un
   burst di particelle (canvas #studio-canvas, solo burst). */
.studio { height: 200vh; margin-top: -200vh; position: relative; z-index: 2; }
.studio-sticky { position: sticky; top: 0; height: 100vh; overflow: hidden; }
#studio-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

.studio-scena { position: relative; height: 100%; display: flex; align-items: center;
    justify-content: flex-end; padding: 0 max(24px, 6vw) 0 24px; }
.studio-destra { width: min(540px, 44vw); display: grid; gap: 16px; }

/* i blocchi nascono "smaterializzati" e si compongono alla loro soglia */
.studio-blocco { opacity: 0; transform: translateY(26px); filter: blur(7px);
    transition: opacity .7s ease, transform .7s cubic-bezier(.22, 1, .36, 1), filter .7s ease; }
.studio-blocco.on { opacity: 1; transform: none; filter: none; }

.studio-titolo {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(34px, 4.4vw, 60px);
    letter-spacing: -.02em;
    line-height: 1.02;
    margin: 12px 0 0;
    padding-bottom: .08em;
    background: linear-gradient(135deg, #ffffff 30%, #8b5cf6 75%, #4f7cff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.studio-lead { font-size: clamp(17px, 1.6vw, 20px); line-height: 1.55; color: var(--text); margin: 0; letter-spacing: -.01em; }
.studio-testo { color: var(--text-muted); line-height: 1.7; font-size: 15.5px; margin: 0; }
.studio-lead strong { color: var(--text); font-weight: 600; }
.studio-lead a, .studio-testo a {
    color: var(--text);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: var(--border-bright);
    text-underline-offset: 3px;
    transition: color var(--t-fast) var(--ease), text-decoration-color var(--t-fast) var(--ease);
}
.studio-lead a:hover, .studio-testo a:hover { color: var(--brand); text-decoration-color: var(--brand); }

/* mini-card: stella + titolo + una riga */
.studio-card { position: relative; overflow: hidden;
    background: linear-gradient(180deg, rgba(20, 20, 30, 0.92), rgba(13, 13, 20, 0.92));
    border: 1px solid var(--border);
    transition: border-color var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease); }
.studio-card::before {   /* nebulosa che segue il mouse (--mx/--my da script.js) */
    content: ""; position: absolute; inset: 0;
    background: radial-gradient(220px 220px at var(--mx, 50%) var(--my, 50%), rgba(139, 92, 246, 0.16), transparent 70%);
    opacity: 0;
    transition: opacity .35s ease;
    pointer-events: none;
}
.studio-card:hover::before { opacity: 1; }
.studio-card:hover { border-color: rgba(139, 92, 246, 0.45); box-shadow: 0 0 26px rgba(139, 92, 246, 0.12); }
.studio-mini { display: flex; gap: 14px; align-items: flex-start; padding: 15px 18px; }
.studio-mini h3 { font-family: var(--font-display); font-weight: 800; font-size: 16px; letter-spacing: -.01em; color: var(--text); margin: 0 0 4px; }
.studio-mini p { font-size: 14px; color: var(--text-muted); line-height: 1.55; margin: 0; }

.studio-stella {
    flex: 0 0 auto;
    margin-top: 5px;
    width: 11px; height: 11px;
    background: #bcd2ff;
    clip-path: polygon(50% 0%, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0% 50%, 39% 39%);
    filter: drop-shadow(0 0 7px rgba(139, 92, 246, 0.95));
    animation: stellaTwinkle 3.4s ease-in-out infinite;
}
.studio-mini:nth-of-type(odd) .studio-stella { animation-delay: 1.1s; }
.studio-card:hover .studio-stella { animation-duration: 1.2s; }
@keyframes stellaTwinkle {
    0%, 100% { opacity: 0.65; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.4); }
}

/* sotto i 1024px: niente atto Studio, sezione statica e tutto visibile */
@media (max-width: 1023.98px) {
    .studio { height: auto; margin-top: 0; }
    .studio-sticky { position: static; height: auto; overflow: visible; padding: 90px 0; }
    #studio-canvas { display: none; }
    .studio-scena { justify-content: center; padding: 0 24px; }
    .studio-destra { width: 100%; max-width: 640px; }
    .studio-blocco { opacity: 1; transform: none; filter: none; transition: none; }
}

@media (prefers-reduced-motion: reduce) and (min-width: 99999px) {   /* DISATTIVATO — vedi nota in cima al file */
    .studio { height: auto; margin-top: 0; }
    .studio-sticky { position: static; height: auto; overflow: visible; padding: 90px 0; }
    #studio-canvas { display: none; }
    .studio-scena { justify-content: center; padding: 0 24px; }
    .studio-destra { width: 100%; max-width: 640px; }
    .studio-blocco { opacity: 1; transform: none; filter: none; transition: none; }
    .studio-stella { animation: none; }
}

/* ============ SERVIZI — LA ROTTA (viaggio orizzontale pinnato) ============ */
/* La sezione si pinna e lo scroll verticale diventa viaggio orizzontale (1px = 1px,
   altezza del wrap impostata dal motore inline in index.php). Le stazioni si
   accendono quando entrano in scena, con burst di particelle; una linea di luce
   si disegna lungo la rotta. Sotto i 1024px / reduced-motion: lista verticale. */
.rotta-wrap { position: relative; z-index: 1; }
.rotta-sticky { position: sticky; top: 0; height: 100vh; overflow: hidden;
    background: radial-gradient(1100px 780px at 50% 45%, #10101a 0%, var(--bg) 74%); }
#rotta-stelle { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

.rotta-binario { position: relative; display: flex; align-items: center;
    gap: clamp(70px, 9vw, 150px); height: 100%; width: max-content;
    padding: 0 16vw 0 max(24px, 7vw); will-change: transform; }

/* la linea di rotta: si riempie di luce man mano che si viaggia */
.rotta-linea { position: absolute; left: 0; right: 0; top: 50%; height: 2px;
    background: rgba(255, 255, 255, 0.06); z-index: 0; }
.rotta-linea-fill { position: absolute; left: 0; top: 0; height: 100%; width: 0;
    background: linear-gradient(90deg, var(--brand), var(--brand-2));
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.7); }
.rotta-linea-fill::after { content: ""; position: absolute; right: -4px; top: 50%;
    width: 8px; height: 8px; margin-top: -4px; border-radius: 50%;
    background: #ffffff; box-shadow: 0 0 16px rgba(139, 92, 246, 1); }

.stazione-intro { position: relative; z-index: 1; flex: 0 0 auto; width: min(620px, 52vw); }
.rotta-hint { margin: 18px 0 0; color: var(--text-muted); font-size: 15px; }
.rotta-hint .arr { display: inline-block; animation: rottaHint 1.6s ease-in-out infinite; }
@keyframes rottaHint { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(8px); } }

.stazione { position: relative; z-index: 1; flex: 0 0 auto; width: min(560px, 46vw);
    background: linear-gradient(180deg, rgba(18, 18, 28, 0.94), rgba(12, 12, 19, 0.94));
    border: 1px solid var(--border);
    padding: 32px 34px 36px;
    opacity: 0.3; transform: translateX(46px); filter: blur(3px);
    transition: opacity .6s ease, transform .6s var(--ease-out), filter .6s ease,
                border-color .5s ease, box-shadow .5s ease; }
.stazione.on { opacity: 1; transform: none; filter: none;
    border-color: hsla(var(--st-hue), 70%, 60%, 0.4);
    box-shadow: 0 0 34px hsla(var(--st-hue), 80%, 60%, 0.12); }

.stazione-testa { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.stazione-stella { flex: 0 0 auto; width: 12px; height: 12px;
    background: hsla(var(--st-hue), 85%, 72%, 1);
    clip-path: polygon(50% 0%, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0% 50%, 39% 39%);
    filter: drop-shadow(0 0 7px hsla(var(--st-hue), 85%, 65%, 0.9));
    animation: stellaTwinkle 3.2s ease-in-out infinite; }
.stazione-num { font-family: var(--font-mono); font-size: 12px; letter-spacing: .28em;
    color: hsla(var(--st-hue), 85%, 72%, 1); }
.stazione-badge { margin-left: auto; font-family: var(--font-mono); font-size: 10px;
    letter-spacing: .16em; text-transform: uppercase;
    color: hsla(var(--st-hue), 85%, 75%, 1);
    border: 1px solid hsla(var(--st-hue), 70%, 60%, 0.45);
    padding: 4px 9px; white-space: nowrap; }
.stazione-titolo { font-family: var(--font-display); font-weight: 800;
    font-size: clamp(30px, 3.4vw, 46px); letter-spacing: -.02em; line-height: 1;
    color: var(--text); margin: 0 0 14px; }
.stazione-desc { color: var(--text-muted); font-size: 15.5px; line-height: 1.65; margin: 0 0 18px; }
.stazione-punti { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 10px; }
.stazione-punti li { position: relative; padding-left: 24px; color: var(--text-muted);
    font-size: 14.5px; line-height: 1.5; }
.stazione-punti li::before { content: ""; position: absolute; left: 0; top: 4px;
    width: 11px; height: 11px;
    background: hsla(var(--st-hue), 85%, 72%, 1);
    clip-path: polygon(50% 0%, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0% 50%, 39% 39%);
    filter: drop-shadow(0 0 6px hsla(var(--st-hue), 85%, 65%, 0.8)); }
.stazione-cta { position: relative; display: inline-flex; align-items: center; gap: 10px;
    padding-bottom: 7px; color: var(--text); font-size: 15px; font-weight: 600; text-decoration: none; }
.stazione-cta::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%;
    background: linear-gradient(90deg, hsla(var(--st-hue), 85%, 70%, 1), transparent);
    transition: filter .3s; }
.stazione-cta .arr { transition: transform .3s; }
.stazione-cta:hover .arr { transform: translateX(6px); }
.stazione-cta:hover::after { filter: drop-shadow(0 0 8px hsla(var(--st-hue), 80%, 60%, 0.7)); }

/* sotto i 1024px: il viaggio orizzontale resta (come da PC), stazioni più larghe
   e leggibili una alla volta; l'altezza del wrap la imposta il motore JS. */
@media (max-width: 1023.98px) {
    .rotta-binario { gap: clamp(34px, 7vw, 70px); padding: 0 18vw 0 max(20px, 6vw); }
    .stazione-intro { width: min(560px, 86vw); }
    .stazione { width: min(440px, 82vw); padding: 26px 22px 30px; }
    .stazione-titolo { font-size: clamp(28px, 7vw, 40px); }
    .stazione-desc { font-size: 15px; }
}

/* Con "riduci movimento" attivo (accessibilità, oppure risparmio energetico su
   Android) la Rotta NON diventa più una colonna: resta affiancata come su PC, ma
   si sfoglia col dito invece di essere guidata dallo scroll — niente pin, niente
   traslazione automatica, niente particelle. Stesso aspetto, zero movimento imposto. */
@media (prefers-reduced-motion: reduce) and (min-width: 99999px) {   /* DISATTIVATO — vedi nota in cima al file */
    .rotta-wrap { height: auto !important; }
    .rotta-sticky { position: static; height: auto; padding: 80px 0; background: none;
        overflow-x: auto; overflow-y: hidden;
        scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain; }
    #rotta-stelle, .rotta-linea { display: none; }
    .rotta-binario { transform: none !important; padding: 0 6vw; gap: clamp(24px, 5vw, 48px); }
    .stazione-intro, .stazione { scroll-snap-align: center; }
    .rotta-hint { display: none; }
    .stazione { opacity: 1; transform: none; filter: none; transition: none;
        border-color: hsla(var(--st-hue), 70%, 60%, 0.4);
        box-shadow: 0 0 34px hsla(var(--st-hue), 80%, 60%, 0.12); }
    .stazione-stella { animation: none; }
    /* barra di scorrimento discreta, in tema */
    .rotta-sticky::-webkit-scrollbar { height: 6px; }
    .rotta-sticky::-webkit-scrollbar-track { background: rgba(255, 255, 255, .04); }
    .rotta-sticky::-webkit-scrollbar-thumb { background: rgba(139, 92, 246, .5); border-radius: 999px; }
}

/* ============ CONTATTI — RITORNO DEL GLOBO ============ */
/* Il viaggio si chiude dov'era iniziato: il globo dell'apertura riappare
   all'orizzonte in fondo alla pagina (seconda istanza cobe, motore inline
   in index.php) sotto i contatti essenziali. */
.finale { position: relative; overflow: hidden; z-index: 1;
    padding: 130px 0 min(44vw, 470px); }
.finale-alone { position: absolute; left: 50%; transform: translateX(-50%); bottom: 0;
    width: min(120vw, 1400px); height: min(60vw, 700px); pointer-events: none;
    background: radial-gradient(50% 62% at 50% 100%, rgba(79, 124, 255, 0.15), rgba(139, 92, 246, 0.06) 45%, transparent 75%); }
#globo-finale { position: absolute; left: 50%; transform: translateX(-50%);
    bottom: calc(min(94vw, 1080px) * -0.62);
    width: min(94vw, 1080px); height: min(94vw, 1080px);
    pointer-events: none; }
.finale-contenuto { position: relative; z-index: 2; }
.finale-lead { color: var(--text-muted); font-size: clamp(16px, 1.6vw, 18px);
    line-height: 1.6; margin: 18px auto 0; max-width: 620px; }
.finale-lead strong { color: var(--text); font-weight: 700; }

.finale-canali { display: grid; justify-items: center; gap: 24px; margin-top: 46px; }
.finale-wa { display: inline-flex; align-items: center; gap: 12px;
    padding: 17px 34px; font-weight: 700; font-size: 16.5px; color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.35);
    transition: transform .3s var(--ease-out), box-shadow .3s ease; }
.finale-wa:hover { transform: translateY(-3px); box-shadow: 0 16px 52px rgba(99, 102, 241, 0.5); }
.finale-wa .arr { transition: transform .3s; }
.finale-wa:hover .arr { transform: translateX(5px); }
.finale-riga { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 22px; }
.finale-riga a { display: inline-flex; align-items: center; gap: 9px;
    color: var(--text-soft); font-size: 15.5px; font-weight: 600;
    transition: color var(--t-fast) var(--ease); }
.finale-riga a:hover { color: var(--text); }
.finale-riga svg { color: #a78bfa; flex: 0 0 auto; }
.finale-sep { width: 4px; height: 4px; border-radius: 50%; background: var(--border-bright); }
.finale-nota { margin: 0; font-family: var(--font-mono); font-size: 11px;
    letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); }

@media (max-width: 560px) {
    .finale-sep { display: none; }
    .finale-riga { flex-direction: column; gap: 12px; }
}

@media (prefers-reduced-motion: reduce) and (min-width: 99999px) {   /* DISATTIVATO — vedi nota in cima al file */
    #globo-finale { display: none; }
    .finale { padding-bottom: 160px; }
}

/* ============ PORTFOLIO — L'UNIVERSO DEI LAVORI ============ */
/* Galleria interstellare (dal prototipo Animazione Globo): scena Three.js con
   oblò circolare per progetto + vortice di particelle. Markup e script inline
   in index.php. Lo scroll governa solo arrivo e uscita; il cambio progetto
   è manuale (frecce, tastiera, swipe, puntini). */

.lavori-wrap { height: 300vh; position: relative; z-index: 1; }
#lavori { position: sticky; top: 0; height: 100vh; overflow: hidden;
    background: radial-gradient(1100px 800px at 50% 35%, #10101a 0%, var(--bg) 72%);
    user-select: none; -webkit-user-select: none; }
#stars2 { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
#cosmo { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; display: block;
    cursor: grab; touch-action: pan-y; }
#cosmo.dragging { cursor: grabbing; }

.cosmo-intro, .cosmo-outro { position: absolute; inset: 0; z-index: 3; display: grid; place-content: center;
    gap: 12px; text-align: center; opacity: 0; pointer-events: none; }
.cosmo-intro h2, .cosmo-outro h2 { margin: 0; font-family: var(--font-display); font-weight: 800;
    font-size: clamp(1.8rem, 5vw, 3.4rem); letter-spacing: -.02em;
    background: linear-gradient(90deg, #bcd2ff, #ffffff 45%, var(--brand-2));
    -webkit-background-clip: text; background-clip: text; color: transparent; }
.cosmo-intro p, .cosmo-outro p { margin: 0; color: var(--text-muted); font-size: clamp(.95rem, 1.6vw, 1.15rem); }
.cosmo-outro .cta { margin: 18px auto 0; display: inline-flex; align-items: center; gap: 10px;
    padding: 14px 26px; border: 1px solid rgba(139, 92, 246, .5); color: var(--text);
    font-weight: 600; text-decoration: none; font-size: 1rem;
    background: linear-gradient(90deg, rgba(139, 92, 246, .22), rgba(79, 124, 255, .06));
    box-shadow: 0 0 30px rgba(139, 92, 246, .15); transition: box-shadow .3s, background .3s; }
.cosmo-outro .cta:hover { box-shadow: 0 0 46px rgba(139, 92, 246, .4);
    background: linear-gradient(90deg, rgba(139, 92, 246, .36), rgba(139, 92, 246, .14)); }

/* il PORTALE: niente card — un oblò circolare sul progetto, cerchiato da un vortice di particelle */
.galassia { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 4;
    display: flex; align-items: center; justify-content: center; gap: clamp(30px, 7vw, 84px);
    width: min(900px, 88vw); opacity: 0; pointer-events: none; }
.portale { position: relative; flex: 0 0 auto; width: min(44vh, 34vw); aspect-ratio: 1;
    border-radius: 50%; overflow: hidden; display: grid; place-items: center;
    box-shadow: 0 0 90px var(--op-glow, rgba(120, 180, 255, .3)); }
.portale img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.portale::after { content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
    box-shadow: inset 0 0 70px rgba(10, 10, 15, .85); }   /* vignetta: fonde l'immagine nel buio */

/* oblò-logo: il logo del cliente dentro al mondo — disco chiaro tipo luna,
   logo contenuto col 15% di margine così il cerchio non lo taglia mai */
.portale-logo { background: radial-gradient(circle at 36% 30%, #ffffff 0%, #eef1f7 55%, #ccd4e3 100%); }
.portale-logo img { object-fit: contain; padding: 15%; mix-blend-mode: multiply; }
/* loghi PNG con sfondo trasparente (es. The Amp): niente multiply, altrimenti i
   colori pieni si sporcano sul disco. Attivata da `alpha: true` in PROGETTI. */
.portale-logo-alpha img { mix-blend-mode: normal; padding: 13%; }
.portale-logo::after { box-shadow: inset 0 0 60px rgba(10, 10, 15, .45); }   /* vignetta più leggera sul disco chiaro */
.portale .mono { font-family: var(--font-display); font-size: clamp(2.6rem, 6vw, 4rem); font-weight: 800;
    letter-spacing: .04em; color: rgba(255, 255, 255, .92); text-shadow: 0 2px 24px rgba(0, 0, 0, .5); z-index: 1; }
.portale .ph { position: absolute; bottom: 14%; left: 0; right: 0; text-align: center; font-size: .6rem;
    color: rgba(255, 255, 255, .55); letter-spacing: .12em; text-transform: uppercase; z-index: 1; }

.op-testo { max-width: 360px; min-width: 0; }
.op-num { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .34em;
    color: var(--op-hue, #7fb2ff); margin-bottom: 12px; }
.op-testo h3 { margin: 0 0 14px; font-family: var(--font-display); font-weight: 800;
    font-size: clamp(1.8rem, 4vw, 2.8rem); letter-spacing: -.02em; line-height: 1.02; }
.op-linea { width: 74px; height: 2px; margin-bottom: 16px;
    background: linear-gradient(90deg, var(--op-hue, #7fb2ff), transparent); }
.op-desc { margin: 0 0 14px; color: var(--text-muted); font-size: .98rem; line-height: 1.6; }
.op-tags { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .16em; text-transform: uppercase;
    color: #9fb2d3; margin-bottom: 26px; }
.op-visit { position: relative; display: inline-flex; align-items: center; gap: 10px; padding-bottom: 7px;
    color: var(--text); font-size: .95rem; font-weight: 600; letter-spacing: .02em; text-decoration: none; }
.op-visit::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%;
    background: linear-gradient(90deg, var(--op-hue, #7fb2ff), transparent); transition: filter .3s; }
.op-visit .arr { transition: transform .3s; }
.op-visit:hover .arr { transform: translateX(6px); }
.op-visit:hover::after { filter: drop-shadow(0 0 8px var(--op-glow, rgba(120, 180, 255, .6))); }

/* frecce di navigazione tra i progetti */
.cosmo-arr { position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
    width: 52px; height: 52px; border-radius: 50%; border: 1px solid rgba(159, 178, 211, .4);
    background: rgba(13, 13, 20, .45); color: var(--text); font-size: 1.6rem; line-height: 1; cursor: pointer;
    display: grid; place-items: center; opacity: 0; pointer-events: none; padding: 0 0 4px;
    transition: opacity .4s, border-color .3s, box-shadow .3s; }
.cosmo-arr:hover { border-color: var(--brand-2); box-shadow: 0 0 22px rgba(139, 92, 246, .35); }
#arr-prev { left: clamp(10px, 3.5vw, 60px); }
#arr-next { right: clamp(10px, 3.5vw, 60px); }

/* puntini di navigazione tra i mondi */
.cosmo-nav { position: absolute; left: clamp(10px, 2.5vw, 28px); top: 50%; transform: translateY(-50%);
    z-index: 5; display: flex; flex-direction: column; gap: 14px; opacity: 0; transition: opacity .5s ease; }
.cosmo-nav button { width: 10px; height: 10px; border-radius: 50%; border: 1px solid rgba(159, 178, 211, .5);
    background: transparent; padding: 0; cursor: pointer;
    transition: transform .3s, background .3s, box-shadow .3s, border-color .3s; }
.cosmo-nav button.on { background: var(--brand-2); border-color: var(--brand-2);
    box-shadow: 0 0 12px rgba(139, 92, 246, .7); transform: scale(1.3); }

@media (max-width: 820px) {
    .galassia { flex-direction: column; text-align: center; gap: 26px; }
    .portale { width: min(56vw, 34vh); }
    .op-testo { max-width: 86vw; }
    .op-linea { margin-left: auto; margin-right: auto; }
}

/* ============ PREVENTIVO ============ */
.quote {
    padding: 120px 0;
    position: relative;
    z-index: 1;
}

.quote-grid {
    display: grid;
    gap: 48px;
    align-items: start;
}

.quote-side h3 {
    font-size: 14px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 32px;
    font-weight: 500;
}

.quote-steps {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 48px;
}

.quote-steps li {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}

.quote-steps li:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-strong);
}

.step-num {
    flex-shrink: 0;
    width: 40px; height: 40px;
    border: 1px solid var(--border-strong);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--brand);
    font-weight: 600;
}

.quote-steps h4 {
    font-size: 17px;
    margin-bottom: 4px;
    color: var(--text);
}

.quote-steps p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.5;
}

.quote-direct {
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
}

.quote-direct p {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 8px;
}

.quote-direct a {
    color: var(--text);
    font-size: 16px;
    font-weight: 500;
    transition: color var(--t-fast) var(--ease);
}

.quote-direct a:hover { color: var(--brand); }

/* Form */
.quote-form-wrap {
    background: var(--bg-elev);
    padding: 36px 32px;
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    position: relative;
    overflow: hidden;
}

.quote-form-wrap::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%; height: 100%;
    background: radial-gradient(circle, rgba(79, 124, 255, 0.08), transparent 70%);
    pointer-events: none;
}

.field {
    margin-bottom: 18px;
    position: relative;
}

.field-row {
    display: grid;
    gap: 16px;
}

.field label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 8px;
    letter-spacing: 0.01em;
}

.field label span:not(.optional) { color: var(--brand); }
.field label .optional {
    color: var(--text-soft);
    font-weight: 400;
    font-size: 12px;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field select,
.field textarea {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    font-family: inherit;
    color: var(--text);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
    -webkit-appearance: none;
    appearance: none;
}

.field input::placeholder, .field textarea::placeholder {
    color: var(--text-soft);
}

.field select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23a1a1aa'%3e%3cpath d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
    padding-right: 44px;
}

.field select option {
    background: var(--bg-elev);
    color: var(--text);
}

.field textarea {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

.field input:focus, .field select:focus, .field textarea:focus {
    outline: none;
    border-color: var(--brand);
    background: rgba(79, 124, 255, 0.04);
    box-shadow: 0 0 0 4px rgba(79, 124, 255, 0.12);
}

.field-checkbox { margin: 28px 0 20px; position: relative; }

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 1px; height: 1px;
}

.checkbox-box {
    flex-shrink: 0;
    width: 18px; height: 18px;
    border: 1.5px solid var(--border-strong);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.02);
    margin-top: 2px;
    position: relative;
    transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}

.checkbox-box::after {
    content: '';
    position: absolute;
    top: 2px; left: 5px;
    width: 5px; height: 9px;
    border: solid var(--bg);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transition: transform var(--t-fast) var(--ease-spring);
}

.checkbox-label input:checked ~ .checkbox-box {
    background: var(--brand);
    border-color: var(--brand);
}

.checkbox-label input:checked ~ .checkbox-box::after {
    transform: rotate(45deg) scale(1);
}

.checkbox-label input:focus-visible ~ .checkbox-box {
    box-shadow: 0 0 0 4px rgba(79, 124, 255, 0.2);
}

.checkbox-text {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

.checkbox-text a {
    color: var(--text);
    text-decoration: underline;
    text-decoration-color: var(--text-soft);
    text-underline-offset: 3px;
    transition: text-decoration-color var(--t-fast) var(--ease);
}

.checkbox-text a:hover { text-decoration-color: var(--brand); }

.quote-alert {
    display: none;
    padding: 14px 16px;
    border-radius: var(--r-md);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 16px;
    border: 1px solid;
}

.quote-alert.success {
    display: block;
    background: rgba(16, 185, 129, 0.08);
    color: #6ee7b7;
    border-color: rgba(16, 185, 129, 0.3);
}

.quote-alert.error {
    display: block;
    background: rgba(239, 68, 68, 0.08);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.3);
}

.quote-small {
    margin-top: 16px;
    font-size: 12px;
    color: var(--text-soft);
    line-height: 1.5;
    text-align: center;
}

/* ============ FOOTER ============ */
.site-footer {
    background: var(--bg-elev);
    border-top: 1px solid var(--border);
    padding: 80px 0 0;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.footer-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 2;
}

/* PEC Badge */
.pec-link {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pec-badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--brand);
    background: rgba(79, 124, 255, 0.1);
    border: 1px solid rgba(79, 124, 255, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    line-height: 1;
}

.footer-grid {
    display: grid;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-col h3 {
    font-size: 13px;
    color: var(--text-soft);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 500;
    margin-bottom: 20px;
}

.footer-col ul li {
    padding: 6px 0;
    font-size: 14px;
    color: var(--text-muted);
}

.footer-col ul li a {
    display: inline-block;
    color: var(--text-muted);
    transition: color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}

.footer-col ul li a:hover { color: var(--text); transform: translateX(3px); }

.footer-brand p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-top: 16px;
}

.logo-footer { margin-bottom: 4px; }

.footer-bottom {
    padding: 28px 0;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    text-align: center;
    font-size: 13px;
    color: var(--text-soft);
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.footer-links a {
    color: var(--text-soft);
    transition: color var(--t-fast) var(--ease);
}

.footer-links a:hover { color: var(--text); }

/* Cometa: ogni tanto una scia di luce percorre il bordo superiore del footer */
.site-footer::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 0;
    width: 220px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.85), transparent);
    transform: translateX(-240px);
    animation: footerCometa 8s ease-in-out infinite;
    pointer-events: none;
    z-index: 3;
}
@keyframes footerCometa {
    0% { transform: translateX(-240px); opacity: 0; }
    8% { opacity: 1; }
    50% { transform: translateX(100vw); opacity: 1; }
    51%, 100% { transform: translateX(100vw); opacity: 0; }
}

/* Stelline sparse che scintillano piano sullo sfondo */
.footer-stelle { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.footer-stelle span {
    position: absolute;
    width: 9px; height: 9px;
    background: #bcd2ff;
    clip-path: polygon(50% 0%, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0% 50%, 39% 39%);
    filter: drop-shadow(0 0 6px rgba(139, 92, 246, 0.8));
    animation: footerStella 4.5s ease-in-out infinite;
}
.footer-stelle span:nth-child(1) { top: 16%; left: 5%; }
.footer-stelle span:nth-child(2) { top: 28%; right: 8%; width: 7px; height: 7px; animation-delay: 1.2s; }
.footer-stelle span:nth-child(3) { top: 62%; left: 37%; width: 6px; height: 6px; animation-delay: 2.2s; }
.footer-stelle span:nth-child(4) { top: 10%; left: 57%; width: 7px; height: 7px; animation-delay: 3.1s; }
.footer-stelle span:nth-child(5) { bottom: 18%; right: 28%; width: 6px; height: 6px; animation-delay: 0.6s; }
@keyframes footerStella {
    0%, 100% { opacity: 0.22; transform: scale(1); }
    50% { opacity: 0.75; transform: scale(1.35); }
}

@media (prefers-reduced-motion: reduce) and (min-width: 99999px) {   /* DISATTIVATO — vedi nota in cima al file */
    .site-footer::before { animation: none; opacity: 0; }
    .footer-stelle span { animation: none; opacity: 0.3; }
}

/* ============ REVEAL ANIMATIONS ============ */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) and (min-width: 99999px) {   /* DISATTIVATO — vedi nota in cima al file */
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; }
    .reveal-line > span { transform: none; opacity: 1; animation: none; }
}

/* ============ LEGAL PAGE ============ */
.legal-page {
    padding: calc(var(--header-h) + 60px) 0 100px;
    min-height: 80vh;
    position: relative;
    z-index: 1;
}

.legal-page .container { max-width: 760px; }

.legal-page h1 {
    font-size: clamp(36px, 5vw, 56px);
    margin-bottom: 8px;
    letter-spacing: -0.03em;
}

.legal-updated {
    font-family: var(--font-mono);
    color: var(--text-soft);
    font-size: 13px;
    margin-bottom: 40px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border);
}

.legal-page h2 {
    font-size: 22px;
    margin: 40px 0 16px;
    color: var(--text);
}

.legal-page h3 {
    font-size: 17px;
    margin: 26px 0 10px;
    color: var(--text);
}

.legal-page p {
    color: var(--text-muted);
    line-height: 1.75;
    margin-bottom: 14px;
    font-size: 15px;
}

.legal-page strong { color: var(--text); }
.legal-page a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }

.legal-list {
    margin: 16px 0 20px;
}

.legal-list li {
    padding: 6px 0 6px 20px;
    position: relative;
    color: var(--text-muted);
    font-size: 15px;
}

.legal-list li::before {
    content: '';
    position: absolute;
    left: 0; top: 16px;
    width: 6px; height: 1px;
    background: var(--brand);
}

.legal-back {
    margin-top: 56px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}

.legal-back a { font-weight: 500; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* TABLET ≥ 640px */
@media (min-width: 640px) {
    .field-row { grid-template-columns: 1fr 1fr; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

/* DESKTOP ≥ 1024px */
@media (min-width: 1024px) {
    .nav-links { display: flex; }
    .navbar-cta { display: inline-flex; }
    .menu-toggle { display: none; }

    .quote { padding: 110px 0; }


    .quote-grid {
        grid-template-columns: 1fr 1.2fr;
        gap: 80px;
    }

    .footer-grid {
        grid-template-columns: 1.8fr 1fr 1fr 1fr 1fr;
        gap: 48px;
    }

    .container { padding: 0 32px; }
}

/* LARGE ≥ 1280px */
@media (min-width: 1280px) {
    :root { --header-h: 80px; }
}

/* PRINT */
@media print {
    .navbar, .mobile-menu, .backdrop, .menu-toggle,
    .hero-actions, .quote-form-wrap, .cosmo-arr,
    .cosmo-nav, .scroll-indicator, .scroll-progress,
    .cursor-dot, .cursor-ring {
        display: none !important;
    }
    body { background: white; color: black; }
}

/* ============================================================
   SEO LOCALE — FAQ · ZONE · FOOTER ZONE · PAGINE LOCALITÀ
   ============================================================ */

/* ---------- FAQ (home + pagine località) ---------- */
.faq-section { padding: 90px 0; position: relative; z-index: 1; }
.faq { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    background: var(--bg-card);
    transition: border-color var(--t-base) var(--ease), background var(--t-base) var(--ease);
}
.faq-item[open] { border-color: var(--border-strong); background: var(--bg-card-hover); }
.faq-item summary {
    list-style: none;
    cursor: pointer;
    display: flex; align-items: center; justify-content: space-between; gap: 20px;
    padding: 22px 26px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(16px, 2vw, 19px);
    color: var(--text);
    letter-spacing: -0.01em;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: var(--r-md); }
.faq-icon { position: relative; flex: 0 0 18px; width: 18px; height: 18px; }
.faq-icon::before, .faq-icon::after {
    content: ''; position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: var(--brand); border-radius: 2px;
}
.faq-icon::before { width: 14px; height: 2px; }
.faq-icon::after { width: 2px; height: 14px; transition: transform var(--t-base) var(--ease), opacity var(--t-base) var(--ease); }
.faq-item[open] .faq-icon::after { transform: translate(-50%, -50%) rotate(90deg); opacity: 0; }
.faq-answer { padding: 0 26px 24px; color: var(--text-muted); line-height: 1.75; max-width: 72ch; }
.faq-answer p { font-size: 15.5px; }
.faq-item[open] .faq-answer { animation: faqIn var(--t-base) var(--ease-out); }
@keyframes faqIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ============ FAQ HOME — TERMINALE DI BORDO ============ */
/* Le FAQ della home come comunicazioni col Controllo Missione: elenco trasmissioni
   a sinistra, schermo-terminale a destra dove la risposta arriva battuta a macchina
   (motore inline in index.php). Le pagine località continuano a usare l'accordion
   .faq-item qui sopra. */
.faq-terminale { padding: 90px 0; position: relative; z-index: 1; }
.terminale { display: grid; gap: 18px; max-width: 1060px; margin: 0 auto; align-items: start; }

.tx-lista { display: grid; gap: 10px; }
.tx-voce { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
    padding: 15px 18px;
    background: linear-gradient(180deg, rgba(18, 18, 28, .9), rgba(12, 12, 19, .9));
    border: 1px solid var(--border); cursor: pointer; color: inherit; font: inherit;
    transition: border-color .3s ease, background .3s ease; }
.tx-voce:hover { border-color: var(--border-bright); }
.tx-voce.attiva { border-color: rgba(139, 92, 246, .5); background: rgba(139, 92, 246, .07); }
/* stella al posto della sigla TX: scintilla, si accende sulla voce attiva */
.tx-stella-faq { flex: 0 0 auto; width: 13px; height: 13px;
    background: rgba(188, 210, 255, .35);
    clip-path: polygon(50% 0%, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0% 50%, 39% 39%);
    transition: background .3s ease, filter .3s ease; }
.tx-voce.attiva .tx-stella-faq { background: #bcd2ff;
    filter: drop-shadow(0 0 7px rgba(139, 92, 246, .95));
    animation: stellaTwinkle 3s ease-in-out infinite; }
.tx-q { font-size: 14.5px; font-weight: 600; color: var(--text-soft); line-height: 1.4;
    transition: color .3s ease; }
.tx-voce.attiva .tx-q { color: var(--text); }

.tx-schermo { position: relative; border: 1px solid var(--border-strong);
    background: linear-gradient(180deg, #0c0f18, #090b12); overflow: hidden; }
.tx-schermo::before {   /* scanline sottili da vecchio monitor */
    content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
    background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 3px); }
.tx-schermo::after {    /* alone del fosforo */
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(120% 90% at 50% 0%, rgba(139, 92, 246, .07), transparent 60%); }
.tx-corpo { position: relative; padding: 26px 24px 28px; min-height: 240px; }
.tx-eco { font-family: var(--font-mono); font-size: 12.5px; color: #a78bfa;
    margin: 0 0 14px; line-height: 1.5; }
.tx-testo { font-size: 15.5px; line-height: 1.75; color: var(--text-soft); margin: 0; max-width: 60ch; }
.tx-cursore { display: inline-block; width: .55em; height: 1.05em; margin-left: 2px;
    background: #a78bfa; vertical-align: text-bottom;
    animation: txCursore 1s steps(2) infinite; }
@keyframes txCursore { 50% { opacity: 0; } }
.tx-schermo.cambio .tx-corpo { animation: txFlick .16s ease-out; }
@keyframes txFlick { 0% { opacity: .4; transform: translateY(1px); } 100% { opacity: 1; transform: none; } }

@media (min-width: 1024px) {
    .terminale { grid-template-columns: 0.92fr 1.08fr; gap: 22px; }
}

@media (prefers-reduced-motion: reduce) and (min-width: 99999px) {   /* DISATTIVATO — vedi nota in cima al file */
    .tx-cursore { display: none; }
    .tx-voce.attiva .tx-stella-faq { animation: none; }
    .tx-schermo.cambio .tx-corpo { animation: none; }
}

/* ---------- FOOTER ZONE — link SEO nel DOM ma non visibili (visually-hidden) ---------- */
.footer-zone-seo {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- PAGINE LOCALITÀ ---------- */
.lp-hero { position: relative; padding: calc(var(--header-h) + 70px) 0 64px; overflow: hidden; }
.lp-hero-bg {
    position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background:
        radial-gradient(60% 80% at 18% 0%, rgba(79, 124, 255, 0.14), transparent 60%),
        radial-gradient(50% 70% at 90% 10%, rgba(139, 92, 246, 0.12), transparent 60%);
}
.lp-hero .container { position: relative; z-index: 1; }
.breadcrumb {
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
    font-size: 12.5px; color: var(--text-soft);
    margin-bottom: 26px; font-family: var(--font-mono);
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb [aria-current] { color: var(--text); }
.lp-title { font-size: clamp(36px, 6vw, 66px); line-height: 1.03; letter-spacing: -0.035em; margin: 16px 0 22px; }
.lp-sub { font-size: clamp(16px, 2.2vw, 20px); line-height: 1.6; color: var(--text-muted); max-width: 720px; }
.lp-sub strong { color: var(--text); font-weight: 600; }
.lp-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

.lp-section { padding: 60px 0; position: relative; z-index: 1; }
.lp-grid { display: grid; grid-template-columns: 1fr; gap: 48px; align-items: start; }
@media (min-width: 900px) { .lp-grid { grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); gap: 56px; } }
.lp-main h2 { font-size: clamp(24px, 3.4vw, 34px); letter-spacing: -0.03em; margin: 42px 0 18px; line-height: 1.12; }
.lp-main h2:first-child { margin-top: 0; }
.lp-main p { color: var(--text-muted); line-height: 1.75; margin-bottom: 18px; font-size: 16.5px; }
.lp-main strong { color: var(--text); font-weight: 600; }
.lp-services { display: flex; flex-direction: column; gap: 14px; margin: 4px 0 8px; }
.lp-services li {
    padding: 18px 20px; border: 1px solid var(--border); border-left: 3px solid var(--brand);
    border-radius: var(--r-md); background: var(--bg-card);
    color: var(--text-muted); line-height: 1.65; font-size: 15.5px;
}
.lp-services strong { color: var(--text); }
.lp-sectors { display: flex; flex-wrap: wrap; gap: 10px; }
.lp-sectors li { font-size: 14px; color: var(--text-muted); padding: 8px 16px; border: 1px solid var(--border); border-radius: var(--r-full); background: var(--bg-card); }

.lp-aside { position: relative; }
@media (min-width: 900px) { .lp-aside { position: sticky; top: calc(var(--header-h) + 20px); } }
.lp-card { border: 1px solid var(--border-strong); border-radius: var(--r-lg); background: linear-gradient(180deg, var(--bg-elev), var(--bg-elev-2)); padding: 28px 26px; }
.lp-card-label { display: inline-block; font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.18em; color: var(--brand); margin-bottom: 12px; }
.lp-card h3 { font-size: 22px; letter-spacing: -0.02em; margin-bottom: 10px; }
.lp-card > p { color: var(--text-muted); font-size: 14.5px; line-height: 1.6; margin-bottom: 20px; }
.lp-contact { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--r-md); margin-bottom: 10px; transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
.lp-contact span { font-weight: 600; color: var(--text); }
.lp-contact small { color: var(--text-soft); font-size: 12.5px; }
.lp-contact:hover { border-color: var(--border-bright); background: var(--bg-card-hover); transform: translateY(-2px); }
.lp-contact-wa { border-color: rgba(37, 211, 102, 0.4); background: rgba(37, 211, 102, 0.08); }
.lp-contact-wa span { color: #25d366; }

.lp-nearby h2 { font-size: clamp(20px, 3vw, 28px); letter-spacing: -0.02em; margin-bottom: 22px; }
.lp-nearby-links { display: flex; flex-wrap: wrap; gap: 12px; }
.lp-nearby-links a { font-size: 14.5px; color: var(--text-muted); padding: 10px 18px; border: 1px solid var(--border); border-radius: var(--r-full); transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
.lp-nearby-links a:hover { color: var(--text); border-color: var(--border-strong); background: var(--bg-card-hover); transform: translateY(-2px); }
.lp-nearby-all { color: var(--brand) !important; border-color: rgba(79, 124, 255, 0.3) !important; }

.lp-cta { padding: 30px 0 100px; position: relative; z-index: 1; }
.lp-cta-inner {
    text-align: center; max-width: 760px; margin: 0 auto; padding: 56px 32px;
    border: 1px solid var(--border-strong); border-radius: var(--r-xl);
    background: radial-gradient(120% 140% at 50% 0%, rgba(79, 124, 255, 0.12), transparent 60%), var(--bg-elev);
}
.lp-cta-inner h2 { font-size: clamp(26px, 4vw, 42px); letter-spacing: -0.03em; line-height: 1.08; margin-bottom: 16px; }
.lp-cta-inner p { color: var(--text-muted); font-size: 17px; margin-bottom: 30px; }
.lp-cta-inner .lp-actions { justify-content: center; }

@media (max-width: 560px) {
    .faq-section { padding: 64px 0; }
    .faq-item summary { padding: 18px 20px; }
    .faq-answer { padding: 0 20px 20px; }
    .lp-cta-inner { padding: 40px 22px; }
}
/* ============================================================
   REDESIGN LAYER — Fase B (tipografia) + Fase D (brutalismo)
   Appeso in coda: vince per cascata, rimuovibile in blocco.
   ============================================================ */

/* --- Font display self-hosted: Cabinet Grotesk (Fontshare) --- */
@font-face {
  font-family: 'Cabinet Grotesk';
  src: url('fonts/CabinetGrotesk-Medium.woff2') format('woff2');
  font-weight: 500; font-display: swap; font-style: normal;
}
@font-face {
  font-family: 'Cabinet Grotesk';
  src: url('fonts/CabinetGrotesk-Bold.woff2') format('woff2');
  font-weight: 700; font-display: swap; font-style: normal;
}
@font-face {
  font-family: 'Cabinet Grotesk';
  src: url('fonts/CabinetGrotesk-Extrabold.woff2') format('woff2');
  font-weight: 800; font-display: swap; font-style: normal;
}

:root {
  --font-display: 'Cabinet Grotesk', 'Inter', -apple-system, system-ui, sans-serif;
  /* Bordi netti: identità editoriale, niente look "SaaS" */
  --r-sm: 0px; --r-md: 0px; --r-lg: 0px; --r-xl: 0px; --r-full: 0px;
}

/* --- Tipografia display: peso pieno, tracking calibrato per Cabinet Grotesk --- */
.hero-title,
.section-title {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.hero-title { line-height: 1.0; }
.section-title { font-size: clamp(36px, 6vw, 76px); line-height: 1.02; }

/* --- Fase D: spigoli vivi sui componenti con radius hardcoded --- */
.section-label { border-radius: 0; }
/* .logo-img resta tondo: è un "oblò", coerente coi portali della sezione lavori */


/* ===== REDESIGN LAYER — Fase A (hero globo scroll-driven) ===== */
.wg-wrap { height: 600vh; position: relative; }   /* 400vh di viaggio globo + 200vh di atto Studio, senza scroll a vuoto in mezzo */
@media (max-width: 1023.98px) { .wg-wrap { height: 500vh; } }   /* niente atto Studio su schermi stretti */
    .wg-sticky { position: sticky; top: 0; height: 100vh; overflow: hidden;
      background: radial-gradient(1200px 900px at 50% 40%, #10101a 0%, #0a0a0f 70%); }
    .wg-layer { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
    #stars { z-index: 0; pointer-events: none; }
    #gl { z-index: 1; opacity: 0; pointer-events: none; }
    #cobe, #arcs { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
      width: min(100vw, 100vh); height: min(100vw, 100vh); display: block; }
    #cobe { z-index: 2; cursor: grab; touch-action: pan-y; }
    #arcs { z-index: 3; pointer-events: none; }
    .wg-overlay { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
    .wg-hero { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
      padding: calc(var(--header-h, 80px) + 40px) 24px 80px; }
    .wg-hero a { pointer-events: auto; }
    .wg-cap { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%);
      text-align: center; font-family: var(--font-display, 'Inter', sans-serif);
      font-size: clamp(1.6rem, 4.5vw, 3rem); font-weight: 600; letter-spacing: -0.02em;
      color: #f5f5f7; opacity: 0; text-shadow: 0 2px 30px rgba(0,0,0,.6); }
    #veneto-label { position: absolute; transform: translate(-50%,-140%); font-size: .95rem;
      font-weight: 600; letter-spacing: .02em; color: #8b5cf6; opacity: 0; white-space: nowrap;
      text-shadow: 0 0 12px rgba(139,92,246,.55); }
    #veneto-label::after { content: ""; display: block; width: 1px; height: 16px;
      background: linear-gradient(#8b5cf6, transparent); margin: 4px auto 0; }
    #wippo-label { position: absolute; transform: translate(-50%,-160%);
      font-size: clamp(1.1rem, 2.6vw, 1.7rem); font-weight: 700; letter-spacing: .04em;
      color: #f5f5f7; opacity: 0; white-space: nowrap; text-shadow: 0 0 18px rgba(139,92,246,.6); }
    #wippo-label::after { content: ""; display: block; width: 1px; height: 22px;
      background: linear-gradient(#8b5cf6, transparent); margin: 6px auto 0; }
    .wg-loading { position: absolute; inset: 0; display: flex; align-items: center;
      justify-content: center; color: #71717a; font-size: .9rem; z-index: 5; }

@media (prefers-reduced-motion: reduce) and (min-width: 99999px) {   /* DISATTIVATO — vedi nota in cima al file */
  /* Globo fermo: hero statico a piena vista, sequenza scroll disattivata */
  .wg-wrap { height: 100vh; }
  #gl, #arcs { display: none; }
  .wg-cap, #veneto-label, #wippo-label { display: none; }
}

/* ============================================================
   REDESIGN LAYER — Animazioni A1-A8 (senza A7)
   ============================================================ */

/* A1: titoli sezione rivelati riga per riga */
.section-title .wgr-line { display: block; overflow: hidden; }
.section-title .wgr-line > span { display: inline-block; transform: translateY(112%);
  transition: transform .9s cubic-bezier(.22,1,.36,1); transition-delay: calc(var(--i, 0) * .1s); }
.section-title.wgr-in .wgr-line > span { transform: translateY(0); }

/* A5: etichetta che accompagna il cursore sulle azioni */
.wgr-cursor-tag { position: fixed; left: 0; top: 0; z-index: 99; padding: 7px 13px;
  background: #f5f5f7; color: #0a0a0f; font-family: var(--font-mono);
  font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  pointer-events: none; opacity: 0; white-space: nowrap;
  transform: translate(16px, 18px); transition: opacity .18s ease; }
.wgr-cursor-tag.on { opacity: 1; }

/* A6: chiusura tipografica kinetic */
.wgr-kinetic { overflow: hidden; padding: 56px 0 20px; background: #0a0a0f;
  border-top: 1px solid rgba(255,255,255,.06); }
.wgr-kinetic-track { display: flex; width: max-content; animation: wg-marquee 26s linear infinite; }
.wgr-kinetic-track span { font-family: var(--font-display); font-weight: 800;
  font-size: clamp(88px, 15vw, 210px); line-height: .92; letter-spacing: -0.03em;
  white-space: nowrap; padding-right: 5vw;
  color: transparent; -webkit-text-stroke: 1px rgba(245,245,247,.25); }
.wgr-kinetic-track span i { font-style: normal; color: #f5f5f7; -webkit-text-stroke: 0; }

/* A8: entrata morbida delle sezioni */
.wgr-sec { opacity: 0; transform: translateY(26px);
  transition: opacity .8s ease, transform .8s cubic-bezier(.22,1,.36,1); }
.wgr-sec.wgr-vis { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) and (min-width: 99999px) {   /* DISATTIVATO — vedi nota in cima al file */
  .section-title .wgr-line > span { transform: none !important; transition: none; }
  .wgr-sec { opacity: 1; transform: none; transition: none; }
  .wgr-kinetic-track { animation: none; }
  .wgr-cursor-tag { display: none; }
}

/* ===== REDESIGN — Wordmark "Wippo Studio" (dots->text + fill) ===== */
.wgr-wm { position: relative; width: 100%; height: clamp(220px, 34vh, 440px);
  background: #0a0a0f; border-top: 1px solid rgba(255,255,255,.06); overflow: hidden; }
.wgr-wm-canvas { display: block; width: 100%; height: 100%; }

/* ===== REDESIGN — S1 (Lenis) + S5 (reveal a sipario) ===== */
/* Lenis anima scrollTop direttamente: lo smooth CSS va disattivato per non combattere */
html { scroll-behavior: auto !important; }

.wgr-clip { clip-path: inset(100% 0 0 0); opacity: .001;
  transition: clip-path .9s cubic-bezier(.22,1,.36,1), opacity .5s ease;
  transition-delay: calc(var(--wgr-d, 0) * .12s); }
.wgr-clip.wgr-open { clip-path: inset(0 0 0 0); opacity: 1; }

@media (prefers-reduced-motion: reduce) and (min-width: 99999px) {   /* DISATTIVATO — vedi nota in cima al file */
  .wgr-clip { clip-path: none; opacity: 1; transition: none; }
}

/* ============================================================
   PRELOADER — arrivo nel cosmo Wippo (markup e script in header.php)
   ============================================================ */
html.wgr-loading { overflow: hidden; }
/* il titolo hero resta in attesa finché il preloader non esce di scena */
html.wgr-loading .reveal-line > span { animation-play-state: paused; }

.wgr-loader {
    position: fixed; inset: 0; z-index: 9990;
    background: radial-gradient(1100px 800px at 50% 42%, #10101a 0%, #0a0a0f 72%);
    display: grid; place-items: center;
    transition: opacity .6s ease, visibility .6s ease;
}
.wgr-loader.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
.wgr-loader-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.wgr-loader-core { position: relative; display: grid; justify-items: center; gap: 22px; }
.wgr-loader-word {
    font-family: var(--font-display); font-weight: 800;
    font-size: clamp(2rem, 6vw, 3.4rem); letter-spacing: -0.02em;
    color: #f5f5f7; line-height: 1.1; padding-bottom: 0.08em;
}
.wgr-loader-word em {
    font-style: normal;
    background: linear-gradient(90deg, var(--brand), var(--brand-2));
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
}
.wgr-loader-bar { width: min(220px, 40vw); height: 2px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.wgr-loader-bar span {
    display: block; height: 100%; width: 0;
    background: linear-gradient(90deg, var(--brand), var(--brand-2));
}

@media (prefers-reduced-motion: reduce) and (min-width: 99999px) {   /* DISATTIVATO — vedi nota in cima al file */
    .wgr-loader-canvas { display: none; }
    .wgr-loader { transition: opacity .3s ease; }
    .navbar::before { animation: none; }
}
