/* ==========================================================================
   ABE S.r.l. — Sito istituzionale
   Concept: "La linea del segnale" — una linea d'onda verde che attraversa
   il sito come fa il segnale radio dentro una galleria.
   Palette: navy #16264f + verde ABE #8cc63f su carta fredda.
   Type: Space Grotesk (display) / Inter (testo) / JetBrains Mono (dati).
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --navy:        #16264f;
  --navy-2:      #1d3266;
  --navy-3:      #25407e;
  --green:       #8cc63f;
  --green-d:     #6fa92b;
  --green-soft:  #eaf5da;
  --ink:         #14213d;
  --muted:       #5b6b8c;
  --muted-2:     #8090ad;
  --paper:       #f5f8fd;
  --paper-2:     #eaf0f9;
  --line:        #e2e8f4;
  --white:       #ffffff;

  --shadow-sm: 0 2px 8px rgba(22, 38, 79, .06);
  --shadow:    0 14px 40px -18px rgba(22, 38, 79, .28);
  --shadow-lg: 0 30px 70px -28px rgba(22, 38, 79, .40);

  --r-sm: 10px;
  --r:    16px;
  --r-lg: 24px;
  --r-xl: 32px;

  --wrap: 1200px;
  --pad:  clamp(1.1rem, 4vw, 2rem);

  --f-display: "Space Grotesk", system-ui, sans-serif;
  --f-body:    "Inter", system-ui, sans-serif;
  --f-mono:    "JetBrains Mono", ui-monospace, monospace;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--f-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.7;
  font-size: 1.02rem;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; padding: 0; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 4px; }

/* ---------- Layout helpers ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad); }
.section { padding-block: clamp(4rem, 9vw, 7rem); position: relative; }
.section--tight { padding-block: clamp(3rem, 6vw, 4.5rem); }
.bg-paper2 { background: var(--paper-2); }
.bg-navy { background: var(--navy); color: #dfe7f5; }

/* dotted halftone texture (dalla mockup del docente) */
.dots {
  background-image: radial-gradient(var(--paper-2) 1.4px, transparent 1.5px);
  background-size: 22px 22px;
}
.bg-navy.dots {
  background-image: radial-gradient(rgba(255,255,255,.06) 1.4px, transparent 1.5px);
  background-color: var(--navy);
}

/* ---------- Section head ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--f-mono);
  font-size: .76rem; font-weight: 500;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--green-d);
}
.bg-navy .eyebrow { color: var(--green); }
.eyebrow .wave { width: 46px; height: 10px; flex: none; }
.eyebrow .wave path { fill: none; stroke: var(--green); stroke-width: 2; stroke-linecap: round; }

.section-head { max-width: 760px; margin-bottom: clamp(2.2rem, 5vw, 3.4rem); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }
.section-head h2 {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(1.9rem, 3.7vw, 2.85rem);
  line-height: 1.1;
  letter-spacing: -.02em;
  margin-top: .9rem;
  color: var(--navy);
}
.bg-navy .section-head h2 { color: #fff; }
.section-head p { margin-top: 1rem; color: var(--muted); font-size: 1.08rem; }
.bg-navy .section-head p { color: #aab8d6; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--f-body); font-weight: 600; font-size: .98rem;
  padding: .85rem 1.5rem; border-radius: 999px;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s, color .25s;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; transition: transform .25s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn--primary { background: var(--green); color: var(--navy); box-shadow: 0 10px 24px -10px rgba(140,198,63,.8); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -12px rgba(140,198,63,.9); }
.btn--navy { background: var(--navy); color: #fff; }
.btn--navy:hover { transform: translateY(-2px); background: var(--navy-3); }
.btn--ghost { border: 1.5px solid rgba(255,255,255,.35); color: #fff; }
.btn--ghost:hover { background: rgba(255,255,255,.1); transform: translateY(-2px); }
.btn--outline { border: 1.5px solid var(--line); color: var(--navy); background: var(--white); }
.btn--outline:hover { border-color: var(--green); color: var(--green-d); transform: translateY(-2px); }

/* link with arrow */
.link-more {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--f-mono); font-size: .82rem; font-weight: 500;
  letter-spacing: .06em; color: var(--green-d);
}
.link-more svg { width: 16px; height: 16px; transition: transform .25s var(--ease); }
.link-more:hover svg { transform: translateX(4px); }

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header { position: sticky; top: 0; z-index: 60; }
.nav-social { display: inline-flex; align-items: center; gap: .25rem; flex: none; }
.nav-social a {
  width: 36px; height: 36px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--navy); transition: color .2s, background .2s;
}
.nav-social a:hover { color: var(--green-d); background: var(--green-soft); }
.nav-social svg { width: 18px; height: 18px; }

.navbar { background: rgba(255,255,255,.86); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.navbar .wrap { display: flex; align-items: center; gap: 1.5rem; padding-block: .92rem; }
.brand { display: flex; align-items: center; flex: none; }
.brand img { height: 60px; width: auto; }
.nav-links { display: flex; align-items: center; gap: .35rem; margin-left: auto; }
.nav-links > li > a {
  position: relative;
  display: block; padding: .6rem .95rem; border-radius: 8px;
  font-weight: 500; color: var(--navy); font-size: 1rem;
  transition: color .2s, background .2s;
}
.nav-links > li > a::after {
  content: ""; position: absolute; left: .95rem; right: .95rem; bottom: .35rem;
  height: 2px; background: var(--green); border-radius: 2px;
  transform: scaleX(0); transform-origin: left; transition: transform .28s var(--ease);
}
.nav-links > li > a:hover { color: var(--green-d); }
.nav-links > li > a:hover::after,
.nav-links > li.active > a::after { transform: scaleX(1); }
.nav-links > li.active > a { color: var(--green-d); }

.nav-cta { display: inline-flex; }
.nav-burger { display: none; flex: none; width: 46px; height: 46px; border-radius: 10px; border: 1px solid var(--line); }
.nav-burger span { display: block; width: 20px; height: 2px; background: var(--navy); margin: 4px auto; border-radius: 2px; transition: .3s var(--ease); }
.nav-burger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* shrink on scroll */
.site-header.scrolled .brand img { height: 52px; }

/* ==========================================================================
   HERO (home)
   ========================================================================== */
.hero { position: relative; background: var(--navy); color: #fff; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(120% 90% at 85% -10%, rgba(140,198,63,.22), transparent 55%),
    radial-gradient(80% 80% at 0% 110%, rgba(37,64,126,.7), transparent 60%);
}
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; padding-block: clamp(3.5rem, 8vw, 6rem); }
.hero-copy { max-width: 600px; }
.hero .eyebrow { color: var(--green); }
.hero h1 {
  font-family: var(--f-display); font-weight: 600;
  font-size: clamp(2.4rem, 5.4vw, 4.1rem); line-height: 1.04; letter-spacing: -.025em;
  margin: 1.1rem 0 0;
}
.hero h1 .accent { color: var(--green); }
.hero-lead { margin-top: 1.4rem; font-size: 1.18rem; color: #b9c6e2; max-width: 38ch; }
.hero-actions { margin-top: 2.1rem; display: flex; flex-wrap: wrap; gap: .9rem; }
.hero-specs { margin-top: 2.6rem; display: flex; flex-wrap: wrap; gap: 1.8rem; padding-top: 1.6rem; border-top: 1px solid rgba(255,255,255,.12); }
.hero-spec .n { font-family: var(--f-mono); font-size: 1.5rem; font-weight: 700; color: #fff; }
.hero-spec .l { font-size: .82rem; color: #95a6cb; letter-spacing: .02em; }

/* hero visual: galleria + linea del segnale */
.hero-visual { position: relative; align-self: stretch; min-height: 360px; }
.hero-frame {
  position: relative; height: 100%; min-height: 360px; border-radius: var(--r-xl);
  overflow: hidden; box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255,255,255,.12);
}
.hero-frame img { width: 100%; height: 100%; object-fit: cover; }
.hero-frame::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(22,38,79,.1), rgba(22,38,79,.55)); }
.hero-signal { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }
.hero-signal path { fill: none; stroke: var(--green); stroke-width: 3; stroke-linecap: round;
  filter: drop-shadow(0 0 6px rgba(140,198,63,.8)); }
.hero-signal .track { stroke: rgba(255,255,255,.25); stroke-width: 2; }
.hero-badge {
  position: absolute; left: 1.1rem; bottom: 1.1rem; z-index: 3;
  display: flex; align-items: center; gap: .7rem;
  background: rgba(22,38,79,.72); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.16); border-radius: 999px;
  padding: .55rem 1rem; font-family: var(--f-mono); font-size: .8rem; color: #fff;
}
.hero-badge .pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(140,198,63,.6); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(140,198,63,.55); } 70% { box-shadow: 0 0 0 12px rgba(140,198,63,0); } 100% { box-shadow: 0 0 0 0 rgba(140,198,63,0); } }

/* client strip under hero */
.trustbar { background: var(--navy-2); border-top: 1px solid rgba(255,255,255,.08); }
.trustbar .wrap { display: flex; align-items: center; gap: 2rem; padding-block: 1.4rem; flex-wrap: wrap; }
.trustbar .label { font-family: var(--f-mono); font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: #8295bd; flex: none; }
.trustbar .logos { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.trustbar .chip { background: #fff; border-radius: 9px; height: 48px; padding: .4rem .85rem; display: grid; place-items: center; transition: transform .25s var(--ease); }
.trustbar .chip:hover { transform: translateY(-3px); }
.trustbar .chip a { display: grid; place-items: center; width: 100%; height: 100%; }
.trustbar .chip img { height: 30px; width: auto; max-width: 120px; object-fit: contain; }

/* ==========================================================================
   SERVIZI (cards)
   ========================================================================== */
.servizi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.service-card {
  position: relative; background: var(--white); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 2.2rem 1.9rem 2rem;
  display: flex; flex-direction: column;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
  overflow: hidden;
}
a.service-card { color: inherit; text-decoration: none; cursor: pointer; }
.service-card::before {
  content: ""; position: absolute; left: 0; top: 0; height: 4px; width: 100%;
  background: linear-gradient(90deg, var(--green), var(--navy-3));
  transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease);
}
.service-card:hover { transform: translateY(-8px); box-shadow: var(--shadow); border-color: transparent; }
.service-card:hover::before { transform: scaleX(1); }
.service-num { font-family: var(--f-mono); font-size: .78rem; color: var(--muted-2); letter-spacing: .1em; }
.service-icon {
  width: 64px; height: 64px; border-radius: 18px; margin: 1.1rem 0 1.3rem;
  display: grid; place-items: center;
  background: var(--green-soft); color: var(--green-d);
  transition: background .35s, color .35s, transform .35s var(--ease);
}
.service-icon svg { width: 32px; height: 32px; }
.service-card:hover .service-icon { background: var(--green); color: var(--navy); transform: rotate(-6deg); }
/* image-based service icons (illustrazioni brand) */
.service-icon.is-img { width: 76px; height: 76px; background: #fff; border: 1px solid var(--line); padding: 8px; }
.service-icon.is-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.service-card:hover .service-icon.is-img { background: #fff; color: inherit; transform: translateY(-3px) scale(1.04); border-color: var(--green); }
.service-card h3 { font-family: var(--f-display); font-weight: 600; font-size: 1.32rem; line-height: 1.2; color: var(--navy); }
.service-card p { margin-top: .8rem; color: var(--muted); font-size: .98rem; flex: 1; }
.service-card .link-more { margin-top: 1.5rem; }

/* ==========================================================================
   FEATURE / split (Azienda preview, ecc.)
   ========================================================================== */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.split.reverse .split-media { order: 2; }
.split-media { position: relative; }
.split-media .frame { border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 4/3; }
.split-media .frame img { width: 100%; height: 100%; object-fit: cover; }
.split-media .stat-chip {
  position: absolute; right: -14px; bottom: -18px;
  background: var(--navy); color: #fff; border-radius: var(--r);
  padding: 1.1rem 1.4rem; box-shadow: var(--shadow); border: 1px solid var(--navy-3);
}
.split-media .stat-chip .n { font-family: var(--f-mono); font-size: 1.8rem; font-weight: 700; color: var(--green); line-height: 1; }
.split-media .stat-chip .l { font-size: .8rem; color: #aebbd9; margin-top: .25rem; }
.prose p { color: var(--muted); margin-top: 1rem; }
.prose p:first-child { margin-top: 1.3rem; }
.check-list { margin-top: 1.6rem; display: grid; gap: .85rem; }
.check-list li { display: flex; gap: .8rem; align-items: flex-start; color: var(--ink); font-weight: 500; }
.check-list .tick { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--green-soft); color: var(--green-d); display: grid; place-items: center; margin-top: 2px; }
.check-list .tick svg { width: 14px; height: 14px; }

/* ==========================================================================
   STATS band
   ========================================================================== */
.stats-band { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.stat {
  text-align: center; padding: 1.5rem 1rem; border-radius: var(--r);
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
}
.stat .n { font-family: var(--f-mono); font-weight: 700; font-size: clamp(2rem, 4vw, 2.8rem); color: var(--green); line-height: 1; }
.stat .l { margin-top: .6rem; font-size: .92rem; color: #aab8d6; }

/* ==========================================================================
   PROGETTI
   ========================================================================== */
.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.project-card {
  position: relative; border-radius: var(--r-lg); overflow: hidden; min-height: 320px;
  display: flex; align-items: flex-end; box-shadow: var(--shadow-sm);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.project-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.project-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(22,38,79,0) 30%, rgba(22,38,79,.92) 100%); }
.project-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.project-card:hover img { transform: scale(1.07); }
.project-body { position: relative; z-index: 2; padding: 1.6rem; color: #fff; width: 100%; }
.project-tag {
  display: inline-flex; align-items: center; gap: .4rem;
  font-family: var(--f-mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase;
  padding: .25rem .6rem; border-radius: 999px; margin-bottom: .7rem;
}
.project-tag.done { background: rgba(140,198,63,.22); color: var(--green); border: 1px solid rgba(140,198,63,.4); }
.project-tag.ongoing { background: rgba(94,160,255,.2); color: #9fc4ff; border: 1px solid rgba(94,160,255,.4); }
.project-card h3 { font-family: var(--f-display); font-weight: 600; font-size: 1.18rem; line-height: 1.2; }
.project-card .meta { margin-top: .35rem; font-size: .9rem; color: #c2cee8; }
.project-card .card-more { margin-top: .85rem; display: inline-flex; align-items: center; gap: .4rem; color: var(--green); font-family: var(--f-mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; }
.project-card .card-more svg { width: 14px; height: 14px; transition: transform .25s var(--ease); }
.project-card:hover .card-more svg { transform: translateX(3px); }

/* ==========================================================================
   TIMELINE — "la linea del segnale" (Azienda)
   ========================================================================== */
.timeline { position: relative; margin-top: 3rem; }
.timeline-track { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; transform: translateX(-50%);
  background: linear-gradient(var(--green), var(--navy-3)); }
.timeline-track::before, .timeline-track::after { content: ""; position: absolute; left: 50%; transform: translateX(-50%); width: 12px; height: 12px; border-radius: 50%; background: var(--green); }
.timeline-track::before { top: -2px; } .timeline-track::after { bottom: -2px; background: var(--navy-3); }
.tl-item { position: relative; width: 50%; padding: 0 3rem 2.8rem; }
.tl-item:nth-child(odd) { left: 0; text-align: right; }
.tl-item:nth-child(even) { left: 50%; }
.tl-node { position: absolute; top: .35rem; width: 18px; height: 18px; border-radius: 50%; background: var(--white); border: 3px solid var(--green); box-shadow: 0 0 0 5px var(--green-soft); z-index: 2; }
.tl-item:nth-child(odd) .tl-node { right: -9px; }
.tl-item:nth-child(even) .tl-node { left: -9px; }
.tl-year { font-family: var(--f-mono); font-weight: 700; font-size: 1.5rem; color: var(--green-d); }
.tl-card { display: inline-block; background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 1.1rem 1.3rem; margin-top: .5rem; box-shadow: var(--shadow-sm); transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.tl-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.tl-card h3 { font-family: var(--f-display); font-size: 1.08rem; color: var(--navy); }
.tl-card p { margin-top: .3rem; color: var(--muted); font-size: .92rem; }

/* ==========================================================================
   CLIENTI
   ========================================================================== */
.clienti-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.client-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r);
  padding: 1.8rem 1.4rem 1.5rem; text-align: center;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
}
.client-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: var(--green); }
.client-logo { height: 78px; display: grid; place-items: center; margin-bottom: 1.1rem; }
.client-logo a { display: grid; place-items: center; width: 100%; height: 100%; }
.client-logo img { max-height: 72px; max-width: 80%; width: auto; object-fit: contain; }
.client-card h3 { font-size: 1.02rem; color: var(--navy); font-weight: 600; }
.client-card p { margin-top: .4rem; font-size: .88rem; color: var(--muted); line-height: 1.5; }

/* ==========================================================================
   PAGE HERO (sottopagine)
   ========================================================================== */
.page-hero { position: relative; background: var(--navy); color: #fff; overflow: hidden; }
.page-hero.dots { background-color: var(--navy); }
.page-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(100% 120% at 90% -20%, rgba(140,198,63,.18), transparent 55%); }
.page-hero .wrap { position: relative; padding-block: clamp(3rem, 7vw, 5rem); }
.breadcrumb { display: flex; gap: .5rem; align-items: center; font-family: var(--f-mono); font-size: .78rem; color: #8fa0c6; letter-spacing: .04em; }
.breadcrumb a:hover { color: var(--green); }
.breadcrumb .sep { opacity: .5; }
.page-hero h1 { font-family: var(--f-display); font-weight: 600; font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.06; letter-spacing: -.02em; margin-top: 1rem; }
.page-hero p { margin-top: 1.1rem; color: #b9c6e2; max-width: 60ch; font-size: 1.1rem; }

/* ==========================================================================
   DETTAGLIO SERVIZIO
   ========================================================================== */
.svc-detail { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 3.5rem); align-items: start; }
.spec-table { margin-top: 2rem; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--white); }
.spec-table .row { display: grid; grid-template-columns: 40% 1fr; border-top: 1px solid var(--line); }
.spec-table .row:first-child { border-top: none; }
.spec-table .k { padding: .9rem 1.2rem; font-family: var(--f-mono); font-size: .82rem; color: var(--muted); background: var(--paper); letter-spacing: .03em; }
.spec-table .v { padding: .9rem 1.2rem; font-weight: 500; color: var(--navy); }
.svc-aside { position: sticky; top: 120px; display: grid; gap: 1.2rem; }
.aside-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.6rem; box-shadow: var(--shadow-sm); }
.aside-card.navy { background: var(--navy); color: #cdd8ef; border-color: var(--navy-3); }
.aside-card h4 { font-family: var(--f-display); color: var(--navy); margin-bottom: .9rem; font-size: 1.1rem; }
.aside-card.navy h4 { color: #fff; }
.aside-list li { display: flex; gap: .7rem; padding: .5rem 0; border-top: 1px dashed var(--line); font-size: .94rem; }
.aside-card.navy .aside-list li { border-color: rgba(255,255,255,.14); }
.aside-list li:first-child { border-top: none; }
.aside-list .dot { color: var(--green); flex: none; }

/* prodotti grid (dentro servizio) */
.prodotti-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.4rem; margin-top: 1.6rem; }
.prodotto-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.prodotto-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.prodotto-card .pic { aspect-ratio: 16/10; background: var(--paper-2); overflow: hidden; }
.prodotto-card .pic img { width: 100%; height: 100%; object-fit: cover; }
.prodotto-card .body { padding: 1.1rem 1.2rem 1.3rem; }
.prodotto-card h4 { font-family: var(--f-display); font-size: 1.04rem; color: var(--navy); }
.prodotto-card p { font-size: .88rem; color: var(--muted); margin-top: .3rem; }
a.prodotto-card { display: block; color: inherit; text-decoration: none; }
.prodotto-card .more { margin-top: .8rem; display: inline-flex; align-items: center; gap: .35rem; color: var(--green-d); font-weight: 600; font-size: .85rem; }
.prodotto-card .more svg { width: 15px; height: 15px; transition: transform .25s var(--ease); }
.prodotto-card:hover .more svg { transform: translateX(3px); }
.frame.ph { display: grid; place-items: center; background: linear-gradient(135deg, var(--paper-2), var(--green-soft)); }
.frame.ph svg { width: 88px; height: 88px; color: var(--green-d); opacity: .85; }
.check-list.cols-2 { grid-template-columns: 1fr 1fr; column-gap: 2.2rem; }
@media (max-width: 700px) { .check-list.cols-2 { grid-template-columns: 1fr; } }

/* ==========================================================================
   CONTATTI
   ========================================================================== */
.contact-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; }
.contact-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.8rem 1.4rem; text-align: center; box-shadow: var(--shadow-sm); transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.contact-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.contact-card .ic { width: 56px; height: 56px; margin: 0 auto 1rem; border-radius: 16px; display: grid; place-items: center; background: var(--green-soft); color: var(--green-d); }
.contact-card .ic svg { width: 26px; height: 26px; }
.contact-card h3 { font-size: 1.06rem; color: var(--navy); margin-bottom: .5rem; }
.contact-card p, .contact-card a { font-size: .94rem; color: var(--muted); display: block; }
.contact-card a:hover { color: var(--green-d); }

.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem,4vw,3rem); align-items: stretch; margin-top: 2.5rem; }
.contact-form { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(1.6rem, 3vw, 2.4rem); box-shadow: var(--shadow-sm); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { position: relative; margin-top: 1rem; }
.field label { display: block; font-family: var(--f-mono); font-size: .74rem; letter-spacing: .04em; color: var(--muted); margin-bottom: .35rem; text-transform: uppercase; }
.field input, .field textarea, .field select {
  width: 100%; font-family: var(--f-body); font-size: 1rem; color: var(--ink);
  padding: .8rem 1rem; border: 1.5px solid var(--line); border-radius: var(--r-sm);
  background: var(--paper); transition: border-color .2s, background .2s, box-shadow .2s;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--green); background: #fff; box-shadow: 0 0 0 4px rgba(140,198,63,.14); }
.form-note { margin-top: 1rem; font-size: .85rem; color: var(--muted-2); }
.form-status { margin-top: 1rem; font-size: .92rem; font-weight: 600; color: var(--green-d); min-height: 1.2em; }
.map-frame { border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-sm); min-height: 360px; }
.map-frame iframe { width: 100%; height: 100%; min-height: 360px; border: 0; display: block; }

/* ==========================================================================
   CTA strip
   ========================================================================== */
.cta-strip { position: relative; background: var(--navy); color: #fff; border-radius: var(--r-xl); padding: clamp(2.4rem, 5vw, 3.6rem); overflow: hidden; text-align: center; }
.cta-strip::before { content: ""; position: absolute; inset: 0; background: radial-gradient(80% 140% at 50% -20%, rgba(140,198,63,.25), transparent 60%); }
.cta-strip > * { position: relative; }
.cta-strip h2 { font-family: var(--f-display); font-weight: 600; font-size: clamp(1.7rem, 3.5vw, 2.5rem); letter-spacing: -.02em; }
.cta-strip p { color: #b9c6e2; margin: .8rem auto 0; max-width: 52ch; }
.cta-strip .btn { margin-top: 1.8rem; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer { background: var(--navy); color: #aab8d6; padding-top: clamp(3.5rem, 7vw, 5rem); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.4fr; gap: 2.5rem; }
.footer-brand img { height: 42px; width: auto; }
.footer-brand p { margin-top: 1.2rem; font-size: .94rem; max-width: 34ch; color: #93a3c7; }
.footer-brand .socials { margin-top: 1.4rem; display: flex; gap: .6rem; }
.footer-brand .socials a { width: 38px; height: 38px; border-radius: 10px; background: rgba(255,255,255,.07); display: grid; place-items: center; transition: background .2s, color .2s, transform .2s; }
.footer-brand .socials a:hover { background: var(--green); color: var(--navy); transform: translateY(-2px); }
.footer-brand .socials svg { width: 18px; height: 18px; }
.footer-col h4 { color: #fff; font-family: var(--f-display); font-size: 1rem; margin-bottom: 1.1rem; }
.footer-col li { margin-bottom: .65rem; }
.footer-col a { font-size: .94rem; transition: color .2s, padding .2s; }
.footer-col a:hover { color: var(--green); padding-left: 4px; }
.footer-contact li { display: flex; gap: .7rem; margin-bottom: .9rem; font-size: .94rem; }
.footer-contact svg { width: 17px; height: 17px; flex: none; color: var(--green); margin-top: 3px; }
.footer-bottom { margin-top: clamp(2.5rem,5vw,3.5rem); border-top: 1px solid rgba(255,255,255,.1); padding-block: 1.4rem; }
.footer-bottom .wrap { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .85rem; color: #7e8fb6; }

/* ==========================================================================
   Reveal animation
   ========================================================================== */
/* Solo se il JS è attivo nascondiamo: senza JS tutto resta visibile */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; } .reveal.d2 { transition-delay: .16s; } .reveal.d3 { transition-delay: .24s; } .reveal.d4 { transition-delay: .32s; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 980px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-visual { min-height: 300px; order: -1; }
  .split, .svc-detail, .contact-layout { grid-template-columns: 1fr; }
  .split.reverse .split-media { order: 0; }
  .svc-aside { position: static; }
  .servizi-grid, .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .clienti-grid, .contact-cards { grid-template-columns: repeat(2, 1fr); }
  .stats-band { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }

  /* nav -> mobile drawer */
  .nav-burger { display: block; margin-left: auto; }
  .nav-cta { display: none; }
  .nav-social { display: none; }
  .nav-links {
    position: fixed; inset: 0 0 0 auto; width: min(82vw, 340px);
    background: var(--white); flex-direction: column; align-items: stretch;
    gap: 0; padding: 5.5rem 1.5rem 2rem; box-shadow: -20px 0 60px -20px rgba(22,38,79,.4);
    transform: translateX(100%); transition: transform .4s var(--ease); margin-left: 0; z-index: 55;
  }
  .nav-links.open { transform: none; }
  .nav-links > li > a { padding: .9rem .5rem; font-size: 1.1rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav-links > li > a::after { display: none; }
  .nav-overlay { position: fixed; inset: 0; background: rgba(22,38,79,.4); opacity: 0; visibility: hidden; transition: .3s; z-index: 54; }
  .nav-overlay.open { opacity: 1; visibility: visible; }

  /* timeline -> single column */
  .timeline-track { left: 12px; }
  .tl-item { width: 100%; left: 0 !important; text-align: left !important; padding: 0 0 2.4rem 2.6rem; }
  .tl-item .tl-node { left: 4px !important; right: auto !important; }
}

@media (max-width: 620px) {
  .servizi-grid, .projects-grid, .clienti-grid, .contact-cards, .stats-band, .prodotti-grid, .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-specs { gap: 1.2rem; }
  .split-media .stat-chip { right: 10px; bottom: -14px; }
}

/* ==========================================================================
   Nav dropdown (Servizi) + prodotto senza foto
   ========================================================================== */
.nav-links .has-sub { position: relative; }
.nav-links .has-sub > a { display: inline-flex; align-items: center; gap: .35rem; }
.nav-links .chev { width: 14px; height: 14px; transition: transform .25s var(--ease); }
.nav-links .has-sub:hover .chev,
.nav-links .has-sub:focus-within .chev { transform: rotate(180deg); }
.submenu {
  position: absolute; top: 100%; left: 0; min-width: 280px;
  display: grid; gap: 2px;
  background: var(--white); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow); padding: .5rem;
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s;
  z-index: 70;
}
.submenu::before { content: ""; position: absolute; top: -12px; left: 0; right: 0; height: 12px; }
.nav-links .has-sub:hover .submenu,
.nav-links .has-sub:focus-within .submenu { opacity: 1; visibility: visible; transform: none; }
.submenu li a { display: block; padding: .7rem .9rem; border-radius: 10px; font-size: .94rem; font-weight: 500; color: var(--navy); white-space: nowrap; transition: background .2s, color .2s; }
.submenu li a:hover { background: var(--green-soft); color: var(--green-d); }

/* prodotto senza foto: piastrella con icona al posto dell'immagine */
.prodotto-card .pic.ph { display: grid; place-items: center; background: linear-gradient(135deg, var(--paper-2), var(--green-soft)); }
.prodotto-card .pic.ph svg { width: 54px; height: 54px; color: var(--green-d); opacity: .85; }

@media (max-width: 980px) {
  /* backdrop-filter sul navbar crea un containing block per il drawer fixed:
     va rimosso su mobile, altrimenti il menu non copre lo schermo */
  .navbar { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(255,255,255,.96); }
  .nav-burger { position: relative; z-index: 60; }
  .nav-links .submenu {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: none; background: transparent;
    padding: .2rem 0 .4rem .9rem; margin: 0; min-width: 0; gap: 0;
  }
  .submenu li a { padding: .8rem .5rem; font-size: 1rem; color: var(--muted); border-bottom: 1px solid var(--line); border-radius: 0; white-space: normal; }
  .nav-links .has-sub > a .chev { display: none; }
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
