@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #0F2236;
  --ink-2: #1C3653;
  --steel: #556677;
  --zinc: #E8ECEF;
  --paper: #FFFFFF;
  --volt: #FFC61A;
  --wa: #1A8F49;
  --wa-dark: #147A3D;
  --wrap: 1180px;
  --gut: clamp(1.1rem, 4vw, 2.5rem);
  --sec: clamp(4rem, 9vw, 7.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  font-stretch: 100%;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.05; font-stretch: 125%; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }
.ico { width: 1.25em; height: 1.25em; flex: none; }

.skip { position: absolute; left: -9999px; top: 0; background: var(--volt); padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; top: 1rem; }

:focus-visible { outline: 3px solid var(--volt); outline-offset: 3px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .95rem 1.35rem;
  border-radius: 999px;
  font-weight: 700; font-size: 1rem; line-height: 1.2;
  text-decoration: none;
  border: 2px solid transparent;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn--wa { background: var(--wa); color: #fff; }
.btn--wa:hover { background: var(--wa-dark); }
.btn--ghost { color: #fff; border-color: rgba(255,255,255,.7); }
.btn--ghost:hover { background: #fff; color: var(--ink); border-color: #fff; }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: var(--ink-2); }
.btn--small { padding: .6rem 1rem; font-size: .95rem; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 50;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 0 rgba(15,34,54,.12);
}
.top__in { display: flex; align-items: center; gap: 2rem; min-height: 86px; }
.brand { display: block; line-height: 0; padding: 6px 0; }
.brand img { height: 74px; width: auto; }
.nav { display: flex; gap: 1.6rem; margin-left: auto; }
.nav a { text-decoration: none; font-size: .97rem; color: var(--ink); padding: .3rem 0; border-bottom: 2px solid transparent; }
.top__tel { display: none; width: 46px; height: 46px; border-radius: 50%; background: var(--volt); color: var(--ink); align-items: center; justify-content: center; }
.nav a:hover { border-bottom-color: var(--volt); }

/* Hero */
.hero {
  position: relative;
  min-height: min(88vh, 820px);
  display: flex; align-items: flex-end;
  color: #fff;
  background: var(--ink);
  border-bottom: 10px solid var(--volt);
  overflow: hidden;
}
.hero__img, .hero__img img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__img img { object-fit: cover; object-position: 50% 60%; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(15,34,54,.92) 0%, rgba(15,34,54,.72) 45%, rgba(15,34,54,.15) 100%),
              linear-gradient(0deg, rgba(15,34,54,.85) 0%, rgba(15,34,54,0) 55%);
}
.hero__in { position: relative; z-index: 1; width: 100%; padding-top: 6rem; padding-bottom: clamp(3rem, 7vw, 5.5rem); }
.hero h1 {
  font-weight: 800;
  font-size: clamp(2.2rem, 4.6vw, 4.3rem);
  line-height: .98;
  letter-spacing: -.01em;
  max-width: 19ch;
  text-wrap: balance;
}
.hero__lead { font-size: clamp(1.08rem, 1.6vw, 1.3rem); max-width: 40ch; margin: 1.4rem 0 2rem; color: rgba(255,255,255,.9); }
.hero__cta { display: flex; flex-wrap: wrap; gap: .8rem; }

/* Section titles */
.h2 { font-weight: 800; font-size: clamp(1.9rem, 4vw, 3rem); letter-spacing: -.005em; }
.intro { color: var(--steel); max-width: 56ch; margin: 1rem 0 2.5rem; font-size: 1.1rem; }

/* Services */
.services { padding: var(--sec) 0; }
.svc { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.2rem, 2.5vw, 2rem); }
.svc__item { background: var(--zinc); display: flex; flex-direction: column; }
.svc__item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 40%; }
.svc__txt { padding: 1.5rem 1.5rem 1.7rem; border-top: 6px solid var(--volt); }
.svc__txt h3 { font-size: 1.35rem; font-weight: 800; margin-bottom: .7rem; }
.svc__txt p { margin: 0; color: #2E4156; }
.also__title { font-size: 1.2rem; font-weight: 800; margin: 3rem 0 1.1rem; }
.also { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: .9rem 2rem; }
.also li { display: flex; align-items: center; gap: .6rem; font-weight: 600; }
.also li::before { content: ""; width: .7rem; height: .7rem; background: var(--volt); flex: none; }

/* Works */
.works { padding: var(--sec) 0 calc(var(--sec) * .75); background: var(--zinc); }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.6rem; }
.chip {
  font: inherit; font-size: .95rem; font-weight: 600;
  padding: .55rem 1.05rem; border-radius: 999px;
  border: 2px solid var(--ink); background: transparent; color: var(--ink);
  cursor: pointer;
}
.chip:hover { background: rgba(15,34,54,.08); }
.chip.is-on { background: var(--ink); color: #fff; }
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.grid li[hidden] { display: none; }
.grid a { display: block; overflow: hidden; background: var(--ink); aspect-ratio: 1; }
.grid img { width: 100%; height: 100%; object-fit: cover; transition: opacity .2s ease; }
.grid a:hover img { opacity: .85; }
.more { margin-top: 1.6rem; }
.more[hidden] { display: none; }

/* About */
.about { padding: var(--sec) 0; }
.about__in { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.about__txt p { max-width: 54ch; font-size: 1.1rem; }
.about__txt .h2 { margin-bottom: 1.4rem; }
.about__txt .btn { margin-top: .8rem; }
.about__img { margin: 0; }
.about__img img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }

/* Area */
.area { padding: var(--sec) 0; background: var(--ink); color: #fff; }
.area .intro { color: rgba(255,255,255,.78); }
.area__in { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.addr { font-style: normal; font-size: 1.15rem; font-weight: 600; margin-bottom: .8rem; }
.link { color: var(--volt); font-weight: 600; text-underline-offset: .2em; }
.towns { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid rgba(255,255,255,.18); }
.towns li { padding: .9rem 0; border-bottom: 1px solid rgba(255,255,255,.18); font-stretch: 112%; font-weight: 600; font-size: 1.12rem; }
.towns li:nth-child(odd) { padding-right: 1rem; }
.towns__home { color: var(--volt); }

/* Contact */
.contact { padding: var(--sec) 0; background: var(--volt); }
.contact__title { font-weight: 800; font-size: clamp(2rem, 4.6vw, 3.6rem); line-height: 1.02; max-width: 22ch; text-wrap: balance; }
.contact__lead { font-size: 1.15rem; max-width: 50ch; margin: 1.3rem 0 2.4rem; }
.contact__grid { display: grid; grid-template-columns: 1.2fr 1fr 1.45fr 1.25fr; gap: 12px; }
.cbox {
  display: flex; flex-direction: column; gap: .35rem;
  padding: 1.4rem 1.3rem 1.5rem;
  background: var(--ink); color: #fff; text-decoration: none;
  transition: background-color .15s ease;
  min-width: 0;
}
.cbox:hover { background: var(--ink-2); }
.cbox .ico { width: 1.7rem; height: 1.7rem; margin-bottom: .6rem; }
.cbox__k { font-size: .9rem; color: rgba(255,255,255,.7); }
.cbox__v { font-weight: 700; font-size: 1.05rem; overflow-wrap: break-word; }
.cbox--mail .cbox__v { font-size: .98rem; }
.cbox--wa { background: var(--wa); }
.cbox--wa:hover { background: var(--wa-dark); }
.cbox--wa .cbox__v { font-size: 1.35rem; font-stretch: 115%; }

/* Footer */
.foot { background: var(--paper); padding: 2.5rem 0 6rem; font-size: .95rem; color: var(--steel); }
.foot__in { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.foot strong { color: var(--ink); }
.foot p { margin: 0; }
.foot__slogan { font-stretch: 112%; font-weight: 700; color: var(--ink); align-self: center; }

/* Floating WhatsApp (mobile) */
.fab {
  position: fixed; right: 16px; bottom: 16px; z-index: 60;
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--wa); color: #fff;
  display: none; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(15,34,54,.35);
}
.fab .ico { width: 32px; height: 32px; }

/* Lightbox */
.lb { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; margin: 0; }
.lb::backdrop { background: rgba(8,18,30,.94); }
.lb[open] { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.lb img { max-width: min(92vw, 1600px); max-height: 82vh; width: auto; height: auto; object-fit: contain; }
.lb__cap { color: #fff; margin: 1rem 1rem 0; text-align: center; max-width: 60ch; }
.lb__btn {
  position: fixed; border: 0; background: rgba(255,255,255,.12); color: #fff;
  width: 52px; height: 52px; border-radius: 50%; font: 400 2rem/1 "Archivo", sans-serif; cursor: pointer;
}
.lb__btn:hover { background: rgba(255,255,255,.25); }
.lb__close { top: 16px; right: 16px; }
.lb__prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb__next { right: 16px; top: 50%; transform: translateY(-50%); }

/* Responsive */
@media (max-width: 960px) {
  .nav { display: none; }
  .top__in { justify-content: space-between; }
  .svc { grid-template-columns: 1fr; }
  .svc__item { display: grid; grid-template-columns: 40% 1fr; }
  .svc__item img { height: 100%; aspect-ratio: auto; }
  .svc__txt { border-top: 0; border-left: 6px solid var(--volt); }
  .about__in, .area__in { grid-template-columns: 1fr; }
  .also { grid-template-columns: 1fr 1fr; }
  .about__img { order: -1; }
  .about__img img { aspect-ratio: 4 / 3; }
  .grid { grid-template-columns: repeat(3, 1fr); }
  .contact__grid { grid-template-columns: 1fr 1fr; }
  .cbox--wa { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  body { font-size: 1rem; }
  .top .btn--small { display: none; }
  .top__tel { display: inline-flex; }
  .hero { min-height: 82vh; }
  .hero::after { background: linear-gradient(0deg, rgba(15,34,54,.95) 0%, rgba(15,34,54,.75) 50%, rgba(15,34,54,.25) 100%); }
  .hero__cta .btn { width: 100%; justify-content: center; }
  .svc__item { grid-template-columns: 1fr; }
  .also { grid-template-columns: 1fr; }
  .brand img { height: 54px; }
  .top__in { min-height: 66px; }
  .svc__item img { aspect-ratio: 16 / 10; height: auto; }
  .svc__txt { border-left: 0; border-top: 6px solid var(--volt); }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .contact__grid { grid-template-columns: 1fr; }
  .fab { display: flex; }
  .lb__prev, .lb__next { top: auto; bottom: 20px; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ===== v2: logo grande, menu a pulsanti, luce ed energia ===== */
.top { transition: box-shadow .25s ease; }
.top__in { min-height: 0; padding-top: 10px; padding-bottom: 10px; gap: 1.4rem; }
.brand img { height: 104px; transition: height .3s ease; }
.top.is-small .brand img { height: 66px; }
.top.is-small { box-shadow: 0 6px 24px -12px rgba(15,34,54,.35); }
html { scroll-padding-top: 100px; }

.nav { gap: .5rem; }
.nav a {
  font-size: 1.08rem; font-weight: 700;
  padding: .72rem 1.15rem; border-radius: 999px;
  background: var(--zinc); border: 0;
  transition: background-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.nav a:hover, .nav a:focus-visible {
  background: var(--volt); color: var(--ink);
  box-shadow: 0 0 0 4px rgba(255,198,26,.11), 0 8px 26px -6px rgba(255,198,26,.38);
  transform: translateY(-1px);
}
.nav a.is-here { background: var(--ink); color: #fff; }
.nav a.is-here:hover { background: var(--volt); color: var(--ink); }
.top .btn--small { font-size: 1.05rem; padding: .8rem 1.3rem; }
.btn--wa:hover { box-shadow: 0 0 0 4px rgba(26,143,73,.2), 0 8px 26px -6px rgba(26,143,73,.8); }
.btn--volt { background: var(--volt); color: var(--ink); }
.btn--volt:hover { box-shadow: 0 0 0 4px rgba(255,198,26,.25), 0 10px 30px -6px rgba(255,198,26,.9); }
.btn { transition: background-color .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.btn:hover { transform: translateY(-1px); }

.menu-btn {
  display: none; margin-left: auto; align-items: center; gap: .6rem;
  font: inherit; font-weight: 700; font-size: 1.02rem; color: var(--ink);
  background: var(--zinc); border: 0; border-radius: 999px; padding: .7rem 1.1rem; cursor: pointer;
}
.menu-btn__bars, .menu-btn__bars::before, .menu-btn__bars::after { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; position: relative; }
.menu-btn__bars::before, .menu-btn__bars::after { content: ""; position: absolute; left: 0; }
.menu-btn__bars::before { top: -6px; } .menu-btn__bars::after { top: 6px; }

/* Hero: foto che si alternano e cavo con l'impulso */
.hero { border-bottom: 0; }
.hero__slides, .hero__img, .hero__img img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__img { opacity: 0; transition: opacity 1.6s ease; }
.hero__img.is-on { opacity: 1; }
.hero__img img { object-fit: cover; transform: scale(1.02); }
.hero__img.is-on img { animation: kb 9s ease-out forwards; }
@keyframes kb { from { transform: scale(1.02); } to { transform: scale(1.1); } }
.hero::after { z-index: 0; }
.hero__in { z-index: 2; }
.cable {
  position: absolute; left: 0; right: 0; bottom: 0; height: 10px; z-index: 3;
  background: var(--volt); overflow: hidden;
}
.cable::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 28%; left: -30%;
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.95), rgba(255,255,255,0));
  animation: pulse 2.2s .6s ease-in-out 1 forwards;
}
.hero:hover .cable::after { animation: pulse 1.6s ease-in-out 1; }
@keyframes pulse { from { left: -30%; } to { left: 105%; } }

/* Servizi: le schede si accendono */
.svc__item {
  position: relative; overflow: hidden; transition: transform .25s ease, box-shadow .25s ease;
  --mx: 50%; --my: 0%;
}
.svc__item::before {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0;
  background: radial-gradient(260px circle at var(--mx) var(--my), rgba(255,214,90,.35), transparent 60%);
  transition: opacity .25s ease;
}
.svc__item:hover { transform: translateY(-4px); box-shadow: 0 0 0 2px var(--volt), 0 22px 50px -18px rgba(255,170,0,.65); }
.svc__item:hover::before { opacity: 1; }
.svc__txt { position: relative; transition: border-color .25s ease; }
.svc__ico {
  position: absolute; right: 1.2rem; top: -28px; width: 56px; height: 56px; border-radius: 50%;
  background: var(--ink); color: var(--volt); display: grid; place-items: center;
  box-shadow: 0 0 0 5px var(--zinc); transition: background-color .25s ease, color .25s ease, box-shadow .25s ease;
}
.svc__ico svg { width: 28px; height: 28px; }
.svc__item:hover .svc__ico { background: var(--volt); color: var(--ink); box-shadow: 0 0 0 5px var(--zinc), 0 0 28px 6px rgba(255,198,26,.8); }
.svc__item img { transition: transform .5s ease; }
.svc__item:hover img { transform: scale(1.03); }
.svc__item > img { overflow: hidden; }

/* Altri servizi: pillole che si accendono */
.also li { padding: .55rem .2rem; border-radius: 10px; transition: color .2s ease; }
.also li::before { transition: box-shadow .2s ease, transform .2s ease; }
.also li:hover::before { box-shadow: 0 0 12px 3px rgba(255,198,26,.9); transform: scale(1.2); }

/* Galleria */
.grid a { position: relative; border-radius: 4px; }
.grid a::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: 4px;
  box-shadow: inset 0 0 0 0 var(--volt); transition: box-shadow .25s ease;
}
.grid a:hover::after, .grid a:focus-visible::after { box-shadow: inset 0 0 0 4px var(--volt); }
.grid img { transition: transform .45s ease; }
.grid a:hover img { opacity: 1; transform: scale(1.04); }
.chip { transition: background-color .18s ease, color .18s ease, box-shadow .18s ease; }
.chip:hover { background: var(--volt); border-color: var(--volt); box-shadow: 0 8px 22px -8px rgba(255,198,26,.9); }

/* Fascia illuminazione architettonica */
.feature { position: relative; color: #fff; background: var(--ink); overflow: hidden; }
.feature__img { position: absolute; inset: -12% 0; }
.feature__img img { width: 100%; height: 100%; object-fit: cover; transform: translateY(var(--py, 0)); will-change: transform; }
.feature::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(15,34,54,.92) 0%, rgba(15,34,54,.6) 50%, rgba(15,34,54,.1) 100%); }
.feature__in { position: relative; z-index: 1; padding-top: clamp(5rem, 12vw, 9rem); padding-bottom: clamp(5rem, 12vw, 9rem); }
.feature__title { font-weight: 800; font-size: clamp(2rem, 4.6vw, 3.6rem); max-width: 14ch; margin-bottom: 1.2rem; }
.feature p { max-width: 42ch; font-size: 1.15rem; color: rgba(255,255,255,.9); margin-bottom: 1.8rem; }

/* Lightbox: richiesta di un lavoro simile */
.lb__wa { margin-top: 1rem; }

/* Footer */
.foot__in { align-items: center; }
.foot__logo { height: 110px; width: auto; }

/* Ingresso delle sezioni */
[data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity .35s ease, transform .35s ease; }
[data-reveal].in { opacity: 1; transform: none; }
.no-js [data-reveal] { opacity: 1; transform: none; }

@media (max-width: 1180px) {
  .nav { display: none; }
  .menu-btn { display: inline-flex; }
  .top .btn--small { display: inline-flex; }
  .nav.is-open {
    display: flex; flex-direction: column; gap: .6rem;
    position: absolute; left: 0; right: 0; top: 100%;
    background: #fff; padding: 1rem var(--gut) 1.4rem; box-shadow: 0 18px 30px -18px rgba(15,34,54,.5);
  }
  .nav.is-open a { font-size: 1.15rem; padding: 1rem 1.3rem; text-align: center; }
}
@media (max-width: 700px) {
  .brand img { height: 76px; }
  .top.is-small .brand img { height: 56px; }
  .top .btn--small { display: none; }
  .menu-btn { padding: .65rem .95rem; }
  .hero__img--extra { display: none; }
  .svc__ico { top: -24px; width: 50px; height: 50px; }
  .foot__logo { height: 90px; }
}
@media (hover: none) {
  .svc__item:hover, .btn:hover, .nav a:hover { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hero__img.is-on img { animation: none; }
  .cable::after { animation: none; display: none; }
  [data-reveal] { opacity: 1; transform: none; }
  .feature__img img { transform: none !important; }
}
.svc__txt h3 { padding-right: 62px; }
