/* ============================================================
   alamacs — Hi-fi system (Homepage, direction A)
   Brand: red #D91217 + charcoal + white. Clean tech corporate.
   ============================================================ */
:root {
  --red: #D91217;
  --red-700: #B00F14;
  --red-050: #FDECEC;
  --ink: #1A1A1A;
  --charcoal: #2B2B2B;
  --charcoal-900: #161616;
  --paper: #FFFFFF;
  --mist: #F5F4F2;
  --mist-2: #EDEBE7;
  --line: #E6E4E0;
  --muted: #6E6E6E;

  --ff-display: 'Archivo', system-ui, sans-serif;
  --ff-body: 'Public Sans', system-ui, sans-serif;
  --ff-mono: 'Space Mono', ui-monospace, monospace;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.05), 0 2px 8px rgba(0,0,0,.05);
  --shadow-md: 0 4px 14px rgba(0,0,0,.08), 0 12px 40px rgba(0,0,0,.07);
  --maxw: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--ff-body); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
image-slot { display: block; }
.hs-img { position: absolute; inset: 0; width: 100%; height: 100%; }
a { color: inherit; text-decoration: none; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 32px; }
.eyebrow {
  font-family: var(--ff-mono); font-size: 12px; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase; color: var(--red);
  display: inline-flex; align-items: center; gap: 8px;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--red); }
h1, h2, h3 { font-family: var(--ff-display); font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; margin: 0; text-wrap: balance; }
.lead { font-size: 19px; color: var(--muted); line-height: 1.6; }
.section { padding: 96px 0; }
.section-head { max-width: 680px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(30px, 4vw, 46px); margin: 16px 0 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--ff-body); font-weight: 700; font-size: 16px;
  padding: 15px 26px; border-radius: 8px; border: 2px solid var(--red);
  background: var(--red); color: #fff; cursor: pointer; transition: .18s;
  white-space: nowrap;
}
.btn:hover { background: var(--red-700); border-color: var(--red-700); transform: translateY(-1px); }
.btn .ar { transition: transform .18s; }
.btn:hover .ar { transform: translateX(3px); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: #fff; transform: translateY(-1px); }
.btn.on-dark { border-color: #fff; }
.btn.ghost.on-dark { color: #fff; }
.btn.ghost.on-dark:hover { background: #fff; color: var(--ink); }

/* ============================================================
   HEADER + MEGA MENU
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand-logo { height: 42px; width: auto; display: block; }
.site-footer .brand-logo { height: 38px; }
.brand .mark {
  width: 36px; height: 36px; flex: 0 0 36px; background: var(--red);
  border-radius: 8px; transform: rotate(45deg); display: grid; place-items: center;
}
.brand .mark span { transform: rotate(-45deg); color: #fff; font-family: var(--ff-display); font-weight: 900; font-size: 15px; letter-spacing: -.02em; }
.brand .word { font-family: var(--ff-display); font-weight: 900; font-size: 25px; letter-spacing: -.04em; color: var(--ink); }

.mainnav { display: flex; align-items: center; gap: 6px; }
.mainnav > .nav-item { position: relative; }
.mainnav > .nav-item > a {
  display: inline-flex; align-items: center; gap: 6px; padding: 12px 16px;
  font-weight: 600; font-size: 15.5px; color: var(--charcoal); border-radius: 7px; cursor: pointer;
}
.mainnav > .nav-item > a:hover { background: var(--mist); color: var(--red); }
.nav-item .caret { width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin-top: -3px; transition: .18s; }
.nav-item:hover .caret { transform: rotate(225deg); margin-top: 2px; }
.header-cta { display: flex; align-items: center; gap: 16px; }
.lang { font-family: var(--ff-mono); font-size: 12px; color: var(--muted); font-weight: 700; }
.lang b { color: var(--ink); }

/* mega panel */
.mega {
  position: absolute; left: 50%; top: calc(100% + 14px); transform: translateX(-50%) translateY(8px);
  width: min(1080px, 94vw); background: #fff; border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow-md); padding: 28px; opacity: 0; visibility: hidden; transition: .2s;
  display: grid; grid-template-columns: 1fr 1fr 1fr 300px; gap: 28px;
}
.mega::before { content: ""; position: absolute; bottom: 100%; left: 0; right: 0; height: 18px; }
.nav-item:hover .mega { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.mega-col h4 { font-family: var(--ff-mono); font-size: 11px; letter-spacing: .15em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; font-weight: 700; }
.mega-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.mega-col li a { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 7px; font-size: 14.5px; font-weight: 600; color: var(--charcoal); transition: .14s; }
.mega-col li a::before { content: "›"; color: var(--red); font-weight: 800; }
.mega-col li a:hover { background: var(--red-050); color: var(--red); }
.mega-feat { background: var(--mist); border-radius: 12px; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.mega-feat .ms { width: 100%; height: 120px; border-radius: 9px; }
.mega-feat h5 { font-family: var(--ff-display); font-size: 19px; margin: 0; }
.mega-feat p { margin: 0; font-size: 13.5px; color: var(--muted); }

.hamburger { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 9px; background: #fff; cursor: pointer; }
.hamburger span, .hamburger span::before, .hamburger span::after { content: ""; display: block; width: 20px; height: 2px; background: var(--ink); margin: 0 auto; position: relative; transition: .2s; }
.hamburger span::before { position: absolute; top: -6px; } .hamburger span::after { position: absolute; top: 6px; }

/* ============================================================
   HERO (LayerSlider replacement)
   ============================================================ */
.hero { position: relative; height: 640px; background: var(--charcoal-900); overflow: hidden; }
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .9s ease; }
.hero-slide.active { opacity: 1; }
.hero-slide .hs-img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20,20,20,.86) 0%, rgba(20,20,20,.55) 45%, rgba(20,20,20,.15) 100%); }
.hero-content { position: relative; z-index: 3; height: 100%; display: flex; align-items: center; }
.hero-text { max-width: 640px; color: #fff; }
.hero-text .eyebrow { color: #fff; }
.hero-text .eyebrow::before { background: var(--red); }
.hero-text h1 { font-size: clamp(40px, 6vw, 68px); color: #fff; margin: 18px 0 0; }
.hero-text h1 .hl { color: var(--red); }
.hero-text p { font-size: 20px; color: #D9D9D9; margin: 20px 0 0; max-width: 520px; }
.hero-actions { display: flex; gap: 14px; margin-top: 32px; flex-wrap: wrap; }
.hero-dots { position: absolute; z-index: 4; bottom: 28px; left: 0; right: 0; display: flex; gap: 10px; justify-content: center; }
.hero-dots button { width: 32px; height: 4px; border: 0; border-radius: 2px; background: rgba(255,255,255,.35); cursor: pointer; transition: .2s; padding: 0; }
.hero-dots button.active { background: var(--red); width: 48px; }

/* ============================================================
   TRUST STRIP
   ============================================================ */
.trust { border-bottom: 1px solid var(--line); background: var(--paper); }
.trust .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 26px; padding-bottom: 26px; flex-wrap: wrap; }
.trust .label { font-family: var(--ff-mono); font-size: 12.5px; color: var(--muted); letter-spacing: .04em; }
.trust .logos { display: flex; gap: 30px; align-items: center; flex-wrap: wrap; }
.trust .logos .ms { width: 116px; height: 34px; opacity: .8; }

/* ============================================================
   SOLUTIONS GRID
   ============================================================ */
.sol-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.sol-card {
  border: 1px solid var(--line); border-radius: 14px; padding: 26px; background: #fff;
  transition: .2s; position: relative; overflow: hidden;
}
.sol-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--red); transform: scaleY(0); transform-origin: top; transition: transform .25s; }
.sol-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: transparent; }
.sol-card:hover::before { transform: scaleY(1); }
.sol-num { font-family: var(--ff-mono); font-size: 13px; color: var(--red); font-weight: 700; }
.sol-card h3 { font-size: 22px; margin: 14px 0 10px; }
.sol-card p { margin: 0; color: var(--muted); font-size: 15.5px; }
.sol-card .more { margin-top: 18px; font-weight: 700; font-size: 14.5px; color: var(--ink); display: inline-flex; gap: 7px; align-items: center; }
.sol-card:hover .more { color: var(--red); }

/* ============================================================
   SERVICES SPLIT
   ============================================================ */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split .ms { width: 100%; height: 460px; border-radius: 16px; }
.svc-list { list-style: none; margin: 26px 0 0; padding: 0; display: flex; flex-direction: column; }
.svc-list li { display: flex; align-items: center; gap: 16px; padding: 18px 0; border-top: 1px solid var(--line); }
.svc-list li:last-child { border-bottom: 1px solid var(--line); }
.svc-ico { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 9px; background: var(--red-050); color: var(--red); display: grid; place-items: center; font-weight: 800; }
.svc-list li .t { font-weight: 700; font-size: 17px; }
.svc-list li .d { color: var(--muted); font-size: 14.5px; }

/* ============================================================
   DIVISIONI DEDICATE (homepage)
   ============================================================ */
.div-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.div-card {
  display: flex; flex-direction: column; border: 1px solid var(--line);
  border-radius: 16px; overflow: hidden; background: #fff; transition: .2s;
}
.div-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: transparent; }
.div-media { width: 100%; height: 230px; }
.div-body { padding: 26px 28px 28px; }
.div-kicker {
  font-family: var(--ff-mono); font-size: 12px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--red);
}
.div-body h3 { font-size: 24px; margin: 10px 0 10px; }
.div-body p { margin: 0; color: var(--muted); font-size: 15.5px; }
.div-go { margin-top: 18px; display: inline-flex; gap: 8px; align-items: center; font-weight: 700; font-size: 15px; color: var(--ink); }
.div-card:hover .div-go { color: var(--red); }
.div-go .ar { transition: transform .18s; }
.div-card:hover .div-go .ar { transform: translate(2px,-2px); }
@media (max-width: 768px) { .div-grid { grid-template-columns: 1fr; } .div-media { height: 200px; } }

/* ============================================================
   STATS BAND
   ============================================================ */
.stats { background: var(--red); color: #fff; }
.stats .wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding-top: 64px; padding-bottom: 64px; }
.stat .n { font-family: var(--ff-display); font-weight: 900; font-size: 52px; line-height: 1; letter-spacing: -.03em; }
.stat .l { margin-top: 8px; font-size: 15px; color: rgba(255,255,255,.9); }

/* ============================================================
   CTA
   ============================================================ */
.cta { background: var(--charcoal-900); color: #fff; }
.cta .wrap { padding-top: 84px; padding-bottom: 84px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.cta h2 { font-size: clamp(30px, 4.5vw, 50px); color: #fff; max-width: 760px; }
.cta p { color: #C8C8C8; max-width: 520px; margin: 0; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: var(--charcoal-900); color: #B8B8B8; padding: 64px 0 32px; border-top: 1px solid rgba(255,255,255,.08); }
.foot-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr; gap: 36px; }
.foot-brand .word { color: #fff; }
.foot-brand p { font-size: 14px; margin: 14px 0 0; max-width: 240px; }
.foot-col h4 { color: #fff; font-family: var(--ff-display); font-size: 15px; margin: 0 0 14px; }
.foot-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.foot-col a { font-size: 14px; color: #B8B8B8; transition: .14s; }
.foot-col a:hover { color: #fff; }
.foot-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 48px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.08); font-size: 13px; color: #8A8A8A; flex-wrap: wrap; gap: 12px; }
.foot-bottom .links { display: flex; gap: 20px; flex-wrap: wrap; }

/* ============================================================
   MOBILE
   ============================================================ */
.mobile-nav { display: none; }
@media (max-width: 1024px) {
  .mainnav, .header-cta .btn, .header-cta .lang { display: none; }
  .hamburger { display: grid; place-items: center; }
  .foot-top { grid-template-columns: 1fr 1fr; gap: 30px; }
  .split { grid-template-columns: 1fr; gap: 36px; }
  .split .ms { height: 320px; }
  .sol-grid { grid-template-columns: repeat(2, 1fr); }
  .stats .wrap { grid-template-columns: repeat(2, 1fr); gap: 32px; }
}
@media (max-width: 680px) {
  body { font-size: 16px; }
  .wrap { padding: 0 20px; }
  .section { padding: 64px 0; }
  .hero { height: 560px; }
  .sol-grid { grid-template-columns: 1fr; }
  .foot-top { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
  .hero-actions .btn { flex: 1; justify-content: center; }
}

/* mobile drawer */
.mobile-nav { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.4); opacity: 0; visibility: hidden; transition: .2s; }
.mobile-nav.open { opacity: 1; visibility: visible; }
.mobile-panel { position: absolute; right: 0; top: 0; bottom: 0; width: min(380px, 88vw); background: #fff; transform: translateX(100%); transition: .25s; padding: 22px; overflow-y: auto; }
.mobile-nav.open .mobile-panel { transform: translateX(0); }
.mobile-panel .close { position: absolute; top: 18px; right: 18px; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 9px; background: #fff; font-size: 22px; cursor: pointer; line-height: 1; }
.m-group { border-bottom: 1px solid var(--line); padding: 6px 0; }
.m-group > .m-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 4px; font-family: var(--ff-display); font-weight: 800; font-size: 18px; cursor: pointer; }
.m-group .m-sub { list-style: none; margin: 0; padding: 0 4px; max-height: 0; overflow: hidden; transition: max-height .25s; }
.m-group.open .m-sub { max-height: 600px; padding-bottom: 10px; }
.m-group .m-sub a { display: block; padding: 9px 0; color: var(--muted); font-size: 15px; font-weight: 600; }
.m-group .m-head .pm { color: var(--red); font-size: 22px; }
.mobile-panel .m-cta { margin-top: 22px; }
.mobile-panel .m-cta .btn { width: 100%; justify-content: center; }
