/* ITAIM – foglio di stile */

:root {
  --navy: #0d1726;
  --navy-2: #13223a;
  --navy-3: #1c2f4d;
  --ink: #111827;
  --text: #3b4656;
  --muted: #6b7686;
  --line: #e3e7ee;
  --surface: #f3f5f9;
  --white: #ffffff;
  --accent: #a31f3b;
  --accent-2: #c42b4b;
  --accent-dark: #6b1a2a;
  --on-dark: #e8edf5;
  --on-dark-muted: #9aa8bd;

  --head: 'Libre Franklin', 'Segoe UI', Arial, sans-serif;
  --body: 'Source Sans 3', 'Segoe UI', Arial, sans-serif;

  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1280px;
  --header-h: 76px;
  --radius: 4px;
  --radius-sm: 3px;
  --shadow: 0 18px 50px -20px rgba(13, 23, 38, .28);
  --shadow-sm: 0 6px 20px -10px rgba(13, 23, 38, .25);
  --ease: cubic-bezier(.22, .8, .24, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 70px); }
body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font: 400 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; font-family: var(--head); color: var(--ink); font-weight: 600; letter-spacing: -0.01em; line-height: 1.22; }
h1 { font-size: clamp(28px, 3vw, 40px); }
h2 { font-size: clamp(23px, 2.1vw, 29px); }
h3 { font-size: 18px; font-weight: 600; }
h4 { font-size: 16px; font-weight: 600; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -9999px; top: 0; background: var(--navy); color: #fff; padding: 8px 14px; z-index: 200; }
.skip:focus { left: 8px; top: 8px; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 600 12px/1 var(--body);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.eyebrow::before { content: ''; width: 22px; height: 2px; background: currentColor; }
.dark .eyebrow, .eyebrow--light { color: #ff8da3; }
.lead { font-size: 18px; color: var(--text); max-width: 62ch; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 600 15px/1 var(--body);
  padding: 14px 22px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background .25s, color .25s, border-color .25s, transform .25s var(--ease), box-shadow .25s;
}
.btn svg { width: 16px; height: 16px; transition: transform .25s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-dark); }
.btn--ghost { border-color: rgba(255, 255, 255, .45); color: #fff; }
.btn--ghost:hover { background: #fff; color: var(--navy); }
.btn--outline { border-color: var(--line); color: var(--ink); background: #fff; }
.btn--outline:hover { border-color: var(--ink); }
.btn[disabled] { opacity: .6; cursor: progress; }

.more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 600 15px var(--body);
  color: var(--accent);
  text-decoration: none;
}
.more svg { width: 16px; height: 16px; transition: transform .25s var(--ease); }
.more:hover svg { transform: translateX(4px); }
.dark .more { color: #ff8da3; }

.section { padding-block: clamp(64px, 8vw, 112px); }
.section--surface { background: var(--surface); }
.dark { background: var(--navy); color: var(--on-dark-muted); }
.dark h2, .dark h3, .dark h4 { color: #fff; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 20px 48px; margin-bottom: clamp(32px, 4vw, 48px); }
.section-head > div { max-width: 640px; }
.section-head p { margin: 14px 0 0; }

/* ---------- Intestazione ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-h);
  background: #fff;
  box-shadow: 0 1px 0 var(--line);
  transition: background .3s, box-shadow .3s, transform .35s var(--ease);
}
body.inner { padding-top: var(--header-h); }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand img { height: 28px; width: auto; transition: filter .3s; }

.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav > a, .mega-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  font: 500 15px var(--body);
  color: var(--ink);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: background .2s, color .2s;
}
.site-nav > a:hover, .mega-trigger:hover { background: var(--surface); }
.site-nav a[aria-current="page"]:not(.nav-cta) { color: var(--accent); }
.chev { width: 10px; height: 6px; transition: transform .25s; }
.site-nav .nav-cta { background: var(--accent); color: #fff; margin-left: 10px; padding-inline: 20px; }
.site-nav .nav-cta:hover { background: var(--accent-2); }

/* Header trasparente sopra lo slider della home */
body.home .site-header:not(.is-solid) { background: transparent; box-shadow: none; }
body.home .site-header:not(.is-solid) .brand img { filter: brightness(0) invert(1); }
body.home .site-header:not(.is-solid) .site-nav > a:not(.nav-cta),
body.home .site-header:not(.is-solid) .mega-trigger { color: #fff; }
body.home .site-header:not(.is-solid) .site-nav > a:not(.nav-cta):hover,
body.home .site-header:not(.is-solid) .mega-trigger:hover { background: rgba(255, 255, 255, .12); }
body.home .site-header:not(.is-solid) .menu-toggle span { background: #fff; }
.site-header.is-solid { box-shadow: 0 8px 30px -18px rgba(13, 23, 38, .35); }
.site-header.is-hidden { transform: translateY(-100%); }

/* Menu esteso dei servizi */
.has-mega { position: relative; }
.mega {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  width: min(860px, 90vw);
  display: grid;
  grid-template-columns: 1fr 250px;
  gap: 20px;
  padding: 20px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 8px);
  transition: opacity .25s, transform .25s var(--ease), visibility .25s;
}
.mega::before { content: ''; position: absolute; inset: -16px 0 auto; height: 16px; }
.has-mega:hover .mega, .has-mega.is-open .mega, .has-mega:focus-within .mega { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.has-mega:hover .chev, .has-mega.is-open .chev { transform: rotate(180deg); }
.mega-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.mega-grid a { display: block; padding: 14px 16px; border-radius: var(--radius-sm); text-decoration: none; transition: background .2s; }
.mega-grid a:hover { background: var(--surface); }
.mega-grid strong { display: block; font: 600 15px var(--head); color: var(--ink); margin-bottom: 2px; }
.mega-grid span { font-size: 13px; color: var(--muted); line-height: 1.45; display: block; }
.mega-feature { position: relative; display: flex; flex-direction: column; justify-content: end; padding: 18px; border-radius: var(--radius-sm); overflow: hidden; color: #fff; text-decoration: none; min-height: 220px; }
.mega-feature img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.mega-feature::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(13, 23, 38, .92), rgba(13, 23, 38, .1) 70%); }
.mega-feature:hover img { transform: scale(1.06); }
.mega-feature span, .mega-feature strong { position: relative; z-index: 1; }
.mega-feature span { font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: #ff8da3; margin-bottom: 6px; font-weight: 600; }
.mega-feature strong { font: 600 15px/1.35 var(--head); }

.menu-toggle { display: none; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; position: relative; }
.menu-toggle span { position: absolute; left: 11px; width: 22px; height: 2px; background: var(--ink); transition: transform .3s var(--ease), top .3s; }
.menu-toggle span:first-child { top: 17px; }
.menu-toggle span:last-child { top: 25px; }
.menu-toggle[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }

@media (max-width: 980px) {
  .menu-toggle { display: block; }
  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px var(--gutter) 32px;
    background: #fff;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .25s, transform .25s var(--ease), visibility .25s;
  }
  .site-nav.is-open { opacity: 1; visibility: visible; transform: none; }
  body.menu-open { overflow: hidden; }
  body.menu-open .site-header { background: #fff !important; box-shadow: 0 1px 0 var(--line) !important; }
  body.menu-open .site-header .brand img { filter: none !important; }
  body.menu-open .site-header .menu-toggle span { background: var(--ink) !important; }
  .site-nav > a, .mega-trigger { color: var(--ink) !important; font-size: 18px; padding: 16px 0; border-radius: 0; border-bottom: 1px solid var(--line); justify-content: space-between; width: 100%; }
  .site-nav > a:hover, .mega-trigger:hover { background: none !important; }
  .site-nav .nav-cta { margin: 24px 0 0; justify-content: center; border: 0; border-radius: 999px; color: #fff !important; }
  .mega { position: static; width: auto; transform: none; opacity: 1; visibility: visible; box-shadow: none; padding: 0; display: none; grid-template-columns: 1fr; }
  .has-mega:hover .mega, .has-mega:focus-within .mega { transform: none; }
  .has-mega.is-open .mega { display: block; }
  .mega-grid { grid-template-columns: 1fr; padding: 8px 0; }
  .mega-feature { display: none; }
}

/* ---------- Slider della home ---------- */

.hero { position: relative; height: clamp(600px, 92vh, 820px); background: var(--navy); color: #fff; overflow: hidden; }
.slides { position: absolute; inset: 0; }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s ease; }
.slide.is-active { opacity: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); }
.slide.is-active img { animation: kenburns 9s ease-out forwards; }
@keyframes kenburns { from { transform: scale(1.08); } to { transform: scale(1); } }
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(13, 23, 38, .9) 0%, rgba(13, 23, 38, .65) 42%, rgba(13, 23, 38, .15) 75%),
    linear-gradient(0deg, rgba(13, 23, 38, .8) 0%, rgba(13, 23, 38, 0) 35%);
}
.hero-content { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: center; padding-top: var(--header-h); padding-bottom: 200px; }
.hero-content > div { max-width: 600px; }
.hero h1 { color: #fff; margin-bottom: 18px; }
.hero .lead { color: rgba(255, 255, 255, .82); margin-bottom: 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-tabs { position: absolute; left: 0; right: 0; bottom: 64px; z-index: 3; }
.hero-tabs ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid rgba(255, 255, 255, .18); }
.hero-tabs button {
  all: unset;
  box-sizing: border-box;
  display: block;
  width: 100%;
  cursor: pointer;
  padding: 18px 20px 26px 0;
  position: relative;
  color: rgba(255, 255, 255, .55);
  transition: color .3s;
}
.hero-tabs button::before { content: ''; position: absolute; top: -1px; left: 0; right: 16px; height: 2px; background: rgba(255, 255, 255, .0); }
.hero-tabs button .bar { position: absolute; top: -1px; left: 0; height: 2px; width: 0; background: var(--accent-2); }
.hero-tabs button.is-active { color: #fff; }
.hero-tabs button.is-active .bar { animation: progress var(--slide-ms, 7000ms) linear forwards; }
.hero.is-paused .hero-tabs button.is-active .bar { animation-play-state: paused; }
@keyframes progress { from { width: 0; } to { width: calc(100% - 16px); } }
.hero-tabs button:hover { color: #fff; }
.hero-tabs small { display: block; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 4px; opacity: .8; }
.hero-tabs strong { font: 600 15px/1.35 var(--head); }

/* ---------- Contatori ---------- */

.stats { position: relative; z-index: 5; margin-top: -1px; }
.stats-card {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transform: translateY(-50%);
  margin-bottom: -40px;
}
.stat { padding: 28px 30px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; }
.stat b { display: block; font: 700 clamp(28px, 2.8vw, 38px)/1 var(--head); color: var(--ink); letter-spacing: -0.02em; }
.stat b em { font-style: normal; color: var(--accent); }
.stat > span { display: block; margin-top: 8px; font-size: 14px; color: var(--muted); }

/* ---------- Chi siamo (home) ---------- */

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(36px, 6vw, 88px); align-items: center; }
.collage { position: relative; padding: 0 12% 14% 0; }
.collage img { border-radius: var(--radius); object-fit: cover; width: 100%; }
.collage .c1 { aspect-ratio: 4 / 3.2; }
.collage .c2 { position: absolute; right: 0; bottom: 0; width: 48%; aspect-ratio: 1; border: 6px solid #fff; box-shadow: var(--shadow); }
.collage .badge {
  position: absolute;
  left: 24px;
  bottom: 24%;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font: 600 14px/1.35 var(--head);
  box-shadow: var(--shadow-sm);
}
.collage .badge b { display: block; font-size: 26px; }
.ticks { margin: 24px 0 30px; display: grid; gap: 12px; }
.ticks li { display: flex; gap: 12px; align-items: flex-start; }
.ticks svg { flex: none; width: 22px; height: 22px; margin-top: 1px; color: var(--accent); }

/* ---------- Settori (schede) ---------- */

.sectors { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(24px, 4vw, 56px); align-items: stretch; }
.sector-tabs { display: flex; flex-direction: column; gap: 6px; }
.sector-tabs button {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  display: flex;
  align-items: center;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  color: var(--on-dark-muted);
  transition: background .25s, color .25s;
  position: relative;
}
.sector-tabs button:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.sector-tabs button[aria-selected="true"] { background: var(--navy-3); color: #fff; }
.sector-tabs button[aria-selected="true"]::after { content: ''; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 3px; background: var(--accent-2); }
.sector-tabs .ic { flex: none; width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 255, 255, .06); }
.sector-tabs .ic svg { width: 22px; height: 22px; }
.sector-tabs strong { font: 600 16px var(--head); display: block; color: inherit; }
.sector-tabs small { font-size: 13px; opacity: .75; }
.sector-panels { position: relative; min-height: 460px; border-radius: var(--radius); overflow: hidden; background: var(--navy-2); }
.sector-panel { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .6s ease, visibility .6s; }
.sector-panel.is-active { opacity: 1; visibility: visible; }
.sector-panel img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.05); transition: transform 6s ease-out; }
.sector-panel.is-active img { transform: scale(1); }
.sector-panel::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(13, 23, 38, .95) 0%, rgba(13, 23, 38, .55) 45%, rgba(13, 23, 38, .05) 80%); }
.sector-body { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: clamp(22px, 3vw, 36px); color: var(--on-dark); }
.sector-body h3 { font-size: 22px; margin-bottom: 10px; }
.sector-body p { max-width: 58ch; color: rgba(232, 237, 245, .85); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 20px; }
.chips a, .chips span {
  font-size: 13px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  text-decoration: none;
  backdrop-filter: blur(6px);
  transition: background .2s;
}
.chips a:hover { background: rgba(255, 255, 255, .22); }

/* ---------- Servizi (schede) ---------- */

.svc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.svc-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 30px 28px 26px;
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  text-decoration: none;
  overflow: hidden;
  transition: transform .35s var(--ease), box-shadow .35s, border-color .35s;
}
.svc-card::before { content: ''; position: absolute; left: 0; top: 0; height: 3px; width: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .45s var(--ease); }
.svc-card:hover { transform: none; box-shadow: var(--shadow); border-color: transparent; }
.svc-card:hover::before { transform: scaleX(1); }
.svc-card .ic { width: 52px; height: 52px; border-radius: 12px; background: #f8e9ec; color: var(--accent); display: grid; place-items: center; margin-bottom: 22px; transition: background .3s, color .3s; }
.svc-card:hover .ic { background: var(--accent); color: #fff; }
.svc-card .ic svg { width: 26px; height: 26px; }
.svc-card h3 { margin-bottom: 10px; }
.svc-card p { font-size: 15px; flex: 1; }
.svc-card .more { margin-top: 8px; }

/* ---------- Mappa ---------- */

.map-wrap { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.map-legend { display: grid; gap: 10px; margin: 24px 0 28px; }
.map-legend li { display: flex; align-items: center; gap: 12px; font-size: 15px; color: var(--on-dark); }
.map-legend i { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.map-legend .l-office { background: var(--accent-2); box-shadow: 0 0 0 4px rgba(196, 43, 75, .25); }
.map-legend .l-project { background: #fff; }
.map-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.map-list button {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .05);
  color: var(--on-dark);
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  transition: background .2s;
}
.map-list button:hover, .map-list button.is-active { background: var(--navy-3); color: #fff; }
.map-list button span { color: var(--on-dark-muted); font-size: 12px; }
.map-figure { position: relative; margin: 0; }
.map-svg { width: 100%; height: auto; display: block; }
.map-svg .dots { stroke: #31486d; stroke-width: 4.2; stroke-linecap: round; }
.map-svg .arc { fill: none; stroke: rgba(255, 141, 163, .55); stroke-width: 1.2; stroke-dasharray: 3 5; }
@keyframes dash { to { stroke-dashoffset: -400; } }
.pin { cursor: pointer; }
.pin .core { fill: #fff; transition: r .2s; }
.pin .halo { fill: rgba(255, 255, 255, .18); }
.pin.office .core { fill: var(--accent-2); }
.pin.office .halo { fill: rgba(196, 43, 75, .3); }
@keyframes pulse { 0% { transform: scale(.6); opacity: 1; } 100% { transform: scale(2.6); opacity: 0; } }
.pin:hover .core, .pin.is-active .core { r: 7; }
.pin text { font: 600 13px var(--body); fill: #fff; paint-order: stroke; stroke: var(--navy); stroke-width: 4px; pointer-events: none; }
.map-tip {
  position: absolute;
  z-index: 2;
  width: 260px;
  background: #fff;
  color: var(--text);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  overflow: hidden;
  transform: translate(-50%, calc(-100% - 18px));
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s;
}
.map-tip.is-visible { opacity: 1; pointer-events: auto; }
.map-tip img { width: 100%; height: 110px; object-fit: cover; }
.map-tip div { padding: 12px 14px 14px; }
.map-tip small { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--accent); font-weight: 600; }
.map-tip strong { display: block; font: 600 15px/1.35 var(--head); color: var(--ink); margin: 3px 0 4px; }
.map-tip span { font-size: 13px; color: var(--muted); }
.map-tip a { color: var(--accent); font-size: 13px; font-weight: 600; text-decoration: none; display: inline-block; margin-top: 6px; }

/* ---------- Carosello progetti ---------- */

.carousel-nav { display: flex; gap: 10px; }
.carousel-nav button {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: var(--ink);
  transition: background .2s, color .2s, border-color .2s;
}
.carousel-nav button:hover:not(:disabled) { background: var(--navy); color: #fff; border-color: var(--navy); }
.carousel-nav button:disabled { opacity: .35; cursor: default; }
.carousel-nav svg { width: 18px; height: 18px; }
.track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 3 * 20px) / 3.4);
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 6px;
  cursor: grab;
}
.track::-webkit-scrollbar { display: none; }
.track.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.track.is-dragging a { pointer-events: none; }

.pcard { position: relative; display: block; scroll-snap-align: start; border-radius: var(--radius); overflow: hidden; aspect-ratio: 3 / 4; color: #fff; text-decoration: none; background: var(--navy); }
.pcard img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); user-select: none; -webkit-user-drag: none; }
.pcard::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(13, 23, 38, .92) 0%, rgba(13, 23, 38, .25) 50%, rgba(13, 23, 38, 0) 70%); transition: background .4s; }
.pcard:hover img { transform: scale(1.07); }
.pcard:hover::after { background: linear-gradient(0deg, rgba(107, 26, 42, .94) 0%, rgba(13, 23, 38, .35) 60%, rgba(13, 23, 38, .05) 85%); }
.pcard-body { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 22px; }
.pcard-body small { display: block; font-size: 14px; color: #ff9fb2; margin-bottom: 6px; }
.pcard-body h3, .pcard-title { display: block; color: #fff; font: 600 18px/1.3 var(--head); margin-bottom: 4px; }
.pcard-body span { font-size: 14px; color: rgba(255, 255, 255, .75); }
.pcard-role { display: block; max-height: 0; overflow: hidden; opacity: 0; transition: max-height .4s var(--ease), opacity .4s, margin .4s; font-size: 14px; color: rgba(255, 255, 255, .9); }
.pcard:hover .pcard-role, .pcard:focus-visible .pcard-role { max-height: 60px; opacity: 1; margin-top: 10px; }

/* ---------- News ---------- */

.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.ncard {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 26px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  min-height: 230px;
  transition: transform .3s var(--ease), box-shadow .3s, border-color .3s;
}
.ncard:hover { transform: none; box-shadow: var(--shadow); border-color: transparent; }
.ncard-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.tag { font-size: 14px; font-weight: 600; color: var(--accent); }
.ncard h3 { font-size: 17px; line-height: 1.4; flex: 1; transition: color .2s; }
.ncard:hover h3 { color: var(--accent); }
.ncard-src { font-size: 13px; color: var(--muted); display: flex; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 14px; }
.ncard--featured { grid-column: span 2; background: var(--navy); border-color: var(--navy); color: var(--on-dark-muted); }
.ncard--featured h3 { color: #fff; font-size: clamp(20px, 2vw, 25px); }
.ncard--featured:hover h3 { color: #ff8da3; }
.ncard--featured .tag { color: #ff9fb2; }
.ncard--featured .ncard-src { border-color: rgba(255, 255, 255, .12); color: var(--on-dark-muted); }
.skeleton { background: linear-gradient(90deg, var(--surface) 0%, #e9edf3 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border: 0; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Partner (scorrimento continuo) ---------- */

.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; gap: 20px; width: max-content; animation: marquee 40s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(calc(-50% - 10px)); } }
.marquee li { width: 180px; height: 96px; flex: none; display: grid; place-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px 28px; }
.marquee img { max-height: 54px; width: auto; object-fit: contain; filter: grayscale(1); opacity: .7; transition: filter .3s, opacity .3s; }
.marquee li:hover img { filter: none; opacity: 1; }

/* ---------- Invito finale ---------- */

.cta-band { position: relative; overflow: hidden; border-radius: var(--radius); color: #fff; padding: clamp(36px, 5vw, 64px); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px; background: var(--navy); }
.cta-band img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .35; }
.cta-band::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(107, 26, 42, .92), rgba(13, 23, 38, .75)); }
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { color: #fff; max-width: 26ch; }
.cta-band p { margin: 10px 0 0; color: rgba(255, 255, 255, .8); }


/* ---------- Blocchi della home ---------- */

.link { color: var(--accent); font-weight: 600; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 1px; transition: color .2s; }
.link:hover { color: var(--accent-dark); }
.link--light { color: #fff; }
.link--light:hover { color: #ff8da3; }
.section-head h2 { margin: 0; }

.profile { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.profile h2 { margin-bottom: 18px; }
.facts { margin: 0; border-top: 2px solid var(--navy); }
.facts div { display: grid; grid-template-columns: 200px 1fr; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); font-size: 15px; }
.facts dd { margin: 0; color: var(--ink); font-weight: 600; }

.svc-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(32px, 5vw, 72px); border-top: 1px solid var(--line-strong, #cfd5de); }
.svc-list a { display: block; padding: 24px 0; border-bottom: 1px solid #d6dbe3; text-decoration: none; }
.svc-list h3 { transition: color .2s; }
.svc-list a:hover h3 { color: var(--accent); }
.svc-list p { margin: 6px 0 8px; font-size: 16px; }
.svc-list .for { font-size: 14px; color: var(--muted); font-style: italic; }

.sector-body .refs { margin: 10px 0 0; font-size: 15px; color: rgba(232, 237, 245, .7); }

.iso-table { width: 100%; border-collapse: collapse; font-size: 16px; }
.iso-table th, .iso-table td { text-align: left; padding: 14px 16px 14px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.iso-table thead th { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; border-bottom: 2px solid var(--navy); }
.iso-table tbody th { color: var(--ink); font-weight: 600; white-space: nowrap; }
.iso-table tbody tr { transition: background .2s; }
.iso-table tbody tr:hover { background: var(--surface); }
.iso-table a { color: var(--accent); font-weight: 600; text-decoration: none; }
.iso-table a:hover { text-decoration: underline; }

.logos { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 0; border-left: 1px solid var(--line); border-top: 1px solid var(--line); }
.logos li { display: grid; place-items: center; height: 104px; padding: 20px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.logos img { max-height: 52px; width: auto; filter: grayscale(1); opacity: .75; transition: filter .3s, opacity .3s; }
.logos li:hover img { filter: none; opacity: 1; }

.contact-strip { background: var(--accent-dark); color: rgba(255, 255, 255, .85); }
.contact-strip .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px 32px; padding-block: 26px; }
.contact-strip p { margin: 0; }
.contact-strip strong { color: #fff; margin-right: 8px; }
.contact-strip a:not(.btn) { color: #fff; text-decoration: none; }
.contact-strip .btn--primary { background: #fff; color: var(--accent-dark); }
.contact-strip .btn--primary:hover { background: var(--surface); }

/* ---------- Testata delle pagine interne ---------- */

.page-hero { position: relative; background: var(--navy); color: #fff; overflow: hidden; }
.page-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .45; }
.page-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(13, 23, 38, .95) 0%, rgba(13, 23, 38, .7) 55%, rgba(13, 23, 38, .35) 100%); }
.page-hero .wrap { position: relative; z-index: 1; padding-block: clamp(56px, 7vw, 96px); }
.page-hero h1 { color: #fff; margin-bottom: 14px; }
.page-hero .lead { color: rgba(255, 255, 255, .8); margin: 0; }
.crumbs { font-size: 13px; color: rgba(255, 255, 255, .6); margin-bottom: 22px; display: flex; gap: 8px; }
.crumbs a { color: rgba(255, 255, 255, .8); text-decoration: none; }
.crumbs a:hover { color: #fff; }

/* ---------- Chi siamo ---------- */

.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; counter-reset: step; position: relative; }
.steps::before { content: ''; position: absolute; top: 26px; left: 26px; right: 26px; height: 2px; background: rgba(255, 255, 255, .12); }
.steps .progress { position: absolute; top: 26px; left: 26px; height: 2px; background: var(--accent-2); width: 0; transition: width .6s var(--ease); }
.step { position: relative; }
.step button {
  all: unset;
  cursor: pointer;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--navy-2);
  border: 2px solid rgba(255, 255, 255, .15);
  color: #fff;
  font: 700 16px var(--head);
  transition: background .3s, border-color .3s, transform .3s var(--ease);
  position: relative;
  z-index: 1;
}
.step button:hover { transform: scale(1.06); }
.step.is-active button, .step.is-done button { background: var(--accent); border-color: var(--accent); }
.step h3 { margin: 22px 0 8px; font-size: 18px; }
.step p { font-size: 15px; margin: 0; transition: color .3s; }
.step:not(.is-active) p { color: rgba(154, 168, 189, .7); }

.value-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.value { padding: 28px 24px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); transition: transform .3s var(--ease), box-shadow .3s; }
.value:hover { transform: none; box-shadow: var(--shadow); }
.value .ic { width: 48px; height: 48px; border-radius: 12px; background: #f8e9ec; color: var(--accent); display: grid; place-items: center; margin-bottom: 18px; }
.value .ic svg { width: 24px; height: 24px; }
.value h3 { margin-bottom: 8px; font-size: 18px; }
.value p { font-size: 15px; margin: 0; }

.offices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.office { position: relative; border-radius: var(--radius); overflow: hidden; padding: 28px; background: var(--navy-2); color: var(--on-dark-muted); display: flex; flex-direction: column; }
.office.main { background: var(--accent-dark); }
.office small { font-size: 12px; text-transform: uppercase; letter-spacing: .14em; color: #ff8da3; font-weight: 600; }
.office.main small { color: #ffc2ce; }
.office h3 { font-size: 22px; margin: 0 0 8px; color: #fff; }
.office p { margin: 0; color: rgba(232, 237, 245, .8); }
.office .coords { position: absolute; top: 24px; right: 24px; font-size: 12px; color: rgba(255, 255, 255, .4); font-variant-numeric: tabular-nums; }

/* ---------- Servizi ---------- */

.subnav { position: sticky; top: var(--header-h); z-index: 20; background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.subnav ul { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-block: 12px; }
.subnav ul::-webkit-scrollbar { display: none; }
.subnav a { display: block; white-space: nowrap; padding: 9px 16px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--text); text-decoration: none; transition: background .2s, color .2s; }
.subnav a:hover { background: var(--surface); }
.subnav a.is-active { background: var(--navy); color: #fff; }

.svc-block { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 5vw, 72px); align-items: start; padding-block: clamp(56px, 7vw, 96px); border-bottom: 1px solid var(--line); }
.svc-block:nth-of-type(even) .svc-media { order: 2; }
.svc-media { margin: 0; position: sticky; top: calc(var(--header-h) + 90px); border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3.4; }
.svc-media img { width: 100%; height: 100%; object-fit: cover; }
.svc-media figcaption { position: absolute; left: 16px; bottom: 16px; background: rgba(13, 23, 38, .8); color: #fff; font-size: 13px; padding: 8px 12px; border-radius: 999px; backdrop-filter: blur(6px); }
.svc-text .chips span { background: var(--surface); color: var(--text); backdrop-filter: none; }
.svc-text h2 { margin-bottom: 4px; }
.svc-text h4 { margin: 28px 0 14px; }
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; }
.checks li { display: flex; gap: 10px; font-size: 15px; padding: 12px 14px; background: var(--surface); border-radius: var(--radius-sm); }
.checks svg { flex: none; width: 18px; height: 18px; color: var(--accent); margin-top: 3px; }

/* ---------- Progetti ---------- */

.toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 32px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pills button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 9px 16px;
  font: 500 14px var(--body);
  color: var(--text);
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.pills button:hover { border-color: var(--ink); }
.pills button[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.pills .count { display: inline-block; min-width: 20px; margin-left: 6px; padding: 1px 6px; border-radius: 999px; font-size: 12px; background: var(--surface); color: var(--muted); }
.pills button[aria-pressed="true"] .count { background: rgba(255, 255, 255, .15); color: #fff; }
.search { position: relative; }
.search input { width: 260px; max-width: 100%; padding: 11px 16px 11px 42px; border-radius: 999px; border: 1px solid var(--line); font: 400 15px var(--body); color: var(--ink); background: #fff; }
.search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(163, 31, 59, .12); }
.search svg { position: absolute; left: 15px; top: 50%; width: 17px; height: 17px; transform: translateY(-50%); color: var(--muted); }

.pgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.pgrid .pcard { aspect-ratio: 4 / 3.6; cursor: pointer; border: 0; padding: 0; width: 100%; text-align: left; font: inherit; }
.pgrid .pcard[hidden] { display: none; }
.pgrid .pcard.is-entering { animation: enter .5s var(--ease) both; }
@keyframes enter { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.empty { padding: 48px; text-align: center; color: var(--muted); background: var(--surface); border-radius: var(--radius); }

.modal { width: min(1120px, calc(100% - 2 * var(--gutter))); max-height: calc(100dvh - 40px); padding: 0; border: 0; border-radius: var(--radius); background: #fff; color: var(--text); box-shadow: var(--shadow); overflow: hidden; }
.modal::backdrop { background: rgba(13, 23, 38, .7); backdrop-filter: blur(4px); }
.modal[open] { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); animation: modal-in .35s var(--ease); }
@keyframes modal-in { from { opacity: 0; transform: translateY(16px); } }
.modal-media { position: relative; background: var(--navy); min-height: 100%; }
.modal-media img { width: 100%; height: 100%; object-fit: cover; }
.modal-nav { position: absolute; left: 16px; bottom: 16px; display: flex; gap: 8px; }
.modal-nav button { width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92); cursor: pointer; display: grid; place-items: center; color: var(--ink); transition: background .2s; }
.modal-nav button:hover { background: #fff; }
.modal-nav svg { width: 16px; height: 16px; }
.modal-body { padding: clamp(24px, 3.4vw, 44px); overflow-y: auto; max-height: calc(100dvh - 40px); position: relative; }
.modal-close { position: absolute; top: 16px; right: 16px; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 22px; line-height: 1; color: var(--ink); }
.modal-close:hover { background: var(--surface); }
.modal-body h2 { font-size: clamp(22px, 2.2vw, 28px); margin: 6px 48px 6px 0; }
.modal-loc { color: var(--muted); font-size: 15px; display: flex; align-items: center; gap: 6px; margin-bottom: 18px; }
.modal-loc svg { width: 16px; height: 16px; }
.specs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 24px 0 28px; }
.specs div { background: var(--surface); border-radius: var(--radius-sm); padding: 12px 14px; }
.specs dt { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 2px; }
.specs dd { margin: 0; color: var(--ink); font-weight: 500; font-size: 15px; }

/* ---------- Pagina news ---------- */

.news-page .news-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.news-note { margin-top: 36px; font-size: 13px; color: var(--muted); max-width: 90ch; }
.load-more { display: flex; justify-content: center; margin-top: 32px; }

/* ---------- Contatti ---------- */

.contact-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px; align-items: stretch; }
.contact-panel { background: var(--navy); color: var(--on-dark-muted); border-radius: var(--radius); padding: clamp(28px, 3.5vw, 44px); display: flex; flex-direction: column; gap: 22px; }
.contact-panel h2 { color: #fff; font-size: 24px; }
.cline { padding-bottom: 16px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.cline .ic { flex: none; width: 46px; height: 46px; border-radius: 12px; background: rgba(255, 255, 255, .07); color: #ff8da3; display: grid; place-items: center; }
.cline .ic svg { width: 21px; height: 21px; }
.cline small { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; }
.cline a, .cline p { color: #fff; font-size: 17px; text-decoration: none; margin: 2px 0 0; }
.cline a:hover { color: #ff8da3; }
.contact-legal { margin-top: auto; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: 13px; line-height: 1.7; }

.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(28px, 3.5vw, 44px); box-shadow: var(--shadow-sm); }
.form-card h2 { font-size: 24px; margin-bottom: 6px; }
.form-card > p { color: var(--muted); }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 24px; }
.field { display: flex; flex-direction: column; gap: 6px; position: relative; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 14px; font-weight: 500; color: var(--ink); }
.field input, .field select, .field textarea {
  font: 400 16px var(--body);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  width: 100%;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.field textarea { min-height: 150px; resize: vertical; }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236b7686' stroke-width='1.5' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 34px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; background: #fff; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(163, 31, 59, .12); }
.field.is-invalid input, .field.is-invalid textarea { border-color: var(--accent); background: #fff; }
.privacy { grid-column: 1 / -1; font-size: 14px; color: var(--muted); display: flex; gap: 10px; align-items: flex-start; }
.privacy input { margin-top: 4px; accent-color: var(--accent); width: 16px; height: 16px; }
.form-foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.form-msg { margin: 0; font-size: 15px; }
.form-msg.is-error { color: var(--accent); }
.form-msg.is-ok { color: #1c7c4a; }
.hp { position: absolute; left: -9999px; }

.map-embed { margin-top: 24px; border-radius: var(--radius); overflow: hidden; height: 380px; background: var(--surface); }
.map-embed iframe { width: 100%; height: 100%; border: 0; filter: grayscale(.9) contrast(1.05); }


/* ---------- Certificazioni ---------- */

.iso-wheel { max-width: 460px; margin-inline: auto; width: 100%; }
.iso-wheel svg { width: 100%; height: auto; overflow: visible; }
.iso-wheel .ring { fill: none; stroke: var(--line); stroke-width: 1.5; stroke-dasharray: 6 8; transform-origin: 200px 200px; animation: spin 60s linear infinite; }
.iso-wheel .ring--inner { stroke: #f0d5db; animation-direction: reverse; animation-duration: 45s; }
@keyframes spin { to { transform: rotate(360deg); } }
.iso-wheel .node { transform: translate(200px, 200px) rotate(var(--a)) translate(150px) rotate(calc(var(--a) * -1)); cursor: pointer; }
.iso-wheel .node circle { fill: #fff; stroke: var(--line); stroke-width: 1.5; filter: drop-shadow(0 8px 16px rgba(13, 23, 38, .12)); transition: fill .3s, stroke .3s; }
.iso-wheel .node text { text-anchor: middle; font: 700 17px var(--head); fill: var(--ink); transition: fill .3s; }
.iso-wheel .node text.s { font: 500 10.5px var(--body); fill: var(--muted); }
.iso-wheel .node:hover circle, .iso-wheel .node:focus-visible circle { fill: var(--accent); stroke: var(--accent); }
.iso-wheel .node:hover text, .iso-wheel .node:focus-visible text { fill: #fff; }
.iso-wheel .center { text-anchor: middle; font: 700 26px var(--head); fill: var(--navy); }
.iso-wheel .center.s { font: 500 13px var(--body); fill: var(--muted); }

.cert-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.cert { display: flex; flex-direction: column; gap: 20px; padding: 28px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); transition: transform .3s var(--ease), box-shadow .3s, border-color .3s; scroll-margin-top: calc(var(--header-h) + 24px); }
.cert:hover, .cert:target { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.cert:target { outline: 2px solid var(--accent); outline-offset: 2px; }
.cert-head { display: flex; gap: 16px; align-items: center; }
.cert-badge { flex: none; width: 76px; height: 76px; border-radius: 50%; display: grid; place-content: center; text-align: center; background: var(--navy); color: #ff8da3; font: 600 11px/1 var(--body); letter-spacing: .14em; box-shadow: inset 0 0 0 4px var(--navy), inset 0 0 0 5px rgba(255, 141, 163, .5); }
.cert-badge b { display: block; font: 700 17px/1.15 var(--head); color: #fff; letter-spacing: 0; margin-top: 3px; }
.cert-head h3 { font-size: 18px; margin-bottom: 2px; }
.cert-head p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.45; }
.cert-data { margin: 0; display: grid; gap: 0; border-top: 1px solid var(--line); flex: 1; }
.cert-data div { display: grid; grid-template-columns: 104px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.cert-data dt { color: var(--muted); }
.cert-data dd { margin: 0; color: var(--ink); font-weight: 500; }
.cert-actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.cert-actions .btn { padding: 11px 18px; font-size: 14px; }
.cert--note { background: var(--accent-dark); border-color: var(--accent-dark); color: rgba(255, 255, 255, .8); justify-content: center; }
.cert--note h3 { color: #fff; font-size: 21px; }
.cert--note p { margin: 0; }
.cert--note .btn { align-self: flex-start; }

.modal--pdf[open] { display: flex; flex-direction: column; width: min(960px, calc(100% - 2 * var(--gutter))); height: calc(100dvh - 40px); }
.pdf-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 18px 14px 24px; border-bottom: 1px solid var(--line); }
.pdf-bar strong { font: 600 16px var(--head); color: var(--ink); }
.pdf-bar > div { display: flex; align-items: center; gap: 16px; }
.pdf-bar .modal-close { position: static; }
.modal--pdf iframe { flex: 1; width: 100%; border: 0; background: var(--surface); }

/* Certificazioni in home */
.iso-strip { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(28px, 4vw, 64px); align-items: center; }
.iso-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.iso-row a { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 22px 10px 18px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); text-decoration: none; text-align: center; transition: transform .3s var(--ease), box-shadow .3s, border-color .3s; }
.iso-row a:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: transparent; }
.iso-row .cert-badge { width: 70px; height: 70px; transition: background .3s, box-shadow .3s; }
.iso-row a:hover .cert-badge { background: var(--accent); box-shadow: inset 0 0 0 4px var(--accent), inset 0 0 0 5px rgba(255, 255, 255, .6); }
.iso-row a:hover .cert-badge, .iso-row a:hover .cert-badge b { color: #fff; }
.iso-row span.t { font: 600 14px/1.3 var(--head); color: var(--ink); }


/* ---------- Pagine interne: blocchi semplici ---------- */

.photo { margin: 0; }
.photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.photo figcaption { font-size: 14px; color: var(--muted); padding-top: 10px; }

.phases { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); }
.phase-tabs { display: flex; flex-direction: column; border-left: 2px solid var(--line); }
.phase-tabs button { all: unset; cursor: pointer; padding: 12px 18px; margin-left: -2px; border-left: 2px solid transparent; font: 600 16px var(--head); color: var(--muted); transition: color .2s, border-color .2s; }
.phase-tabs button:hover { color: var(--ink); }
.phase-tabs button[aria-selected="true"] { color: var(--accent); border-color: var(--accent); }
.phase-tabs button:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.phase { display: none; max-width: 68ch; }
.phase.is-active { display: block; animation: fade .4s ease; }
@keyframes fade { from { opacity: 0; } }

.facts--wide div { grid-template-columns: 160px 1fr; }
.facts--wide dd { font-weight: 400; }

.dash-list { max-width: 68ch; }
.dash-list li { position: relative; padding: 6px 0 6px 22px; }
.dash-list li::before { content: '–'; position: absolute; left: 2px; color: var(--accent); }

.table-wrap { overflow-x: auto; }
.iso-table--full { min-width: 760px; }
.iso-table--full tbody th span { display: block; font-weight: 400; color: var(--muted); font-size: 15px; }
.iso-table .pdf { white-space: nowrap; }
.iso-table .pdf button { all: unset; cursor: pointer; color: var(--accent); font-weight: 600; margin-right: 14px; }
.iso-table .pdf button:hover { text-decoration: underline; }
.iso-table tbody tr:target { background: #fbeef1; }
.note { margin-top: 24px; color: var(--muted); }
.note a { color: var(--accent); }
.modal-cat { margin: 0 0 4px; font-size: 14px; color: var(--accent); font-weight: 600; }

/* ---------- Piè di pagina ---------- */

.site-footer { background: var(--navy); color: var(--on-dark-muted); padding-top: clamp(56px, 6vw, 80px); font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1.2fr 1.2fr; gap: 40px; padding-bottom: 48px; }
.footer-logo { height: 26px; width: auto; filter: brightness(0) invert(1); margin-bottom: 18px; }
.footer-brand p { max-width: 36ch; }
.social { display: flex; gap: 10px; margin-top: 18px; }
.social a { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .07); color: #fff; transition: background .2s; }
.social a:hover { background: var(--accent); }
.social svg { width: 17px; height: 17px; fill: currentColor; }
.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-col h3 { color: #fff; font-size: 15px; margin-bottom: 8px; }
.footer-col a { text-decoration: none; transition: color .2s; }
.footer-col a:hover { color: #fff; }
.footer-col p { margin: 0; }
.footer-offices { margin-top: 8px !important; font-size: 14px; }
.footer-legal { padding-block: 0 28px; }
.footer-legal p { border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 20px; }
.footer-legal p { margin: 0; font-size: 12px; color: #7d8ba1; }

/* ---------- Comparsa allo scorrimento ---------- */

.reveal { opacity: 0; transform: translateY(10px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0s); }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
  .marquee-track { animation: none; }
}

/* ---------- Adattamento schermi ---------- */

@media (max-width: 1100px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .value-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .track { grid-auto-columns: calc((100% - 20px) / 2.3); }
}

@media (max-width: 900px) {
  .split, .sectors, .map-wrap, .contact-grid, .svc-block { grid-template-columns: minmax(0, 1fr); }
  .svc-block:nth-of-type(even) .svc-media { order: 0; }
  .svc-media { position: relative; top: 0; aspect-ratio: 16 / 10; }
  .svc-grid, .pgrid, .news-grid, .news-page .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ncard--featured { grid-column: 1 / -1; }
  .stats-card { grid-template-columns: repeat(2, minmax(0, 1fr)); transform: translateY(-36px); margin-bottom: -10px; }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .hero-tabs ol { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hero-tabs strong { display: none; }
  .hero-tabs button { padding: 16px 12px 22px 0; }
  .sector-tabs { flex-direction: row; overflow-x: auto; scrollbar-width: none; }
  .sector-tabs button { flex: none; padding: 12px 16px; }
  .sector-tabs small { display: none; }
  .sector-tabs button[aria-selected="true"]::after { left: 14px; right: 14px; top: auto; bottom: 0; width: auto; height: 3px; }
  .sector-panels { min-height: 440px; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 36px; }
  .steps::before, .steps .progress { display: none; }
  .offices { grid-template-columns: minmax(0, 1fr); }
  .profile { grid-template-columns: minmax(0, 1fr); }
  .logos { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cert-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .phases { grid-template-columns: minmax(0, 1fr); }
  .phase-tabs { flex-direction: row; overflow-x: auto; border-left: 0; border-bottom: 2px solid var(--line); }
  .phase-tabs button { margin: 0 0 -2px; border-left: 0; border-bottom: 2px solid transparent; white-space: nowrap; }
  .iso-strip { grid-template-columns: minmax(0, 1fr); }
  .iso-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .modal[open] { grid-template-columns: minmax(0, 1fr); overflow-y: auto; }
  .modal-media { min-height: 0; }
  .modal-media img { height: 260px; }
  .modal-body { max-height: none; overflow: visible; }
}

@media (max-width: 620px) {
  body { font-size: 15.5px; }
  .svc-grid, .pgrid, .news-grid, .news-page .news-grid, .checks, .specs, .value-grid, .form, .map-list { grid-template-columns: minmax(0, 1fr); }
  .track { grid-auto-columns: 82%; }
  .hero { height: auto; min-height: 640px; }
  .hero-content { padding-bottom: 170px; }
  .stat { padding: 20px; }
  .collage .badge { left: 12px; bottom: 20%; }
  .search, .search input { width: 100%; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .hero-tabs small { display: none; }
  .hero-tabs button { padding: 14px 8px 14px 0; }
  .hero-tabs { bottom: 56px; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .svc-list { grid-template-columns: minmax(0, 1fr); }
  .facts div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .iso-table thead { display: none; }
  .iso-table tr { display: grid; grid-template-columns: 1fr auto; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .iso-table th, .iso-table td { border: 0; padding: 2px 0; }
  .iso-table td:nth-of-type(2) { display: none; }
  .cert-grid { grid-template-columns: minmax(0, 1fr); }
  .iso-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
