/* =========================================================
   HUROOS — HM · Manufacturing landing
   File: website_huroos/static/src/css/hm_manufacturing.css
   Prefisso classi: .hm-   (sostituisce hm_tailwind.css per questa pagina)
   Palette: blu HM #2A84BB · verde HUROOS #21a085 · neutri
   ========================================================= */

.hm-page {
    --hm-blue: #2A84BB;
    --hm-blue-dark: #1f6a97;
    --hm-blue-mid: #7fb9dd;
    --hm-blue-light: #a9d3ea;
    --hm-blue-soft: #eef6fc;
    --hm-green: #21a085;
    --hm-green-soft: #8fdcc4;
    --hm-red: #c1121f;
    --hm-ink: #0d1117;
    --hm-muted: #5a6672;
    --hm-meta: #8b95a1;
    --hm-faint: #a3acb8;
    --hm-border: #e8edf5;
    --hm-line: #f1f4f8;
    --hm-bg: #f8f9fb;
    font-family: 'Poppins', system-ui, sans-serif;
    color: var(--hm-ink);
    background: #fff;
    overflow-x: hidden;
}
.hm-page * { box-sizing: border-box; }

/* ---------- keyframes ---------- */
@keyframes hmFloat  { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes hmFloatS { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes hmRise   { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes hmGrow   { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes hmBar    { from { transform: scaleY(.2); transform-origin: bottom; } to { transform: scaleY(1); transform-origin: bottom; } }
@media (prefers-reduced-motion: reduce) { .hm-page * { animation: none !important; transition: none !important; } }

/* ---------- reveal on scroll (JS) ---------- */
.hm-reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1); }
.hm-reveal.is-in { opacity: 1; transform: none; }

/* ---------- struttura ---------- */
.hm-page section { position: relative; }
.hm-sec        { padding: 112px 32px; }
.hm-sec--muted { background: var(--hm-bg); border-top: 1px solid var(--hm-border); border-bottom: 1px solid var(--hm-border); }
.hm-wrap       { max-width: 1250px; margin: 0 auto; }
.hm-wrap--md   { max-width: 1080px; margin: 0 auto; }
.hm-wrap--sm   { max-width: 900px;  margin: 0 auto; }

.hm-head         { max-width: 680px; margin-bottom: 52px; }
.hm-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.hm-eyebrow { font-size: 19px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--hm-blue); margin-bottom: 18px; }
.hm-h2   { font-size: clamp(30px, 3.4vw, 42px); line-height: 1.12; font-weight: 800; letter-spacing: -.015em; margin: 0 0 16px; text-wrap: pretty; }
.hm-lead { font-size: 17px; line-height: 1.65; color: var(--hm-muted); margin: 0; }

/* ---------- HERO ---------- */
.hm-hero { padding: 130px 32px 150px; overflow: hidden; }
.hm-hero__glow-a { position: absolute; top: -160px; right: -140px; width: 620px; height: 620px; border-radius: 50%; background: var(--hm-blue-soft); z-index: 0; }
.hm-hero__glow-b { position: absolute; bottom: -120px; left: -120px; width: 380px; height: 380px; border-radius: 50%; background: #f4f6f9; z-index: 0; }
.hm-hero__grid {
    position: relative; z-index: 1; max-width: 1250px; margin: 0 auto;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
    gap: 72px; align-items: center; animation: hmRise 560ms ease both;
}
.hm-hero__title { font-size: clamp(28px, 4vw, 56px); line-height: 1.06; font-weight: 800; letter-spacing: -.02em; margin: 0 0 22px; text-wrap: pretty; }
.hm-grad {
    background: linear-gradient(100deg, #14567f 0%, var(--hm-blue) 55%, #4aa5da 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
}
.hm-hero__lead { font-size: 18px; line-height: 1.65; color: var(--hm-muted); margin: 0 0 34px; max-width: 520px; text-wrap: pretty; }
.hm-hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 40px; }
.hm-hero__kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 28px; max-width: 560px; }
.hm-kpi__value { font-size: 30px; font-weight: 800; line-height: 1; }
.hm-kpi__value--green { color: var(--hm-green); }
.hm-kpi__label { font-size: 12px; font-weight: 600; color: var(--hm-meta); margin-top: 6px; }

.hm-hero__media { position: relative; }
.hm-hero__logo { position: absolute; top: 64px; right: -34px; width: 124px; height: 124px; z-index: 5; animation: hmFloat 7s ease-in-out infinite; }
.hm-dot { position: absolute; border-radius: 50%; z-index: 3; }
.hm-dot--blue  { top: -26px; left: -22px; width: 34px; height: 34px; background: var(--hm-blue); animation: hmFloat 6s ease-in-out infinite; }
.hm-dot--green { bottom: -18px; right: -14px; width: 20px; height: 20px; background: var(--hm-green); animation: hmFloatS 5.4s ease-in-out infinite .5s; }

/* ---------- browser chrome ---------- */
.hm-shot { border: 1px solid var(--hm-border); border-radius: 20px; overflow: hidden; background: #fff; box-shadow: 0 28px 60px -18px rgba(13,17,23,.16); }
.hm-shot--float { animation: hmFloatS 9s ease-in-out infinite; }
.hm-shot__bar { display: flex; align-items: center; gap: 8px; padding: 11px 14px; background: #f4f6f9; border-bottom: 1px solid var(--hm-border); }
.hm-shot__bar > i { width: 10px; height: 10px; border-radius: 50%; background: #e0e5ec; display: inline-block; }
.hm-shot__url { flex: 1; background: #fff; border: 1px solid var(--hm-border); border-radius: 7px; height: 26px; display: flex; align-items: center; padding: 0 10px; font-size: 10px; color: var(--hm-meta); font-weight: 500; margin-left: 6px; }
.hm-shot__url .fa-lock { width: auto; height: auto; background: none; color: var(--hm-green); margin-right: 7px; font-size: 9px; }
.hm-shot__app { width: 18px; height: 18px; border-radius: 6px; background: var(--hm-blue); display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 800; color: #fff; }

/* ---------- MES toolbar + gantt ---------- */
.hm-page .hm-mes { display: flex; align-items: center; gap: 10px; padding: 9px 14px; line-height: 1.2; border-bottom: 1px solid var(--hm-border); font-size: 10.5px; color: var(--hm-meta); font-weight: 600; flex-wrap: wrap; }
.hm-mes__name { color: var(--hm-ink); font-weight: 800; }
.hm-mes i { color: var(--hm-blue); margin-right: 5px; }

.hm-gantt { background: #fff; }
.hm-gantt__head { display: grid; grid-template-columns: 110px 1fr; background: var(--hm-bg); border-bottom: 1px solid var(--hm-border); }
.hm-gantt__head-label { padding: 8px 10px; border-right: 1px solid var(--hm-border); font-size: 8.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--hm-meta); }
.hm-page .hm-gantt__days { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); padding-right: 96px; }
.hm-page .hm-gantt__days > span { display: block; min-height: 26px; }
.hm-page .hm-gantt__days > span.is-today { color: var(--hm-blue); background: rgba(42,132,187,.07); }

.hm-grow { display: grid; grid-template-columns: 110px 1fr; border-bottom: 1px solid var(--hm-line); background: #fff; }
.hm-grow--alt { background: #fbfcfd; }
.hm-grow__machine { padding: 7px 10px; border-right: 1px solid var(--hm-border); min-width: 0; }
.hm-page .hm-grow__machine b { display: block; font-size: 10.5px; font-weight: 700; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-page .hm-grow__machine small { display: block; font-size: 8.5px; line-height: 1.2; color: var(--hm-faint); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-grow__track { position: relative; height: 34px; }
.hm-grow__track--slim { height: 28px; }
.hm-grow__track::before { content: ""; position: absolute; left: 52%; top: 0; bottom: 0; width: 1.5px; background: rgba(42,132,187,.55); z-index: 2; }
.hm-bar {
    position: absolute; top: 6px; height: 19px; border-radius: 4px;
    display: flex; align-items: center; padding: 0 6px;
    font-size: 8px; font-weight: 700; color: #fff;
    white-space: nowrap; overflow: hidden;
    background: var(--hm-blue); transform-origin: left; animation: hmGrow .7s ease both;
}
.hm-bar--mid   { background: var(--hm-blue-mid); }
.hm-bar--light { background: var(--hm-blue-light); }
.hm-bar--deep  { background: var(--hm-blue-dark); }
.hm-bar--green { background: var(--hm-green); }
.hm-supply { position: absolute; top: 11px; width: 8px; height: 8px; border-radius: 50%; background: var(--hm-red); }

.hm-res-head { display: grid; grid-template-columns: 110px 1fr; background: var(--hm-blue-soft); border-bottom: 1px solid var(--hm-border); }
.hm-page .hm-res-head > span { display: block; min-height: 24px; }
.hm-page .hm-res-head > span:first-child { border-right: 1px solid #dbe9f4; }
.hm-res__label { padding: 6px 10px; border-right: 1px solid var(--hm-border); font-size: 10px; font-weight: 600; color: var(--hm-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-res__track { position: relative; height: 22px; }
.hm-res__track::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: #f3d3d3; }
.hm-res__bar { position: absolute; top: 5px; height: 12px; border-radius: 3px; background: var(--hm-green-soft); transform-origin: left; animation: hmGrow .7s ease both; }

.hm-page .hm-gantt__foot { display: flex; line-height: 1.2; flex-wrap: wrap; gap: 18px; padding: 10px 14px; background: var(--hm-bg); font-size: 9px; font-weight: 600; color: var(--hm-meta); }
.hm-gantt__foot strong { color: var(--hm-ink); }

.hm-toast {
    position: absolute; right: -22px; bottom: 56px; z-index: 4;
    background: #fff; border: 1px solid var(--hm-border); border-radius: 16px;
    box-shadow: 0 18px 40px -12px rgba(13,17,23,.18);
    padding: 14px 18px; display: flex; align-items: center; gap: 12px;
    animation: hmFloat 7s ease-in-out infinite 1s;
}
.hm-toast--top { right: -18px; bottom: auto; top: -26px; padding: 13px 17px; animation: hmFloatS 6.5s ease-in-out infinite .4s; }
.hm-toast__icon { width: 38px; height: 38px; border-radius: 12px; background: var(--hm-blue); display: flex; align-items: center; justify-content: center; color: #fff; }
.hm-toast__icon--warn { width: 34px; height: 34px; border-radius: 11px; background: #fdf1f2; color: var(--hm-red); }
.hm-toast__title { font-size: 12px; font-weight: 700; line-height: 1.2; }
.hm-toast__sub { font-size: 10.5px; color: var(--hm-meta); margin-top: 2px; }

/* ---------- MRP browser frame (immagine sostituibile) ---------- */
.hm-frame { border: 1px solid var(--hm-border); border-radius: 20px; overflow: hidden; background: #fff; box-shadow: 0 24px 50px -24px rgba(13,17,23,.18); }
.hm-frame__bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; background: #f4f6f9; border-bottom: 1px solid var(--hm-border); flex-wrap: nowrap; }
.hm-frame__bar > i { width: 11px; height: 11px; border-radius: 50%; background: #e0e5ec; display: inline-block; flex: 0 0 auto; }
.hm-frame__tab {
    display: flex; align-items: center; gap: 9px; margin-left: 12px;
    background: #fff; border: 1px solid var(--hm-border);
    border-radius: 9px 9px 0 0; padding: 9px 16px 10px;
    font-size: 11.5px; font-weight: 700; color: var(--hm-ink);
    position: relative; top: 1px; white-space: nowrap; flex: 0 0 auto;
}
.hm-frame__tab span.hm-shot__app { width: 16px; height: 16px; border-radius: 5px; font-size: 9px; }
.hm-frame__url { flex: 1; min-width: 0; background: #fff; border: 1px solid var(--hm-border); border-radius: 8px; height: 28px; display: flex; align-items: center; padding: 0 12px; font-size: 10.5px; color: var(--hm-faint); font-weight: 500; margin-left: 14px; white-space: nowrap; overflow: hidden; }
.hm-frame__url .fa-lock { width: auto; height: auto; background: none; color: var(--hm-green); margin-right: 8px; font-size: 9px; }
.hm-frame__screen { aspect-ratio: 16 / 9; background: var(--hm-bg); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.hm-frame__screen img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hm-frame__ph { text-align: center; color: #b7c0cb; }
.hm-frame__ph i { font-size: 34px; }
.hm-frame__ph div { font-size: 13px; font-weight: 600; margin-top: 14px; }

/* ---------- illustrazione animata ---------- */
@keyframes hmMorph { 0%,100% { border-radius: 58% 42% 63% 37% / 45% 58% 42% 55%; } 50% { border-radius: 44% 56% 42% 58% / 58% 42% 58% 42%; } }
@keyframes hmFloatCenter { 0%,100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-12px); } }
@keyframes hmTiltA { 0%,100% { transform: rotate(-4deg) translateY(0); } 50% { transform: rotate(-4deg) translateY(-8px); } }
@keyframes hmTiltB { 0%,100% { transform: rotate(3deg) translateY(0); } 50% { transform: rotate(3deg) translateY(-10px); } }

.hm-illu { position: relative; border-radius: 28px; background: #f2f8fc; padding: 70px 40px 118px; overflow: hidden; min-height: 470px; display: flex; align-items: center; justify-content: center; }
.hm-illu__blob { position: absolute; display: block; }
.hm-illu__blob--a { top: -90px; left: -70px; width: 360px; height: 340px; background: rgba(42,132,187,.12); border-radius: 58% 42% 63% 37% / 45% 58% 42% 55%; animation: hmMorph 16s ease-in-out infinite; }
.hm-illu__blob--b { bottom: -110px; right: -60px; width: 320px; height: 300px; background: rgba(33,160,133,.10); border-radius: 42% 58% 38% 62% / 60% 40% 60% 40%; animation: hmMorph 19s ease-in-out infinite 1.4s; }
.hm-illu__blob--v1 { top: -80px; left: -60px; width: 340px; height: 320px; background: rgba(255,255,255,.16); border-radius: 58% 42% 63% 37% / 45% 58% 42% 55%; animation: hmMorph 17s ease-in-out infinite; }
.hm-illu__blob--v2 { bottom: -100px; right: -50px; width: 300px; height: 280px; background: rgba(13,17,23,.12); border-radius: 42% 58% 38% 62% / 60% 40% 60% 40%; animation: hmMorph 21s ease-in-out infinite 1.2s; }
.hm-illu__stage { position: relative; width: min(620px, 100%); height: 300px; }
.hm-illu__card { position: absolute; box-sizing: border-box; background: #fff; border-radius: 20px; padding: 18px; }
.hm-illu__card--left   { left: 0; top: 56px; width: 34%; border: 1px solid #dbe9f4; box-shadow: 0 18px 40px -22px rgba(13,17,23,.22); animation: hmTiltA 8s ease-in-out infinite .3s; }
.hm-illu__card--center { left: 50%; top: 0; width: 34%; min-width: 200px; padding: 24px; border: 1.5px solid var(--hm-blue); border-radius: 22px; box-shadow: 0 26px 54px -20px rgba(42,132,187,.35); transform: translateX(-50%); animation: hmFloatCenter 7.2s ease-in-out infinite; z-index: 3; }
.hm-illu__card--right  { right: 0; top: 40px; width: 34%; border: 1.5px solid var(--hm-green); box-shadow: 0 22px 46px -20px rgba(33,160,133,.3); animation: hmTiltB 6.8s ease-in-out infinite .6s; }
.hm-illu__label { font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--hm-faint); margin-bottom: 12px; }
.hm-illu__label.is-blue { color: var(--hm-blue); font-size: 11px; margin-bottom: 16px; }
.hm-illu__label.is-green { color: var(--hm-green-dark, #1a8068); }
.hm-illu__lines { display: grid; gap: 9px; }
.hm-illu__lines i { display: block; height: 8px; border-radius: 5px; background: #eef4f9; }
.hm-illu__lines i.is-l1 { width: 76%; margin-left: 14px; }
.hm-illu__lines i.is-l2 { width: 62%; margin-left: 14px; }
.hm-illu__lines i.is-l3 { width: 48%; margin-left: 28px; }
.hm-illu__value { font-size: 34px; font-weight: 800; line-height: 1; }
.hm-illu__value.is-neg { color: var(--hm-red); }
.hm-illu__meta { font-size: 11.5px; color: var(--hm-muted); margin-top: 8px; line-height: 1.4; }
.hm-illu__bar { margin-top: 10px; height: 6px; border-radius: 4px; background: var(--hm-line); overflow: hidden; }
.hm-illu__bar span { display: block; height: 100%; background: var(--hm-blue); transform-origin: left; animation: hmGrow .9s ease .3s both; }
.hm-illu__bar span.is-green { background: var(--hm-green); }
.hm-illu__bar span.is-mid { background: var(--hm-blue-mid); }
.hm-illu__cov { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; font-size: 10.5px; color: var(--hm-muted); margin-top: 10px; }
.hm-illu__cov b { color: var(--hm-ink); }
.hm-illu__chip { margin-top: 18px; display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 20px; background: var(--hm-blue); color: #fff; font-size: 10.5px; font-weight: 700; }
.hm-illu__toast { position: absolute; left: 0; bottom: -52px; background: #fff; border: 1px solid var(--hm-border); border-radius: 16px; box-shadow: 0 18px 40px -18px rgba(13,17,23,.2); padding: 14px 18px; display: flex; align-items: center; gap: 12px; animation: hmFloatS 6.4s ease-in-out infinite .8s; z-index: 4; }
.hm-illu__toast-ico { width: 34px; height: 34px; border-radius: 11px; background: var(--hm-blue-soft); display: flex; align-items: center; justify-content: center; color: var(--hm-blue); font-size: 14px; }
.hm-illu__toast-title { font-size: 12px; font-weight: 700; line-height: 1.2; }
.hm-illu__toast-sub { font-size: 10.5px; color: var(--hm-meta); margin-top: 2px; }
.hm-illu__seal { position: absolute; right: 2%; bottom: -58px; width: 52px; height: 52px; border-radius: 50%; background: var(--hm-green); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 19px; animation: hmFloat 6.9s ease-in-out infinite .2s; z-index: 4; }

.hm-video--ph { background: var(--hm-blue); display: flex; align-items: center; justify-content: center; }
.hm-video__play { position: relative; width: 96px; height: 96px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 18px 40px rgba(13,17,23,.24); color: var(--hm-blue); font-size: 30px; animation: hmFloatS 6s ease-in-out infinite; }
.hm-video__play i { margin-left: 5px; }

@media (max-width: 767.98px) {
    .hm-illu { padding: 40px 20px 130px; min-height: 0; }
    .hm-illu__stage { height: auto; display: grid; gap: 16px; }
    .hm-illu__card, .hm-illu__toast, .hm-illu__seal { position: static; width: auto; transform: none; animation: none; }
    .hm-illu__card--center { min-width: 0; }
}

/* ---------- split + feature list ---------- */
.hm-split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); gap: 80px; align-items: center; }
.hm-features { display: grid; gap: 22px; max-width: 540px; }
.hm-feature { display: flex; gap: 18px; align-items: flex-start; }
.hm-feature__ico { width: 44px; height: 44px; flex: 0 0 auto; border-radius: 14px; background: var(--hm-blue); display: flex; align-items: center; justify-content: center; color: #fff; }
.hm-feature__ico--green { background: var(--hm-green); }
.hm-feature__title { font-size: 16px; font-weight: 700; margin-bottom: 5px; }
.hm-feature__text  { font-size: 14.5px; line-height: 1.6; color: var(--hm-muted); }

/* ---------- MPS chart ---------- */
.hm-panel { background: #fff; border: 1px solid var(--hm-border); border-radius: 20px; box-shadow: 0 24px 50px -20px rgba(13,17,23,.16); overflow: hidden; }
.hm-panel__head { padding: 16px 20px; border-bottom: 1px solid var(--hm-border); background: var(--hm-bg); display: flex; align-items: center; justify-content: space-between; }
.hm-panel__title { font-size: 13px; font-weight: 700; }
.hm-panel__meta { font-size: 11px; font-weight: 600; color: var(--hm-meta); }
.hm-mps { display: flex; align-items: flex-end; gap: 14px; height: 170px; }
.hm-mps__month { flex: 1; display: flex; align-items: flex-end; gap: 4px; height: 100%; }
.hm-mps__month span { flex: 1; border-radius: 5px 5px 0 0; background: #d6e7f3; animation: hmBar .7s ease both; }
.hm-mps__month span.is-plan { background: var(--hm-blue); }
.hm-mps__month span.is-short { background: var(--hm-red); }
.hm-mps__month span.is-ok { background: var(--hm-green); }
.hm-axis { display: flex; justify-content: space-between; font-size: 10px; color: var(--hm-meta); margin-top: 10px; }
.hm-legend { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 18px; font-size: 11px; font-weight: 600; color: var(--hm-muted); }
.hm-legend b { display: inline-block; width: 10px; height: 6px; border-radius: 3px; margin-right: 7px; }
.hm-legend b.is-demand { background: #d6e7f3; }
.hm-legend b.is-plan { background: var(--hm-blue); }
.hm-legend b.is-short { background: var(--hm-red); }

/* ---------- vincoli ---------- */
.hm-constraints { position: relative; }
.hm-constraints__accent { position: absolute; top: 6%; left: 2%; width: 66%; height: 76%; border-radius: 28px; background: var(--hm-blue); z-index: 0; }
.hm-constraints__card { position: relative; z-index: 1; margin-left: auto; width: 88%; background: #fff; border: 1px solid var(--hm-border); border-radius: 20px; box-shadow: 0 24px 50px -18px rgba(13,17,23,.18); overflow: hidden; }
.hm-fields { padding: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hm-field { border: 1px solid var(--hm-border); border-radius: 14px; padding: 16px; }
.hm-field__group { font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--hm-meta); margin-bottom: 12px; }
.hm-field__label { font-size: 12.5px; color: var(--hm-muted); margin-bottom: 6px; }
.hm-field__value { border: 1px solid var(--hm-border); border-radius: 10px; padding: 10px 12px; font-size: 14px; font-weight: 700; background: var(--hm-bg); }
.hm-actions { padding: 16px 20px; border-top: 1px solid var(--hm-border); display: flex; gap: 10px; }
.hm-chip { padding: 9px 20px; border-radius: 12px; font-size: 12px; font-weight: 700; }
.hm-chip--blue { background: var(--hm-blue); color: #fff; }
.hm-chip--ghost { border: 1px solid var(--hm-border); color: var(--hm-muted); font-weight: 600; }

/* ---------- video ---------- */
.hm-video { position: relative; border-radius: 24px; overflow: hidden; box-shadow: 0 30px 64px -24px rgba(13,17,23,.28); aspect-ratio: 16 / 9; background: var(--hm-ink); }
.hm-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- bento ---------- */
.hm-bento { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 560px), 1fr)); gap: 24px; align-items: stretch; }
.hm-bento__card { background: var(--hm-bg); border: 1px solid var(--hm-border); border-radius: 24px; padding: 36px; display: flex; flex-direction: column; transition: border-color .18s ease; }
.hm-bento__card:hover { border-color: #d7dee8; }
.hm-bento__ico { width: 48px; height: 48px; border-radius: 14px; background: var(--hm-blue); display: flex; align-items: center; justify-content: center; margin-bottom: 22px; font-size: 19px; color: #fff; }
.hm-bento__ico--green { background: var(--hm-green); }
.hm-bento__title { font-size: 23px; font-weight: 800; margin: 0 0 12px; letter-spacing: -.01em; }
.hm-bento__text  { font-size: 15.5px; line-height: 1.65; color: var(--hm-muted); margin: 0; }
.hm-stats { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; margin-top: auto; padding-top: 26px; }
.hm-stats > div { background: #fff; border: 1px solid var(--hm-border); border-radius: 14px; padding: 16px; text-align: center; }
.hm-stats strong { display: block; font-size: 22px; font-weight: 800; }
.hm-stats strong.is-blue  { color: var(--hm-blue); }
.hm-stats strong.is-green { color: var(--hm-green); }
.hm-stats small { display: block; font-size: 10.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--hm-meta); margin-top: 5px; }
.hm-pills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 22px; }
.hm-page .hm-pills > span {
    display: inline-flex; align-items: center;
    padding: 8px 16px; border-radius: 40px;
    background: #fff; border: 1px solid var(--hm-border);
    font-size: 12.5px; font-weight: 600; line-height: 1.2; color: var(--hm-ink);
    white-space: nowrap;
}

/* ---------- flusso ---------- */
.hm-flow { position: relative; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px; align-items: stretch; }
.hm-flow__line { position: absolute; top: 22px; left: 8%; right: 8%; height: 2px; background: #e2e7ee; }
.hm-step { position: relative; display: flex; flex-direction: column; min-width: 0; }
.hm-step__num { width: 44px; height: 44px; flex: 0 0 auto; border-radius: 50%; background: var(--hm-blue); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; margin-bottom: 22px; }
.hm-step__num--green { background: var(--hm-green); }
.hm-step__card { background: #fff; border: 1px solid var(--hm-border); border-radius: 20px; padding: 26px; flex: 1; min-width: 0; }
.hm-step__card > i { font-size: 22px; color: var(--hm-blue); }
.hm-step__card > i.is-green { color: var(--hm-green); }
.hm-step__card h4 { font-size: 17px; font-weight: 700; margin: 16px 0 8px; }
.hm-step__card p  { font-size: 14px; line-height: 1.6; color: var(--hm-muted); margin: 0; }

/* ---------- FAQ ---------- */
.hm-faq { display: grid; gap: 14px; }
.hm-faq details { background: var(--hm-bg); border: 1px solid var(--hm-border); border-radius: 18px; padding: 24px 28px; }
.hm-faq summary { font-size: 17px; font-weight: 700; cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.hm-faq summary::-webkit-details-marker { display: none; }
.hm-faq summary::after { content: "\f078"; font-family: "Font Awesome 6 Free"; font-weight: 900; font-size: 13px; color: var(--hm-meta); transition: transform .2s ease; }
.hm-faq details[open] summary::after { transform: rotate(180deg); }
.hm-faq p { font-size: 15.5px; line-height: 1.7; color: var(--hm-muted); margin: 16px 0 0; }

/* ---------- CTA ---------- */
.hm-cta-section { padding: 0 32px 112px; background: #fff; }
.hm-cta { max-width: 1250px; margin: 0 auto; background: var(--hm-blue); border-radius: 32px; padding: 80px 56px; text-align: center; position: relative; overflow: hidden; }
.hm-cta__blob { position: absolute; border-radius: 50%; }
.hm-cta__blob--a { top: -90px; right: -70px; width: 320px; height: 320px; background: rgba(255,255,255,.14); animation: hmFloat 12s ease-in-out infinite; }
.hm-cta__blob--b { bottom: -120px; left: -60px; width: 280px; height: 280px; background: rgba(13,17,23,.08); animation: hmFloatS 14s ease-in-out infinite; }
.hm-cta__title { position: relative; font-size: clamp(32px, 3.6vw, 46px); line-height: 1.12; font-weight: 800; letter-spacing: -.015em; color: #fff; margin: 0 0 18px; text-wrap: pretty; }
.hm-cta__text  { position: relative; font-size: 17px; line-height: 1.65; color: rgba(255,255,255,.85); margin: 0 auto 36px; max-width: 560px; }
.hm-cta__actions { position: relative; display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.hm-cta__notes { position: relative; display: flex; flex-wrap: wrap; justify-content: center; gap: 26px; margin-top: 36px; font-size: 13px; font-weight: 600; color: rgba(255,255,255,.72); }

/* ---------- bottoni ---------- */
.hm-btn {
    display: inline-flex; align-items: center; justify-content: center; height: 54px; padding: 0 30px;
    border-radius: 16px; font-weight: 700; font-size: 15px; text-decoration: none;
    transition: background-color .16s ease, color .16s ease, transform .12s ease; border: 0; cursor: pointer;
}
.hm-btn:hover  { text-decoration: none; }
.hm-btn:active { transform: translateY(1px); }
.hm-btn--blue  { background: var(--hm-blue); color: #fff; }
.hm-btn--blue:hover { background: var(--hm-blue-dark); color: #fff; }
.hm-btn--ghost { background: #fff; border: 1px solid var(--hm-border); color: var(--hm-ink); font-weight: 600; }
.hm-btn--ghost:hover { background: var(--hm-bg); color: var(--hm-ink); }
.hm-btn--light { background: #fff; color: var(--hm-blue); height: 56px; padding: 0 32px; }
.hm-btn--light:hover { background: var(--hm-blue-soft); color: var(--hm-blue-dark); }
.hm-btn--outline-light { background: transparent; border: 1.5px solid rgba(255,255,255,.5); color: #fff; font-weight: 600; height: 56px; padding: 0 32px; }
.hm-btn--outline-light:hover { background: rgba(255,255,255,.12); color: #fff; }

/* ---------- responsive ---------- */
@media (max-width: 1199.98px) {
    .hm-sec { padding: 90px 24px; }
    .hm-hero { padding: 100px 24px 110px; }
    .hm-split { gap: 56px; }
    .hm-cta-section { padding: 0 24px 90px; }
}
@media (max-width: 991.98px) {
    .hm-hero__grid { grid-template-columns: minmax(0,1fr); gap: 56px; }
    .hm-split { grid-template-columns: minmax(0,1fr); }
    .hm-hero__logo { width: 96px; height: 96px; right: -12px; }
    .hm-gantt__days { padding-right: 76px; }
    .hm-toast { right: 8px; bottom: 16px; }
    .hm-toast--top { right: 8px; top: -18px; }
    .hm-constraints__accent { display: none; }
    .hm-constraints__card { width: 100%; margin-left: 0; }
    .hm-flow__line { display: none; }
    .hm-cta { padding: 56px 28px; }
}
@media (max-width: 575.98px) {
    .hm-hero { padding: 72px 20px 80px; }
    .hm-sec  { padding: 72px 20px; }
    .hm-fields { grid-template-columns: minmax(0,1fr); }
    .hm-stats  { grid-template-columns: minmax(0,1fr); }
    .hm-hero__logo { width: 78px; height: 78px; top: 8px; }
    .hm-frame__url { display: none; }
}
