/* ============================================================
   ESEX s.r.l. — Design System
   Stampaggio a caldo dell'acciaio dal 1995

   Colori sociali: Rosso ESEX #CC0000 · Nero · Bianco
   Mobile-first · CSS Custom Properties · Grid + Flexbox
   ============================================================ */

/* --- SELF-HOSTED FONT: Inter (variable) -------------------- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC,
    U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- RESET ------------------------------------------------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* --- CUSTOM PROPERTIES ------------------------------------- */
:root {
  /* Palette ESEX — colori sociali */
  --rosso:        #CC0000;
  --rosso-scuro:  #990000;
  --rosso-chiaro: #E63333;
  --nero:         #1A1A1A;
  --nero-pieno:   #000000;
  --grigio-scuro: #333333;
  --grigio:       #666666;
  --grigio-medio: #999999;
  --grigio-chiaro:#E8E8E8;
  --grigio-bg:    #F5F5F5;
  --bianco:       #FFFFFF;

  /* Accenti metallici (richiamo acciaio forgiato) */
  --acciaio:      #4A5568;
  --acciaio-chiaro: #718096;
  --scintilla:    #F6AD55;

  /* Typography */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Spacing scale (4px base) */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.25rem;
  --sp-6: 1.5rem;
  --sp-8: 2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-16: 4rem;
  --sp-20: 5rem;
  --sp-24: 6rem;

  /* Layout */
  --max-width: 1200px;
  --header-h: 64px;
  --radius: 4px;
  --radius-lg: 8px;

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --duration: 300ms;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.15);
  --shadow-red: 0 4px 20px rgba(204,0,0,0.25);
}

/* --- BASE -------------------------------------------------- */
html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--nero);
  background: var(--bianco);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--rosso);
  text-decoration: none;
  transition: color var(--duration) var(--ease);
}
a:hover {
  color: var(--rosso-scuro);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--nero-pieno);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.5rem); }

/* --- CONTAINER --------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--sp-5);
}

/* --- SECTION SPACING --------------------------------------- */
.section {
  padding: var(--sp-16) 0;
}
.section--dark {
  background: var(--nero);
  color: var(--bianco);
}
.section--dark h2,
.section--dark h3 {
  color: var(--bianco);
}
.section--gray {
  background: var(--grigio-bg);
}
.section--red {
  background: var(--rosso);
  color: var(--bianco);
}
.section--red h2 {
  color: var(--bianco);
}

/* Section header with accent line */
.section__header {
  margin-bottom: var(--sp-12);
  position: relative;
}
.section__header h2 {
  display: inline-block;
}
.section__header h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--rosso);
  margin-top: var(--sp-3);
  transition: width var(--duration) var(--ease);
}
.section--dark .section__header h2::after,
.section--red .section__header h2::after {
  background: var(--bianco);
}
.section__header p {
  margin-top: var(--sp-3);
  color: var(--grigio);
  font-size: 1.1rem;
  max-width: 640px;
}
.section--dark .section__header p {
  color: var(--grigio-medio);
}

/* --- HEADER ------------------------------------------------ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  z-index: 1000;
  transition: box-shadow var(--duration) var(--ease);
}
.header.scrolled {
  box-shadow: var(--shadow);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--sp-5);
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--nero-pieno);
  text-decoration: none;
}
.logo__img {
  height: 42px;
  width: auto;
  display: block;
}
.logo__mark {
  color: var(--rosso);
}
.logo__sub {
  font-size: 0.6rem;
  font-weight: 400;
  color: var(--grigio);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  display: block;
  line-height: 1;
  margin-top: 2px;
}

/* Desktop nav */
.nav {
  display: none;
  align-items: center;
  gap: var(--sp-6);
  list-style: none;
}
.nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--grigio-scuro);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: var(--sp-2) 0;
  position: relative;
  text-decoration: none;
}
.nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--rosso);
  transition: width var(--duration) var(--ease);
}
.nav a:hover::after,
.nav a.active::after {
  width: 100%;
}
.nav a:hover {
  color: var(--rosso);
}

/* CTA header button */
.btn-header {
  display: none;
  padding: var(--sp-2) var(--sp-5);
  background: var(--rosso);
  color: var(--bianco) !important;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: var(--radius);
  transition: all var(--duration) var(--ease);
  text-decoration: none;
}
.btn-header:hover {
  background: var(--rosso-scuro);
  color: var(--bianco) !important;
  box-shadow: var(--shadow-red);
  transform: translateY(-1px);
}

/* Hamburger */
.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--sp-2);
  z-index: 1001;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--nero);
  transition: all var(--duration) var(--ease);
  transform-origin: center;
}
.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
}
.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile menu overlay */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  max-width: 320px;
  height: 100vh;
  height: 100dvh;
  background: var(--bianco);
  padding: calc(var(--header-h) + var(--sp-8)) var(--sp-8) var(--sp-8);
  z-index: 999;
  transition: right var(--duration) var(--ease);
  box-shadow: var(--shadow-lg);
  overflow-y: auto;
}
.mobile-menu.open {
  right: 0;
}
.mobile-menu__overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration) var(--ease);
}
.mobile-menu__overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.mobile-menu ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}
.mobile-menu a {
  display: block;
  padding: var(--sp-3) var(--sp-4);
  font-size: 1rem;
  font-weight: 500;
  color: var(--nero);
  text-decoration: none;
  border-radius: var(--radius);
  transition: all var(--duration) var(--ease);
}
.mobile-menu a:hover,
.mobile-menu a.active {
  background: var(--grigio-bg);
  color: var(--rosso);
}
.mobile-menu .btn-mobile-cta {
  display: block;
  margin-top: var(--sp-6);
  padding: var(--sp-3) var(--sp-6);
  background: var(--rosso);
  color: var(--bianco);
  font-weight: 600;
  text-align: center;
  border-radius: var(--radius);
  text-decoration: none;
}

/* --- HERO -------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--nero);
}
.hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.35;
  filter: saturate(0.6);
}
.hero__content {
  position: relative;
  z-index: 2;
  max-width: 720px;
  padding: calc(var(--header-h) + var(--sp-12)) var(--sp-5) var(--sp-16);
}
.hero__tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--rosso-chiaro);
  margin-bottom: var(--sp-4);
  padding: var(--sp-1) var(--sp-3);
  border: 1px solid var(--rosso);
  border-radius: 2px;
}
.hero h1 {
  color: var(--bianco);
  margin-bottom: var(--sp-6);
  font-weight: 800;
}
.hero h1 em {
  color: var(--rosso);
  font-style: normal;
}
.hero__lead {
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--grigio-chiaro);
  margin-bottom: var(--sp-8);
  max-width: 560px;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
}

/* Diagonal cut bottom */
.hero::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--bianco);
  clip-path: polygon(0 100%, 100% 0, 100% 100%);
  z-index: 3;
}

/* --- BUTTONS ----------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-6);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  text-decoration: none;
  line-height: 1.4;
}
.btn--primary {
  background: var(--rosso);
  color: var(--bianco);
  border-color: var(--rosso);
}
.btn--primary:hover {
  background: var(--rosso-scuro);
  border-color: var(--rosso-scuro);
  color: var(--bianco);
  box-shadow: var(--shadow-red);
  transform: translateY(-2px);
}
.btn--outline {
  background: transparent;
  color: var(--bianco);
  border-color: rgba(255,255,255,0.4);
}
.btn--outline:hover {
  background: var(--bianco);
  color: var(--nero);
  border-color: var(--bianco);
}
.btn--outline-dark {
  background: transparent;
  color: var(--nero);
  border-color: var(--grigio-chiaro);
}
.btn--outline-dark:hover {
  background: var(--nero);
  color: var(--bianco);
  border-color: var(--nero);
}
.btn--white {
  background: var(--bianco);
  color: var(--rosso);
  border-color: var(--bianco);
}
.btn--white:hover {
  background: var(--grigio-bg);
  transform: translateY(-2px);
  color: var(--rosso);
}

/* Arrow icon in buttons */
.btn .arrow {
  display: inline-block;
  transition: transform var(--duration) var(--ease);
}
.btn:hover .arrow {
  transform: translateX(4px);
}

/* --- CARDS (Settori prodotti in homepage) ------------------- */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-5);
}
.card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--nero);
  cursor: pointer;
  transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.card__img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  transition: transform 600ms var(--ease), opacity var(--duration) var(--ease);
  opacity: 0.7;
}
.card:hover .card__img {
  transform: scale(1.05);
  opacity: 0.5;
}
.card__img--logo {
  object-fit: contain;
  padding: var(--sp-10);
  opacity: 1;
  background: var(--nero);
}
.card:hover .card__img--logo {
  transform: none;
  opacity: 1;
}
.card__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--sp-6);
  background: linear-gradient(0deg, rgba(0,0,0,0.8) 0%, transparent 60%);
}
.card__label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--rosso-chiaro);
  margin-bottom: var(--sp-1);
}
.card__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--bianco);
  margin-bottom: var(--sp-2);
}
.card__arrow {
  color: var(--bianco);
  font-size: 1.25rem;
  opacity: 0;
  transform: translateX(-8px);
  transition: all var(--duration) var(--ease);
}
.card:hover .card__arrow {
  opacity: 1;
  transform: translateX(0);
}

/* --- TECH STRIP (horizontal scroll) ----------------------- */
.tech-strip {
  display: flex;
  gap: var(--sp-4);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--sp-4);
  scrollbar-width: none;
}
.tech-strip::-webkit-scrollbar {
  display: none;
}
.tech-strip__item {
  flex: 0 0 280px;
  scroll-snap-align: start;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
}
.tech-strip__item img {
  width: 100%;
  aspect-ratio: 3/2;
  object-fit: cover;
}
.tech-strip__caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--sp-3) var(--sp-4);
  background: linear-gradient(0deg, rgba(0,0,0,0.85), transparent);
  color: var(--bianco);
  font-size: 0.85rem;
  font-weight: 500;
}

/* --- CERTIFICATIONS (quality badges) ---------------------- */
.cert-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  margin-top: var(--sp-6);
}
.cert-badge {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  background: var(--bianco);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border-left: 3px solid var(--rosso);
  flex: 1 1 200px;
  min-width: 200px;
}
.cert-badge__icon {
  font-size: 1.5rem;
  color: var(--rosso);
  flex-shrink: 0;
}
.cert-badge__text {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--nero);
}
.cert-badge__sub {
  font-weight: 400;
  font-size: 0.8rem;
  color: var(--grigio);
}

/* --- QUALITY IMAGES --------------------------------------- */
.quality-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
  margin-top: var(--sp-8);
}
.quality-images img {
  border-radius: var(--radius-lg);
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

/* --- SEDE (map + info) ------------------------------------ */
.sede-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-8);
}
.sede-info {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}
.sede-info__item {
  display: flex;
  gap: var(--sp-4);
  align-items: flex-start;
}
.sede-info__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--grigio-bg);
  color: var(--rosso);
  border-radius: var(--radius);
  border: 1px solid #E0E0E0;
}
.sede-info__text h4 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 2px;
}
.sede-info__text p,
.sede-info__text a {
  font-size: 0.95rem;
  color: var(--grigio);
}
.sede-info__text a:hover {
  color: var(--rosso);
}
.sede-map {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16/10;
  background: var(--grigio-chiaro);
  position: relative;
}
.sede-map iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* --- MAP CONSENT PLACEHOLDER ------------------------------ */
.map-consent {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-4);
  width: 100%;
  height: 100%;
  padding: var(--sp-8) var(--sp-5);
  text-align: center;
  background:
    linear-gradient(135deg, var(--grigio-chiaro) 25%, transparent 25%) -50px 0,
    linear-gradient(225deg, var(--grigio-chiaro) 25%, transparent 25%) -50px 0,
    linear-gradient(315deg, var(--grigio-chiaro) 25%, transparent 25%),
    linear-gradient(45deg,  var(--grigio-chiaro) 25%, transparent 25%);
  background-size: 20px 20px;
  background-color: #EBEBEB;
}
.map-consent__icon {
  width: 48px;
  height: 48px;
  color: var(--grigio);
}
.map-consent__text {
  font-size: 0.9rem;
  color: var(--grigio-scuro);
  max-width: 380px;
  line-height: 1.5;
}
.map-consent__text a {
  color: var(--rosso);
  text-decoration: underline;
}
.map-consent__btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-6);
  background: var(--rosso);
  color: var(--bianco);
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.map-consent__btn:hover {
  background: var(--rosso-scuro);
}

/* --- CTA BANNER ------------------------------------------- */
.cta-banner {
  text-align: center;
  padding: var(--sp-16) var(--sp-5);
}
.cta-banner h2 {
  color: var(--bianco);
  margin-bottom: var(--sp-4);
}
.cta-banner p {
  color: rgba(255,255,255,0.8);
  font-size: 1.1rem;
  margin-bottom: var(--sp-8);
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* --- FOOTER ----------------------------------------------- */
.footer {
  background: var(--nero);
  color: var(--grigio-medio);
  padding: var(--sp-12) 0 var(--sp-6);
}
.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-8);
  margin-bottom: var(--sp-8);
}
.footer__brand .logo {
  color: var(--bianco);
  margin-bottom: var(--sp-4);
}
.footer__brand p {
  font-size: 0.875rem;
  line-height: 1.7;
  max-width: 320px;
}
.footer__col h4 {
  color: var(--bianco);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: var(--sp-4);
}
.footer__col ul {
  list-style: none;
}
.footer__col li {
  margin-bottom: var(--sp-2);
}
.footer__col a {
  color: var(--grigio-medio);
  font-size: 0.875rem;
  text-decoration: none;
  transition: color var(--duration) var(--ease);
}
.footer__col a:hover {
  color: var(--bianco);
}
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: var(--sp-6);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--sp-4);
  font-size: 0.8rem;
}
.footer__legal {
  display: flex;
  gap: var(--sp-4);
}
.footer__legal a {
  color: var(--grigio-medio);
  text-decoration: none;
}
.footer__legal a:hover {
  color: var(--bianco);
}

/* --- PRODUCTS PAGE: TABS ----------------------------------- */
.tabs {
  position: sticky;
  top: var(--header-h);
  background: var(--bianco);
  border-bottom: 1px solid var(--grigio-chiaro);
  z-index: 100;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.tabs::-webkit-scrollbar {
  display: none;
}
.tabs__list {
  display: flex;
  list-style: none;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--sp-5);
  gap: 0;
}
.tabs__item {
  flex-shrink: 0;
}
.tabs__btn {
  display: block;
  padding: var(--sp-4) var(--sp-5);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--grigio);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--duration) var(--ease);
}
.tabs__btn:hover {
  color: var(--nero);
}
.tabs__btn.active {
  color: var(--rosso);
  border-bottom-color: var(--rosso);
}

/* --- PRODUCTS GRID ----------------------------------------- */
.products-section {
  padding-top: var(--sp-12);
  padding-bottom: var(--sp-8);
}
.products-section__header {
  margin-bottom: var(--sp-6);
}
.products-section__header h2 {
  font-size: 1.5rem;
  display: inline-block;
}
.products-section__header h2::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: var(--rosso);
  margin-top: var(--sp-2);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-4);
}
.product-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--grigio-bg);
  cursor: pointer;
  transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}
.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.product-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  transition: transform 600ms var(--ease);
}
.product-card:hover img {
  transform: scale(1.05);
}
.product-card figcaption {
  padding: var(--sp-3) var(--sp-4);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--grigio-scuro);
  background: var(--bianco);
}

/* --- LIGHTBOX --------------------------------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration) var(--ease);
}
.lightbox.open {
  opacity: 1;
  pointer-events: auto;
}
.lightbox__close {
  position: absolute;
  top: var(--sp-4);
  right: var(--sp-4);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.1);
  border: none;
  border-radius: 50%;
  color: var(--bianco);
  font-size: 1.5rem;
  cursor: pointer;
  transition: background var(--duration) var(--ease);
  z-index: 2001;
}
.lightbox__close:hover {
  background: rgba(255,255,255,0.2);
}
.lightbox__img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: var(--radius);
  object-fit: contain;
}
.lightbox__caption {
  position: absolute;
  bottom: var(--sp-6);
  left: 50%;
  transform: translateX(-50%);
  color: var(--bianco);
  font-size: 0.9rem;
  text-align: center;
  max-width: 80vw;
  background: rgba(0,0,0,0.6);
  padding: var(--sp-2) var(--sp-5);
  border-radius: var(--radius);
}
.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.1);
  border: none;
  border-radius: 50%;
  color: var(--bianco);
  font-size: 1.3rem;
  cursor: pointer;
  transition: background var(--duration) var(--ease);
}
.lightbox__nav:hover {
  background: rgba(255,255,255,0.25);
}
.lightbox__nav--prev { left: var(--sp-4); }
.lightbox__nav--next { right: var(--sp-4); }

/* --- CONTACT FORM ----------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-10);
}

/* --- PAGE HERO (internal pages) --------------------------- */
.page-hero {
  padding: calc(var(--header-h) + var(--sp-12)) 0 var(--sp-10);
  background: var(--nero);
}
.page-hero h1 {
  color: var(--bianco);
  margin-bottom: var(--sp-3);
}
.page-hero p {
  color: var(--grigio-medio);
  font-size: 1.1rem;
  max-width: 540px;
}
.page-hero h1 em {
  color: var(--rosso);
  font-style: normal;
}

/* --- ANIMATIONS (Intersection Observer) -------------------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 100ms; }
.reveal-delay-2 { transition-delay: 200ms; }
.reveal-delay-3 { transition-delay: 300ms; }
.reveal-delay-4 { transition-delay: 400ms; }

/* --- DESKTOP BREAKPOINT (≥768px) -------------------------- */
@media (min-width: 768px) {
  .hamburger { display: none; }
  .mobile-menu,
  .mobile-menu__overlay { display: none !important; }

  .nav { display: flex; }
  .btn-header { display: inline-flex; }

  .hero__content {
    padding-left: var(--sp-12);
    max-width: 800px;
  }

  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .sede-grid {
    grid-template-columns: 1fr 1fr;
  }

  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .contact-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-12);
  }
    .contact-grid--single {
      grid-template-columns: 1fr;
      max-width: 640px;
    }

  .footer__grid {
    grid-template-columns: 2fr 1fr 1fr;
  }

  .tech-strip__item {
    flex: 0 0 320px;
  }
}

/* --- LARGE DESKTOP (≥1024px) ------------------------------ */
@media (min-width: 1024px) {
  .cards-grid {
    grid-template-columns: repeat(2, minmax(0, 560px));
    justify-content: center;
  }

  .hero__content {
    padding-left: var(--sp-16);
  }

  .section {
    padding: var(--sp-20) 0;
  }
}

/* --- PRINT ------------------------------------------------ */
@media print {
  .header, .hamburger, .mobile-menu, .lightbox, .cta-banner { display: none; }
  body { color: #000; background: #fff; }
  .hero { min-height: auto; background: #fff; }
  .hero h1 { color: #000; }
}
