/* ==========================================================
   NEXT Software Suite — pagina prodotti
   Token dal brand book "NEXT Visual Identity & Icon Design System" v1.0
   ========================================================== */

:root {
    /* Corporate */
    --navy: #0B2545;
    --navy-900: #071A33;
    --navy-800: #0E2D52;
    --primary: #0066FF;
    --accent: #1688F5;
    --ice: #E6E9EF;
    --white: #FFFFFF;
    --paper: #F7F9FC;
    --text: #10243E;
    --muted: #66758A;
    --stroke: #D8E0E9;

    /* Famiglia prodotti: colore guida + inchiostro per testi su chiaro */
    --control: #E43A45;  --control-ink: #C21F2C;
    --cut: #0066FF;      --cut-ink: #0057D9;
    --frame: #F58220;    --frame-ink: #B4560A;
    --drill: #18A968;    --drill-ink: #0E7A4A;
    --manager: #E8AE1E;  --manager-ink: #8A6100;

    --font-head: 'Manrope', 'Inter', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

    --radius: 14px;
    --shadow: 0 1px 2px rgba(11, 37, 69, .06), 0 12px 32px -12px rgba(11, 37, 69, .18);
    --shadow-dark: 0 24px 60px -20px rgba(0, 0, 0, .6);
    --header-h: 72px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.6;
    color: var(--text);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
ul, ol { list-style: none; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }

.skip {
    position: absolute; left: 16px; top: -60px; z-index: 200;
    background: var(--primary); color: #fff; padding: 10px 16px; border-radius: 8px; text-decoration: none;
}
.skip:focus { top: 12px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, h4 { font-family: var(--font-head); letter-spacing: -0.02em; line-height: 1.12; }

.eyebrow {
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--primary);
    display: inline-flex; align-items: center; gap: 10px;
    margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; }
.eyebrow--light { color: #6FB1FF; }

/* ---------- Bottoni ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 14px 24px; border-radius: 10px;
    font-weight: 600; font-size: 16px; text-decoration: none;
    transition: background-color .2s, border-color .2s, color .2s, transform .2s;
    white-space: nowrap;
}
.btn--sm { padding: 10px 16px; font-size: 14px; }
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: #0052cc; transform: translateY(-1px); }
.btn--ghost { color: #fff; border: 1px solid rgba(255,255,255,.28); }
.btn--ghost:hover { border-color: #fff; background: rgba(255,255,255,.06); }

/* ---------- Simbolo N ---------- */
.n { display: block; --n-post: var(--navy); --n-accent: var(--p, var(--primary)); --n-cut: var(--white); }
.n--tile { width: 100%; height: 100%; --n-post: #E9EEF5; --n-cut: var(--navy); }
.n--mini { width: 34px; height: 34px; flex: none; --n-post: #DCE5F0; --n-cut: var(--navy-900); }
.n--chip { width: 22px; height: 22px; flex: none; --n-cut: var(--white); }
.n--product {
    width: 88px; height: 88px; flex: none;
    padding: 14px; border-radius: 22px;
    background: var(--navy); --n-post: #E9EEF5; --n-cut: var(--navy);
    box-shadow: var(--shadow);
}
.n--mono { width: 100%; height: auto; --n-post: rgba(255,255,255,.85); --n-accent: rgba(255,255,255,.85); --n-cut: var(--navy-900); }
.n--mono.n--next { --n-accent: var(--primary); }

/* ---------- Header ---------- */
.nx-header {
    position: fixed; inset: 0 0 auto 0; z-index: 100;
    height: var(--header-h);
    background: rgba(7, 26, 51, .72);
    backdrop-filter: saturate(140%) blur(14px);
    -webkit-backdrop-filter: saturate(140%) blur(14px);
    border-bottom: 1px solid rgba(255,255,255,.06);
    transition: background-color .25s;
}
.nx-header.is-scrolled { background: rgba(7, 26, 51, .94); }
.nx-header__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.nx-brand img { width: 128px; height: auto; }

.nx-nav { display: flex; align-items: center; gap: 28px; }
.nx-nav ul { display: flex; gap: 4px; }
.nx-nav ul a {
    display: block; padding: 8px 12px; border-radius: 8px;
    color: rgba(255,255,255,.78); text-decoration: none; font-size: 15px; font-weight: 500;
    position: relative;
}
.nx-nav ul a::after {
    content: ""; position: absolute; left: 12px; right: 12px; bottom: 3px; height: 2px;
    background: var(--c, var(--accent)); transform: scaleX(0); transform-origin: left; transition: transform .25s;
}
.nx-nav ul a:hover, .nx-nav ul a.is-current { color: #fff; }
.nx-nav ul a:hover::after, .nx-nav ul a.is-current::after { transform: scaleX(1); }
.nx-nav__cta { display: flex; align-items: center; gap: 16px; }
.nx-link-back { color: rgba(255,255,255,.6); font-size: 14px; text-decoration: none; }
.nx-link-back:hover { color: #fff; }

.nx-burger { display: none; width: 44px; height: 44px; position: relative; }
.nx-burger span { position: absolute; left: 11px; right: 11px; height: 2px; background: #fff; transition: transform .25s, opacity .25s; }
.nx-burger span:nth-child(1) { top: 15px; }
.nx-burger span:nth-child(2) { top: 21px; }
.nx-burger span:nth-child(3) { top: 27px; }
.nx-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nx-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nx-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
    position: relative; overflow: hidden;
    background: radial-gradient(1200px 600px at 78% 20%, #13396b 0%, transparent 60%), var(--navy-900);
    color: #fff;
    padding: calc(var(--header-h) + 72px) 0 56px;
}
.hero__grid {
    position: absolute; inset: 0; pointer-events: none;
    background-image:
        linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse at 70% 30%, #000 0%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at 70% 30%, #000 0%, transparent 70%);
}
.hero__inner { position: relative; display: grid; grid-template-columns: 1fr 1.15fr; gap: 64px; align-items: center; }
.hero h1 { font-size: clamp(40px, 5.2vw, 64px); font-weight: 800; margin-bottom: 22px; }
.hero h1 span { color: #6FB1FF; display: block; }
.hero__lead { font-size: 19px; color: rgba(255,255,255,.76); max-width: 540px; margin-bottom: 32px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__facts { display: flex; gap: 36px; margin-top: 44px; padding-top: 28px; border-top: 1px solid rgba(255,255,255,.12); }
.hero__facts li { display: flex; align-items: center; gap: 12px; }
.hero__facts strong { font-family: var(--font-head); font-size: 34px; font-weight: 800; color: #fff; }
.hero__facts span { font-size: 13px; line-height: 1.35; color: rgba(255,255,255,.62); }

.hero__visual { position: relative; padding: 24px 0 56px 32px; }
.screen { border-radius: 12px; overflow: hidden; background: #0d1626; box-shadow: var(--shadow-dark); border: 1px solid rgba(255,255,255,.1); }
.screen__bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; background: #142238; font-size: 12px; color: rgba(255,255,255,.55); }
.screen__bar i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.18); }
.screen__bar span { margin-left: 10px; font-family: var(--font-mono); }
.screen--float { position: absolute; width: 46%; border-radius: 10px; }
.screen--a { left: -6px; bottom: 0; transform: rotate(-2deg); }
.screen--b { right: -24px; bottom: -18px; width: 40%; transform: rotate(2deg); }
.hero__tile {
    position: absolute; top: -8px; right: -14px; width: 104px; height: 104px;
    padding: 16px; border-radius: 26px; background: var(--navy);
    border: 1px solid rgba(255,255,255,.14); box-shadow: var(--shadow-dark);
}

.hero__strip {
    position: relative; margin-top: 56px;
    display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px;
    background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.1); border-radius: var(--radius); overflow: hidden;
}
.hero__strip a {
    display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center;
    padding: 18px; background: var(--navy-900);
    text-decoration: none; font-family: var(--font-head); font-weight: 700; font-size: 15px; letter-spacing: .02em;
    position: relative; transition: background-color .2s;
}
.hero__strip a svg { grid-row: span 2; }
.hero__strip small { font-family: var(--font-body); font-weight: 400; font-size: 13px; color: rgba(255,255,255,.55); letter-spacing: 0; }
.hero__strip a::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--p); transform: scaleX(0); transition: transform .25s; transform-origin: left; }
.hero__strip a:hover { background: #0c2244; }
.hero__strip a:hover::before { transform: scaleX(1); }

/* ---------- Sezioni generiche ---------- */
.section { padding: 112px 0; }
.section--paper { background: var(--paper); }
.section__head { max-width: 760px; margin-bottom: 56px; }
.section__head h2 { font-size: clamp(30px, 3.6vw, 44px); font-weight: 800; color: var(--navy); margin-bottom: 18px; }
.section__head p { color: var(--muted); font-size: 18px; }

/* Flusso */
.flow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: s; position: relative; }
.flow__step {
    background: #fff; border: 1px solid var(--stroke); border-radius: var(--radius);
    padding: 32px; position: relative; box-shadow: 0 1px 2px rgba(11,37,69,.04);
}
.flow__step:not(:last-child)::after {
    content: ""; position: absolute; top: 50px; right: -25px; width: 26px; height: 2px;
    background: repeating-linear-gradient(90deg, var(--stroke) 0 6px, transparent 6px 10px);
}
.flow__num { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.flow__step h3 { font-size: 26px; color: var(--navy); margin: 8px 0 10px; }
.flow__step p { color: var(--muted); font-size: 16px; margin-bottom: 22px; }
.flow__apps { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 7px 12px 7px 8px; border-radius: 999px;
    border: 1px solid var(--stroke); background: var(--paper);
    text-decoration: none; font-size: 13px; font-weight: 700; letter-spacing: .03em; color: var(--navy);
    transition: border-color .2s, background-color .2s;
}
.chip:hover { border-color: var(--p); background: #fff; }

/* ---------- Prodotti ---------- */
.product { padding: 112px 0; position: relative; background: #fff; }
.product::before { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 4px; background: linear-gradient(90deg, var(--p) 0 120px, transparent 120px); }
.product--dark { background: var(--navy-900); color: #fff; }
.product__head { display: flex; align-items: center; gap: 24px; margin-bottom: 48px; }
.product__cat {
    font-family: var(--font-mono); font-size: 13px; letter-spacing: .08em; text-transform: uppercase;
    color: var(--p-ink); margin-bottom: 6px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.product--dark .product__cat { color: var(--p); }
.badge {
    font-style: normal; font-size: 11px; padding: 3px 8px; border-radius: 999px;
    background: color-mix(in srgb, var(--p) 16%, transparent); color: inherit; border: 1px solid color-mix(in srgb, var(--p) 40%, transparent);
}
.wordmark { font-size: clamp(38px, 5vw, 60px); font-weight: 800; letter-spacing: -0.01em; color: var(--navy); line-height: 1; }
.wordmark span { color: var(--p); }
.product--dark .wordmark { color: #fff; }
#cut .wordmark span, #drill .wordmark span { color: var(--p-ink); }
#manager .wordmark span, #frame .wordmark span { color: var(--p); }
.product--dark .n--product { background: #0f2a4f; --n-cut: #0f2a4f; border: 1px solid rgba(255,255,255,.1); }

.product__body { display: grid; grid-template-columns: 1fr 1.35fr; gap: 64px; align-items: start; }
.product__body--rev .product__text { order: 2; }
.product__text h3 { font-size: 28px; font-weight: 700; margin-bottom: 16px; color: var(--navy); }
.product--dark .product__text h3 { color: #fff; }
.product__text > p { color: var(--muted); margin-bottom: 26px; }
.product--dark .product__text > p { color: rgba(255,255,255,.7); }

.ticks { display: grid; gap: 12px; margin-bottom: 28px; }
.ticks li { position: relative; padding-left: 30px; font-size: 16px; }
.ticks li::before {
    content: ""; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 5px;
    background: color-mix(in srgb, var(--p) 14%, transparent);
}
.ticks li::after {
    content: ""; position: absolute; left: 6px; top: 8px; width: 6px; height: 9px;
    border: solid var(--p-ink); border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.product--dark .ticks li { color: rgba(255,255,255,.88); }
.product--dark .ticks li::after { border-color: var(--p); }

.specs { display: flex; flex-wrap: wrap; gap: 8px; }
.specs li {
    font-family: var(--font-mono); font-size: 12.5px; padding: 6px 10px; border-radius: 6px;
    border: 1px solid var(--stroke); color: var(--muted); background: var(--paper);
}
.product--dark .specs li { border-color: rgba(255,255,255,.14); color: rgba(255,255,255,.7); background: rgba(255,255,255,.03); }

/* Galleria */
.gallery__main { margin-bottom: 14px; }
.gallery__zoom {
    display: block; width: 100%; border-radius: 12px; overflow: hidden;
    border: 1px solid var(--stroke); background: var(--ice); box-shadow: var(--shadow);
    aspect-ratio: 16 / 10; position: relative;
}
.product--dark .gallery__zoom { border-color: rgba(255,255,255,.1); background: #0d1626; box-shadow: var(--shadow-dark); }
.gallery__zoom img { width: 100%; height: 100%; object-fit: contain; transition: opacity .25s, transform .4s; }
.gallery__zoom:hover img { transform: scale(1.015); }
.gallery__zoom::after {
    content: "Ingrandisci"; position: absolute; right: 12px; bottom: 12px;
    font-size: 12px; font-weight: 600; padding: 6px 10px; border-radius: 6px;
    background: rgba(7,26,51,.78); color: #fff; opacity: 0; transition: opacity .2s;
}
.gallery__zoom:hover::after, .gallery__zoom:focus-visible::after { opacity: 1; }
.gallery__main figcaption { font-size: 14px; color: var(--muted); margin-top: 12px; min-height: 1.6em; }
.product--dark .gallery__main figcaption { color: rgba(255,255,255,.6); }
.gallery__thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.gallery__thumbs button {
    aspect-ratio: 16 / 10; border-radius: 8px; overflow: hidden;
    border: 2px solid transparent; outline: 1px solid var(--stroke); opacity: .65;
    transition: opacity .2s, border-color .2s; background: var(--ice);
}
.product--dark .gallery__thumbs button { outline-color: rgba(255,255,255,.12); background: #0d1626; }
.gallery__thumbs img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumbs button:hover { opacity: 1; }
.gallery__thumbs button.is-active { opacity: 1; border-color: var(--p); }

/* Motori di nesting */
.engines { margin-top: 72px; border-top: 1px solid var(--stroke); padding-top: 40px; }
.engines h4 { font-size: 20px; color: var(--navy); margin-bottom: 24px; }
.engines dl { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.engines dl div { padding: 22px; border-radius: 12px; background: var(--paper); border: 1px solid var(--stroke); }
.engines dt { font-family: var(--font-head); font-weight: 700; color: var(--cut-ink); margin-bottom: 6px; }
.engines dd { color: var(--muted); font-size: 15px; }

/* Mockup Manager */
.mock { border-radius: 12px; overflow: hidden; background: #0d1626; border: 1px solid rgba(255,255,255,.1); box-shadow: var(--shadow-dark); }
.mock__bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: #142238; }
.mock__bar i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.18); }
.mock__bar span { margin-left: 12px; font-family: var(--font-mono); font-size: 12px; color: rgba(255,255,255,.55); background: rgba(255,255,255,.06); padding: 3px 10px; border-radius: 6px; }
.mock__body { display: grid; grid-template-columns: 56px 1fr; min-height: 340px; background: #F4F7FB; color: var(--text); }
.mock__side { background: var(--navy); display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 16px 0; }
.mock__side b { width: 26px; height: 26px; border-radius: 7px; background: var(--manager); margin-bottom: 10px; }
.mock__side span { width: 22px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.25); }
.mock__side span.on { background: #fff; }
.mock__main { padding: 20px; display: grid; gap: 16px; align-content: start; }
.mock__kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.mock__kpis div { background: #fff; border: 1px solid var(--stroke); border-radius: 10px; padding: 12px 14px; }
.mock__kpis small { display: block; font-size: 12px; color: var(--muted); }
.mock__kpis strong { font-family: var(--font-head); font-size: 24px; color: var(--navy); }
.mock__gantt { position: relative; background: #fff; border: 1px solid var(--stroke); border-radius: 10px; padding: 14px; display: grid; gap: 10px; }
.mock__gantt .row { position: relative; height: 26px; margin-left: 92px; background: repeating-linear-gradient(90deg, #EEF2F7 0 1px, transparent 1px 12.5%); border-radius: 4px; }
.mock__gantt em { position: absolute; left: -92px; top: 4px; font-style: normal; font-size: 12px; color: var(--muted); width: 86px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mock__gantt .row span { position: absolute; top: 3px; bottom: 3px; left: var(--x); width: var(--w); border-radius: 5px; background: var(--c); opacity: .9; }
.mock__gantt .now { position: absolute; top: 8px; bottom: 8px; left: calc(14px + 92px + (100% - 28px - 92px) * .47); width: 2px; background: var(--navy); }
.mock__note { font-size: 12px; color: rgba(255,255,255,.55); padding: 10px 14px; }

/* Pilastri */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.pillar { background: #fff; border: 1px solid var(--stroke); border-radius: var(--radius); padding: 30px; }
.pillar svg { width: 40px; height: 40px; padding: 8px; border-radius: 10px; background: #E8F0FF; fill: none; stroke: var(--primary); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 18px; }
.pillar h3 { font-size: 19px; color: var(--navy); margin-bottom: 8px; }
.pillar p { color: var(--muted); font-size: 15.5px; }

/* Matrice */
.matrix { overflow-x: auto; border: 1px solid var(--stroke); border-radius: var(--radius); }
.matrix table { width: 100%; border-collapse: collapse; min-width: 760px; }
.matrix th, .matrix td { padding: 16px 20px; text-align: left; border-bottom: 1px solid var(--stroke); font-size: 15px; }
.matrix thead th { background: var(--paper); font-family: var(--font-mono); font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.matrix tbody tr:last-child th, .matrix tbody tr:last-child td { border-bottom: 0; }
.matrix tbody th { font-family: var(--font-head); font-weight: 700; color: var(--navy); white-space: nowrap; }
.matrix .dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--p); margin-right: 10px; }
.matrix td { color: var(--muted); }
.matrix td.y { color: var(--navy); font-size: 14px; }
.matrix td.p { color: var(--muted); font-family: var(--font-mono); font-size: 12px; }
.matrix tbody tr:hover { background: #FAFCFF; }

/* Maker */
.maker { background: var(--navy); color: #fff; padding: 104px 0; }
.maker__inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: 72px; align-items: center; }
.maker h2 { font-size: clamp(28px, 3.2vw, 40px); font-weight: 800; margin-bottom: 18px; }
.maker p { color: rgba(255,255,255,.72); margin-bottom: 28px; }
.family { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.family li { aspect-ratio: 1; padding: 20%; border-radius: 22%; background: var(--navy-900); border: 1px solid rgba(255,255,255,.08); }

/* FAQ */
.faq { display: grid; grid-template-columns: 1fr 1.6fr; gap: 64px; align-items: start; }
.faq__list { border-top: 1px solid var(--stroke); }
.faq details { border-bottom: 1px solid var(--stroke); }
.faq summary {
    list-style: none; cursor: pointer; padding: 22px 40px 22px 0; position: relative;
    font-family: var(--font-head); font-weight: 700; font-size: 18px; color: var(--navy);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 18px; font-size: 24px; font-weight: 400; color: var(--primary); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding: 0 40px 24px 0; }

/* CTA */
.cta { position: relative; overflow: hidden; background: radial-gradient(900px 400px at 50% 0%, #13396b 0%, transparent 70%), var(--navy-900); color: #fff; padding: 112px 0; text-align: center; }
.cta .hero__grid { mask-image: radial-gradient(ellipse at 50% 30%, #000 0%, transparent 70%); -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 0%, transparent 70%); }
.cta__inner { position: relative; max-width: 720px; }
.cta h2 { font-size: clamp(32px, 4vw, 48px); font-weight: 800; margin-bottom: 16px; }
.cta p { color: rgba(255,255,255,.72); font-size: 18px; margin-bottom: 32px; }
.cta .hero__actions { justify-content: center; }

/* Footer */
.nx-footer { background: #05132A; color: rgba(255,255,255,.65); padding: 72px 0 28px; font-size: 15px; }
.nx-footer__inner { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 48px; border-bottom: 1px solid rgba(255,255,255,.08); }
.nx-footer__brand img { width: 140px; margin-bottom: 16px; }
.nx-footer h4 { color: #fff; font-size: 14px; margin-bottom: 14px; }
.nx-footer ul { display: grid; gap: 8px; }
.nx-footer a { text-decoration: none; }
.nx-footer a:hover { color: #fff; }
.nx-footer__legal { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-top: 24px; font-size: 13px; color: rgba(255,255,255,.45); }

/* Lightbox */
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(1400px, 94vw); max-height: 92vh; margin: auto; overflow: visible; }
.lightbox::backdrop { background: rgba(5, 19, 42, .9); }
.lightbox img { max-height: 82vh; width: auto; margin: 0 auto; border-radius: 10px; }
.lightbox p { text-align: center; color: rgba(255,255,255,.8); margin-top: 12px; font-size: 15px; }
.lightbox__close { position: absolute; top: -44px; right: 0; width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; font-size: 26px; line-height: 1; }
.lightbox__close:hover { background: rgba(255,255,255,.22); }

/* Animazioni */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
    * { transition: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .nx-nav ul a { padding: 8px 8px; font-size: 14px; }
    .nx-link-back { display: none; }
    .hero__inner { grid-template-columns: 1fr; gap: 48px; }
    .hero__visual { max-width: 720px; }
    .product__body, .maker__inner, .faq { grid-template-columns: 1fr; gap: 40px; }
    .product__body--rev .product__text { order: 0; }
    .engines dl { grid-template-columns: repeat(2, 1fr); }
    .pillars { grid-template-columns: repeat(2, 1fr); }
    .nx-footer__inner { grid-template-columns: 1fr 1fr; }
    .family { max-width: 420px; }
}

@media (max-width: 900px) {
    .nx-burger { display: block; }
    .nx-nav {
        position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0;
        flex-direction: column; align-items: stretch; gap: 24px;
        padding: 24px; background: var(--navy-900);
        transform: translateX(100%); transition: transform .3s; overflow-y: auto;
    }
    .nx-nav.is-open { transform: none; }
    .nx-nav ul { flex-direction: column; }
    .nx-nav ul a { font-size: 18px; padding: 14px 8px; border-bottom: 1px solid rgba(255,255,255,.06); }
    .nx-nav ul a::after { left: 8px; right: auto; width: 28px; bottom: 8px; }
    .nx-nav__cta { flex-direction: column; align-items: stretch; }
    .nx-link-back { display: block; text-align: center; padding: 8px; }
    .hero__strip { grid-template-columns: repeat(2, 1fr); }
    .hero__strip li:last-child { grid-column: span 2; }
    .flow { grid-template-columns: 1fr; }
    .flow__step:not(:last-child)::after { top: auto; bottom: -21px; left: 50px; right: auto; width: 2px; height: 20px; background: repeating-linear-gradient(180deg, var(--stroke) 0 6px, transparent 6px 10px); }
}

@media (max-width: 640px) {
    body { font-size: 16px; }
    .wrap { padding: 0 16px; }
    .section, .product, .cta { padding: 72px 0; }
    .hero { padding-top: calc(var(--header-h) + 40px); }
    .hero__facts { gap: 18px; flex-wrap: wrap; }
    .hero__facts strong { font-size: 26px; }
    .hero__visual { padding: 12px 0 40px 0; }
    .screen--b { right: -6px; }
    .hero__tile { width: 72px; height: 72px; padding: 10px; border-radius: 18px; right: -4px; top: -16px; }
    .hero__strip { grid-template-columns: 1fr; }
    .hero__strip li:last-child { grid-column: auto; }
    .product__head { gap: 16px; }
    .n--product { width: 64px; height: 64px; padding: 10px; border-radius: 16px; }
    .engines dl, .pillars { grid-template-columns: 1fr; }
    .mock__body { grid-template-columns: 40px 1fr; }
    .mock__main { padding: 12px; }
    .mock__kpis strong { font-size: 18px; }
    .mock__gantt .row { margin-left: 70px; }
    .mock__gantt em { left: -70px; width: 66px; font-size: 11px; }
    .mock__gantt .now { left: calc(14px + 70px + (100% - 28px - 70px) * .47); }
    .nx-footer__inner { grid-template-columns: 1fr; }
    .faq summary { font-size: 16px; }
}

/* Layout invertito: la galleria resta la colonna larga */
.product__body--rev { grid-template-columns: 1.35fr 1fr; }
@media (max-width: 1100px) { .product__body--rev { grid-template-columns: 1fr; } }
