/* ===== Token ===== */
:root {
  --navy: #15284B;
  --navy-deep: #0D1B35;
  --green: #77BC20;
  --green-dark: #5E9A16;
  --paper: #F4F6F1;
  --mist: #E6ECDD;
  --line: #D3DACB;
  --ink: #15284B;
  --muted: #56627A;
  --white: #FFFFFF;

  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --wrap: 1240px;
  --gutter: clamp(20px, 4vw, 48px);
  --header-h: 84px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 100px); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
figure { overflow: hidden; border-radius: 20px; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* ===== Tipografia ===== */
h1, h2, h3 { margin: 0; font-weight: 700; line-height: 1.05; letter-spacing: -0.02em; font-stretch: 112%; }
h1 { font-size: clamp(40px, 6vw, 88px); letter-spacing: -0.035em; font-stretch: 118%; }
h2 { font-size: clamp(32px, 4vw, 52px); }
h3 { font-size: 22px; letter-spacing: -0.01em; font-stretch: 105%; }
p { margin: 0; max-width: 62ch; }
.lead { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.55; color: var(--muted); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 40px; flex-wrap: wrap; }
.section-head p { margin-top: 14px; }

/* ===== Bottoni e link ===== */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: 9px;
  font: 600 12px/1 var(--font); text-decoration: none;
  border: 2px solid transparent; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn-green { background: var(--green); color: var(--navy-deep); }
.btn-green:hover { background: #8BD12E; }
.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover { background: var(--navy-deep); }
.btn-ghost-light { border-color: rgba(255,255,255,.55); color: var(--white); }
.btn-ghost-light:hover { border-color: var(--white); background: rgba(255,255,255,.08); }
.btn-ghost { border-color: var(--navy); color: var(--navy); background: var(--white); }
.btn-ghost:hover { background: var(--navy); color: var(--white); }
.btn-outline-green { border-color: var(--green); color: var(--navy); background: var(--white); }
.btn-outline-green:hover { border-color: var(--green); color: var(--navy-deep); background: var(--green); }

.text-link {
  font-weight: 600;
  text-decoration-line: underline;
  text-decoration-color: var(--green);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  padding-top: 3px;
  font-size: 16px
}
.text-link:hover { color: var(--green-dark); }

/* ===== Header ===== */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--header-h);
  color: var(--navy);
  background: var(--white);
  border-bottom: 1px solid var(--line);
  transition: background-color .3s, color .3s, border-color .3s;
  animation: header-in .7s cubic-bezier(.2,.7,.2,1) backwards;
}
.site-header .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
/* Home: header trasparente sopra la hero finché non si scorre */
.site-header.is-over-hero { background: transparent; color: var(--white); border-color: rgba(255,255,255,.18); }
body[data-site="uk"] .site-header { border-bottom-color: #C8102E; }
.site-header-flag { position: absolute; right: var(--gutter); bottom: -13px; z-index: 1; padding: 2px; background: var(--white); line-height: 0; }
.site-header-flag .flag { display: block; width: 32px; height: 21px; border-radius: 0; box-shadow: 0 0 0 1px rgba(21,40,75,.18); }
.site-header.is-over-hero .site-header-flag { background: transparent; }

.brand { display: flex; align-items: center; text-decoration: none; }
.brand-logo { display: block; width: auto; height: 62px; max-width: min(330px, 62vw); object-fit: contain; }
.brand-logo--blue { display: none; }
.site-header:not(.is-over-hero) .brand-logo--light,
.site-header.menu-open .brand-logo--light { display: none; }
.site-header:not(.is-over-hero) .brand-logo--blue,
.site-header.menu-open .brand-logo--blue { display: block; }
/* Loghi dei siti nazionali (con il nome del paese) un po' più grandi nell'header */
:is([data-site="uk"], [data-site="italia"], [data-site="malta"]) .site-header .brand-logo { height: 62px; max-width: min(330px, 62vw); }

.nav { display: flex; align-items: center; gap: 6px; }
.nav > ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.nav-item { position: relative; }
.nav-link, .nav-toggle {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px; border-radius: 0;
  font: 500 16px/1 var(--font); color: inherit; text-decoration: none;
  background: none; border: 0; cursor: pointer;
}
.nav-link:hover, .nav-toggle:hover, .nav-toggle[aria-expanded="true"] { background: rgba(119,188,32,.16); }
.nav-link[aria-current="page"], .nav-link[aria-current="true"], .nav-toggle.is-current { box-shadow: inset 0 -2px 0 var(--green); border-radius: 0; }
.chev { width: 10px; height: 10px; transition: transform .2s; }
.nav-toggle[aria-expanded="true"] .chev { transform: rotate(180deg); }

.dropdown {
  position: absolute; top: calc(100% + 12px); left: 0;
  min-width: 260px; padding: 10px;
  background: var(--white); color: var(--navy);
  border-radius: 14px; border: 1px solid var(--line);
  box-shadow: 0 18px 40px -18px rgba(21,40,75,.35);
  list-style: none; margin: 0;
  display: none;
}
.dropdown.is-open { display: block; }
.dropdown a { display: block; padding: 11px 14px; border-radius: 8px; text-decoration: none; font-size: 16px; }
.dropdown a:hover, .dropdown a:focus-visible { background: var(--mist); }
.dropdown a[aria-current="page"] { color: var(--green-dark); font-weight: 600; }

.lang { position: relative; display: block; font-size: 14px; font-weight: 600; }
.lang summary { display: flex; align-items: center; gap: 5px; padding: 8px 6px 8px 8px; color: var(--green); cursor: pointer; list-style: none; }
.lang summary::-webkit-details-marker { display: none; }
.lang summary:hover, .lang[open] summary { background: rgba(119,188,32,.16); }
.lang-chev { width: 10px; height: 10px; transition: transform .2s; }
.lang[open] .lang-chev { transform: rotate(180deg); }
.lang ul { position: absolute; top: calc(100% + 8px); right: 0; z-index: 2; min-width: 78px; padding: 5px; margin: 0; list-style: none; background: var(--white); color: var(--navy); border: 1px solid var(--line); box-shadow: 0 14px 30px -18px rgba(21,40,75,.45); }
.lang a { display: flex; align-items: center; gap: 9px; padding: 8px 10px; color: inherit; text-decoration: none; }
.lang .flag { width: 20px; height: 14px; flex: 0 0 auto; box-shadow: 0 0 0 1px rgba(21,40,75,.15); }
.lang a:hover, .lang a:focus-visible, .lang a[aria-current="true"] { color: var(--green-dark); background: var(--mist); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.menu-btn { display: none; background: none; border: 0; color: inherit; padding: 8px; cursor: pointer; }
.menu-btn svg { width: 28px; height: 28px; }

/* ===== Hero home a tutta pagina ===== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex; align-items: flex-end;
  color: var(--white);
  background: var(--navy-deep);
  overflow: hidden;
  isolation: isolate;
}
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media video, .hero-media img { width: 100%; height: 100%; object-fit: cover; }
/* Slideshow di foto nell'hero della home (HeroSlideshow.astro): dissolvenza tra le foto */
.hero-slideshow { position: absolute; inset: 0; }
.hero-media .hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1s ease; }
.hero-media .hero-slide.is-active { opacity: 1; }
.hero-montage { position: absolute; inset: 0; background: var(--navy-deep); }
.hero-montage-video { position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s ease; }
.hero-montage-video.is-active { opacity: 1; }
/* Segnaposto finché non arriva il video/foto: filari di campo in prospettiva */
.hero-placeholder {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 80% at 80% 0%, rgba(119,188,32,.22), transparent 55%),
    linear-gradient(180deg, #1B3460 0%, var(--navy) 45%, var(--navy-deep) 100%);
}
.hero-placeholder svg { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 62%; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(13,27,53,.6) 0%, rgba(13,27,53,.15) 28%, rgba(13,27,53,.35) 55%, rgba(21,40,75,.92) 100%);
}
.hero-inner { width: 100%; padding-top: calc(var(--header-h) + 60px); padding-bottom: clamp(56px, 9vh, 110px); }
.hero-claim { display: inline-block; font-size: 15px; font-weight: 600; color: var(--navy-deep); background: var(--green); padding: 6px 14px; border-radius: 999px; margin-bottom: 22px; }
.hero h1 { max-width: 18ch; }
/* UK, Malta e Italia: titolo dell'hero più lungo, quindi più piccolo e su 2 righe */
:is([data-site="uk"], [data-site="malta"], [data-site="italia"]) .hero h1 { font-size: clamp(34px, 4.2vw, 60px); max-width: 30ch; text-wrap: balance; }
.hero .lead { color: rgba(255,255,255,.78); margin-top: 26px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 38px; }
.hero-note { position: absolute; top: calc(var(--header-h) + 20px); right: var(--gutter); font-size: 13px; color: rgba(255,255,255,.45); }

.scroll-cue {
  position: absolute; right: var(--gutter); top: 50%;
  z-index: 3;
  display: none; flex-direction: column; align-items: center; gap: 10px;
  color: var(--cue-color, rgba(255,255,255,.84)); font-size: 13px; text-decoration: none;
  writing-mode: vertical-rl; transform: translateY(-50%);
}
.scroll-cue span { display: block; width: 2px; height: 56px; background: var(--cue-track, rgba(255,255,255,.3)); position: relative; overflow: hidden; }
.scroll-cue span::after { content: ""; position: absolute; left: 0; top: -40%; width: 100%; height: 40%; background: var(--green); animation: cue 2.2s ease-in-out infinite; }
#business .scroll-cue { color: var(--cue-color, var(--navy)); }
#business .scroll-cue span { background: var(--cue-track, rgba(21,40,75,.25)); }
@keyframes cue { to { top: 100%; } }

/* Ingresso hero: un solo momento orchestrato */
.hero-inner > * { animation: rise .9s cubic-bezier(.2,.7,.2,1) both; }
.hero-inner > *:nth-child(2) { animation-delay: .08s; }
.hero-inner > *:nth-child(3) { animation-delay: .16s; }
.hero-inner > *:nth-child(4) { animation-delay: .24s; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }
@keyframes header-in {
  from { opacity: 0; transform: translateY(-18px); }
}

/* ===== Sezioni ===== */
.section {
  position: relative;
  min-height: 50vh;
  min-height: 50svh;
  display: flex;
  align-items: center;
  padding: clamp(72px, 10vw, 130px) 0;
}
.section > .wrap { width: 100%; }
.section-tint { background: var(--paper); }
.section-navy { background: var(--navy); color: var(--white); }
.section-navy .lead { color: rgba(255,255,255,.72); }
.cta-photo { background: linear-gradient(90deg, rgba(13,27,53,.94) 0%, rgba(13,27,53,.78) 58%, rgba(13,27,53,.58) 100%), var(--cta-image) center / cover no-repeat; }
.cta-photo--harvesters { background-position: center bottom; }
.cta-photo .about-intro { justify-items: center; text-align: center; }
.cta-photo .about-intro h2 { max-width: 30ch; }
.cta-photo .cta { flex-direction: column; justify-content: center; text-align: center; }
.cta-photo .cta h2 { max-width: 30ch; margin-inline: auto; }
.cta-photo .cta .lead { margin-inline: auto; }
.cta-photo .cta-actions { justify-content: center; }
.cta-actions[hidden], .cta-actions .btn[hidden] { display: none; }
.cta-photo [data-fm-download] { padding: 16px 28px; font-size: 14px; }

/* Motion system: content settles into view as sections enter the viewport. */
.motion-ready {
  opacity: 0;
  filter: blur(6px);
  transform: translate3d(0, 38px, 0) scale(.985);
  transition:
    opacity .8s cubic-bezier(.2,.7,.2,1) var(--motion-delay, 0ms),
    transform 1.05s cubic-bezier(.2,.7,.2,1) var(--motion-delay, 0ms),
    filter .8s cubic-bezier(.2,.7,.2,1) var(--motion-delay, 0ms);
  will-change: opacity, transform, filter;
}
.motion-ready.is-revealed { opacity: 1; filter: blur(0); transform: none; }.motion-ready .media-ph img {
  transform: scale(1.08);
  transition: transform 1.35s cubic-bezier(.2,.7,.2,1) var(--motion-delay, 0ms);
}
.motion-ready.is-revealed .media-ph img { transform: scale(1); }

.media-ph {
  position: relative; border-radius: 20px; overflow: hidden;
  background:
    repeating-linear-gradient(115deg, transparent 0 22px, rgba(21,40,75,.05) 22px 23px),
    var(--mist);
  display: flex; align-items: flex-end; padding: 16px;
  color: var(--muted); font-size: 13px;
}

/* About */
.about-section {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: var(--ink);
  background: var(--white);
}
.about-section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(rgba(255,255,255,.94), rgba(255,255,255,.96)), url("https://images.unsplash.com/photo-1500382017468-9049fed747ef?auto=format&fit=crop&w=2000&q=85") center / cover no-repeat;
}
.about-section > :not(.scroll-cue) { position: relative; z-index: 1; }
.about { display: grid; grid-template-columns: 1fr; justify-items: center; width: 100%; max-width: var(--wrap); text-align: center; }
.about-content { transition: opacity 1.1s cubic-bezier(.2,.7,.2,1), transform 1.1s cubic-bezier(.2,.7,.2,1); }
.about-content.is-reveal-pending { opacity: 0; transform: translateY(72px); }
.about .lead { max-width: 1400px; font-size: 48px; font-weight: 600; line-height: 1.28; color: var(--ink); }
/* Frase iniziale della sezione About, solo per alcuni siti (homeIntro in site.ts), es. "Diagram UK is part of Diagram Group." */
.about .home-intro { max-width: 1400px; margin: 0 auto 0.4em; font-size: 48px; font-weight: 600; line-height: 1.28; color: var(--green-dark); }
.about-content.is-reading .about-word { color: rgba(21,40,75,.32); transition: color .35s ease, text-shadow .35s ease; }
.about-content.is-reading .about-word.is-lit { color: var(--ink); text-shadow: 0 0 18px rgba(119,188,32,.2); }
.about-content.is-reading .home-intro .about-word { color: rgba(94,154,22,.32); }
.about-content.is-reading .home-intro .about-word.is-lit { color: var(--green-dark); }
.about-links { display: flex; justify-content: center; gap: 28px; flex-wrap: wrap; margin-top: 38px; transition: opacity .65s .3s ease, transform .65s .3s ease; }
.about-content.is-reveal-pending .about-links { opacity: 0; transform: translateY(28px); }

/* Business */
.business-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 2px solid var(--navy); }
.business-list li { border-right: 1px solid var(--line); }
.business-list li:last-child { border-right: 0; }
.business-list a {
  display: flex; flex-direction: column; gap: 14px; height: 100%;
  padding: 30px 26px 34px; text-decoration: none;
  transition: background-color .2s;
}
.business-list a:hover { background: var(--white); }
.business-list a:hover .biz-go { color: var(--green-dark); }
.biz-icon { width: 44px; height: 44px; color: var(--green-dark); }
.business-list p { color: var(--muted); font-size: 16px; }
.biz-go { margin-top: auto; font-weight: 600; font-size: 15px; }

#business {
  color: var(--ink);
  background-color: var(--white);
  background-image:
    linear-gradient(rgba(21,40,75,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(21,40,75,.07) 1px, transparent 1px);
  background-size: 42px 42px;
}
#business .lead { color: var(--muted); }
#business .text-link { color: var(--navy); }
#business .business-list { gap: 16px; border: 0; }
#business .business-list li {
  --accent: var(--green);
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 20px;
  background: #17345A;
  transition: background-color .25s, border-color .25s, transform .25s;
}
#business .business-list li::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--accent); }
#business .business-list li:nth-child(2) { --accent: #75D7FF; }
#business .business-list li:nth-child(3) { --accent: #C8F24B; }
#business .business-list li:nth-child(4) { --accent: #FFBE66; }
#business .business-list li:hover { border-color: var(--accent); background: #1C3E69; transform: translateY(-6px); }
#business .business-list a { position: relative; gap: 10px; padding: 24px; color: var(--white); }
#business .business-list a > :not(.biz-photo) { position: relative; z-index: 1; }
#business .business-list a:hover { background: transparent; }
#business .biz-icon { color: var(--accent); }
#business .biz-photo { position: absolute; inset: 0; height: auto; overflow: hidden; border-radius: 0; }
#business .biz-photo::after { content: ""; position: absolute; inset: 0; background: rgba(13,27,53,.68); }
#business .biz-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 20% 58%; opacity: .62; }
#business .biz-photo--netsens img { object-position: center top; }
#business .business-list li:nth-child(2) .biz-photo img { object-position: 45% 42%; }
#business .business-list li:nth-child(3) .biz-photo img { object-position: 70% 58%; }
#business .business-list li:nth-child(4) .biz-photo img { object-position: 88% 42%; }
#business .business-list li:nth-child(4) .biz-photo--research img { object-position: 45% 42%; }
#business .business-list p { color: rgba(255,255,255,.72); font-size: 14px; line-height: 1.45; }
#business .biz-go, #business .business-list a:hover .biz-go { color: var(--accent); }

#business.is-revealed .section-head h2 { animation: business-reveal 1.1s cubic-bezier(.2,.7,.2,1) both; }
#business.is-revealed .section-head .lead,
#business.is-revealed .section-head .text-link { animation: business-reveal 1.1s .7s cubic-bezier(.2,.7,.2,1) both; }
#business.is-revealed .business-list li { animation: business-reveal 1.1s cubic-bezier(.2,.7,.2,1) both; }
#business.is-revealed .business-list li:nth-child(1) { animation-delay: 1.8s; }
#business.is-revealed .business-list li:nth-child(2) { animation-delay: 2.05s; }
#business.is-revealed .business-list li:nth-child(3) { animation-delay: 2.3s; }
#business.is-revealed .business-list li:nth-child(4) { animation-delay: 2.55s; }
#business.is-gsap-ready .business-list li { animation: none; }
@keyframes business-reveal { from { opacity: 0; transform: translateY(36px); } }

/* Focus */
.section#focus {
  color: var(--white);
  background: linear-gradient(rgba(13,27,53,.86), rgba(21,40,75,.9)), url("https://images.unsplash.com/photo-1500382017468-9049fed747ef?auto=format&fit=crop&w=2200&q=85") center / cover no-repeat;
}
.section#focus .lead { color: rgba(255,255,255,.76); }
.focus-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 20px; }
.sdg-logo { display: block; width: min(260px, 100%); flex: 0 0 auto; padding: 10px 14px; background: var(--white); border-radius: 4px; }
.sdg-logo img { width: 100%; height: auto; }
.focus-card { display: flex; flex-direction: column; text-decoration: none; }
.focus-card .media-ph { aspect-ratio: 4 / 3; }
.focus-card .focus-photo { padding: 0; }
.focus-card .focus-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 22% 55%; }
.focus-card:nth-child(2) .focus-photo img { object-position: 50% 42%; }
.focus-card:nth-child(3) .focus-photo img { object-position: 78% 55%; }
.focus-card:first-child .media-ph { aspect-ratio: auto; flex: 1; min-height: 280px; }
.focus-card h3 { margin-top: 20px; }
.focus-card p { margin-top: 8px; color: rgba(255,255,255,.72); font-size: 16px; }
.focus-card:hover h3 { color: var(--green); }

/* News */
.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.news-card { text-decoration: none; display: flex; flex-direction: column; gap: 14px; }
.news-card .media-ph { aspect-ratio: 16 / 10; }
.news-meta { display: flex; gap: 14px; font-size: 14px; color: var(--muted); }
.news-meta .tag { color: var(--green-dark); font-weight: 600; }
.news-card h3 { font-size: 21px; line-height: 1.25; }
.news-card:hover h3 { text-decoration: underline; text-decoration-color: var(--green); text-underline-offset: 4px; }

/* CTA */
.cta { display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap; }
.cta h2 { max-width: 16ch; }
.cta .lead { margin-top: 14px; }
.cta-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.contact-cta-form { width: min(760px, 100%); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; text-align: left; }
.contact-cta-form label { display: grid; gap: 8px; color: var(--white); font-size: 14px; font-weight: 500; }
.contact-cta-form input, .contact-cta-form textarea { width: 100%; padding: 12px 14px; border: 1px solid rgba(255,255,255,.55); border-radius: 0; background: rgba(255,255,255,.96); color: var(--ink); font: inherit; }
.contact-cta-form textarea { min-height: 100px; resize: vertical; }
.contact-cta-form label:nth-of-type(4), .contact-cta-form .btn { grid-column: 1 / -1; }
.contact-cta-form .btn { justify-self: center; margin-top: 8px; }

/* ===== Footer ===== */
.site-footer { background: var(--navy-deep); color: rgba(255,255,255,.85); padding: 72px 0 28px; font-size: 16px; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 40px; }
.footer-grid .footer-companies ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 24px; }
.footer-contacts dl { margin: 0; }
.footer-contacts dt { font-size: 13px; color: rgba(255,255,255,.55); }
.footer-contacts dd { margin: 2px 0 14px; line-height: 1.5; }
.footer-grid h4 { margin: 0 0 14px; font-size: 14px; font-weight: 600; color: var(--green); }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-grid a { text-decoration: none; }
.footer-grid a:hover { color: var(--white); text-decoration: underline; }
.footer-company { color: rgba(255,255,255,.6); line-height: 1.7; }
.footer-company .brand { color: var(--white); margin-bottom: 16px; }
.footer-company .brand-logo { height: 44px; }
.footer-directory { grid-column: 1 / -1; }
.footer-directory > h4 { margin: 0 0 22px; color: var(--green); font-size: 14px; font-weight: 600; }
.footer-directory-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 32px; }
/* Desktop: le 3 sedi Diagram (prime tre) in una riga, le altre sotto. */
@media (min-width: 1081px) { .footer-directory-grid article:nth-child(4) { grid-column: 1; } }
.footer-directory article { min-width: 0; }
.footer-directory h5 { margin: 0 0 8px; color: var(--white); font-size: 15px; line-height: 1.3; }
.footer-directory p { margin: 0 0 10px; color: rgba(255,255,255,.65); line-height: 1.5; }
.footer-directory ul { display: flex; flex-direction: column; gap: 5px; margin: 0; padding: 0; list-style: none; }
.footer-directory a { color: rgba(255,255,255,.85); text-decoration: none; overflow-wrap: anywhere; }
.footer-directory a:hover { color: var(--white); text-decoration: underline; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: 56px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.14); font-size: 14px; color: rgba(255,255,255,.6); }
.footer-bottom ul { list-style: none; display: flex; gap: 22px; margin: 0; padding: 0; flex-wrap: wrap; }
.footer-bottom a { text-decoration: none; }
.footer-bottom a:hover { color: var(--white); }

/* Native scroll-driven reveals when the browser supports view timelines. */
@supports (animation-timeline: view()) {
  .motion-ready,
  .motion-ready.is-revealed {
    opacity: 1;
    filter: none;
    transform: none;
    transition: none;
    animation: scroll-reveal 1s linear both;
    animation-timeline: view();
    animation-range: entry 8% cover 38%;
  }

  .motion-ready .media-ph img {
    transform: none;
    transition: none;
    animation: scroll-image-settle 1s linear both;
    animation-timeline: view();
    animation-range: entry 8% cover 48%;
  }

  .about-content,
  .about-content.is-reveal-pending {
    animation: scroll-reveal-sharp 1s linear both;
    animation-timeline: view();
    animation-range: entry 8% cover 42%;
  }

  #business.is-revealed .section-head h2,
  #business.is-revealed .section-head .lead,
  #business.is-revealed .section-head .text-link {
    animation: scroll-reveal 1s linear both;
    animation-timeline: view();
    animation-range: entry 8% cover 42%;
  }

  .about-content.is-reveal-pending,
  .about-content.is-reveal-pending .about-links {
    opacity: 1;
    transform: none;
  }

  #business.is-revealed .section-head .lead,
  #business.is-revealed .section-head .text-link {
    animation-delay: 0s;
  }
}

/* Il testo della news è un blocco molto alto: l'effetto resterebbe sfumato per quasi tutta la lettura. */
.news-body.motion-ready,
.news-body.motion-ready.is-revealed {
  opacity: 1;
  filter: none;
  transform: none;
  transition: none;
  animation: none;
}

@keyframes scroll-reveal {
  from { opacity: 0; filter: blur(6px); transform: translate3d(0, 42px, 0) scale(.985); }
  to { opacity: 1; filter: blur(0); transform: none; }
}
@keyframes scroll-reveal-sharp {
  from { opacity: 0; transform: translate3d(0, 42px, 0) scale(.985); }
  to { opacity: 1; transform: none; }
}
@keyframes scroll-image-settle {
  from { transform: scale(1.08); }
  to { transform: scale(1); }
}

/* ===== Pagina interna ===== */
.page-hero { padding: calc(var(--header-h) + 28px) 0 clamp(64px, 8vw, 110px); background: var(--paper); }
.breadcrumb { display: flex; gap: 10px; font-size: 12px; color: var(--muted); margin-bottom: 48px; list-style: none; padding: 0; text-transform: uppercase; }
.breadcrumb li + li::before { content: "/"; margin-right: 10px; opacity: .5; }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { color: var(--navy); text-decoration: underline; }
.page-hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 5vw, 80px); align-items: end; }
.page-hero .area { font-size: 17px; font-weight: 600; color: var(--green-dark); margin-bottom: 18px; }
.page-hero h1 { font-size: clamp(40px, 5.2vw, 72px); max-width: 15ch; }
.page-hero .lead { margin-top: 24px; }
.page-hero .media-ph { aspect-ratio: 4 / 3; }
.business-page-hero { position: relative; isolation: isolate; overflow: hidden; box-sizing: border-box; display: flex; align-items: flex-end; height: 640px; background: linear-gradient(to bottom, #0b1830 0%, #1c4274 42%, #2f6a5a 74%, #6f9a63 100%); color: var(--white); }
.business-page-hero .wrap { width: 100%; }
.business-page-hero .page-hero-grid { grid-template-columns: 1fr; }
.business-page-hero h1 { font-size: clamp(36px, 4.4vw, 64px); max-width: 22ch; }
.business-page-hero .lead { color: rgba(255,255,255,.8); max-width: 100ch; }
.business-page-hero .area { color: var(--green); }
.business-page-hero .breadcrumb, .business-page-hero .breadcrumb a { color: rgba(255,255,255,.75); }
.business-page-hero .breadcrumb a:hover { color: var(--white); }
.about-gradient-page .page-hero--photo { background: linear-gradient(to bottom, #0b1830 0%, #1c4274 42%, #477e9e 74%, #7ba9b9 100%); }
.focus-gradient-page .page-hero--photo { background: linear-gradient(to bottom, #0b1830 0%, #1c4274 42%, #477e9e 74%, #7ba9b9 100%); }
:is(.about-gradient-page, .focus-gradient-page) .page-hero--photo::after { display: none; }
:is(.about-gradient-page, .focus-gradient-page) .page-hero-bg { display: none; }

@media (max-width: 700px) {
  .business-page-hero { height: 600px; }
}

.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.hardware-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 920px; }
.product { background: var(--white); border-radius: 20px; overflow: hidden; display: flex; flex-direction: column; }
.product .media-ph { aspect-ratio: 4 / 3; border-radius: 0; }
.hardware-product-photo { padding: 0; background: var(--mist); }
.hardware-product-photo img { width: 100%; height: 100%; object-fit: cover; }
.hardware-product-photo--station { padding: 0; }
.hardware-product-photo--station img { object-fit: contain; }
.hardware-product-photo--sensor img { object-position: 70% 70%; }
/* Una sola scheda: occupa tutta la riga, con foto a sinistra e testo a destra */
.hardware-product-grid--single { grid-template-columns: 1fr; }
@media (min-width: 601px) {
  .hardware-product-grid--single .product { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
  .hardware-product-grid--single .product-body { justify-content: center; padding: 32px; }
}
.product-brand-logo { width: min(190px, 100%); height: auto; align-self: flex-start; margin-bottom: 4px; }
.product-brand-logo--netsens { width: min(140px, 100%); }
.product-body { padding: 22px; display: flex; flex-direction: column; gap: 8px; }
.product-body p { color: var(--muted); font-size: 16px; }
.product-audiences { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 0; padding: 0; }
.product-body > .product-audiences { margin: 18px 0 14px; }
.product-audiences li { padding: 6px 8px; border: 1px solid var(--line); border-left: 3px solid var(--green); color: var(--navy); font-size: 12px; font-weight: 600; line-height: 1.2; }
.product-audiences li:first-child { background: var(--green); border-color: var(--green); color: var(--navy); }
.product-audiences li:nth-child(2) { background: var(--navy); border-color: var(--navy); color: var(--white); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); counter-reset: step; }
.steps li { counter-increment: step; padding: 26px 28px 0 0; border-top: 2px solid rgba(255,255,255,.2); position: relative; }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block; font-size: 56px; font-weight: 700; font-stretch: 120%; line-height: 1; color: var(--green); margin-bottom: 20px;
}
.steps li::after { content: ""; position: absolute; top: -2px; left: 0; width: 48px; height: 2px; background: var(--green); }
.steps p { margin-top: 10px; color: rgba(255,255,255,.72); font-size: 16px; }

.case { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(32px, 5vw, 80px); align-items: center; }
.case .media-ph { aspect-ratio: 16 / 11; }
.hardware-case-photo { padding: 0; }
.hardware-case-photo img { width: 100%; height: 100%; object-fit: cover; }
.case .kicker { font-weight: 600; color: var(--green-dark); margin-bottom: 14px; }
.case h2 { font-size: clamp(28px, 3.2vw, 42px); }
.case .lead { margin: 18px 0 28px; }

.cta-box { background: var(--mist); border-radius: 6px; padding: clamp(32px, 5vw, 64px); }

/* ===== About pages ===== */
.about-page-hero { background: var(--paper); }
.about-hero-media { padding: 0; aspect-ratio: 4 / 3; }
.about-hero-media img { width: 100%; height: 100%; object-fit: cover; }
.eyebrow, .area { font-size: 14px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--green-dark); }
.section-navy .eyebrow { color: var(--green); }
.about-intro { display: grid; gap: 20px; max-width: 900px; }
.about-intro h2 { max-width: 16ch; }
.about-intro-text { display: grid; gap: 20px; }
.profile-page .about-intro { max-width: var(--wrap); margin-left: auto; margin-right: auto; }
.about-intro--split { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); align-items: center; gap: clamp(32px, 6vw, 88px); max-width: var(--wrap); }
/* Primo blocco sotto l'hero, su tutte le pagine: più stretto delle sezioni successive */
.page-hero + .section > .wrap { max-width: 1120px; }
.profile-block-media { display: grid; gap: 20px; }
.profile-block-photo { width: 100%; aspect-ratio: 4 / 3; margin: 0; overflow: hidden; }
.profile-block-photo img { width: 100%; height: 100%; object-fit: cover; }
.soil-mapping-overview-photo { background: var(--paper); }
.soil-mapping-overview-photo img { object-fit: contain; }
.agrivalue-overview-photo { background: var(--paper); aspect-ratio: auto; padding: clamp(16px, 3vw, 32px); }
.agrivalue-overview-photo img { height: auto; object-fit: contain; }
.profile-history-link { justify-content: center; min-height: 60px; padding: 18px 28px; font-size: 17px; }

.uk-story-statement { padding: clamp(64px, 8vw, 110px) 0; background: var(--navy); color: var(--white); text-align: center; }
.uk-story-statement-copy { display: grid; gap: 34px; justify-items: center; }
.uk-story-statement p { max-width: 62ch; font-size: clamp(21px, 2.2vw, 32px); line-height: 1.35; font-weight: 700; }
.uk-story-statement p:first-child { font-size: 48px; line-height: 1.28; }
.uk-story-strengths-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(32px, 5vw, 80px); }
.uk-story-strengths h2 { max-width: 11ch; font-size: clamp(28px, 3vw, 44px); }
.uk-story-strengths p { margin-top: 22px; font-size: 18px; line-height: 1.55; }
.uk-story-timeline-section { padding-top: 30px; }
.uk-group-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 52px 0 0; padding: 0; list-style: none; }
.uk-group-metrics li { display: grid; align-content: start; gap: 12px; min-height: 164px; padding: 28px; border-left: 1px solid var(--line); }
.uk-group-metrics li:first-child { border-left: 0; }
.uk-group-metrics strong { color: var(--navy); font-size: clamp(34px, 3.5vw, 54px); line-height: .95; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.uk-group-metrics span { max-width: 14ch; color: var(--muted); font-weight: 600; }
.consulting-inline-logo { display: inline-flex; align-items: center; margin-top: 20px; }
.consulting-inline-logo img { display: block; width: auto; height: 35px; }
.consulting-inline-actions { margin-top: 14px; }
.consulting-company-logo { display: grid; place-items: center; min-height: 180px; margin: 0; }
.consulting-company-logo img { width: min(100%, 460px); height: auto; }
.consulting-company-actions { margin-top: 28px; }
.research-company-logo { display: grid; place-items: center; min-height: 75px; margin: 0; }
.research-company-logo img { display: block; width: auto; max-width: 100%; height: 75px; object-fit: contain; }
.research-company-actions { margin-top: 28px; }
.stat-grid, .value-grid, .people-grid, .company-grid { display: grid; gap: 20px; }
.stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat { min-height: 220px; display: flex; flex-direction: column; justify-content: space-between; padding: 28px; border-top: 3px solid var(--green); background: var(--white); }
.stat strong { font-size: clamp(36px, 4vw, 56px); color: var(--green-dark); line-height: .9; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.stat span { max-width: 16ch; color: var(--muted); font-weight: 600; }
.value-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.value-grid article { padding-top: 24px; border-top: 1px solid rgba(255,255,255,.3); }
.value-grid span { color: var(--green); font-weight: 700; }
.value-grid h3 { margin-top: 42px; color: var(--white); }
.value-grid p { margin-top: 12px; color: rgba(255,255,255,.72); }
.people-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.person-card { min-height: 250px; padding: 24px; display: flex; flex-direction: column; justify-content: flex-end; border: 1px solid var(--line); background: var(--paper); }
.person-mark { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: auto; border-radius: 50%; background: var(--navy); color: var(--white); font-size: 18px; font-weight: 700; }
.person-card p { margin-top: 8px; color: var(--muted); }
.history-timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.history-timeline li { display: grid; grid-template-columns: minmax(110px, .35fr) 1fr; gap: 28px; padding: 30px 0; border-top: 1px solid var(--line); }
.history-timeline li:last-child { border-bottom: 1px solid var(--line); }
.history-timeline time, .history-timeline-label { color: var(--green-dark); font-size: 22px; font-weight: 700; }
.history-timeline h3 { margin-bottom: 10px; }
.history-timeline p { color: var(--muted); }
.company-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.company-card { min-height: 340px; padding: 28px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 20px; }
.company-card > span { color: var(--green-dark); font-weight: 700; }
.company-card h3 { margin-top: 14px; }
.company-card p { margin-top: 12px; color: var(--muted); }
.company-card .company-location { margin-top: 12px; color: var(--green-dark); font-size: 14px; font-weight: 600; }
.company-card .text-link { align-self: flex-start; margin-top: 24px; }
.contact-grid { grid-template-columns: minmax(260px, 1fr) minmax(0, 2fr); }
.contact-form { display: flex; flex-direction: column; gap: 24px; padding: 28px; border: 1px solid var(--line); border-radius: 20px; background: var(--white); }
.contact-form-head > span { color: var(--green-dark); font-weight: 700; }
.contact-form-head h2 { margin-top: 14px; }
.contact-form-head p { margin-top: 12px; color: var(--muted); }
.contact-form-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.contact-form label { display: grid; gap: 8px; color: var(--green-dark); font-size: 14px; font-weight: 700; }
.contact-form input, .contact-form textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 0; background: var(--white); color: var(--ink); font: inherit; }
.contact-form textarea { resize: vertical; }
.contact-form-message { grid-column: 1 / -1; }
.contact-form .btn { align-self: flex-start; }
.group-contacts-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (min-width: 1081px) { .group-contacts-grid .company-card:nth-child(4) { grid-column: 1; } }
.group-contacts-grid .company-card { min-height: 0; padding: 20px; border-radius: 12px; }
.group-contacts-grid .company-card h3 { margin-top: 0; font-size: 19px; }
.company-contact-links { display: grid; gap: 9px; margin-top: 18px; }
.company-contact-links .text-link { width: fit-content; margin-top: 0; }
.group-contacts-grid .company-contact-links .text-link { font-size: 14px; font-weight: 400; }
.contact-registered-office { margin-top: 24px !important; padding-top: 20px; border-top: 1px solid var(--line); }
.hardware-company-logo { display: block; width: auto; max-width: 100%; height: 44px; margin-bottom: 10px; object-fit: contain; object-position: left center; }
.hardware-company-logo--netsens { height: 44px; }
.hardware-company-card--white { background: var(--white); }
.hardware-company-actions { margin-top: auto; padding-top: 24px; }
.group-world-map { width: 100%; aspect-ratio: 2 / 1; overflow: hidden; background: transparent; }
.group-world-map svg, .group-world-map img { display: block; width: 100%; height: 100%; }
.group-world-map path { transition: fill .2s ease; }
.group-world-map--error { display: grid; place-items: center; min-height: 220px; padding: 24px; background: var(--paper); color: var(--muted); text-align: center; }
.group-presence { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.group-presence .section-head { margin-bottom: 0; }
.group-presence-countries { margin-top: 20px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.software-page-hero:not(.business-page-hero) { background: var(--paper); }
/* Hero comune a tutte le pagine dettaglio software (riferimento: New Agri). */
.software-page-hero.page-hero--photo { background: linear-gradient(to bottom, #0b1830 0%, #1c4274 42%, #2f6a5a 74%, #6f9a63 100%); }
.software-page-hero.page-hero--photo::after { display: none; }
.diagram-fm-page-hero .diagram-fm-nav { border-color: rgba(255,255,255,.35); }
/* Senza riga di pulsanti: compensa 38px di margine + 40px di bottone per allinearsi agli altri hero. */
.diagram-fm-page-hero { padding-bottom: calc(clamp(64px, 8vw, 110px) + 78px); }
@media (min-width: 900px) { .diagram-fm-page-hero .area { white-space: nowrap; } }
.diagram-fm-page-hero .diagram-fm-nav a { border-color: rgba(255,255,255,.35); }
.diagram-fm-page-hero .diagram-fm-nav a:hover { background: rgba(255,255,255,.08); }
.software-sector-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.software-sector-summary article { position: relative; display: flex; flex-direction: column; padding: clamp(26px, 3vw, 42px); border-top: 5px solid var(--green); border-radius: 20px; background: var(--white); box-shadow: 0 18px 38px rgba(21,40,75,.08); }
.software-sector-summary article + article { border-top-color: var(--navy); }
.software-sector-summary h3 { margin: 4px 0 0; font-size: clamp(28px, 3vw, 42px); }
.software-sector-summary h3 a { text-decoration: none; }
.software-sector-summary ul { display: grid; gap: 0; list-style: none; margin: clamp(32px, 4vw, 52px) 0 0; padding: 0; }
.software-sector-summary li { position: relative; padding: 14px 0 14px 24px; border-top: 1px solid var(--line); color: var(--muted); line-height: 1.45; }
.software-sector-summary li::before { content: ""; position: absolute; top: 23px; left: 0; width: 8px; height: 8px; background: var(--green); }
.software-sector-private li::before { background: var(--navy); }
.software-sector-link { align-self: flex-start; margin-top: 24px; }
.software-sector-number { display: block; color: var(--green-dark); font-size: 13px; font-weight: 700; letter-spacing: .1em; }
.software-sector-private .software-sector-number, .software-sector-private .software-sector-kicker { color: var(--navy); }
.software-sector-kicker { margin: 26px 0 0; color: var(--green-dark); font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.software-group { align-items: flex-start; }
.software-grid { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.software-card { min-height: 255px; display: flex; flex-direction: column; align-items: flex-start; padding: 26px; overflow: hidden; border: 1px solid var(--line); border-top: 3px solid var(--green); border-radius: 20px; background: var(--white); }
.software-card--agrivoltaics { min-height: 330px; }
/* I file dei loghi hanno margini vuoti diversi: le altezze sono calibrate perché il testo risulti alto uguale (~28px). */
.software-card img[src$="/images/agrivoltaics.png"], .software-card img[src$="/images/agrivalue.png"], .software-card img[src$="/images/newagri.png"], .software-card img[src$="/images/soilmapping.png"] { width: auto; max-width: 100%; height: 36px; object-fit: contain; align-self: flex-start; }
.software-card img[src$="/images/agrivoltaics.png"] { height: 30px; }
.software-brand-logo--fm { display: block; width: auto; max-width: 100%; height: 35px; margin-bottom: 12px; }
.diagram-fm-card { padding: clamp(28px, 4vw, 44px); border-top-width: 5px; box-shadow: 0 14px 34px rgba(21,40,75,.07); }
.diagram-fm-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; width: 100%; margin: 0; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.diagram-fm-heading img { margin: 0; }
.diagram-fm-heading span { color: var(--green-dark); font-size: 12px; font-weight: 700; text-align: right; text-transform: uppercase; }
.diagram-fm-overview { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 4vw, 48px); align-items: center; margin-top: 18px; }
.software-card .diagram-fm-intro { max-width: 80ch; margin: 0; color: var(--ink); font-size: 18px; font-weight: 500; }
.software-module-bullets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; list-style: none; margin: 24px 0 0; padding: 0; }
.software-module-bullets li { position: relative; padding-left: 16px; color: var(--navy); font-weight: 600; }
.software-module-bullets li::before { content: ""; position: absolute; top: .65em; left: 0; width: 6px; height: 6px; background: var(--green); }
.software-card h3 { margin-top: 0; }
.software-card p { margin-top: 14px; color: var(--muted); }
.software-card .text-link { margin-top: auto; padding-top: 22px; }
.software-package-modules { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 36px; list-style: none; margin: 12px 0 0; padding: 0; }
.diagram-fm-supply-modules { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 24px; }
.software-package-modules li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 0 12px; padding: 18px 0; border-top: 1px solid var(--line); }
.software-package-modules li > span { grid-row: 1 / span 2; color: var(--green-dark); font-size: 13px; font-weight: 700; }
.software-package-modules h4 { margin: 0; font-size: 17px; }
.software-package-modules p { margin: 8px 0 0; }
/* DIAGRAM FM: con 5 moduli su 2 colonne, l'ultimo occupa tutta la larghezza. */
.diagram-fm-card .software-package-modules li:last-child:nth-child(odd) { grid-column: 1 / -1; }
.diagram-fm-actions { width: 100%; margin-top: 16px; padding-top: 22px; border-top: 1px solid var(--line); }
.diagram-fm-hero-grid { align-items: center; }
.diagram-fm-hero-visual { width: 100%; aspect-ratio: 4 / 3; margin: 0; padding: 20px; overflow: hidden; background: var(--white); }
.diagram-fm-hero-visual img { width: 100%; height: 100%; object-fit: contain; }
.product-hero-visual { width: 100%; aspect-ratio: 4 / 3; margin: 0; padding: 20px; overflow: hidden; background: var(--white); }
.product-hero-visual img { width: 100%; height: 100%; object-fit: contain; }
.product-logo { display: block; width: auto; max-width: min(240px, 100%); height: 38px; margin: 0 0 14px; object-fit: contain; object-position: left center; }
.diagram-fm-nav { display: flex; flex-wrap: wrap; gap: 0; margin-top: 44px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.diagram-fm-nav a { flex: 1 1 190px; display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 12px 18px; text-decoration: none; font-weight: 600; border-right: 1px solid var(--line); }
.diagram-fm-nav a:hover { background: var(--mist); }
.diagram-fm-nav span { color: var(--green-dark); font-size: 12px; font-weight: 700; }
.diagram-fm-tabs { position: sticky; top: var(--header-h); z-index: 40; display: flex; gap: 0; overflow-x: auto; background: var(--white); border-top: 0px solid var(--line); border-bottom: 0px solid var(--line); }
.diagram-fm-tabs button { flex: 1 0 185px; display: flex; align-items: center; gap: 8px; min-height: 54px; padding: 10px 16px; color: var(--navy); font: inherit; font-weight: 700; white-space: nowrap; text-align: left; border: 0; border-right: 1px solid var(--line); cursor: pointer; }
.diagram-fm-tabs button:last-child { border-right: 0; }
.diagram-fm-tabs button span { color: var(--green-dark); font-size: 12px; }
.diagram-fm-tabs button[aria-selected="true"] { color: var(--white); background: var(--navy); }
.diagram-fm-tabs button[aria-selected="true"] span { color: var(--green); }
.diagram-fm-tabs button:focus-visible { outline: 3px solid var(--green); outline-offset: -3px; }
.diagram-fm-tab-panel[hidden] { display: none; }
.diagram-fm-intro-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr); gap: clamp(28px, 5vw, 72px); align-items: center; margin-bottom: 40px; }
.diagram-fm-intro-grid .section-head { margin-bottom: 0; }
.diagram-fm-detail-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.diagram-fm-detail-grid--full { grid-template-columns: 1fr; }
.diagram-fm-module-visual { width: 100%; aspect-ratio: 4 / 3; margin: 0; overflow: hidden; background: var(--paper); }
.diagram-fm-module-visual img { width: 100%; height: 100%; object-fit: cover; }
.diagram-fm-map-visual img { object-fit: contain; }
.diagram-fm-copy { display: grid; gap: 16px; align-content: start; }
.diagram-fm-copy h3 { margin-top: 12px; }
.diagram-fm-copy p { color: var(--muted); }
.diagram-fm-cta-copy { width: 100%; text-align: center; }
.diagram-fm-cta-copy .lead { margin-inline: auto; }
.diagram-fm-checklist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; margin: 8px 0; padding: 0; list-style: none; }
.diagram-fm-checklist li { padding: 10px 0 10px 18px; border-bottom: 1px solid var(--line); position: relative; font-weight: 600; }
.diagram-fm-checklist li::before { content: ""; position: absolute; top: 19px; left: 0; width: 7px; height: 7px; background: var(--green); }
.diagram-fm-video-section { position: relative; z-index: 0; margin-top: 48px; padding: clamp(64px, 8vw, 100px) 0; }
.diagram-fm-video-section::before { content: ""; position: absolute; inset: 0 calc(50% - 50vw); z-index: -1; background: var(--paper); }
.diagram-fm-video-heading { margin-bottom: 24px; }
.diagram-fm-video-heading h3 { font-size: clamp(26px, 3vw, 40px); }
.diagram-fm-video-heading p:not(.eyebrow) { margin-top: 12px; color: var(--muted); }
.diagram-fm-video-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.diagram-fm-video-item { display: grid; gap: 12px; }
.diagram-fm-video-item h4 { margin: 0; font-size: 17px; }
.software-card-actions { display: flex; flex-wrap: wrap; gap: 12px 20px; margin-top: auto; padding-top: 22px; }
.software-card-actions .text-link { margin-top: 0; padding-top: 0; }
.software-card-actions .btn { align-self: flex-start; margin-top: 0; }
.software-card-wide { grid-column: 1 / -1; }
.software-photo { position: relative; min-height: 255px; margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: var(--paper); }
.software-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.software-photo--diagram-fm { width: 100%; min-height: 0; aspect-ratio: 16 / 9; max-height: 560px; border: 0; background: var(--white); }
.software-photo--diagram-fm img { object-fit: contain; }
.software-photo--public-product { width: 100%; min-height: 0; aspect-ratio: 16 / 9; margin: 12px 0 4px; background: var(--paper); }
.software-photo--public-product img { object-fit: contain; }
/* New Agri: foto a fianco di "One integrated platform" (sotto i 900px torna in colonna) */
.newagri-platform { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; }
.newagri-platform .software-photo--public-product { margin: 0; }
.newagri-structure { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.newagri-structure .software-sector-summary { grid-template-columns: 1fr; }
.newagri-structure .software-photo { min-height: 0; aspect-ratio: 4 / 3; margin: 0; }
.newagri-stats { margin-bottom: 40px; }
.newagri-stats article { display: grid; gap: 4px; padding: 24px; border-top: 3px solid var(--green); background: var(--white); }
.newagri-stats strong { font-size: 48px; line-height: 1; color: var(--navy); }
.newagri-stats span { color: var(--green-dark); font-weight: 700; }
.newagri-solution-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.newagri-solution-grid > div { padding: 28px; background: var(--white); }
.newagri-solution-grid h3 { margin-bottom: 16px; }
.newagri-solution-grid ul { display: grid; gap: 10px; margin: 0; padding-left: 20px; }
.newagri-editorial-media { overflow: hidden; background: var(--navy); }
.newagri-editorial-media img { display: block; width: 100%; min-height: 360px; max-height: 560px; object-fit: cover; object-position: center; }
.newagri-modules-layout { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.newagri-modules-layout .section-head { margin: 0; }
.newagri-modules-layout .software-package-modules { grid-template-columns: 1fr; margin: 0; }
:is(.newagri-downloads, .soil-mapping-downloads) .section-head { justify-content: center; text-align: center; }
:is(.newagri-downloads, .soil-mapping-downloads) .software-card-actions { justify-content: center; }
.software-photo--agrivalue { min-height: 330px; }
.software-photo--agrivalue img { object-fit: contain; }
.video-embed { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #000; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.soil-mapping-process { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.software-photo--padded img { inset: 20px; width: calc(100% - 40px); height: calc(100% - 40px); }
.software-photo-placeholder { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; border: 2px dashed var(--line); color: var(--muted); font-size: 14px; letter-spacing: .08em; text-transform: uppercase; }
.software-group.section-navy .software-card { color: var(--ink); }
.software-note { margin-top: 20px; color: var(--muted); font-size: 14px; }

/* ===== Responsive ===== */
@media (max-width: 1080px) {
  .stat-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .business-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .business-list li:nth-child(2) { border-right: 0; }
  .business-list li:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-directory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .people-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .group-contacts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  :root { --header-h: 70px; }
  .menu-btn { display: block; }
  .nav {
    position: fixed; inset: var(--header-h) 0 0 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 20px var(--gutter) 40px;
    background: var(--white); color: var(--navy);
    overflow-y: auto; display: none;
  }
  .nav.is-open { display: flex; }
  .nav > ul { flex-direction: column; gap: 0; }
  .nav-item { border-bottom: 1px solid var(--line); }
  .nav-link, .nav-toggle { width: 100%; justify-content: space-between; padding: 18px 0; font-size: 20px; border-radius: 0; }
  .nav-link:hover, .nav-toggle:hover, .nav-toggle[aria-expanded="true"] { background: none; }
  .dropdown { position: static; box-shadow: none; border: 0; padding: 0 0 12px; min-width: 0; }
  .lang { align-self: flex-start; margin-top: 28px; }
  .site-header.menu-open { background: var(--white); color: var(--navy); border-color: var(--line); }
  .site-header-flag { right: calc(var(--gutter) + 44px); }

  .about, .page-hero-grid, .case { grid-template-columns: 1fr; }
  .about-intro--split { grid-template-columns: 1fr; }
  .group-presence { grid-template-columns: 1fr; }
  .group-presence .section-head { margin-bottom: 40px; }
  .diagram-fm-overview { grid-template-columns: 1fr; }
  .diagram-fm-detail-grid, .diagram-fm-intro-grid { grid-template-columns: 1fr; }
  .diagram-fm-video-grid { grid-template-columns: 1fr; }
  .software-package-modules { grid-template-columns: 1fr; }
  .diagram-fm-checklist { grid-template-columns: 1fr; }
  .focus-grid { grid-template-columns: 1fr 1fr; }
  .focus-card:first-child { grid-column: 1 / -1; }
  .news-grid { grid-template-columns: 1fr; }
  .stat-grid, .value-grid, .company-grid { grid-template-columns: 1fr; }
  .group-contacts-grid { grid-template-columns: 1fr; }
  .software-audience-intro-head, .software-sector-summary { grid-template-columns: 1fr; }
  .software-audience-intro-head { gap: 24px; }
  .software-audience-intro-head > p { padding-bottom: 0; }
  .newagri-platform { grid-template-columns: 1fr; }
  .newagri-structure { grid-template-columns: 1fr; }
  .newagri-solution-grid { grid-template-columns: 1fr; }
  .newagri-modules-layout { grid-template-columns: 1fr; }
  .newagri-editorial-media img { min-height: 260px; }
  .software-sector-public, .software-sector-private { grid-template-columns: 1fr; }
  .software-sector-summary ul { grid-template-columns: 1fr; }
  .scroll-cue {
    top: auto;
    right: var(--gutter);
    bottom: 18px;
    flex-direction: row;
    gap: 8px;
    writing-mode: horizontal-tb;
    transform: none;
  }
  .scroll-cue span { width: 42px; height: 2px; }
  .scroll-cue span::after { top: 0; left: -40%; width: 40%; height: 100%; }
  .hero-note { display: none; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .business-list, .product-grid, .steps, .focus-grid, .footer-grid { grid-template-columns: 1fr; }
  .footer-directory-grid { grid-template-columns: 1fr; }
  .people-grid { grid-template-columns: 1fr; }
  .software-grid { grid-template-columns: 1fr; }
  .group-world-map { min-height: 220px; }
  .software-card-wide { grid-column: auto; }
  .history-timeline li { grid-template-columns: 1fr; gap: 8px; }
  .business-list li { border-right: 0; border-bottom: 1px solid var(--line); }
  .hero-actions .btn, .cta-actions .btn { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Video hero: sfondo di riserva mentre carica, nessun movimento con reduced motion */
.hero-media { background: var(--navy-deep) url("hero-poster.jpg") center / cover no-repeat; }
@media (prefers-reduced-motion: reduce) { .hero-media video { display: none; } }

/* Profile: hero con foto di sfondo a tutta larghezza */
.page-hero--photo { position: relative; isolation: isolate; overflow: hidden; color: var(--white); height: 640px; box-sizing: border-box; display: flex; align-items: flex-end; }
.page-hero--photo .wrap { width: 100%; }
.page-hero-bg { position: absolute; inset: 0; z-index: -2; }
.page-hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.page-hero--hardware-uk .page-hero-bg img { transform: scale(1.12) translateX(6%); }
.page-hero--photo::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(13,27,53,.55) 0%, rgba(13,27,53,.2) 55%, rgba(13,27,53,0) 80%), linear-gradient(180deg, rgba(13,27,53,.45) 0%, rgba(13,27,53,.25) 35%, rgba(21,40,75,.88) 100%);
}
.page-hero--photo .page-hero-grid { grid-template-columns: 1fr; }
.page-hero--photo h1 { font-size: clamp(36px, 4.4vw, 64px); max-width: 22ch; }
.innovation-page .page-hero--photo h1 { max-width: 34ch; }
.page-hero--photo .lead { color: rgba(255,255,255,.8); max-width: 100ch; }
.page-hero--photo .area { color: var(--green); }
.page-hero--photo .breadcrumb, .page-hero--photo .breadcrumb a { color: rgba(255,255,255,.75); }
.page-hero--photo .breadcrumb a:hover { color: var(--white); }
@media (max-width: 700px) {
  .page-hero--photo { height: 600px; }
  .business-detail-page-hero { height: auto; min-height: 100svh; padding-top: calc(var(--header-h) + 32px); padding-bottom: 80px; }
}

/* News: elenco (news/index.astro) e pagina della notizia (news/[slug].astro) */
.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 3vw, 40px); }
.news-card a { display: flex; flex-direction: column; height: 100%; text-decoration: none; }
.news-card-photo { aspect-ratio: 3 / 2; overflow: hidden; border-radius: 20px; background: var(--mist); }
.news-card-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.news-card a:hover .news-card-photo img { transform: scale(1.04); }
.news-card-date { margin-top: 20px; font-size: 14px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--green-dark); }
.news-card h3 { margin-top: 10px; }
.news-card p { margin-top: 12px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-card .text-link { align-self: flex-start; margin-top: auto; padding-top: 20px; }
.news-body { max-width: 720px; font-size: 18px; line-height: 1.7; }
/* :where perché il contenuto di WordPress/Elementor è annidato in più livelli di div */
.news-body :where(p, ul, ol, blockquote, figure, img) { margin: 0 0 1.1em; }
.news-body h2 { font-size: clamp(26px, 3vw, 36px); margin: 1.6em 0 .6em; }
.news-body h3 { margin: 1.4em 0 .5em; }
.news-body p { max-width: none; }
.news-body ul, .news-body ol { padding-left: 1.3em; }
.news-body a { color: var(--green-dark); }
.news-body img { width: 100%; height: auto; }
.news-body blockquote { margin-left: 0; padding-left: 24px; border-left: 3px solid var(--green); color: var(--muted); }
.news-back { display: inline-block; margin-top: 56px; }
.news-more { display: block; margin: 48px auto 0; }
.news-more[hidden], .news-status[hidden] { display: none; }
.news-hero { background: linear-gradient(to bottom, #0b1830 0%, #1c4274 42%, #477e9e 74%, #7ba9b9 100%); }
.news-hero::after { display: none; }
.news-header { max-width: 900px; margin-bottom: clamp(40px, 5vw, 64px); }
.news-header h1 { margin-top: 18px; font-size: clamp(32px, 3.8vw, 54px); }
.news-header .lead { margin-top: 24px; }
.news-body figure { margin: 0; }
.news-body iframe { max-width: 100%; }
@media (max-width: 900px) { .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .news-grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .news-card-photo img { transition: none; } }

/* Selettore dei siti con le bandierine nell'header (Header.astro) */
.flag { width: 20px; height: 14px; flex: none; border-radius: 2px; box-shadow: 0 0 0 1px rgba(21,40,75,.18); }
.flag--globe { height: 18px; width: 18px; box-shadow: none; border-radius: 0; }
.site-switch .dropdown { left: auto; right: 0; min-width: 220px; }
.site-switch .dropdown a { display: flex; align-items: center; gap: 12px; }
@media (max-width: 900px) {
  .site-switch .nav-toggle { justify-content: flex-start; }
  .site-switch .chev { margin-left: auto; }
}


/* Consulting: pulsanti delle società Agriconsulting in fondo alla card */
.company-card .consulting-company-link { align-self: flex-start; margin-top: auto; }
.consulting-companies { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.consulting-company-card-logo { height: 44px; width: auto; align-self: flex-start; }
.consulting-companies .company-card p { margin: 14px 0 24px; }
.consulting-companies .company-card { min-height: 0; background: var(--white); }
.consulting-company-card--white { background: var(--white); }
@media (max-width: 900px) { .consulting-companies { grid-template-columns: 1fr; } }

/* Certifications: schede dei documenti con il pulsante di download in basso */
.cert-grid .company-card { min-height: 0; }
.cert-grid .cert-download { align-self: flex-start; margin-top: auto; }
.cert-grid .company-card h3, .cert-grid .company-card p:last-of-type { margin-bottom: 24px; }
.cert-grid--wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 900px) { .cert-grid--wide { grid-template-columns: 1fr; } }

/* Newsletter: testo a sinistra, form a destra */
.newsletter { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.newsletter-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.newsletter-form-wide { grid-column: 1 / -1; }
.newsletter-form label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--navy); }
.newsletter-form input:not([type="checkbox"]) { width: 100%; box-sizing: border-box; padding: 12px 14px; border: 1px solid var(--line); border-radius: 9px; background: var(--white); color: var(--navy); font: inherit; font-weight: 400; }
.newsletter-form input:focus-visible { outline: 2px solid var(--green); outline-offset: 1px; }
.newsletter-consent { grid-template-columns: auto 1fr; align-items: start; gap: 10px; font-weight: 400 !important; color: var(--muted) !important; }
.newsletter-consent input { margin-top: 3px; accent-color: var(--green-dark); }
.newsletter-form .btn { justify-self: start; }
@media (max-width: 900px) { .newsletter { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .newsletter-form { grid-template-columns: 1fr; } }
