/* ============================================================
   EBM SOLUTION — Design System
   Verde #1A6B35 · Navy #1C2E4A · Neutri cool-warm
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

:root {
  /* Brand */
  --green-50:  #F0F7F3;
  --green-100: #C2DFD0;
  --green-400: #5FAF82;
  --green-600: #1A6B35;
  --green-800: #0F4020;

  --navy-50:  #EEF1F6;
  --navy-200: #B0BDD1;
  --navy-400: #4E6A8F;
  --navy-700: #1C2E4A;
  --navy-900: #0D1824;

  /* Neutri */
  --white:    #FFFFFF;
  --gray-50:  #F7F8FA;
  --gray-100: #E8ECF0;
  --gray-400: #9BA8B5;
  --gray-600: #5C6B7A;

  /* Semantici */
  --warning:  #D97706;

  /* Tipografia */
  --ff-serif: 'DM Serif Display', Georgia, serif;
  --ff-sans:  'DM Sans', system-ui, sans-serif;

  /* Layout */
  --max-w: 1160px;
  --section-v: clamp(72px, 10vw, 120px);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --transition: 0.2s ease;
}

body {
  background: var(--white);
  color: var(--gray-600);
  font-family: var(--ff-sans);
  font-size: clamp(15px, 1.6vw, 17px);
  line-height: 1.7;
  font-feature-settings: "kern" 1, "liga" 1;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* ── Skip link ── */
.skip-link {
  position: absolute; top: -100%; left: 0;
  background: var(--navy-700); color: var(--white);
  padding: 8px 16px; font-size: 13px; z-index: 9999;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* ── Wrapper ── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 60px);
}

/* ================================================================
   NAVIGAZIONE
   ================================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--gray-100);
  transition: box-shadow var(--transition);
}
.nav.scrolled { box-shadow: 0 2px 20px rgba(28,46,74,0.08); }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0;
  text-decoration: none;
}
.nav-logo-mark {
  width: 36px; height: 36px;
  background: var(--navy-700);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.nav-logo-mark svg { width: 22px; height: 22px; }
.nav-logo-name {
  font-family: var(--ff-serif);
  font-size: 20px;
  color: var(--navy-700);
  letter-spacing: -0.01em;
}
.nav-logo-name span { color: var(--green-600); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-600);
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--navy-700); }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--green-600);
  color: var(--white) !important;
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px !important;
  font-weight: 500 !important;
  text-decoration: none;
  transition: background var(--transition), transform var(--transition);
}
.nav-cta:hover { background: var(--green-800) !important; transform: translateY(-1px); }

/* Checkbox toggle nascosto */
.nav-toggle-input {
  display: none;
}

.nav-hamburger {
  display: none;
  background: none; border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}
.nav-hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--navy-700);
  border-radius: 2px;
  transition: all 0.3s;
}

/* Animazione X quando aperto */
.nav-toggle-input:checked ~ label.nav-hamburger span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.nav-toggle-input:checked ~ label.nav-hamburger span:nth-child(2) {
  opacity: 0;
}
.nav-toggle-input:checked ~ label.nav-hamburger span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ================================================================
   HERO
   ================================================================ */
.hero {
  padding-top: calc(68px + 28px);;
  padding-bottom: clamp(72px, 10vw, 120px);
  background: var(--white);
  position: relative;
  overflow: hidden;
}

/* Pattern geometrico sfondo */
.hero::before {
  content: '';
  position: absolute;
  top: -10%; right: -5%;
  width: 55%;
  height: 130%;
  background:
    radial-gradient(ellipse at 70% 30%, var(--green-50) 0%, transparent 60%),
    radial-gradient(ellipse at 30% 80%, var(--navy-50) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* Griglia decorativa */
.hero::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 45%;
  height: 100%;
  background-image:
    linear-gradient(var(--gray-100) 1px, transparent 1px),
    linear-gradient(90deg, var(--gray-100) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
  -webkit-mask-image: radial-gradient(ellipse at right center, black 20%, transparent 70%);
  mask-image: radial-gradient(ellipse at right center, black 20%, transparent 70%);
}

.hero .container { position: relative; z-index: 1; }

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green-600);
  margin-bottom: 24px;
}
.hero-kicker::before {
  content: '';
  display: inline-block;
  width: 24px; height: 2px;
  background: var(--green-600);
  border-radius: 2px;
}

.hero-headline {
  font-family: var(--ff-serif);
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.12;
  color: var(--navy-700);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  hyphens: none;
}
.hero-headline em {
  font-style: italic;
  color: var(--green-600);
}

.hero-sub {
  font-size: clamp(16px, 1.8vw, 18px);
  line-height: 1.65;
  color: var(--gray-600);
  max-width: 52ch;
  margin-bottom: 40px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--green-600);
  color: var(--white);
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 16px rgba(26,107,53,0.25);
}
.btn-primary:hover {
  background: var(--green-800);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(26,107,53,0.35);
}
.btn-primary svg { transition: transform var(--transition); }
.btn-primary:hover svg { transform: translateX(3px); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 500;
  color: var(--navy-700);
  text-decoration: none;
  border-bottom: 1px solid var(--navy-200);
  padding-bottom: 2px;
  transition: border-color var(--transition), color var(--transition);
}
.btn-secondary:hover {
  color: var(--green-600);
  border-color: var(--green-400);
}

/* Hero visual */
.hero-visual {
  position: relative;
}

.hero-card-stack {
  position: relative;
  height: 400px;
}

.hero-card {
  position: absolute;
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  box-shadow: 0 8px 40px rgba(28,46,74,0.1);
}

.hero-card-main {
  top: 0; left: 0; right: 0;
  z-index: 3;
}
.hero-card-secondary {
  bottom: 40px; right: -24px;
  width: 220px;
  z-index: 4;
  background: var(--navy-700);
  border-color: transparent;
}
.hero-card-tertiary {
  top: 60px; left: -20px;
  width: 180px;
  z-index: 2;
  background: var(--green-50);
  border-color: var(--green-100);
}

.hc-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: 12px;
}
.hc-label-light { color: var(--navy-200); }
.hc-label-green { color: var(--green-600); }

.hc-metric {
  font-family: var(--ff-serif);
  font-size: 42px;
  line-height: 1;
  color: var(--navy-700);
  margin-bottom: 6px;
}
.hc-metric-light { color: var(--white); font-size: 32px; }
.hc-metric-green { color: var(--green-600); font-size: 28px; }

.hc-desc {
  font-size: 13px;
  color: var(--gray-400);
}
.hc-desc-light { color: var(--navy-200); }

.hc-services {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
}
.hc-tag {
  font-size: 11px;
  font-weight: 500;
  background: var(--green-50);
  color: var(--green-600);
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--green-100);
}

/* ================================================================
   SEZIONE PROPOSTA DI VALORE
   ================================================================ */
.value-prop {
  padding: var(--section-v) 0;
  background: var(--navy-700);
  position: relative;
  overflow: hidden;
}

.value-prop::before {
  content: '';
  position: absolute;
  top: -40%; left: -10%;
  width: 50%;
  height: 180%;
  background: radial-gradient(ellipse, rgba(95,175,130,0.12) 0%, transparent 60%);
  pointer-events: none;
}

.value-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(48px, 8vw, 96px);
  align-items: center;
}

.value-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green-400);
  margin-bottom: 24px;
}
.value-kicker::before {
  content: '';
  display: inline-block;
  width: 24px; height: 2px;
  background: var(--green-400);
  border-radius: 2px;
}

.value-headline {
  font-family: var(--ff-serif);
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.2;
  color: var(--white);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  hyphens: none;
}
.value-headline em { font-style: italic; color: var(--green-400); }

.value-text {
  font-size: 16px;
  line-height: 1.75;
  color: var(--navy-200);
  max-width: 52ch;
}

.value-pillars {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.value-pillar {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.value-pillar-num {
  font-family: var(--ff-serif);
  font-size: 36px;
  line-height: 1;
  color: var(--green-400);
  opacity: 0.5;
  flex-shrink: 0;
  width: 44px;
}

.value-pillar-content {}
.value-pillar-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--white);
  margin-bottom: 6px;
}
.value-pillar-desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--navy-200);
}

/* ================================================================
   SERVIZI
   ================================================================ */
.services {
  padding: var(--section-v) 0;
  background: var(--gray-50);
}

.section-header {
  text-align: center;
  margin-bottom: clamp(48px, 7vw, 72px);
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green-600);
  margin-bottom: 16px;
}
.section-kicker::before {
  content: '';
  display: inline-block;
  width: 24px; height: 2px;
  background: var(--green-600);
  border-radius: 2px;
}

.section-title {
  font-family: var(--ff-serif);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.2;
  color: var(--navy-700);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  hyphens: none;
}
.section-title em { font-style: italic; color: var(--green-600); }

.section-sub {
  font-size: 17px;
  color: var(--gray-600);
  max-width: 55ch;
  margin: 0 auto;
  line-height: 1.65;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.service-card {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--green-600);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(28,46,74,0.1);
  border-color: var(--green-100);
}
.service-card:hover::before { transform: scaleX(1); }

.service-icon {
  width: 48px; height: 48px;
  background: var(--green-50);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.service-icon svg { width: 24px; height: 24px; color: var(--green-600); }

.service-title {
  font-family: var(--ff-serif);
  font-size: 20px;
  color: var(--navy-700);
  font-weight: 400;
  margin-bottom: 12px;
  line-height: 1.3;
  hyphens: none;
}

.service-desc {
  font-size: 14px;
  line-height: 1.7;
  color: var(--gray-600);
}

/* ================================================================
   METODO
   ================================================================ */
.method {
  padding: var(--section-v) 0;
  background: var(--white);
}

.method-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: clamp(48px, 8vw, 96px);
  align-items: start;
}

.method-intro {}
.method-intro .section-title { text-align: left; margin-bottom: 20px; }
.method-intro .section-kicker { justify-content: flex-start; }
.method-text {
  font-size: 16px;
  line-height: 1.75;
  color: var(--gray-600);
  margin-bottom: 32px;
}

.method-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.method-step {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 24px;
  padding: 32px 0;
  border-bottom: 1px solid var(--gray-100);
  position: relative;
}
.method-step:last-child { border-bottom: none; }

.method-step-num-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}
.method-step-num {
  width: 48px; height: 48px;
  background: var(--navy-50);
  border: 1px solid var(--navy-200);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--ff-serif);
  font-size: 20px;
  color: var(--navy-700);
  flex-shrink: 0;
  transition: background var(--transition), border-color var(--transition);
}
.method-step:hover .method-step-num {
  background: var(--green-600);
  border-color: var(--green-600);
  color: var(--white);
}
.method-step-line {
  width: 1px;
  flex: 1;
  background: var(--gray-100);
  margin-top: 8px;
  min-height: 24px;
}
.method-step:last-child .method-step-line { display: none; }

.method-step-title {
  font-family: var(--ff-serif);
  font-size: 22px;
  color: var(--navy-700);
  font-weight: 400;
  margin-bottom: 10px;
  line-height: 1.3;
  hyphens: none;
  padding-top: 10px;
}
.method-step-desc {
  font-size: 15px;
  line-height: 1.7;
  color: var(--gray-600);
}

/* ================================================================
   CHI SIAMO
   ================================================================ */
.about {
  padding: var(--section-v) 0;
  background: var(--green-50);
  border-top: 1px solid var(--green-100);
  border-bottom: 1px solid var(--green-100);
}

.about-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(48px, 8vw, 96px);
  align-items: center;
}

.about-text {}
.about-text .section-title { text-align: left; margin-bottom: 20px; }
.about-text .section-kicker { justify-content: flex-start; }
.about-paragraph {
  font-size: 16px;
  line-height: 1.75;
  color: var(--gray-600);
  margin-bottom: 20px;
  max-width: 55ch;
}
.about-paragraph:last-of-type { margin-bottom: 0; }

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.about-stat {
  background: var(--white);
  border: 1px solid var(--green-100);
  border-radius: var(--radius-md);
  padding: 28px 24px;
}

.about-stat-num {
  font-family: var(--ff-serif);
  font-size: 42px;
  line-height: 1;
  color: var(--green-600);
  margin-bottom: 8px;
}

.about-stat-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--navy-700);
  margin-bottom: 4px;
}
.about-stat-sub {
  font-size: 13px;
  color: var(--gray-400);
}

.about-sectors {
  margin-top: 24px;
  grid-column: 1 / -1;
  background: var(--white);
  border: 1px solid var(--green-100);
  border-radius: var(--radius-md);
  padding: 24px;
}
.about-sectors-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: 14px;
}
.about-sectors-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.sector-tag {
  font-size: 13px;
  font-weight: 500;
  color: var(--navy-700);
  background: var(--navy-50);
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid var(--navy-200);
}

/* ================================================================
   CTA FINALE
   ================================================================ */
.cta-final {
  padding: var(--section-v) 0;
  background: var(--navy-700);
  position: relative;
  overflow: hidden;
  text-align: center;
}

.cta-final::before {
  content: '';
  position: absolute;
  bottom: -20%; right: -10%;
  width: 50%;
  height: 160%;
  background: radial-gradient(ellipse, rgba(95,175,130,0.15) 0%, transparent 60%);
  pointer-events: none;
}

.cta-final .container { position: relative; z-index: 1; }

.cta-eyebrow {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green-400);
  margin-bottom: 20px;
}

.cta-headline {
  font-family: var(--ff-serif);
  font-size: clamp(30px, 4.5vw, 52px);
  line-height: 1.15;
  color: var(--white);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  hyphens: none;
  max-width: 16ch;
  margin-left: auto;
  margin-right: auto;
}
.cta-headline em { font-style: italic; color: var(--green-400); }

.cta-sub {
  font-size: 17px;
  line-height: 1.65;
  color: var(--navy-200);
  max-width: 50ch;
  margin: 0 auto 40px;
}

.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--white);
  color: var(--navy-700);
  padding: 16px 36px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 24px rgba(0,0,0,0.2);
}
.btn-cta:hover {
  background: var(--green-50);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.btn-cta svg { transition: transform var(--transition); }
.btn-cta:hover svg { transform: translateX(3px); }

.cta-note {
  margin-top: 16px;
  font-size: 13px;
  color: var(--navy-400);
}

/* ================================================================
   FOOTER
   ================================================================ */
.footer {
  background: var(--navy-900);
  padding: 48px 0 32px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
.footer-brand {}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-bottom: 16px;
}
.footer-logo-name {
  font-family: var(--ff-serif);
  font-size: 22px;
  color: var(--white);
}
.footer-logo-name span { color: var(--green-400); }
.footer-desc {
  font-size: 13px;
  line-height: 1.65;
  color: var(--navy-400);
  max-width: 32ch;
  margin-bottom: 20px;
}
.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--navy-200);
  text-decoration: none;
  margin-bottom: 8px;
  transition: color var(--transition);
}
.footer-contact-item:hover { color: var(--green-400); }
.footer-contact-item svg { width: 14px; height: 14px; flex-shrink: 0; }
.footer-col-title {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: 16px;
}
.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-links a {
  font-size: 14px;
  color: var(--navy-200);
  text-decoration: none;
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--green-400); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 24px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.footer-copy {
  font-size: 13px;
  color: var(--navy-400);
}
.footer-legal-info {
  font-size: 11px;
  color: var(--navy-400);
  opacity: 0.75;
}
.footer-legal {
  display: flex;
  gap: 20px;
}
.footer-legal a {
  font-size: 13px;
  color: var(--navy-400);
  text-decoration: none;
  transition: color var(--transition);
}
.footer-legal a:hover { color: var(--navy-200); }

/* ================================================================
   ANIMAZIONI ENTRATA
   ================================================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.hero-kicker  { animation: fadeUp 0.5s ease 0.1s both; }
.hero-headline{ animation: fadeUp 0.5s ease 0.2s both; }
.hero-sub     { animation: fadeUp 0.5s ease 0.3s both; }
.hero-actions { animation: fadeUp 0.5s ease 0.4s both; }
.hero-visual  { animation: fadeUp 0.6s ease 0.5s both; }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 1024px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-toggle-input:checked ~ nav .nav-links {
    display: flex !important;
    flex-direction: column;
    position: absolute;
    top: 68px; left: 0; right: 0;
    background: var(--white);
    border-top: 1px solid var(--gray-100);
    border-bottom: 1px solid var(--gray-100);
    padding: 20px clamp(20px,5vw,60px);
    gap: 16px;
    box-shadow: 0 8px 24px rgba(28,46,74,0.1);
  }
  .nav-cta { display: none; }
  .nav-hamburger { display: flex; }

  .hero-inner         { grid-template-columns: 1fr; }
  .hero-visual        { display: none; }
  .value-inner        { grid-template-columns: 1fr; }
  .method-grid        { grid-template-columns: 1fr; }
  .about-inner        { grid-template-columns: 1fr; }
  .about-stats        { order: -1; }
  .footer-inner       { grid-template-columns: 1fr 1fr; }
  .footer-bottom      { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .services-grid { grid-template-columns: 1fr; }
  .about-stats   { grid-template-columns: 1fr 1fr; }
  .footer-inner  { grid-template-columns: 1fr; }
}


/* ================================================================
   NAVBAR CONDIVISA — aggiornamento completo
   Sovrascrive le regole navbar precedenti
   ================================================================ */

/* Reset regole vecchie */
.nav-links { display: flex; }

.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 200;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gray-100);
  transition: box-shadow 0.2s ease;
}
.nav.scrolled {
  box-shadow: 0 2px 24px rgba(28,46,74,0.10);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 24px;
}

/* Logo */
.nav-logo { display: flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.nav-logo-img { height: 48px; width: auto; display: block; }

/* Link list */
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0; padding: 0;
}
.nav-links > li > a,
.nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-600);
  text-decoration: none;
  border-radius: var(--radius-sm);
  border: none;
  background: none;
  cursor: pointer;
  font-family: var(--ff-sans);
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}
.nav-links > li > a:hover,
.nav-dropdown-trigger:hover {
  color: var(--navy-700);
  background: var(--gray-50);
}
.nav-links > li > a[aria-current="page"] {
  color: var(--green-600);
}

/* Dropdown chevron */
.nav-dropdown-trigger svg {
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.nav-item-dropdown.open .nav-dropdown-trigger svg {
  transform: rotate(180deg);
}
.nav-item-dropdown.open .nav-dropdown-trigger {
  color: var(--navy-700);
  background: var(--gray-50);
}

/* Dropdown panel */
.nav-item-dropdown { position: relative; }
.nav-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 260px;
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgba(28,46,74,0.12);
  padding: 8px;
  list-style: none;
  margin: 0;
  z-index: 300;
}
.nav-item-dropdown.open .nav-dropdown { display: block; }
.nav-dropdown li a {
  display: block;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 400;
  color: var(--gray-600);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
}
.nav-dropdown li a:hover {
  color: var(--navy-700);
  background: var(--green-50);
}
.nav-dropdown li + li { margin-top: 2px; }

/* CTA bottone */
.nav-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--green-600);
  color: var(--white) !important;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  font-family: var(--ff-sans);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 2px 8px rgba(26,107,53,0.2);
}
.nav-cta-btn:hover {
  background: var(--green-800);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(26,107,53,0.3);
}
.nav-cta-btn svg { flex-shrink: 0; transition: transform 0.15s; }
.nav-cta-btn:hover svg { transform: translateX(3px); }

/* Hamburger */
.nav-toggle-input { display: none; }
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  transition: background 0.15s;
}
.nav-hamburger:hover { background: var(--gray-50); }
.nav-hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--navy-700);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Animazione X */
.nav-toggle-input:checked ~ label.nav-hamburger span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.nav-toggle-input:checked ~ label.nav-hamburger span:nth-child(2) {
  opacity: 0;
}
.nav-toggle-input:checked ~ label.nav-hamburger span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ── MOBILE ── */
@media (max-width: 900px) {
  .nav-links  { display: none; }
  .nav-cta-btn { display: none; }
  .nav-hamburger { display: flex; }

  /* Menu aperto */
  .nav-toggle-input:checked ~ nav .nav-links {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    position: fixed;
    top: 68px; left: 0; right: 0; bottom: 0;
    background: var(--white);
    border-top: 1px solid var(--gray-100);
    padding: 16px clamp(20px,5vw,40px) 32px;
    gap: 4px;
    overflow-y: auto;
    z-index: 199;
  }

  /* Link mobile */
  .nav-toggle-input:checked ~ nav .nav-links > li > a,
  .nav-toggle-input:checked ~ nav .nav-links .nav-dropdown-trigger {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border-radius: var(--radius-sm);
    justify-content: space-between;
  }

  /* Dropdown mobile — inline, no absolute */
  .nav-toggle-input:checked ~ nav .nav-links .nav-dropdown {
    position: static;
    box-shadow: none;
    border: none;
    border-left: 2px solid var(--green-100);
    border-radius: 0;
    margin: 4px 0 4px 16px;
    padding: 4px 0;
    background: transparent;
  }
  .nav-toggle-input:checked ~ nav .nav-links .nav-item-dropdown.open .nav-dropdown {
    display: block;
  }
  .nav-toggle-input:checked ~ nav .nav-links .nav-dropdown li a {
    font-size: 15px;
    padding: 10px 16px;
  }

  /* CTA mobile in fondo al menu */
  .nav-toggle-input:checked ~ nav .nav-links::after {
    content: '';
    display: block;
    height: 1px;
    background: var(--gray-100);
    margin: 12px 0;
  }
}

@media (max-width: 480px) {
  .nav-inner { gap: 12px; }
  .nav-logo-img { height: 48px; }
}
/* ================================================================
   HERO FULL-WIDTH — Homepage
   ================================================================ */
.hero-fullwidth {
  position: relative;
  width: 100%;
  height: 100svh;
  min-height: 560px;
  max-height: 900px;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg-img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.hero-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(13,24,36,0.82) 0%,
    rgba(13,24,36,0.60) 55%,
    rgba(13,24,36,0.20) 100%
  );
}
.hero-fw-inner {
  position: relative;
  z-index: 1;
  padding-top: 68px;
}
.hero-fw-content { max-width: 640px; }

.hero-fw-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green-400);
  margin-bottom: 20px;
  animation: fadeUp 0.5s ease 0.1s both;
}
.hero-fw-kicker::before {
  content: '';
  display: inline-block;
  width: 24px; height: 2px;
  background: var(--green-400);
  border-radius: 2px;
}
.hero-fw-headline {
  font-family: var(--ff-serif);
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.1;
  color: var(--white);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  hyphens: none;
  animation: fadeUp 0.5s ease 0.2s both;
}
.hero-fw-headline em { font-style: italic; color: var(--green-400); }

.hero-fw-sub {
  font-size: clamp(15px, 1.8vw, 18px);
  line-height: 1.65;
  color: rgba(255,255,255,0.80);
  max-width: 52ch;
  margin-bottom: 40px;
  animation: fadeUp 0.5s ease 0.3s both;
}
.hero-fw-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  animation: fadeUp 0.5s ease 0.4s both;
}
.btn-fw-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--green-600);
  color: var(--white);
  padding: 15px 30px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 20px rgba(26,107,53,0.4);
}
.btn-fw-primary:hover {
  background: var(--green-800);
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(26,107,53,0.5);
}
.btn-fw-primary svg { transition: transform var(--transition); }
.btn-fw-primary:hover svg { transform: translateX(3px); }

.btn-fw-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.35);
  padding-bottom: 2px;
  transition: color var(--transition), border-color var(--transition);
}
.btn-fw-secondary:hover {
  color: var(--white);
  border-color: var(--green-400);
}
.hero-scroll {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.45);
  animation: heroScrollBounce 2s ease-in-out infinite;
  z-index: 1;
}
@keyframes heroScrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(6px); }
}
@media (max-width: 600px) {
  .hero-fullwidth { max-height: 100svh; }
  .hero-bg-overlay {
    background: linear-gradient(
      180deg,
      rgba(13,24,36,0.75) 0%,
      rgba(13,24,36,0.60) 100%
    );
  }
  .hero-fw-actions { flex-direction: column; align-items: flex-start; gap: 14px; }
  .btn-fw-primary  { width: 100%; justify-content: center; }
}


/* ============================================================
   NAVBAR HERO/SHRINK — solo desktop
   Dipende da: body.nav-scrolled (toggled da navbar.html)
   ============================================================ */

/* Valore di default globale — mobile e fallback */
:root { --navbar-h: 68px; }

@media (min-width: 901px) {

  /* ── Stato iniziale: navbar alta ── */
  :root { --navbar-h: 92px; }

  .nav-inner {
    height: 92px;
    transition: height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .nav-logo-img {
    height: 64px;
    transition: height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .nav-links > li > a,
  .nav-dropdown-trigger {
    font-size: 15px;
    padding: 10px 14px;
    transition: font-size 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                padding    0.35s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .nav-cta-btn {
    padding: 11px 20px;
    font-size: 14px;
    transition: padding   0.35s cubic-bezier(0.4, 0, 0.2, 1),
                font-size 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  }

  /* ── Compensazione padding-top — selettori definiti in CSS ── */
  .hero {
    padding-top: calc(var(--navbar-h) + 28px);
    transition: padding-top 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .hero-fw-inner {
    padding-top: var(--navbar-h);
    transition: padding-top 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .blog-hero {
    padding-top: calc(var(--navbar-h) + 48px);
    transition: padding-top 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .article-hero {
    padding-top: calc(var(--navbar-h) + 40px);
    transition: padding-top 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  }

  /* Barra filtri blog — sticky sotto la navbar */
  .blog-filters-bar {
    top: var(--navbar-h);
    transition: top 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  }

  /* Sidebar articolo — sticky con buffer visivo */
  .article-sidebar {
    top: calc(var(--navbar-h) + 20px);
    transition: top 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  }

  /* Transizione per .page-hero definito inline negli HTML */
  .page-hero {
    transition: padding-top 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                margin-top  0.35s cubic-bezier(0.4, 0, 0.2, 1);
  }

  /* ── Stato scrolled: --navbar-h torna a 68px ──
     Tutti gli elementi che usano var(--navbar-h) si aggiornano
     automaticamente tramite la custom property. */
  body.nav-scrolled { --navbar-h: 68px; }

  .nav.scrolled .nav-inner {
    height: 68px;
  }

  .nav.scrolled .nav-logo-img {
    height: 44px;
  }

  .nav.scrolled .nav-links > li > a,
  .nav.scrolled .nav-dropdown-trigger {
    font-size: 14px;
    padding: 8px 12px;
  }

  .nav.scrolled .nav-cta-btn {
    padding: 9px 18px;
    font-size: 14px;
  }
}
