/* ============================================================
   T.M.W. S.r.l. — Home page styles
   Palette identità:
     PRIMARIO  (Acciaio antracite) #2B3137
     SECONDARIO (Steel gray)       #6F7C85
     ACCENTO   (Blu tecnico)       #0078B8
     CHIARO    (Alluminio)         #D8DEE3
     SFONDO                          #F4F6F8
   Mood: serif premium, esagono (dado meccanico), elegante e autorevole
   ============================================================ */

:root {
  --nero:        #2B3137;   /* PRIMARIO — Acciaio antracite */
  --titanio:     #6F7C85;   /* SECONDARIO — Steel gray */
  --acciaio:     #A7B2BA;   /* grigio intermedio per bordi sottili */
  --argento:     #D8DEE3;   /* CHIARO — Alluminio */
  --blu:         #0078B8;   /* ACCENTO — Blu tecnico */
  --blu-dark:    #005F94;
  --bianco:      #FFFFFF;
  --crema:       #F4F6F8;   /* SFONDO */

  --serif: 'Playfair Display', 'Times New Roman', Georgia, serif;
  --sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --maxw: 1240px;
  --radius: 4px;
  --shadow-sm: 0 2px 12px rgba(30, 35, 40, 0.06);
  --shadow-md: 0 8px 30px rgba(30, 35, 40, 0.10);
  --shadow-lg: 0 20px 60px rgba(30, 35, 40, 0.16);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-weight: 400;
  color: var(--nero);
  background: var(--bianco);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; height: auto; }

a { color: inherit; text-decoration: none; transition: color 0.2s var(--ease); }

::selection { background: var(--blu); color: #fff; }

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

.section { padding: 120px 0; position: relative; }
.section:nth-of-type(even) { background: var(--crema); }

.section-head { max-width: 760px; margin-bottom: 60px; }
.section-head-small { max-width: 600px; margin-bottom: 32px; }

.eyebrow {
  display: inline-block;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--blu);
  margin-bottom: 18px;
  position: relative;
  padding-left: 36px;
}
.eyebrow::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  width: 24px; height: 1px;
  background: var(--blu);
}

.section-head h2,
.section-head h3 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.1;
  color: var(--nero);
  letter-spacing: -0.01em;
}

.section-lead {
  margin-top: 20px;
  font-size: 1.125rem;
  color: var(--titanio);
  max-width: 680px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 32px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  position: relative;
}
.btn-primary {
  background: var(--nero);
  color: #fff;
  border-color: var(--nero);
}
.btn-primary:hover {
  background: var(--blu);
  border-color: var(--blu);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
}
.btn-block { width: 100%; }

/* ---------- Hexagon accent ---------- */
.hex-dot {
  width: 10px; height: 10px;
  background: var(--blu);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  display: inline-block;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 18px 0;
  transition: all 0.3s var(--ease);
  background: transparent;
}
.site-header.scrolled {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
  padding: 12px 0;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: #fff;
  transition: color 0.3s var(--ease);
}
.site-header.scrolled .brand { color: var(--nero); }
.brand-mark {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 26px;
  letter-spacing: 1px;
}
.brand-sub {
  font-family: var(--serif);
  font-size: 13px;
  font-style: italic;
  color: var(--acciaio);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}
.main-nav a {
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  position: relative;
  padding: 4px 0;
}
.site-header.scrolled .main-nav a { color: var(--titanio); }
.main-nav a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -4px;
  width: 0; height: 1px;
  background: var(--blu);
  transition: width 0.3s var(--ease);
}
.main-nav a:hover { color: var(--blu); }
.main-nav a:hover::after { width: 100%; }
.main-nav a.is-active { color: var(--blu); }
.main-nav a.is-active::after { width: 100%; }
.site-header:not(.scrolled) .main-nav a.is-active { color: #fff; }
.site-header:not(.scrolled) .main-nav a.is-active::after { background: #fff; }

.nav-cta {
  padding: 10px 22px !important;
  border: 1px solid currentColor;
  border-radius: 2px;
}
.nav-cta::after { display: none; }
.nav-cta:hover {
  background: var(--blu);
  color: #fff !important;
  border-color: var(--blu);
}
.nav-cta.is-active {
  background: var(--blu);
  color: #fff !important;
  border-color: var(--blu);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 32px; height: 32px;
  position: relative;
}
.nav-toggle span {
  position: absolute;
  left: 4px; right: 4px;
  height: 2px;
  background: #fff;
  transition: all 0.3s var(--ease);
}
.nav-toggle span:nth-child(1) { top: 8px; }
.nav-toggle span:nth-child(2) { top: 15px; }
.nav-toggle span:nth-child(3) { top: 22px; }
.site-header.scrolled .nav-toggle span { background: var(--nero); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: rotate(45deg); top: 15px; }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: rotate(-45deg); top: 15px; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 140px 0 80px;
  color: #fff;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background: url('../assets/img/hero-azienda.jpeg') center/cover no-repeat;
  filter: grayscale(20%) contrast(1.05) brightness(0.65);
  z-index: -2;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(110deg, rgba(30, 35, 40, 0.72) 0%, rgba(30, 35, 40, 0.42) 50%, rgba(30, 35, 40, 0.62) 100%),
    radial-gradient(circle at 80% 30%, rgba(0, 150, 230, 0.22), transparent 60%);
  z-index: -1;
}
.hero-inner { position: relative; z-index: 1; max-width: 820px; }

.hero-logo-bg {
  position: absolute;
  top: 50%;
  right: -5%;
  width: 60%;
  max-width: 700px;
  aspect-ratio: 1;
  transform: translateY(-50%);
  background: url('../assets/img/logo/logo-tmw.svg') center/contain no-repeat;
  filter: brightness(0) invert(1);
  opacity: 0.1;
  z-index: 0;
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 40px;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 32px;
  backdrop-filter: blur(8px);
}

.hero-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2.8rem, 6.5vw, 5.5rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin-bottom: 28px;
}
.hero-title em {
  font-style: italic;
  color: var(--blu);
  font-weight: 600;
}

.hero-lead {
  font-size: 1.2rem;
  max-width: 640px;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 40px;
}
.hero-lead strong { color: #fff; font-weight: 600; }

.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 80px;
}

.hero-stats {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 32px;
  max-width: 720px;
}
.hero-stats li { display: flex; flex-direction: column; gap: 4px; }
.hero-stats strong {
  font-family: var(--serif);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--blu);
  line-height: 1;
}
.hero-stats span {
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}

.scroll-hint {
  position: absolute;
  bottom: 32px;
  right: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}
.scroll-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.6), transparent);
  position: relative;
  overflow: hidden;
}
.scroll-line::after {
  content: '';
  position: absolute;
  top: -20px; left: 0;
  width: 100%; height: 20px;
  background: var(--blu);
  animation: scrollDot 2s var(--ease) infinite;
}
@keyframes scrollDot {
  0% { top: -20px; }
  100% { top: 80px; }
}

/* ============================================================
   CHI SIAMO
   ============================================================ */
.chi-siamo-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 80px;
  align-items: start;
}
.chi-siamo-text p {
  margin-bottom: 20px;
  font-size: 1.05rem;
  color: var(--titanio);
}
.chi-siamo-text strong { color: var(--nero); font-weight: 600; }

.vision-card {
  margin-top: 40px;
  padding: 32px;
  background: var(--nero);
  color: #fff;
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}
.vision-card::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 160px; height: 160px;
  background: var(--blu);
  opacity: 0.18;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}
.vision-label {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--blu);
  margin-bottom: 12px;
  font-weight: 600;
}
.vision-card h3 {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 16px;
}
.vision-card p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.98rem;
  line-height: 1.7;
}

.chi-siamo-media {
  position: relative;
}
.chi-siamo-media img {
  width: 100%;
  height: 560px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.media-caption {
  position: absolute;
  bottom: 24px;
  left: 24px;
  right: 24px;
  background: rgba(255, 255, 255, 0.96);
  padding: 16px 20px;
  border-left: 3px solid var(--blu);
  font-size: 13px;
  backdrop-filter: blur(8px);
}
.media-caption span {
  display: block;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 15px;
  color: var(--nero);
  margin-bottom: 2px;
}
.media-caption { color: var(--titanio); }

.settori {
  margin-top: 80px;
  padding-top: 40px;
  border-top: 1px solid var(--argento);
}
.settori-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-top: 24px;
}
.settori-list li {
  padding: 24px 20px;
  background: #fff;
  border: 1px solid var(--argento);
  border-radius: var(--radius);
  text-align: center;
  transition: all 0.3s var(--ease);
}
.settori-list li:hover {
  border-color: var(--blu);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.settori-list strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--nero);
  margin-bottom: 4px;
}
.settori-list span {
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--titanio);
}

/* ============================================================
   TECNOLOGIA
   ============================================================ */
.tech-feature {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 60px;
  align-items: center;
  margin-bottom: 80px;
}
.tech-feature-text h3 {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--nero);
}
.tech-feature-text p {
  color: var(--titanio);
  margin-bottom: 28px;
  font-size: 1.05rem;
}
.tech-feature-text strong { color: var(--nero); font-weight: 600; }

.tech-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.tech-tags li {
  padding: 8px 16px;
  background: var(--argento);
  border-radius: 40px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: var(--nero);
}

.tech-feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.tech-feature-grid img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: var(--radius);
  transition: transform 0.4s var(--ease);
}
.tech-feature-grid img:hover { transform: scale(1.03); }

.ufficio-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s var(--ease);
  border: 1px solid var(--argento);
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--blu);
}
.card-img { height: 280px; overflow: hidden; }
.card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.card:hover .card-img img { transform: scale(1.06); }

.card-body { padding: 32px; }
.card-eyebrow {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--blu);
  font-weight: 600;
  margin-bottom: 12px;
}
.card-body h3 {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--nero);
}
.card-body p {
  color: var(--titanio);
  margin-bottom: 20px;
  font-size: 0.98rem;
}
.card-list {
  list-style: none;
  padding-top: 16px;
  border-top: 1px solid var(--argento);
}
.card-list li {
  padding: 6px 0 6px 24px;
  font-size: 13px;
  color: var(--titanio);
  position: relative;
}
.card-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 13px;
  width: 12px; height: 2px;
  background: var(--blu);
}

/* ============================================================
   DIGITALIZZAZIONE
   ============================================================ */
.digital-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.digital-card {
  padding: 40px 32px;
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--argento);
  position: relative;
  transition: all 0.3s var(--ease);
}
.digital-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.digital-card-accent {
  background: var(--nero);
  color: #fff;
  border-color: var(--nero);
}
.digital-card-accent strong { color: var(--blu); }

.digital-num {
  display: inline-block;
  font-family: var(--serif);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--argento);
  line-height: 1;
  margin-bottom: 24px;
}
.digital-card-accent .digital-num { color: var(--blu); opacity: 0.5; }

.digital-card h3 {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--nero);
}
.digital-card p {
  color: var(--titanio);
  margin-bottom: 16px;
  font-size: 0.96rem;
}
.digital-card-accent h3 { color: #fff; }
.digital-card-accent p { color: rgba(255, 255, 255, 0.82); }
.digital-tag {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 14px;
  background: rgba(0, 150, 230, 0.15);
  color: var(--blu);
  border: 1px solid rgba(0, 150, 230, 0.3);
  border-radius: 40px;
  font-size: 11px;
  letter-spacing: 1px;
  font-weight: 600;
}

/* ============================================================
   MATERIALI
   ============================================================ */
.materiali-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 80px;
}
.materiale {
  display: flex;
  gap: 24px;
  padding: 32px;
  background: #fff;
  border: 1px solid var(--argento);
  border-radius: var(--radius);
  transition: all 0.3s var(--ease);
  align-items: flex-start;
}
.materiale:hover {
  border-color: var(--blu);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.materiale-symbol {
  font-family: var(--serif);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--blu);
  width: 80px; height: 80px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--nero);
  border-radius: 50%;
  position: relative;
}
.materiale-symbol::before {
  content: '';
  position: absolute;
  inset: -8px;
  border: 1px solid var(--argento);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}
.materiale-body h3 {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--nero);
}
.materiale-tag {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--blu);
  font-weight: 600;
  margin-bottom: 12px;
}
.materiale-body p {
  color: var(--titanio);
  font-size: 0.95rem;
}

/* ---------- Gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}
.gallery img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.4s var(--ease);
  filter: grayscale(10%);
}
.gallery img:hover {
  filter: grayscale(0);
  transform: scale(1.04);
  box-shadow: var(--shadow-md);
  z-index: 2;
  position: relative;
}

/* ============================================================
   QUALITA
   ============================================================ */
.cert-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 80px;
}
.cert-card {
  padding: 40px;
  background: #fff;
  border: 1px solid var(--argento);
  border-radius: var(--radius);
  text-align: center;
  transition: all 0.3s var(--ease);
}
.cert-card-accent {
  background: var(--nero);
  color: #fff;
  border-color: var(--nero);
}
.cert-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }

.cert-badge {
  width: 140px; height: 140px;
  margin: 0 auto 24px;
  border-radius: 50%;
  background: var(--argento);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  border: 2px solid var(--nero);
}
.cert-card-accent .cert-badge {
  background: var(--blu);
  border-color: var(--blu);
}
.cert-badge::before {
  content: '';
  position: absolute;
  inset: -10px;
  border: 1px dashed var(--acciaio);
  border-radius: 50%;
}
.cert-mark {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--nero);
  letter-spacing: 2px;
}
.cert-card-accent .cert-mark { color: #fff; }
.cert-num {
  font-family: var(--serif);
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--nero);
  line-height: 1;
  margin-top: 4px;
}
.cert-card-accent .cert-num { color: #fff; }

.cert-card h3 {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--nero);
}
.cert-card-accent h3 { color: #fff; }
.cert-card p {
  color: var(--titanio);
  font-size: 0.98rem;
  max-width: 420px;
  margin: 0 auto;
}
.cert-card-accent p { color: rgba(255, 255, 255, 0.85); }

.sostenibilita-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  margin-bottom: 80px;
}
.sostenibilita-text h3 {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--nero);
}
.sostenibilita-text p {
  color: var(--titanio);
  margin-bottom: 28px;
  font-size: 1.05rem;
}
.sostenibilita-text strong { color: var(--nero); font-weight: 600; }

.esg-list {
  list-style: none;
  display: grid;
  gap: 12px;
}
.esg-list li {
  padding: 14px 20px;
  background: #fff;
  border-left: 3px solid var(--blu);
  border-radius: 2px;
  font-size: 14px;
  color: var(--titanio);
}
.esg-list strong { color: var(--nero); font-family: var(--serif); font-size: 1.05rem; }

.sostenibilita-imgs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  height: 380px;
}
.sostenibilita-imgs img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.cert-logos { padding-top: 40px; border-top: 1px solid var(--argento); }
.cert-logos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin-top: 24px;
  max-width: 900px;
}
.cert-logos-grid img {
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
  border: 1px solid var(--argento);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

/* ---------- Section head centrata ---------- */
.section-head-center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.section-head-center .eyebrow {
  padding-left: 0;
}
.section-head-center .eyebrow::before {
  display: none;
}
.section-head-center .section-lead {
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Premio Industria Felix ---------- */
.felix-seals {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 760px;
  margin: 0 auto;
}
.felix-seals img {
  width: 100%;
  border: 1px solid var(--argento);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  background: #fff;
  padding: 16px;
}
.felix-cert {
  max-width: 440px;
  margin: 48px auto 0;
}
.felix-cert img {
  display: block;
  width: 100%;
  border: 1px solid var(--argento);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

/* ============================================================
   CONTATTI
   ============================================================ */
.section-contatti { background: var(--nero); color: #fff; }
.section-contatti .section-head h2 { color: #fff; }
.section-contatti .section-lead { color: rgba(255, 255, 255, 0.75); }
.section-contatti .eyebrow { color: var(--blu); }

.contatti-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
}

.contatti-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px 24px;
}
.contact-block { padding-bottom: 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.contact-label {
  display: block;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--blu);
  font-weight: 600;
  margin-bottom: 8px;
}
.contact-block p { color: rgba(255, 255, 255, 0.9); font-size: 0.98rem; line-height: 1.6; }
.contact-block a { color: #fff; }
.contact-block a:hover { color: var(--blu); }

.contatti-form {
  background: rgba(255, 255, 255, 0.04);
  padding: 40px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
}
.form-row { margin-bottom: 20px; }
.form-row label {
  display: block;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 8px;
  font-weight: 500;
}
.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 2px;
  color: #fff;
  font-family: var(--sans);
  font-size: 15px;
  transition: all 0.2s var(--ease);
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--blu);
  background: rgba(0, 150, 230, 0.05);
}
.form-row select { background-color: var(--nero); }
.form-row select option { background: var(--nero); }
.form-row textarea { resize: vertical; min-height: 120px; }

.form-consenso { margin-bottom: 28px; }
.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
  text-transform: none;
  letter-spacing: 0;
}
.checkbox input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--blu); }
.checkbox span { font-weight: 400; }
.form-consenso .privacy-note {
  margin: 10px 0 0;
  font-size: 11px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.45);
  max-width: 520px;
}

.form-feedback {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 2px;
  font-size: 14px;
  display: none;
}
.form-feedback.show { display: block; }
.form-feedback.success { background: rgba(0, 180, 100, 0.15); color: #5fd69a; border: 1px solid rgba(0, 180, 100, 0.4); }
.form-feedback.error { background: rgba(230, 80, 80, 0.15); color: #f4a3a3; border: 1px solid rgba(230, 80, 80, 0.4); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: #14181C;
  color: rgba(255, 255, 255, 0.7);
  padding: 60px 0 30px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1.2fr;
  gap: 60px;
  align-items: start;
}
.footer-brand img { width: 110px; height: auto; margin-bottom: 16px; filter: brightness(0) invert(1); }
.footer-brand p { font-size: 13px; line-height: 1.6; }

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-nav a {
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  transition: all 0.2s var(--ease);
}
.footer-nav a:hover { color: var(--blu); padding-left: 6px; }

.footer-meta { font-size: 12px; line-height: 1.8; }
.footer-meta p { margin-bottom: 4px; }

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px; height: 44px;
  background: var(--blu);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s var(--ease);
  z-index: 50;
  box-shadow: var(--shadow-md);
}
.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover { background: var(--nero); transform: translateY(-4px); }

/* ============================================================
   ANIMATIONS
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .section { padding: 90px 0; }
  .chi-siamo-grid,
  .tech-feature,
  .sostenibilita-row,
  .contatti-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .ufficio-row,
  .cert-grid { grid-template-columns: 1fr; gap: 24px; }
  .digital-grid,
  .materiali-grid { grid-template-columns: 1fr; }
  .settori-list { grid-template-columns: repeat(3, 1fr); }
  .gallery { grid-template-columns: repeat(4, 1fr); }
  .contatti-info { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 40px; }
  .chi-siamo-media img { height: 400px; }
  .tech-feature-grid { height: 360px; }
}

@media (max-width: 768px) {
  .section { padding: 70px 0; }
  .container { padding: 0 20px; }
  .main-nav {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--nero);
    flex-direction: column;
    justify-content: center;
    padding: 60px 32px;
    transform: translateX(100%);
    transition: transform 0.4s var(--ease);
    z-index: 90;
  }
  .main-nav.open { transform: translateX(0); }
  .main-nav a { color: #fff; font-size: 16px; padding: 12px 0; }
  .main-nav a::after { display: none; }
  .nav-toggle { display: block; z-index: 95; }

  .hero { min-height: 90vh; padding: 120px 0 60px; }
  .hero-logo-bg { width: 90%; right: -20%; opacity: 0.06; }
  .page-hero--gray .page-hero-logo-bg { width: 90%; right: -20%; opacity: 0.08; }
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  .hero-stats strong { font-size: 2rem; }
  .scroll-hint { display: none; }

  .settori-list { grid-template-columns: 1fr 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .gallery img { height: 140px; }
  .sostenibilita-imgs { height: 280px; }
  .cert-logos-grid { grid-template-columns: 1fr; }
  .felix-seals { grid-template-columns: 1fr; }
  .contatti-form { padding: 28px 20px; }
  .tech-feature-grid { grid-template-columns: 1fr 1fr; }
  .tech-feature-grid img { height: 200px; }
  .tech-feature-grid img:nth-child(1) { grid-row: auto; }
}

@media (max-width: 480px) {
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .settori-list { grid-template-columns: 1fr; }
  .contatti-info { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; }
}

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

/* ============================================================
   MULTI-PAGE LAYOUT — Page hero, intro, CTA, schema, ecc.
   ============================================================ */

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  position: relative;
  min-height: 62vh;
  display: flex;
  align-items: flex-end;
  padding: 180px 0 80px;
  color: #fff;
  overflow: hidden;
}
.page-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: grayscale(25%) contrast(1.05) brightness(0.5);
  z-index: -2;
}
.page-hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(30, 35, 40, 0.85) 0%, rgba(30, 35, 40, 0.7) 100%),
    radial-gradient(circle at 20% 80%, rgba(0, 120, 184, 0.25), transparent 60%);
  z-index: -1;
}
.page-hero-inner { max-width: 760px; }
.page-hero-inner h1 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}
.page-hero-lead {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.82);
  max-width: 620px;
}
.eyebrow-light {
  color: rgba(255, 255, 255, 0.9);
}
.eyebrow-light::before { background: rgba(255, 255, 255, 0.9); }

/* ---------- Page hero: variante grigia con logo (chi-siamo) ---------- */
.page-hero--gray {
  background: var(--titanio);
}
.page-hero--gray .page-hero-logo-bg {
  position: absolute;
  top: 50%;
  right: -5%;
  width: 60%;
  max-width: 700px;
  aspect-ratio: 1;
  transform: translateY(-50%);
  background: url('../assets/img/logo/logo-tmw.svg') center/contain no-repeat;
  filter: brightness(0) invert(1);
  opacity: 0.12;
  z-index: 0;
  pointer-events: none;
}
.page-hero--gray .page-hero-inner {
  position: relative;
  z-index: 1;
}

/* ---------- Home: intro grid (teaser cards) ---------- */
.section-intro { padding-top: 0; margin-top: -60px; position: relative; z-index: 2; }
.intro-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.intro-card {
  padding: 36px 32px;
  background: #fff;
  border: 1px solid var(--argento);
  border-radius: var(--radius);
  transition: all 0.3s var(--ease);
  position: relative;
}
.intro-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--blu);
}
.intro-card-accent {
  background: var(--nero);
  color: #fff;
  border-color: var(--nero);
}
.intro-card-cta {
  background: var(--blu);
  color: #fff;
  border-color: var(--blu);
}
.intro-card-cta .btn-primary {
  background: #fff;
  color: var(--blu);
  border-color: #fff;
}
.intro-card-cta .btn-primary:hover {
  background: var(--nero);
  color: #fff;
  border-color: var(--nero);
}

.intro-num {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--blu);
  letter-spacing: 2px;
  margin-bottom: 12px;
  display: block;
}
.intro-card-accent .intro-num,
.intro-card-cta .intro-num { color: rgba(255, 255, 255, 0.6); }
.intro-card h3 {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--nero);
}
.intro-card p {
  color: var(--titanio);
  font-size: 0.93rem;
  margin-bottom: 16px;
}
.intro-card-accent h3,
.intro-card-cta h3 { color: #fff; }
.intro-card-accent p { color: rgba(255, 255, 255, 0.8); }
.intro-card-cta p { color: rgba(255, 255, 255, 0.9); }
.intro-link {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--blu);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: border-color 0.2s var(--ease);
}
.intro-link:hover { border-bottom-color: var(--blu); }

/* ---------- CTA band ---------- */
.section-cta-band { padding: 80px 0; }
.cta-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.cta-band-text h2 {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 700;
  color: var(--nero);
  margin-bottom: 8px;
}
.cta-band-text p {
  color: var(--titanio);
  font-size: 1.05rem;
}

/* ---------- Tech extra gallery ---------- */
.tech-extra-gallery { margin-top: 80px; padding-top: 40px; border-top: 1px solid var(--argento); }
.tech-extra-gallery h3 {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 700;
  margin: 12px 0 24px;
  color: var(--nero);
}
.gallery-tech {
  grid-template-columns: repeat(3, 1fr);
}
.gallery-tech img { height: 260px; }

/* ---------- Digital schema ---------- */
.digital-schema {
  margin-top: 80px;
  padding: 40px;
  background: #fff;
  border: 1px solid var(--argento);
  border-radius: var(--radius);
}
.digital-schema h3 {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 700;
  margin: 12px 0 32px;
  color: var(--nero);
}
.schema-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.schema-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 20px 16px;
  background: var(--crema);
  border: 1px solid var(--argento);
  border-radius: var(--radius);
  min-width: 140px;
  text-align: center;
  transition: all 0.3s var(--ease);
}
.schema-node:hover { border-color: var(--blu); transform: translateY(-3px); }
.schema-node-server { background: var(--nero); border-color: var(--nero); }
.schema-node-server .schema-ico,
.schema-node-server .schema-desc { color: #fff; }
.schema-node-firewall { background: var(--blu); border-color: var(--blu); }
.schema-node-firewall .schema-ico,
.schema-node-firewall .schema-desc { color: #fff; }
.schema-node-macchine { background: var(--argento); }
.schema-ico {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1rem;
  color: var(--nero);
}
.schema-desc {
  font-size: 11px;
  letter-spacing: 0.5px;
  color: var(--titanio);
}
.schema-arrow {
  font-size: 1.4rem;
  color: var(--blu);
  font-weight: 600;
}

/* ---------- Parti lavorate ---------- */
.parti-lavorate { margin-top: 80px; padding-top: 40px; border-top: 1px solid var(--argento); }

/* ---------- Contatti page (dark section) ---------- */
.section.section-contatti {
  background: var(--nero);
  color: #fff;
}
.section.section-contatti .section-head h2 { color: #fff; }
.section.section-contatti .section-lead { color: rgba(255, 255, 255, 0.75); }
.section.section-contatti .eyebrow { color: var(--blu); }

/* ---------- Responsive: multi-page ---------- */
@media (max-width: 1024px) {
  .intro-grid { grid-template-columns: 1fr 1fr; }
  .gallery-tech { grid-template-columns: 1fr 1fr; }
  .schema-flow { flex-direction: column; }
  .schema-arrow { transform: rotate(90deg); }
}
@media (max-width: 768px) {
  .page-hero { min-height: 50vh; padding: 140px 0 60px; }
  .intro-grid { grid-template-columns: 1fr; }
  .cta-band { flex-direction: column; text-align: center; }
  .digital-schema { padding: 24px 20px; }
  .gallery-tech { grid-template-columns: 1fr; }
  .gallery-tech img { height: 220px; }
}
