:root {
    --bg: #0b1012;
    --bg-soft: #12191c;
    --surface: #171f22;
    --paper: #f1f0eb;
    --paper-2: #e8e6df;
    --text: #f4f4ef;
    --text-dark: #15191a;
    --muted: #99a3a6;
    --muted-dark: #596063;
    --green: #72b82d;
    --green-bright: #8bd63a;
    --orange: #ee7d19;
    --line: rgba(255,255,255,.12);
    --line-dark: rgba(10,20,22,.14);
    --radius: 4px;
    --container: min(1240px, calc(100% - 64px));
    --header-h: 82px;
    --ease: cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button { color: inherit; }
.container { width: var(--container); margin-inline: auto; }
.skip-link { position: fixed; left: 12px; top: -50px; z-index: 999; background: #fff; color: #000; padding: 10px 14px; }
.skip-link:focus { top: 12px; }

.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    height: var(--header-h);
    z-index: 100;
    border-bottom: 1px solid transparent;
    transition: background .3s ease, border-color .3s ease, backdrop-filter .3s ease;
}
.site-header.scrolled { background: rgba(11,16,18,.88); border-color: var(--line); backdrop-filter: blur(18px); }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { display: inline-flex; align-items: center; width: 164px; min-width: 164px; }
.brand img, .footer-brand img { width: 100%; max-height: 48px; object-fit: contain; object-position: left center; }
.main-nav { display: flex; align-items: center; gap: clamp(14px, 1.6vw, 26px); font-size: 13px; font-weight: 650; letter-spacing: .02em; }
.main-nav > a:not(.nav-cta) { color: #d9dddd; transition: color .2s ease; }
.main-nav > a:not(.nav-cta):hover { color: #fff; }
.nav-cta { border: 1px solid rgba(255,255,255,.4); padding: 13px 16px; transition: background .25s ease, color .25s ease, border-color .25s ease; }
.nav-cta:hover { background: var(--green-bright); border-color: var(--green-bright); color: #0c1209; }
.menu-toggle { display: none; appearance: none; background: transparent; border: 0; width: 42px; height: 42px; padding: 8px; cursor: pointer; }
.menu-toggle span { display: block; width: 100%; height: 2px; margin: 6px 0; background: #fff; transition: transform .25s ease, opacity .25s ease; }

.hero { position: relative; min-height: 100svh; display: flex; align-items: center; overflow: hidden; background: #090d0f; }
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: center; filter: saturate(.82) contrast(1.04); }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7,12,14,.94) 0%, rgba(7,12,14,.75) 43%, rgba(7,12,14,.2) 78%), linear-gradient(0deg, rgba(7,12,14,.7), transparent 46%); }
.hero-content { position: relative; z-index: 2; padding-top: 92px; }
.eyebrow { margin: 0 0 20px; color: var(--green-bright); font-size: 12px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.eyebrow.dark { color: #416a18; }
.hero h1 { max-width: 950px; margin: 0; font-size: clamp(50px, 7.2vw, 106px); line-height: .93; letter-spacing: -.055em; font-weight: 720; }
.hero h1 span { color: #b6bec0; font-weight: 430; }
.hero-lead { max-width: 680px; margin: 30px 0 0; color: #d4d9da; font-size: clamp(18px, 2vw, 25px); line-height: 1.45; font-weight: 360; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 14px; min-height: 52px; padding: 0 22px; border: 1px solid transparent; border-radius: 0; font-size: 14px; font-weight: 750; cursor: pointer; transition: transform .2s ease, background .2s ease, color .2s ease, border-color .2s ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--green-bright); color: #0b1206; }
.button-primary:hover { background: #9ae34c; }
.button-ghost { background: rgba(255,255,255,.03); border-color: rgba(255,255,255,.35); color: #fff; backdrop-filter: blur(5px); }
.button-ghost:hover { border-color: #fff; background: rgba(255,255,255,.1); }
.scroll-cue { position: absolute; z-index: 3; bottom: 34px; right: max(32px, calc((100vw - 1240px)/2)); display: flex; align-items: center; gap: 12px; color: rgba(255,255,255,.62); font-size: 10px; letter-spacing: .18em; }
.scroll-cue i { display: block; width: 60px; height: 1px; background: rgba(255,255,255,.5); position: relative; overflow: hidden; }
.scroll-cue i::after { content:""; position:absolute; inset:0; width: 50%; background:#fff; animation: scrollLine 1.7s infinite ease-in-out; }
@keyframes scrollLine { 0%{transform:translateX(-100%)} 100%{transform:translateX(220%)} }

.trust-strip { background: #11181b; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.trust-grid { display: grid; grid-template-columns: repeat(4,1fr); }
.trust-grid > div { min-height: 118px; padding: 28px 26px; display: flex; flex-direction: column; justify-content: center; border-right: 1px solid var(--line); }
.trust-grid > div:first-child { border-left: 1px solid var(--line); }
.trust-grid strong { font-size: 15px; letter-spacing: .04em; }
.trust-grid span { margin-top: 7px; color: var(--muted); font-size: 13px; }

.section { padding: 128px 0; }
.intro { background: var(--paper); color: var(--text-dark); }
.intro-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9vw; align-items: start; }
.section-heading h2 { margin: 0; font-size: clamp(38px, 5.1vw, 72px); line-height: 1.02; letter-spacing: -.045em; font-weight: 620; }
.section-heading-row { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(280px,.55fr); gap: 8vw; align-items: end; margin-bottom: 58px; }
.section-heading-row > p { margin: 0 0 7px; color: var(--muted); font-size: 16px; line-height: 1.65; }
.client-section .section-heading-row > p, .team-section .section-heading-row > p { color: var(--muted-dark); }
.intro-copy { padding-top: 4px; }
.intro-copy p { color: #4d5557; font-size: 17px; line-height: 1.7; }
.intro-copy .lead { margin-top: 0; color: #202627; font-size: clamp(22px, 2.5vw, 31px); line-height: 1.42; letter-spacing: -.015em; }
.text-link { display: inline-flex; gap: 14px; align-items: center; margin-top: 20px; padding-bottom: 5px; border-bottom: 1px solid currentColor; font-weight: 750; font-size: 14px; }

.competencies { background: var(--bg); }
.competence-grid { display: grid; grid-template-columns: repeat(3,1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.competence-card { min-width: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #0d1315; }
.competence-image { position: relative; aspect-ratio: 16/10; overflow: hidden; background:#151d20; }
.competence-image img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.15) brightness(.75); transition: transform .7s var(--ease), filter .5s ease; }
.competence-card:hover .competence-image img { transform: scale(1.045); filter: grayscale(0) brightness(.9); }
.competence-number { position:absolute; top:18px; right:20px; width:42px; height:42px; display:grid; place-items:center; background:rgba(11,16,18,.82); border:1px solid var(--line); font-size:11px; font-weight:800; }
.competence-body { padding: 30px 28px 34px; }
.card-eyebrow { color: var(--green-bright); text-transform: uppercase; font-size: 10px; font-weight: 800; letter-spacing: .16em; }
.competence-body h3 { margin: 11px 0 15px; font-size: 25px; letter-spacing: -.025em; }
.competence-body p { margin: 0; min-height: 92px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.tag-list { display:flex; flex-wrap:wrap; gap:7px; margin-top: 24px; }
.tag-list span { padding:6px 8px; border:1px solid var(--line); color:#c7cdcf; font-size:10px; text-transform:uppercase; letter-spacing:.07em; }

.feature { display: grid; grid-template-columns: 1fr 1fr; min-height: 690px; }
.feature-media { min-height: 590px; overflow: hidden; }
.feature-media img { width:100%; height:100%; object-fit:cover; }
.feature-copy { padding: clamp(70px,9vw,145px) max(7vw,60px); display:flex; flex-direction:column; justify-content:center; }
.feature-copy h2 { margin: 0; font-size: clamp(44px,5.4vw,76px); line-height:1.02; letter-spacing:-.045em; font-weight:620; }
.feature-copy > p:not(.eyebrow) { max-width: 650px; color:var(--muted); font-size:17px; line-height:1.72; }
.feature-dark { background:#12191c; }
.feature-light { background:var(--paper-2); color:var(--text-dark); }
.feature-light .feature-copy > p:not(.eyebrow) { color:#586164; }
.feature-copy > .button { align-self:flex-start; margin-top:34px; }

/* Pagina "non trovata" (404.php) */
.error-hero { min-height:72vh; display:flex; align-items:center; padding:160px 0 110px; background:#0c1113; }
.error-hero h1 { margin:0 0 22px; font-size:clamp(44px,6vw,84px); line-height:1.02; letter-spacing:-.045em; font-weight:620; }
.error-lead { max-width:560px; margin:0 0 38px; color:var(--muted); font-size:18px; line-height:1.65; }
.inline-list { list-style:none; display:flex; flex-wrap:wrap; gap:9px; padding:0; margin:24px 0 0; }
.inline-list li { padding:8px 10px; border:1px solid var(--line); color:#d5d9da; font-size:11px; font-weight:700; letter-spacing:.05em; text-transform:uppercase; }
.dark-list li { border-color:var(--line-dark); color:#394042; }

.process-section { background: var(--paper); color:var(--text-dark); }
.process-grid { list-style:none; display:grid; grid-template-columns:repeat(6,1fr); padding:0; margin:58px 0 0; border-top:1px solid var(--line-dark); border-left:1px solid var(--line-dark); }
.process-grid li { min-height:235px; padding:26px 20px; border-right:1px solid var(--line-dark); border-bottom:1px solid var(--line-dark); }
.process-grid span { display:block; color:#596063; font-size:11px; margin-bottom:68px; }
.process-grid strong { display:block; font-size:19px; }
.process-grid p { color:#596063; font-size:12px; line-height:1.55; }

.tech-section { background:#101719; }
.technology-list { display:grid; grid-template-columns:repeat(4,1fr); border-top:1px solid var(--line); border-left:1px solid var(--line); }
.technology-list span { min-height:104px; display:flex; align-items:center; padding:24px; border-right:1px solid var(--line); border-bottom:1px solid var(--line); font-size:18px; font-weight:650; letter-spacing:-.01em; }
.technology-list span::before { content:""; width:7px; height:7px; margin-right:13px; background:var(--green-bright); border-radius:50%; }

.industries { background:var(--paper); color:var(--text-dark); }
.industry-grid { display:grid; grid-template-columns:repeat(3,1fr); margin-top:58px; border-top:1px solid var(--line-dark); border-left:1px solid var(--line-dark); }
.industry-card { position:relative; min-height:230px; display:flex; flex-direction:column; justify-content:flex-end; padding:28px; border-right:1px solid var(--line-dark); border-bottom:1px solid var(--line-dark); overflow:hidden; }
.industry-card > span { position:absolute; top:22px; left:24px; color:#596063; font-size:11px; }
.industry-card img { position:absolute; right:16px; top:22px; width:95px; height:95px; object-fit:contain; opacity:.75; filter:grayscale(1); transition:transform .4s var(--ease), filter .3s ease, opacity .3s ease; }
.industry-card:hover img { transform:translateY(-5px) scale(1.05); filter:grayscale(0); opacity:1; }
.industry-card h3 { position:relative; margin:0; font-size:25px; letter-spacing:-.025em; }

.client-section { background:#dedcd4; color:var(--text-dark); }

/* Scorrimento continuo loghi: i contenuti reali restano generati da PHP/JSON.
   JavaScript duplica solo il gruppo per rendere il loop continuo. */
.logo-marquee {
    position:relative;
    width:100%;
    overflow:hidden;
    scrollbar-width:none;
    -ms-overflow-style:none;
    touch-action:pan-y;
}
.logo-marquee::-webkit-scrollbar { display:none; }
 .logo-marquee-track {
    display:flex;
    width:max-content;
    min-width:100%;
    transform:translate3d(0,0,0);
    will-change:transform;
    backface-visibility:hidden;
    -webkit-backface-visibility:hidden;
}
.logo-marquee-track.is-marquee-ready {
    animation:miraiLogoMarquee var(--marquee-duration, 30s) linear infinite;
}
.logo-marquee-track.is-marquee-paused {
    animation-play-state:paused;
}
.logo-marquee-group { display:flex; flex:none; min-width:max-content; }
@keyframes miraiLogoMarquee {
    from { transform:translate3d(0,0,0); }
    to { transform:translate3d(calc(-1 * var(--marquee-distance)),0,0); }
}

.client-marquee {
    border-top:1px solid rgba(0,0,0,.12);
    border-left:1px solid rgba(0,0,0,.12);
    border-bottom:1px solid rgba(0,0,0,.12);
}
.logo-card {
    flex:0 0 clamp(175px, 16.5vw, 220px);
    width:clamp(175px, 16.5vw, 220px);
    height:130px;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:24px;
    background:rgba(255,255,255,.42);
    border-right:1px solid rgba(0,0,0,.12);
}
.logo-card img { max-width:100%; max-height:55px; object-fit:contain; /* filter:grayscale(1); opacity:.7; */ transition:filter .25s ease, opacity .25s ease, transform .25s ease; }
.logo-card:hover img { filter:grayscale(0); opacity:1; transform:scale(1.04); }

.partner-section { background:#0e1416; }
.partner-marquee {
    margin-top:58px;
    border-top:1px solid var(--line);
    border-left:1px solid var(--line);
    border-bottom:1px solid var(--line);
}
.partner-card {
    flex:0 0 clamp(190px, 20vw, 248px);
    width:clamp(190px, 20vw, 248px);
    height:150px;
    padding:30px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-right:1px solid var(--line);
    background:#12191c;
    transition:background .25s ease;
}
.partner-card:hover { background:#7a7e80; }
.partner-card img { max-width:100%; max-height:58px; object-fit:contain; /*filter:grayscale(1) brightness(1.8); opacity:.72;*/ transition:filter .25s ease, opacity .25s ease; }
.partner-card:hover img { filter:none; opacity:1; }

.logo-marquee {
    -webkit-mask-image:linear-gradient(90deg,transparent 0,#000 28px,#000 calc(100% - 28px),transparent 100%);
    mask-image:linear-gradient(90deg,transparent 0,#000 28px,#000 calc(100% - 28px),transparent 100%);
}

.team-section { background:var(--paper); color:var(--text-dark); }
.team-groups { display:flex; flex-direction:column; gap:48px; }
.team-group-heading {
    display:flex;
    align-items:baseline;
    gap:14px;
    margin-bottom:16px;
    padding-bottom:12px;
    border-bottom:1px solid var(--line-dark);
}
.team-group-heading span {
    color:#596063;
    font-size:11px;
    font-weight:800;
    letter-spacing:.12em;
}
.team-group-heading h3 {
    margin:0;
    font-size:24px;
    line-height:1.1;
    letter-spacing:-.02em;
}
.team-grid { display:grid; grid-template-columns:repeat(6,1fr); gap:10px; }
.team-card { background:var(--paper); border:1px solid var(--line-dark); }
.team-photo { aspect-ratio:4/3; overflow:hidden; background:#c9c7c0; }
.team-photo img { width:100%; height:100%; object-fit:cover; object-position:center; filter:grayscale(.2); transition:transform .6s var(--ease), filter .3s ease; }
.team-card:hover img { transform:scale(1.035); filter:grayscale(0); }
.team-info { padding:22px 22px 25px; }
.team-info h3 { margin:0; font-size:20px; }
.team-info p { margin:6px 0 0; color:var(--muted-dark); font-size:13px; }
.section-action { margin-top:30px; }

.career-cta { padding:105px 0; background:#142016; border-top:1px solid rgba(139,214,58,.25); border-bottom:1px solid rgba(139,214,58,.25); }
.career-inner { display:grid; grid-template-columns:1.2fr .8fr; gap:9vw; align-items:end; }
.career-inner h2 { margin:0; font-size:clamp(42px,5.1vw,70px); line-height:1.02; letter-spacing:-.045em; }
.career-inner > div:last-child p { margin:0 0 26px; color:#b6c0b7; line-height:1.65; }

.contact-section { padding:128px 0; background:#0b1012; }
.contact-grid { display:grid; grid-template-columns:.9fr 1.1fr; gap:9vw; }
.contact-copy h2 { margin:0; font-size:clamp(48px,6vw,82px); line-height:.98; letter-spacing:-.05em; }
.contact-copy > p:not(.eyebrow) { color:var(--muted); max-width:560px; font-size:17px; line-height:1.7; }
.contact-details { display:grid; grid-template-columns:1fr 1fr; gap:28px 36px; margin-top:54px; }
.contact-details div { display:flex; flex-direction:column; align-items:flex-start; gap:6px; }
.contact-details span { color:#7b8587; font-size:10px; letter-spacing:.15em; text-transform:uppercase; font-weight:800; }
.contact-details strong, .contact-details a { font-size:14px; line-height:1.6; font-weight:600; }
.contact-details a:hover { color:var(--green-bright); }

.contact-form { position:relative; display:flex; flex-direction:column; gap:22px; padding:42px; background:#12191c; border:1px solid var(--line); }
.form-row { display:grid; grid-template-columns:1fr 1fr; gap:18px; }
.contact-form label { display:flex; flex-direction:column; gap:9px; color:#b6bec0; font-size:11px; text-transform:uppercase; letter-spacing:.08em; font-weight:750; }
.contact-form input, .contact-form textarea { width:100%; background:#0e1416; color:#fff; border:1px solid rgba(255,255,255,.16); border-radius:0; padding:14px 14px; outline:none; transition:border-color .2s ease, background .2s ease; }
.contact-form textarea { resize:vertical; min-height:155px; }
.contact-form input:focus, .contact-form textarea:focus { border-color:var(--green-bright); background:#10181a; }
.privacy-check { flex-direction:row !important; align-items:flex-start; text-transform:none !important; letter-spacing:0 !important; font-size:12px !important; line-height:1.5; font-weight:500 !important; }
.privacy-check input { width:17px; height:17px; margin:1px 7px 0 0; flex:0 0 auto; accent-color:var(--green-bright); }
.privacy-check a { text-decoration:underline; }
.submit-button { align-self:flex-start; border:0; }
.submit-button[disabled] { opacity:.6; cursor:wait; transform:none; }
.form-status { display:none; padding:12px 14px; font-size:13px; line-height:1.45; border:1px solid transparent; }
.form-status.success { display:block; color:#dff8c7; background:rgba(113,184,45,.12); border-color:rgba(139,214,58,.35); }
.form-status.error { display:block; color:#ffd6c2; background:rgba(238,125,25,.1); border-color:rgba(238,125,25,.42); }
.honeypot { position:absolute; left:-10000px; width:1px; height:1px; overflow:hidden; }


/* =========================================
   MAPPA / COME RAGGIUNGERCI
   ========================================= */

.contact-map {
    width: var(--container);
    margin: 70px auto 0;
    display: grid;
    grid-template-columns: minmax(260px, .65fr) minmax(0, 1.35fr);
    border: 1px solid var(--line);
    background: #101719;
}

.contact-map-heading {
    min-width: 0;
    padding: 42px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-map-heading > span {
    color: var(--green-bright);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.contact-map-heading h3 {
    margin: 12px 0 14px;
    font-size: 32px;
    letter-spacing: -.03em;
}

.contact-map-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
}

.contact-map-heading .text-link {
    align-self: flex-start;
    color: #dce1e2;
}

.map-frame {
    min-width: 0;
    min-height: 420px;
    overflow: hidden;
    background: #151d20;
}

.map-placeholder {
    height: 100%;
    min-height: inherit;
    padding: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    text-align: center;
}

.map-placeholder p {
    max-width: 360px;
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

.map-frame iframe {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 420px;
    border: 0;
    filter: grayscale(.2) contrast(1.02);
}

.site-footer { background:#080c0d; border-top:1px solid var(--line); }
.footer-top { padding:70px 0 58px; display:grid; grid-template-columns:.8fr 1.2fr; gap:8vw; }
.footer-brand { width:190px; }
.footer-brand p { color:#798386; font-size:12px; letter-spacing:.06em; }
.footer-brochure {
    display:inline-flex;
    align-items:center;
    justify-content:space-between;
    gap:18px;
    width:100%;
    margin-top:18px;
    padding:11px 13px;
    border:1px solid rgba(255,255,255,.18);
    color:#d5dbdc;
    font-size:12px;
    font-weight:750;
    letter-spacing:.02em;
    transition:background .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}
.footer-brochure:hover {
    background:rgba(139,214,58,.08);
    border-color:var(--green-bright);
    color:var(--green-bright);
    transform:translateY(-1px);
}
.footer-social {
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    gap:9px;
    margin-top:17px;
}
.footer-social a {
    width:34px;
    height:34px;
    display:grid;
    place-items:center;
    border:1px solid rgba(255,255,255,.14);
    background:#0d1214;
    transition:border-color .2s ease, background .2s ease, transform .2s ease;
}
.footer-social a:hover {
    border-color:var(--green-bright);
    background:#121a1c;
    transform:translateY(-2px);
}
.footer-social img {
    width:18px;
    height:18px;
    object-fit:contain;
}
.footer-nav { display:grid; grid-template-columns:repeat(3,1fr); gap:38px; }
.footer-nav > div { display:flex; flex-direction:column; align-items:flex-start; gap:10px; }
.footer-nav span { margin-bottom:6px; color:#7b8587; font-size:10px; letter-spacing:.15em; text-transform:uppercase; font-weight:800; }
.footer-nav a, .footer-nav p { margin:0; color:#c6ccce; font-size:13px; line-height:1.6; }
.footer-nav a:hover { color:var(--green-bright); }
.footer-bottom { padding:20px 0; display:flex; justify-content:space-between; border-top:1px solid var(--line); color:#7b8587; font-size:11px; }
.footer-bottom p { margin:0; }

/* Gli elementi partono nascosti solo se JavaScript è attivo (classe "js" su <html>, vedi layout.php):
   senza JS i contenuti restano visibili. */
.js .reveal { opacity:0; transform:translateY(24px); transition:opacity .75s var(--ease), transform .75s var(--ease); }
.js .reveal.is-visible { opacity:1; transform:none; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior:auto; }
    *, *::before, *::after { animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; }
    .js .reveal { opacity:1; transform:none; }

    /* Test carosello: resta volutamente attivo anche con Reduced Motion,
       per escludere qualsiasi stop esterno durante la diagnosi. */
    .logo-marquee-track.is-marquee-ready {
        animation-duration:var(--marquee-duration, 30s) !important;
        animation-iteration-count:infinite !important;
    }
    .logo-marquee-track.is-marquee-paused {
        animation-play-state:paused !important;
    }
}

@media (max-width: 1120px) {
    :root { --container: min(100% - 42px, 1050px); }
    .main-nav { gap:14px; font-size:12px; }
    .nav-cta { display:none; }
    .competence-grid { grid-template-columns:repeat(2,1fr); }
    .process-grid { grid-template-columns:repeat(3,1fr); }
    .technology-list { grid-template-columns:repeat(2,1fr); }
}

@media (max-width: 820px) {
    :root { --header-h:72px; --container:calc(100% - 32px); }
    .site-header { background:rgba(11,16,18,.82); backdrop-filter:blur(16px); }
    .brand { width:145px; min-width:145px; }
    .menu-toggle { display:block; z-index:102; }
    .menu-toggle.open span:nth-child(1) { transform:translateY(8px) rotate(45deg); }
    .menu-toggle.open span:nth-child(2) { opacity:0; }
    .menu-toggle.open span:nth-child(3) { transform:translateY(-8px) rotate(-45deg); }
    .main-nav { position:fixed; inset:0; z-index:101; background:#0b1012; padding:110px 28px 400px; display:flex; flex-direction:column; align-items:flex-start; gap:0; transform:translateX(100%); transition:transform .35s var(--ease); overflow:auto; }
    .main-nav.open { transform:none; }
    .main-nav > a:not(.nav-cta) { width:100%; padding:16px 0; border-bottom:1px solid var(--line); font-size:14px; letter-spacing:-.02em; }
    .nav-cta { display:inline-flex; margin-top:30px; }
    body.menu-open { overflow:hidden; }

    .hero { min-height:800px; }
    .hero-overlay { background:linear-gradient(0deg, rgba(7,12,14,.92) 0%, rgba(7,12,14,.68) 58%, rgba(7,12,14,.3) 100%); }
    .hero-media img { object-position:60% center; }
    .hero h1 { font-size:clamp(48px,12vw,78px); }
    .hero-lead { font-size:18px; max-width:580px; }
    .scroll-cue { right:16px; bottom:22px; }
    .trust-grid { grid-template-columns:1fr 1fr; }
    .trust-grid > div { border-bottom:1px solid var(--line); }
    .trust-grid > div:first-child { border-left:0; }
    .section { padding:90px 0; }
    .intro-grid, .section-heading-row, .career-inner, .contact-grid { grid-template-columns:1fr; gap:42px; }
    .section-heading-row { margin-bottom:42px; }
    .feature { grid-template-columns:1fr; min-height:0; }
    .feature-light .feature-copy { order:2; }
    .feature-light .feature-media { order:1; }
    .feature-media { min-height:450px; }
    .feature-copy { padding:72px 32px; }
    .industry-grid { grid-template-columns:repeat(2,1fr); }
    .team-groups { gap:38px; }
    .team-grid { grid-template-columns:repeat(2,1fr); }
    .contact-form { padding:30px; }
    .footer-top { grid-template-columns:1fr; gap:45px; }
}

@media (max-width: 560px) {
    :root { --container:calc(100% - 24px); }
    .hero { min-height:760px; }
    .hero-content { padding-top:70px; }
    .hero h1 { font-size:clamp(45px,13.5vw,68px); }
    .hero-actions { flex-direction:column; align-items:stretch; }
    .button { width:100%; }
    .scroll-cue { display:none; }
    .trust-grid { grid-template-columns:1fr; }
    .trust-grid > div { min-height:90px; padding:20px 8px; }
    .section { padding:72px 0; }
    .competence-grid { grid-template-columns:1fr; }
    .competence-body p { min-height:0; }
    .feature-media { min-height:320px; }
    .feature-copy { padding:58px 22px; }
    .process-grid { grid-template-columns:1fr 1fr; }
    .process-grid li { min-height:200px; }
    .process-grid span { margin-bottom:46px; }
    .technology-list { grid-template-columns:1fr 1fr; }
    .technology-list span { min-height:86px; padding:18px 14px; font-size:15px; }
    .industry-grid { grid-template-columns:1fr; }
    .industry-card { min-height:190px; }
    .logo-card { flex-basis:155px; width:155px; height:105px; padding:17px; }
    .partner-card { flex-basis:170px; width:170px; height:115px; padding:18px; }
    .logo-marquee { -webkit-mask-image:linear-gradient(90deg,transparent 0,#000 16px,#000 calc(100% - 16px),transparent 100%); mask-image:linear-gradient(90deg,transparent 0,#000 16px,#000 calc(100% - 16px),transparent 100%); }
    .team-group-heading h3 { font-size:21px; }
    .team-grid { grid-template-columns:1fr; }
    .career-cta { padding:72px 0; }
    .contact-details { grid-template-columns:1fr; gap:22px; }
    .contact-form { padding:22px 18px; }
    .form-row { grid-template-columns:1fr; }
    .footer-nav { grid-template-columns:1fr; }
    .footer-bottom { flex-direction:column; gap:10px; }
}

/* ===== v2.2 · Language switcher ===== */
.language-switcher {
    position: relative;
    flex: 0 0 auto;
    z-index: 120;
}
.language-current {
    appearance: none;
    border: 1px solid rgba(255,255,255,.14);
    background: rgba(255,255,255,.045);
    color: #fff;
    min-height: 38px;
    padding: 6px 10px 6px 8px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .06em;
    transition: border-color .2s ease, background .2s ease;
}
.language-current:hover,
.language-current[aria-expanded="true"] {
    border-color: rgba(255,255,255,.34);
    background: rgba(255,255,255,.09);
}
.language-current:focus-visible,
.language-option:focus-visible {
    outline: 2px solid var(--green-bright);
    outline-offset: 2px;
}
.language-current img,
.language-option img {
    width: 22px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(255,255,255,.12);
}
.language-chevron {
    color: rgba(255,255,255,.62);
    font-size: 13px;
    line-height: 1;
    transform: translateY(-1px);
}
.language-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 178px;
    padding: 7px;
    border: 1px solid rgba(255,255,255,.11);
    border-radius: 10px;
    background: rgba(12,17,19,.98);
    box-shadow: 0 18px 45px rgba(0,0,0,.35);
    backdrop-filter: blur(14px);
}
.language-dropdown[hidden] { display: none; }
.language-option {
    appearance: none;
    width: 100%;
    border: 0;
    background: transparent;
    color: rgba(255,255,255,.75);
    padding: 9px 10px;
    border-radius: 7px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    text-decoration: none;
    font-size: 12px;
    font-weight: 650;
    transition: background .18s ease, color .18s ease;
}
.language-option:hover,
.language-option.is-active {
    color: #fff;
    background: rgba(255,255,255,.075);
}
.language-option.is-active::after {
    content: '✓';
    margin-left: auto;
    color: var(--green-bright);
    font-size: 12px;
}

/* ===== v2.1 · Company counters ===== */
.stats-strip {
    background: var(--paper);
    color: var(--text-dark);
    border-bottom: 1px solid var(--line-dark);
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-left: 1px solid var(--line-dark);
}
.stat-item {
    min-height: 170px;
    padding: 30px 28px 27px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-right: 1px solid var(--line-dark);
}
.stat-number {
    display: block;
    color: #14191a;
    font-size: clamp(48px, 5.2vw, 76px);
    line-height: .95;
    letter-spacing: -.055em;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
}
.stat-item span {
    margin-top: 13px;
    color: var(--muted-dark);
    font-size: 12px;
    font-weight: 750;
    letter-spacing: .08em;
    text-transform: uppercase;
}

@media (max-width: 1120px) {
    .language-switcher { margin-left: 4px; }
}

@media (max-width: 820px) {
    .header-inner { gap: 12px; }
    .language-switcher { margin-left: auto; z-index: 103; }
    .menu-toggle { margin-left: 2px; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .stat-item { min-height: 145px; }
}

@media (max-width: 560px) {
    .language-current { padding: 6px 8px; }
    .language-current .language-code { display: none; }
    .language-dropdown { width: 168px; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .stat-item { min-height: 125px; padding: 23px 18px; }
    .stat-number { font-size: clamp(42px, 13vw, 58px); }
    .stat-item span { margin-top: 9px; font-size: 10px; line-height: 1.4; }
}


@media (max-width: 820px) {
    .contact-map {
        grid-template-columns: 1fr;
        margin-top: 45px;
    }

    .contact-map-heading {
        padding: 28px 24px;
    }

    .contact-map-heading h3 {
        font-size: 26px;
    }

    .map-frame,
    .map-frame iframe {
        min-height: 330px;
    }
}

