/* =============================================================
   ENHANCE.CSS — Layer visivo premium (caricato per ultimo)
   Gradienti, glass, micro-animazioni, hero dinamico, marquee
   ============================================================= */

:root {
    --grad-brand: linear-gradient(135deg, #0f2740 0%, #1a3a5c 45%, #2a5280 100%);
    --grad-accent: linear-gradient(135deg, #f07a4a 0%, #e8612a 55%, #c94e1e 100%);
    --grad-text: linear-gradient(120deg, #f07a4a 0%, #ffb27a 50%, #f07a4a 100%);
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-bd: rgba(255, 255, 255, 0.18);
    --ease-out: cubic-bezier(.22, 1, .36, 1);
    --shadow-glow: 0 18px 50px -12px rgba(232, 97, 42, .45);
}

html { scroll-padding-top: 90px; }
body { background: #f7f5f2; overflow-x: hidden; }

/* Barra progresso scroll */
.scroll-progress {
    position: fixed; top: 0; left: 0; height: 3px; width: 0;
    background: var(--grad-accent); z-index: 300;
    box-shadow: 0 0 12px rgba(232, 97, 42, .6);
}

/* Barra avviso */
.site-notice {
    background: linear-gradient(90deg, #0f2740, #1a3a5c, #0f2740);
    background-size: 200% 100%;
    animation: noticeSlide 12s linear infinite;
    color: rgba(255, 255, 255, .85);
    text-align: center; font-size: .8rem; padding: 8px 16px;
}
.site-notice a { color: #ffb27a; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
@keyframes noticeSlide { to { background-position: -200% 0; } }

/* Navbar */
.navbar {
    background: rgba(247, 245, 242, .88);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(26, 58, 92, .08);
}
.navbar__logo {
    font-family: var(--f-serif);
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.02em;
    color: var(--c-brand);
    transition: transform .3s var(--ease-out);
}
.navbar__logo:hover { transform: scale(1.03); }
.navbar__nav a {
    font-family: var(--f-sans);
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    border-bottom: 0 !important;
}
.navbar__nav a::after {
    content: ''; position: absolute; left: 0; bottom: -2px; height: 2.5px; width: 100%;
    background: var(--grad-accent); transform: scaleX(0); transform-origin: right;
    transition: transform .35s var(--ease-out);
    border-radius: 2px;
}
.navbar__nav a:hover::after, .navbar__nav a.active::after { transform: scaleX(1); transform-origin: left; }

/* Bottoni */
.btn { border-radius: 999px; position: relative; overflow: hidden; transition: transform .3s var(--ease-out), box-shadow .3s, background .3s, border-color .3s, color .3s; }
.btn--primary { background: var(--grad-accent); border-color: transparent; box-shadow: 0 8px 24px -8px rgba(232, 97, 42, .55); }
.btn--primary:hover { background: var(--grad-accent); transform: translateY(-3px); box-shadow: var(--shadow-glow); }
.btn--primary::after {
    content: ''; position: absolute; top: 0; left: -75%; width: 50%; height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, .45), transparent);
    transform: skewX(-20deg); transition: left .7s var(--ease-out);
}
.btn--primary:hover::after { left: 130%; }
.btn--ghost { backdrop-filter: blur(8px); background: var(--glass-bg); }
.btn--ghost:hover { transform: translateY(-3px); }
.btn--secondary { border-radius: 999px; }

/* Tipografia */
h1 { letter-spacing: -.02em; }
h2 { letter-spacing: -.015em; }
.eyebrow {
    display: inline-flex; align-items: center; gap: .6rem;
    padding: 6px 14px; border-radius: 999px;
    background: rgba(232, 97, 42, .09); border: 1px solid rgba(232, 97, 42, .22);
    color: var(--c-accent-dk); font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
}
.eyebrow::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--c-accent); animation: pulseDot 2s infinite; }
@keyframes pulseDot { 0% { box-shadow: 0 0 0 0 rgba(232, 97, 42, .6); } 70% { box-shadow: 0 0 0 8px rgba(232, 97, 42, 0); } 100% { box-shadow: 0 0 0 0 rgba(232, 97, 42, 0); } }
.hero--dark .eyebrow, .section--dark .eyebrow, .section--brand .eyebrow {
    background: var(--glass-bg) !important; border-color: var(--glass-bd); color: #ffd2b8 !important;
}
.section-head h2 {
    position: relative; padding-bottom: 1rem;
}
.section-head:not(.section-head--center) h2::after,
.section-head--center h2::after {
    content: ''; display: block; width: 56px; height: 4px; border-radius: 4px; margin-top: 1rem; background: var(--grad-accent);
}
.section-head--center h2::after { margin-inline: auto; }

/* HERO */
.hero { background: radial-gradient(1200px 500px at 85% -10%, rgba(232, 97, 42, .10), transparent 60%), radial-gradient(900px 500px at -10% 110%, rgba(26, 58, 92, .10), transparent 60%), #fff; }
.hero::before {
    content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
    background-image: radial-gradient(rgba(26, 58, 92, .12) 1px, transparent 1px);
    background-size: 26px 26px;
    -webkit-mask-image: radial-gradient(ellipse at 70% 30%, #000 0%, transparent 70%);
    mask-image: radial-gradient(ellipse at 70% 30%, #000 0%, transparent 70%);
}
.hero--dark {
    background: radial-gradient(900px 500px at 90% 0%, rgba(232, 97, 42, .28), transparent 60%), radial-gradient(700px 500px at 0% 100%, rgba(66, 120, 190, .35), transparent 60%), var(--grad-brand);
}
.hero--dark::before { background-image: radial-gradient(rgba(255, 255, 255, .18) 1px, transparent 1px); opacity: .45; }
.hero--dark::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 60px; pointer-events: none;
    background: linear-gradient(to top, #f7f5f2, transparent); opacity: .0;
}
.hero__bg-blob { animation: floatBlob 14s ease-in-out infinite; }
.hero__bg-blob--2 { animation-duration: 18s; animation-direction: reverse; }
@keyframes floatBlob { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(40px, 30px) scale(1.15); } }
.hero h1 { font-size: clamp(2.4rem, 5.2vw, 4.2rem); line-height: 1.05; }
.hero h1 .underline-accent, .hero h1 span[style*="accent"] {
    background: var(--grad-text); background-size: 200% auto;
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent !important;
    animation: shineText 6s linear infinite;
}
@keyframes shineText { to { background-position: 200% center; } }
.hero__content > * { animation: riseIn .9s var(--ease-out) both; }
.hero__content > *:nth-child(1) { animation-delay: .05s; }
.hero__content > *:nth-child(2) { animation-delay: .15s; }
.hero__content > *:nth-child(3) { animation-delay: .25s; }
.hero__content > *:nth-child(4) { animation-delay: .35s; }
.hero__content > *:nth-child(5) { animation-delay: .45s; }
@keyframes riseIn { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
.hero__visual {
    border-radius: 28px; animation: floatY 7s ease-in-out infinite, riseIn 1s var(--ease-out) .2s both;
    box-shadow: 0 40px 80px -20px rgba(15, 39, 64, .45), 0 0 0 1px rgba(255, 255, 255, .15);
    transform-style: preserve-3d;
}
@keyframes floatY { 0%, 100% { translate: 0 0; } 50% { translate: 0 -14px; } }
.hero__visual::after {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(135deg, rgba(255, 255, 255, .18), transparent 40%);
}
.hero-chip {
    position: absolute; z-index: 3; display: flex; align-items: center; gap: .6rem;
    padding: 10px 16px; border-radius: 16px; font-size: .78rem; font-weight: 600; color: #fff;
    background: rgba(15, 39, 64, .62); border: 1px solid var(--glass-bd);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .5);
    animation: chipFloat 5s ease-in-out infinite;
}
.hero-chip b { font-family: var(--f-serif); font-size: 1.15rem; font-weight: 400; color: #ffb27a; }
.hero-chip--1 { top: 18px; left: 18px; }
.hero-chip--2 { bottom: 22px; right: 18px; animation-delay: -2.5s; }
@keyframes chipFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* Tech pills */
.tech-pill { background: rgba(255, 255, 255, .7); backdrop-filter: blur(6px); transition: transform .3s var(--ease-out), border-color .3s, background .3s; }
.tech-pill:hover { transform: translateY(-3px); border-color: var(--c-accent); background: #fff; }

/* Card servizio */
.service-card {
    border-radius: 20px; border: 1px solid rgba(26, 58, 92, .08);
    background: linear-gradient(#fff, #fff) padding-box, linear-gradient(135deg, transparent, transparent) border-box;
    box-shadow: 0 1px 2px rgba(15, 39, 64, .04), 0 10px 30px -18px rgba(15, 39, 64, .25);
    transition: transform .45s var(--ease-out), box-shadow .45s var(--ease-out), border-color .3s;
    transform-style: preserve-3d;
    overflow: hidden;
}
.service-card::after {
    content: ''; position: absolute; width: 220px; height: 220px; border-radius: 50%; right: -90px; top: -90px;
    background: radial-gradient(circle, rgba(232, 97, 42, .16), transparent 70%); opacity: 0; transition: opacity .4s;
}
.service-card:hover { transform: translateY(-8px); box-shadow: 0 30px 60px -24px rgba(15, 39, 64, .35); border-color: rgba(232, 97, 42, .35); }
.service-card:hover::after { opacity: 1; }
.service-card::before { height: 4px; background: var(--grad-accent); }
.service-card h3 { transition: color .3s; }
.service-card:hover h3 { color: var(--c-accent-dk); }
.service-card__icon { border-radius: 14px; background: linear-gradient(135deg, rgba(26, 58, 92, .08), rgba(232, 97, 42, .12)) !important; transition: transform .45s var(--ease-out); }
.service-card:hover .service-card__icon { transform: rotate(-8deg) scale(1.12); }
.link-arrow::after { content: '→'; display: inline-block; transition: transform .3s var(--ease-out); }
.service-card a.link-arrow:hover::after, .link-arrow:hover::after { transform: translateX(5px); }

/* City card */
.city-card { border-radius: 24px; box-shadow: 0 20px 50px -20px rgba(15, 39, 64, .5); transition: transform .5s var(--ease-out), box-shadow .5s; }
.city-card:hover { transform: translateY(-10px) scale(1.01); box-shadow: 0 40px 70px -24px rgba(15, 39, 64, .6); }
.city-card img { transition: transform 1.2s var(--ease-out); }
.city-card:hover img { transform: scale(1.12); }
.city-card__sub { display: inline-flex; align-items: center; gap: .4rem; transition: transform .4s var(--ease-out), color .3s; }
.city-card:hover .city-card__sub { transform: translateX(6px); }
.city-card::after {
    content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15);
}

/* Info box / intro snippet */
.info-box {
    position: relative; border: 1px solid rgba(26, 58, 92, .1); border-radius: 22px; padding: 2rem;
    background: linear-gradient(145deg, #fff, #f3efe9); box-shadow: 0 20px 50px -28px rgba(15, 39, 64, .4);
    overflow: hidden; line-height: 1.8;
}
.info-box::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--grad-accent); }
.intro-snippet {
    font-size: 1.2rem; line-height: 1.85; padding: 2rem 2.2rem; border-radius: 22px;
    background: linear-gradient(135deg, rgba(26, 58, 92, .05), rgba(232, 97, 42, .06));
    border: 1px solid rgba(26, 58, 92, .08); position: relative;
}
.intro-snippet::before { content: '“'; position: absolute; top: -10px; left: 18px; font: 5rem/1 var(--f-serif); color: var(--c-accent); opacity: .25; }

/* Feature list */
.feature-list li { padding: .5rem .8rem; border-radius: 12px; transition: background .3s, transform .3s var(--ease-out); }
.feature-list li:hover { background: rgba(232, 97, 42, .07); transform: translateX(6px); }

/* Badge */
.badge { transition: transform .3s var(--ease-out), background .3s, color .3s; padding: 8px 16px; font-size: .8rem; }
.badge--brand:hover { background: var(--c-brand); color: #fff; transform: translateY(-3px); box-shadow: 0 10px 20px -10px rgba(15, 39, 64, .6); }

/* FAQ */
.faq__item { border: 1px solid rgba(26, 58, 92, .08) !important; border-radius: 16px; margin-bottom: .8rem; padding-inline: 1.4rem; background: #fff; transition: box-shadow .3s, border-color .3s; }
.faq__item:hover { box-shadow: 0 14px 30px -20px rgba(15, 39, 64, .4); }
.faq__item.is-open { border-color: rgba(232, 97, 42, .4) !important; box-shadow: 0 20px 40px -24px rgba(232, 97, 42, .45); }
.faq__answer { animation: faqIn .4s var(--ease-out); }
@keyframes faqIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* CTA */
.cta-banner { background: radial-gradient(700px 300px at 85% 0%, rgba(255, 255, 255, .22), transparent 60%), var(--grad-accent); padding-block: 5rem; }
.cta-banner h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); }
.cta-banner .btn--primary { background: #fff; box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .4); }
.cta-banner .btn--primary::after { display: none; }

/* Scroll reveal */
.animate-on-scroll { opacity: 0; transform: translateY(34px) scale(.98); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
.animate-on-scroll.is-visible { opacity: 1; transform: none; }
.animate-delay-1 { transition-delay: .1s; }
.animate-delay-2 { transition-delay: .22s; }
.grid > .animate-on-scroll:nth-child(2) { transition-delay: .1s; }
.grid > .animate-on-scroll:nth-child(3) { transition-delay: .2s; }
.grid > .animate-on-scroll:nth-child(4) { transition-delay: .3s; }
.grid > .animate-on-scroll:nth-child(5) { transition-delay: .4s; }
.grid > .animate-on-scroll:nth-child(6) { transition-delay: .5s; }

/* Sezioni alternate con decorazioni */
.section--surface { background: linear-gradient(180deg, #f1eee9 0%, #ece8e2 100%); position: relative; }
.section--white { position: relative; }

/* ============ NUOVE SEZIONI HOME ============ */

/* Marquee tecnologie / keyword */
.marquee { background: var(--c-dark); overflow: hidden; padding-block: 1.1rem; position: relative; border-block: 1px solid rgba(255, 255, 255, .06); }
.marquee::before, .marquee::after { content: ''; position: absolute; top: 0; bottom: 0; width: 120px; z-index: 2; pointer-events: none; }
.marquee::before { left: 0; background: linear-gradient(to right, var(--c-dark), transparent); }
.marquee::after { right: 0; background: linear-gradient(to left, var(--c-dark), transparent); }
.marquee__track { display: flex; gap: 3rem; width: max-content; animation: marquee 38s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__item { display: inline-flex; align-items: center; gap: 3rem; color: rgba(255, 255, 255, .75); font-family: var(--f-mono); font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.marquee__item::after { content: '✦'; color: var(--c-accent); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Statistiche */
.stats-band { position: relative; margin-top: -3.2rem; z-index: 5; padding-bottom: 4.5rem; }
.stats-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
    background: linear-gradient(135deg, rgba(255, 255, 255, .5), rgba(255, 255, 255, .1));
    border-radius: 24px; overflow: hidden; box-shadow: 0 30px 70px -28px rgba(15, 39, 64, .5);
}
.stats-grid__item { background: rgba(255, 255, 255, .92); backdrop-filter: blur(12px); padding: 2rem 1.5rem; text-align: center; transition: background .3s, transform .4s var(--ease-out); }
.stats-grid__item:hover { background: #fff; transform: translateY(-4px); }
.stats-grid__num { font-family: var(--f-serif); font-size: clamp(2rem, 4vw, 3rem); line-height: 1; background: var(--grad-accent); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stats-grid__label { margin-top: .6rem; font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--c-muted); }

/* Timeline processo */
.process { position: relative; }
.process__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; position: relative; }
.process__grid::before {
    content: ''; position: absolute; top: 34px; left: 12%; right: 12%; height: 2px;
    background: repeating-linear-gradient(90deg, var(--c-accent) 0 8px, transparent 8px 16px); opacity: .5;
}
.process__step { position: relative; text-align: center; padding: 0 .5rem; }
.process__num {
    width: 68px; height: 68px; margin: 0 auto 1.3rem; border-radius: 50%; display: grid; place-items: center;
    font-family: var(--f-mono); font-size: 1.25rem; color: #fff; background: var(--grad-brand);
    box-shadow: 0 0 0 8px rgba(232, 97, 42, .12), 0 16px 30px -12px rgba(15, 39, 64, .6);
    position: relative; z-index: 2; transition: transform .5s var(--ease-out), background .4s;
}
.process__step:hover .process__num { transform: scale(1.14) rotate(-6deg); background: var(--grad-accent); }
.process__step h3 { font-family: var(--f-sans); font-weight: 600; font-size: 1.1rem; margin-bottom: .5rem; }
.process__step p { font-size: .9rem; color: var(--c-muted); line-height: 1.7; }

/* Griglia Vantaggi ordinata (3 colonne bilanciate) */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
}

.feature-box {
    background: #ffffff;
    border: 1px solid rgba(26, 58, 92, .09);
    border-radius: 20px;
    padding: 2.25rem 2rem;
    box-shadow: 0 4px 20px -4px rgba(15, 39, 64, .06), 0 2px 6px -1px rgba(15, 39, 64, .04);
    transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out), border-color .3s;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.feature-box::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--grad-accent);
    opacity: 0;
    transition: opacity .35s ease;
}

.feature-box:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px -12px rgba(15, 39, 64, .14);
    border-color: rgba(232, 97, 42, .3);
}

.feature-box:hover::after {
    opacity: 1;
}

.feature-box__icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: transform .4s var(--ease-out);
}

.feature-box:hover .feature-box__icon {
    transform: scale(1.1) rotate(-4deg);
}

.feature-box__icon--brand {
    background: rgba(26, 58, 92, .08);
    color: var(--c-brand);
}

.feature-box__icon--accent {
    background: rgba(232, 97, 42, .12);
    color: var(--c-accent);
}

.feature-box h3 {
    font-family: var(--f-serif);
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--c-brand);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.feature-box p {
    font-size: 0.95rem;
    color: var(--c-muted);
    line-height: 1.75;
    margin: 0;
}

@media (max-width: 992px) {
    .features-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .features-grid { grid-template-columns: 1fr; }
}

/* Footer */
footer { background: radial-gradient(800px 300px at 90% 0%, rgba(232, 97, 42, .14), transparent 60%), var(--c-dark); position: relative; }
footer::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--grad-accent); }
.footer__col a { transition: color .3s, transform .3s var(--ease-out); }
.footer__col a:hover { transform: translateX(5px); color: #ffb27a; }

/* Back to top */
.to-top {
    position: fixed; right: 22px; bottom: 22px; width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer;
    background: var(--grad-accent); color: #fff; font-size: 1.1rem; z-index: 90; box-shadow: var(--shadow-glow);
    opacity: 0; transform: translateY(20px); pointer-events: none; transition: opacity .4s, transform .4s var(--ease-out);
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { transform: translateY(-4px); }

/* Responsive */
@media (max-width: 900px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .process__grid { grid-template-columns: repeat(2, 1fr); gap: 2.5rem 1rem; }
    .process__grid::before { display: none; }
    .bento { grid-template-columns: 1fr; }
    .bento__card--lg, .bento__card--md { grid-column: auto; }
    .hero__visual { display: block !important; max-width: 560px; margin-inline: auto; }
}
@media (max-width: 480px) { .hero-chip { font-size: .68rem; padding: 8px 12px; } .process__grid { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
    .animate-on-scroll { opacity: 1; transform: none; }
}

/* ---- Classi mancanti ---- */
.mb-16 { margin-bottom: var(--sp-16); }
.mt-10 { margin-top: var(--sp-10); }
.pt-6 { padding-top: var(--sp-6); }
.card--no-hover:hover { transform: none; box-shadow: none; }
.card { border-radius: 20px; box-shadow: 0 14px 40px -26px rgba(15,39,64,.4); }
.nav-content { display: flex; align-items: center; }
.footer__brand { min-width: 0; }
.content-formatted { max-width: 780px; margin-inline: auto; line-height: 1.85; color: var(--c-text); }
.content-formatted h2 { font-size: var(--t-2xl); margin: 2.2rem 0 .8rem; }
.content-formatted h3 { font-family: var(--f-sans); font-weight: 600; font-size: var(--t-lg); margin: 1.6rem 0 .6rem; }
.content-formatted p { margin-bottom: 1rem; color: var(--c-muted); }
.content-formatted ul { list-style: disc; padding-left: 1.4rem; margin-bottom: 1rem; color: var(--c-muted); }
.content-formatted ol { list-style: decimal; padding-left: 1.4rem; margin-bottom: 1rem; color: var(--c-muted); }
.content-formatted a { color: var(--c-accent-dk); text-decoration: underline; text-underline-offset: 3px; }
