/* ==========================================================================
   Pressofusioni G.M. — foglio di stile
   ========================================================================== */

@font-face {
  font-family: "Lato";
  src: url("../fonts/Lato-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Lato";
  src: url("../fonts/Lato-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --red: #d7141a;
  --red-dark: #b01016;
  --ink: #111318;
  --steel: #1b1e24;
  --steel-2: #262a32;
  --text: #1d2026;
  --muted: #5d636e;
  --line: #e3e5e9;
  --surface: #f4f5f7;
  --white: #ffffff;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(17, 19, 24, .06), 0 8px 24px rgba(17, 19, 24, .06);
  --container: 1180px;
  --header-h: 76px;
  --font: "Lato", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--red); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--red-dark); }

h1, h2, h3, h4 {
  margin: 0 0 .5em;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink);
}
h1 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute; left: -999px; top: 8px;
  background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 6px; z-index: 100;
}
.skip-link:focus { left: 8px; }

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

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.site-header.scrolled { border-bottom-color: var(--line); box-shadow: 0 4px 20px rgba(17,19,24,.05); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  height: var(--header-h);
}
.brand img { width: 300px; height: auto; }
.nav { display: flex; align-items: center; gap: 6px; }
.nav a {
  color: var(--text); text-decoration: none; font-weight: 700; font-size: .95rem;
  padding: 8px 12px; border-radius: 8px; transition: color .15s, background .15s;
}
.nav a:hover { color: var(--red); background: var(--surface); }
.nav a[aria-current="page"] { color: var(--red); }
.nav .btn, .nav .btn[aria-current="page"] { margin-left: 10px; color: #fff; }
.nav .btn:hover { color: #fff; background: var(--red-dark); }

.menu-toggle {
  display: none; background: none; border: 0; padding: 10px; cursor: pointer; color: var(--ink);
}
.menu-toggle svg { width: 26px; height: 26px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px; border-radius: 999px;
  background: var(--red); color: #fff; font-weight: 700; font-size: .98rem;
  text-decoration: none; border: 2px solid var(--red);
  transition: background .15s, border-color .15s, transform .15s;
}
.btn:hover { background: var(--red-dark); border-color: var(--red-dark); color: #fff; transform: translateY(-1px); }
.btn svg { width: 18px; height: 18px; }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.btn-ghost:hover { background: rgba(255,255,255,.08); border-color: #fff; }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-outline:hover { background: var(--surface); color: var(--ink); border-color: var(--ink); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1000px 500px at 85% 20%, rgba(215,20,26,.18), transparent 60%),
    linear-gradient(180deg, var(--steel) 0%, var(--ink) 100%);
  color: #d6d9df;
  padding: 88px 0 96px;
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
}
.hero-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center;
}
.hero h1 { color: #fff; }
.hero h1 em { font-style: normal; color: var(--red); }
.hero .lead { font-size: 1.2rem; max-width: 34em; color: #c3c7cf; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--red); margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; }
.hero .eyebrow { color: #ff5a5f; }
.hero-media { position: relative; }
.hero-media img {
  border-radius: 22px; width: 100%;
  box-shadow: 0 30px 80px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.06);
}
.hero-badge {
  position: absolute; left: -28px; bottom: 28px;
  display: flex; align-items: center; gap: 12px;
  background: #fff; color: var(--ink); border-radius: 14px; padding: 12px 16px 12px 12px;
  box-shadow: 0 16px 40px rgba(0,0,0,.3);
  font-size: .88rem; line-height: 1.3;
}
.hero-badge img { width: 54px; height: auto; border-radius: 0; box-shadow: none; }
.hero-badge strong { display: block; font-size: 1rem; }

/* Page hero (sub pages) */
.page-hero {
  background:
    radial-gradient(800px 300px at 90% 0%, rgba(215,20,26,.2), transparent 60%),
    linear-gradient(180deg, var(--steel), var(--ink));
  color: #c3c7cf; padding: 72px 0 64px;
}
.page-hero h1 { color: #fff; margin-bottom: .3em; }
.page-hero p { max-width: 42em; font-size: 1.15rem; margin: 0; }
.page-hero .eyebrow { color: #ff5a5f; }

/* ---------- Stats ---------- */
.stats {
  position: relative; z-index: 2;
  margin-top: -44px;
}
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  border: 1px solid var(--line); overflow: hidden;
}
.stat { padding: 26px 28px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; }
.stat-value { font-size: 2rem; font-weight: 700; color: var(--ink); line-height: 1.1; letter-spacing: -0.02em; }
.stat-value small { font-size: 1rem; color: var(--muted); font-weight: 700; }
.stat-label { color: var(--muted); font-size: .92rem; margin-top: 4px; }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-alt { background: var(--surface); }
.section-dark { background: var(--ink); color: #c3c7cf; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-head { max-width: 46em; margin-bottom: 48px; }
.section-head p { color: var(--muted); font-size: 1.1rem; }
.section-dark .section-head p { color: #a9aeb8; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split-media img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; }
.split-media figcaption { font-size: .85rem; color: var(--muted); margin-top: 10px; }

.checklist { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; }
.checklist li { display: flex; gap: 14px; align-items: flex-start; }
.checklist svg { flex: none; width: 22px; height: 22px; color: var(--red); margin-top: 3px; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; counter-reset: step; list-style: none; padding: 0; margin: 0; }
.step {
  position: relative; background: var(--steel-2); border: 1px solid rgba(255,255,255,.07);
  border-radius: var(--radius); padding: 26px 22px;
}
.step::before {
  counter-increment: step; content: "0" counter(step);
  display: block; font-size: 2.2rem; font-weight: 700; color: var(--red); line-height: 1; margin-bottom: 14px;
}
.step h3 { font-size: 1.08rem; margin-bottom: .4em; }
.step p { font-size: .95rem; margin: 0; color: #a9aeb8; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 24px; transition: transform .2s, box-shadow .2s, border-color .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: transparent; }
.card p { color: var(--muted); font-size: .97rem; margin: 0; }
.icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: grid; place-items: center;
  background: rgba(215,20,26,.08); color: var(--red); margin-bottom: 18px;
}
.icon svg { width: 24px; height: 24px; }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.gallery-4 { grid-template-columns: repeat(4, 1fr); }
.gallery button {
  all: unset; cursor: zoom-in; display: block; position: relative;
  border-radius: var(--radius); overflow: hidden; background: #222; aspect-ratio: 4 / 3.2;
}
.gallery button:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gallery button:hover img { transform: scale(1.05); }
.gallery .cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 16px 12px;
  background: linear-gradient(transparent, rgba(0,0,0,.65)); color: #fff; font-weight: 700; font-size: .92rem;
}

.lightbox {
  border: 0; padding: 0; background: transparent; max-width: min(92vw, 1100px); max-height: 92vh;
}
.lightbox::backdrop { background: rgba(10,11,14,.88); }
.lightbox img { max-height: 84vh; width: auto; margin: 0 auto; border-radius: 10px; }
.lightbox p { color: #fff; text-align: center; margin: 12px 0 0; font-weight: 700; }
.lightbox-close {
  position: fixed; top: 18px; right: 18px; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,.12); color: #fff; font-size: 26px; cursor: pointer; line-height: 1;
}
.lightbox-close:hover { background: rgba(255,255,255,.24); }

/* Video (click to load) */
.videos { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.video { border-radius: var(--radius); overflow: hidden; background: #000; }
.video-frame { position: relative; aspect-ratio: 16 / 9; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-load {
  all: unset; cursor: pointer; position: absolute; inset: 0; display: grid; place-items: center;
}
.video-load img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .75; transition: opacity .2s; }
.video-load:hover img { opacity: .9; }
.video-load .play {
  position: relative; width: 72px; height: 72px; border-radius: 50%; background: var(--red);
  display: grid; place-items: center; box-shadow: 0 10px 30px rgba(0,0,0,.4);
}
.video-load .play svg { width: 28px; height: 28px; color: #fff; margin-left: 4px; }
.video-meta { padding: 18px 22px; background: var(--steel-2); }
.video-meta h3 { color: #fff; margin: 0 0 4px; }
.video-meta p { margin: 0; font-size: .88rem; color: #a9aeb8; }

/* Equipment */
.machines { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.machine {
  border-radius: var(--radius); padding: 32px; color: #c3c7cf;
  background: linear-gradient(160deg, var(--steel-2), var(--ink));
  border: 1px solid rgba(255,255,255,.06);
}
.machine .tons { font-size: 3.2rem; font-weight: 700; color: #fff; line-height: 1; letter-spacing: -0.03em; }
.machine .tons span { font-size: 1.2rem; color: var(--red); margin-left: 6px; }
.machine h3 { color: #fff; margin: 14px 0 10px; }
.machine ul { margin: 0; padding-left: 18px; }
.machine li { margin-bottom: 4px; }

.taglist { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 0; }
.taglist li {
  background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font-weight: 700; font-size: .93rem;
}
.callout {
  display: flex; gap: 18px; align-items: flex-start;
  background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--red);
  border-radius: var(--radius-sm); padding: 22px 24px; margin-top: 40px;
}
.callout p { margin: 0; }

/* CTA band */
.cta-band {
  background:
    radial-gradient(600px 240px at 0% 100%, rgba(255,255,255,.12), transparent 70%),
    linear-gradient(120deg, var(--red), #8e0b10);
  color: #fff; border-radius: 22px; padding: 56px;
  display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap;
}
.cta-band h2 { color: #fff; margin-bottom: .2em; }
.cta-band p { margin: 0; color: rgba(255,255,255,.85); font-size: 1.1rem; }
.cta-band .btn { background: #fff; color: var(--red); border-color: #fff; }
.cta-band .btn:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Contacts */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 32px; align-items: stretch; }
.contact-list { display: grid; gap: 16px; }
.contact-item {
  display: flex; gap: 18px; align-items: flex-start;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px;
}
.contact-item .icon { margin: 0; flex: none; }
.contact-item h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 2px 0 6px; }
.contact-item p { margin: 0; font-size: 1.08rem; }
.contact-item a { color: var(--ink); font-weight: 700; text-decoration: none; }
.contact-item a:hover { color: var(--red); }
.map {
  position: relative; border-radius: var(--radius); overflow: hidden; min-height: 420px;
  background: linear-gradient(160deg, var(--steel-2), var(--ink));
}
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-consent {
  position: absolute; inset: 0; display: grid; place-content: center; text-align: center; padding: 32px; color: #c3c7cf;
}
.map-consent img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .25; }
.map-consent > * { position: relative; }
.map-consent h3 { color: #fff; }
.map-consent p { font-size: .9rem; max-width: 30em; margin: 0 auto 18px; }
.map-consent .btn { justify-self: center; }

/* Certificate */
.cert { display: grid; grid-template-columns: 360px 1fr; gap: 56px; align-items: start; }
.cert-doc {
  all: unset; cursor: zoom-in; display: block; background: #fff; padding: 14px; border-radius: var(--radius);
  box-shadow: var(--shadow); border: 1px solid var(--line); transition: transform .2s;
}
.cert-doc:hover { transform: translateY(-3px) rotate(-.5deg); }
.cert-doc:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
.cert dl { display: grid; grid-template-columns: max-content 1fr; gap: 10px 24px; margin: 24px 0 32px; }
.cert dt { color: var(--muted); font-size: .92rem; }
.cert dd { margin: 0; font-weight: 700; }

/* Prose (legal pages) */
.prose { max-width: 760px; }
.prose h2 { font-size: 1.35rem; margin-top: 2em; }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 0; list-style: none; }
.prose ul li { position: relative; padding-left: 26px; margin-bottom: 12px; }
.prose ul li::before { content: ""; position: absolute; left: 0; top: .62em; width: 10px; height: 10px; border-radius: 2px; background: var(--red); }
.signature { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); }
.signature strong { color: var(--ink); display: block; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #9aa0ab; padding: 72px 0 28px; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; }
.footer-logo { background: #fff; border-radius: 10px; padding: 12px 14px; display: inline-block; margin-bottom: 18px; }
.footer-logo img { width: 240px; }
.site-footer h3 { color: #fff; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 16px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer a { color: #c9cdd4; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.social { display: inline-flex; align-items: center; gap: 8px; }
.social svg { width: 18px; height: 18px; }
.footer-bottom {
  margin-top: 56px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.08);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; font-size: .84rem;
}
.footer-bottom p { margin: 0; }

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

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .brand img { width: 240px; }
}

@media (max-width: 900px) {
  :root { --header-h: 66px; }
  .menu-toggle { display: block; }
  .nav {
    /* l'header ha backdrop-filter, quindi fa da riferimento: ci posizioniamo sotto di lui */
    position: absolute; top: 100%; left: 0; right: 0;
    height: calc(100vh - var(--header-h)); height: calc(100dvh - var(--header-h));
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; padding: 16px 24px 32px;
    transform: translateX(100%); transition: transform .25s ease; visibility: hidden;
    overflow-y: auto;
  }
  .nav.open { transform: none; visibility: visible; }
  .nav a { padding: 16px 4px; font-size: 1.15rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav .btn { margin: 24px 0 0; justify-content: center; border-radius: 999px; border-bottom: 2px solid var(--red); }
  body.nav-open { overflow: hidden; }

  .hero { padding: 56px 0 88px; }
  .hero-grid, .split, .contact-grid, .cert { grid-template-columns: 1fr; gap: 40px; }
  .hero-media { max-width: 480px; }
  .hero-badge { left: 12px; bottom: 12px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .section { padding: 72px 0; }
  .gallery, .gallery-4 { grid-template-columns: repeat(2, 1fr); }
  .cards-3 { grid-template-columns: 1fr 1fr; }
  .videos, .machines { grid-template-columns: 1fr; }
  .cta-band { padding: 40px 32px; }
  .cert-doc { max-width: 360px; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .container { padding: 0 16px; }
  .brand img { width: 200px; }
  .steps, .cards, .cards-3 { grid-template-columns: 1fr; }
  .gallery, .gallery-4 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .gallery .cap { font-size: .8rem; padding: 24px 10px 8px; }
  .stat { padding: 20px 18px; }
  .stat-value { font-size: 1.6rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .cta-band { padding: 32px 22px; border-radius: 16px; }
  .machine { padding: 24px; }
  .contact-item { padding: 18px; }
  .cert dl { grid-template-columns: 1fr; gap: 2px; }
  .cert dd { margin-bottom: 12px; }
}
