/* ============================================================
   EDIL FALGARI CORRADO S.R.L. — Main Stylesheet
   Breakpoints:
     Mobile  : max 640px
     Tablet  : 641px – 1024px
     Desktop : 1025px +
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;900&display=swap');

/* ── RESET & BASE ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --orange:       #F05A1A;
  --orange-dark:  #C43E05;
  --orange-light: #FF7A3D;
  --black:        #424143;
  --black-mid:    #2d2e33;
  --black-soft:   #44454a;
  --gray-dark:    #3A3A3A;
  --gray-mid:     #6B6B6B;
  --gray-light:   #A8A8A8;
  --gray-bg:      #F2F2F0;
  --gray-card:    #EBEBEA;
  --white:        #FFFFFF;

  --px: 3.5rem;          /* horizontal padding desktop */
  --px-tablet: 2rem;     /* horizontal padding tablet  */
  --px-mobile: 1.2rem;   /* horizontal padding mobile  */
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Montserrat', sans-serif;
  background: var(--white);
  color: var(--black);
  overflow-x: hidden;
}

/* ── TYPOGRAPHY ── */
h1 {
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  font-weight: 900;
  line-height: 1.0;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: -0.01em;
  margin-bottom: 1.4rem;
}
h1 .line-orange { color: var(--orange); }
h1 .line-thin {
  font-weight: 300;
  font-size: 0.65em;
  display: block;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.6);
}
h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 1.08;
  color: var(--black);
  margin-bottom: 1rem;
}

/* ── UTILITIES ── */
.s-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0.8rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--orange);
}
.s-tag::before {
  content: '';
  width: 20px;
  height: 2px;
  background: var(--orange);
  display: block;
  flex-shrink: 0;
}
.s-lead {
  font-size: 1rem;
  color: var(--gray-mid);
  line-height: 1.8;
  max-width: 540px;
  font-weight: 400;
}

/* ── SCROLL REVEAL ── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.d1 { transition-delay: 0.10s; }
.d2 { transition-delay: 0.20s; }
.d3 { transition-delay: 0.30s; }
.d4 { transition-delay: 0.40s; }

/* ============================================================
   NAV
   ============================================================ */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--px);
  height: 68px;
  background: rgba(58,59,63,0.97);
  border-bottom: 1px solid rgba(240,90,26,0.2);
  overflow: visible;
}

.nav-logo {
  display: flex;
  align-items: center;
  align-self: center;
}

.nav-logo-img {
  width: 230px;
  height: auto;
  flex-shrink: 0;
  display: block;
}

.nav-logo-text {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.2;
}
.nav-logo-text span {
  display: block;
  font-size: 0.58rem;
  font-weight: 400;
  color: var(--gray-mid);
  letter-spacing: 0.18em;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2.2rem;
  align-items: center;
}
nav a {
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  transition: color 0.2s;
}
nav a:hover { color: var(--orange); }

.nav-cta {
  background: var(--orange) !important;
  color: var(--white) !important;
  padding: 8px 20px;
  font-size: 0.68rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.1em !important;
  transition: background 0.2s !important;
}
.nav-cta:hover { background: var(--orange-light) !important; color: var(--white) !important; }

/* Hamburger — hidden on desktop */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: transform 0.25s, opacity 0.25s;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav drawer */
.nav-drawer {
  display: none;
  position: fixed;
  top: 60px; left: 0; right: 0;
  background-color: #424143;
  border-bottom: 3px solid var(--orange);
  z-index: 999;
  padding: 1.5rem 1.2rem;
  flex-direction: column;
  gap: 0;
  box-shadow: 0 12px 40px rgba(0,0,0,0.9);
}
.nav-drawer.open { display: flex; }
.nav-drawer a {
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: color 0.2s;
}
.nav-drawer a:last-child { border-bottom: none; color: var(--orange); }
.nav-drawer a:hover { color: var(--orange); }

/* ============================================================
   HERO
   ============================================================ */
#hero {
  height: 100vh;
  min-height: 600px;
  max-height: 800px;
  background: var(--black);
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg-photo {
  position: absolute; inset: 0;
  background-image: url('images/edil-falgari-costruzioni-risotrutturazioni-lavori-in-quota.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0.3;
}

.hero-bg-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(240,90,26,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(240,90,26,0.07) 1px, transparent 1px);
  background-size: 60px 60px;
}
.hero-bg-grad {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 70% at 80% 50%, rgba(240,90,26,0.12) 0%, transparent 70%);
}
.hero-stripe {
  position: absolute; top: 0; bottom: 0; right: 0;
  width: 38%;
  background: linear-gradient(135deg, var(--black-soft) 0%, var(--black-mid) 100%);
  clip-path: polygon(12% 0, 100% 0, 100% 100%, 0% 100%);
  border-left: 2px solid var(--orange);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 var(--px);
  animation: fadeUp 0.9s ease both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(240,90,26,0.12);
  border: 1px solid rgba(240,90,26,0.3);
  padding: 5px 14px;
  margin-bottom: 1.8rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--orange);
}
.hero-tag::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--orange);
  border-radius: 50%;
  display: block;
}

.hero-desc {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.45);
  line-height: 1.8;
  max-width: 420px;
  font-weight: 400;
  margin-bottom: 2.2rem;
}

.hero-actions { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }

.btn-primary {
  background: var(--orange);
  color: var(--white);
  padding: 14px 28px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  border: 2px solid var(--orange);
  transition: background 0.2s, transform 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Montserrat', sans-serif;
}
.btn-primary:hover { background: var(--orange-light); border-color: var(--orange-light); transform: translateY(-2px); }

.btn-ghost {
  color: rgba(255,255,255,0.6);
  padding: 14px 28px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.2);
  transition: border-color 0.2s, color 0.2s;
  font-family: 'Montserrat', sans-serif;
}
.btn-ghost:hover { border-color: var(--orange); color: var(--orange); }

/* ============================================================
   CHI SIAMO
   ============================================================ */
#chi-siamo {
  background: var(--gray-bg);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  padding: 5.5rem var(--px);
}

.chi-visual-block {
  background: var(--black) url('images/edil-falgari-costruzioni-risotrutturazioni-lavori-in-quota-bergamo.jpg') center / cover no-repeat;
  aspect-ratio: 3/4;
  position: relative;
  overflow: hidden;
}
.chi-visual-lines {
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(
    0deg, transparent, transparent 40px,
    rgba(240,90,26,0.06) 40px, rgba(240,90,26,0.06) 41px
  );
}
.chi-visual-corner {
  position: absolute;
  bottom: 0; right: 0;
  background: var(--orange);
  padding: 1rem 1.4rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--white);
}

.chi-right p {
  font-size: 0.95rem;
  color: var(--gray-dark);
  line-height: 1.85;
  font-weight: 400;
  margin-bottom: 1rem;
}

.chi-kpi {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--gray-card);
  margin-top: 2.5rem;
}
.kpi-box {
  background: var(--white);
  padding: 1.5rem 1.4rem;
}
.kpi-val {
  font-size: 1.9rem;
  font-weight: 900;
  color: var(--black);
  line-height: 1;
}
.kpi-val span { color: var(--orange); }
.kpi-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray-mid);
  margin-top: 5px;
}

/* ============================================================
   SERVIZI
   ============================================================ */
#servizi {
  background: var(--black);
  padding: 5.5rem var(--px);
}
#servizi .s-tag { color: var(--orange); }
#servizi h2 { color: var(--white); }
#servizi .s-lead { color: rgba(255,255,255,0.35); }

.servizi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(255,255,255,0.06);
  margin-top: 3rem;
}
.srv-card {
  background: var(--black-mid);
  padding: 2.4rem 2rem 3.5rem;
  position: relative;
  overflow: hidden;
  transition: background 0.25s;
  border-top: 2px solid transparent;
}
.srv-card:hover { background: var(--black-soft); border-top-color: var(--orange); }
.srv-n {
  font-size: 3rem;
  font-weight: 900;
  line-height: 1;
  color: var(--orange);
  opacity: 0.55;
  margin-bottom: 0.8rem;
  letter-spacing: -0.02em;
}
.srv-title {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 0.6rem;
}
.srv-desc {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.42);
  line-height: 1.8;
  font-weight: 400;
}
.srv-desc ul { margin: 10px 0; padding-left: 1.1rem; }
.srv-desc li { font-size: 0.88rem; line-height: 1.6; margin-bottom: 4px; color: rgba(255,255,255,0.5); }
.srv-desc li::marker { color: var(--orange); }
.srv-arrow { display: none; }

/* ============================================================
   PERCHÉ NOI
   ============================================================ */
#perche { padding: 5.5rem var(--px); background: var(--white); }

.perche-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
  margin-top: 3rem;
}

.perche-list { display: flex; flex-direction: column; }

.perche-item {
  display: flex;
  gap: 1.2rem;
  align-items: flex-start;
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--gray-card);
}
.perche-item:first-child { border-top: 1px solid var(--gray-card); }

.perche-dot {
  width: 36px; height: 36px;
  flex-shrink: 0;
  background: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 900;
  color: var(--orange);
  letter-spacing: 0.05em;
}
.p-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--black);
  margin-bottom: 4px;
}
.p-desc {
  font-size: 0.95rem;
  color: var(--gray-mid);
  line-height: 1.7;
  font-weight: 400;
}
.p-desc ul {
  margin-top: 10px;
  padding-left: 1.1rem;
}
.p-desc li {
  font-size: 0.88rem;
  line-height: 1.6;
  margin-bottom: 4px;
}
.p-desc li::marker { color: var(--orange); }

.perche-right {
  background: var(--black);
  padding: 3rem 2.5rem;
  position: sticky;
  top: 90px;
}
.perche-right h3 {
  font-size: 1.5rem;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -0.01em;
}
.perche-right h3 span { color: var(--orange); }
.perche-right > p {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.38);
  line-height: 1.8;
  font-weight: 400;
}

.perche-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 1.5rem; }
.pill {
  padding: 6px 14px;
  border: 1px solid rgba(255,255,255,0.12);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}
.pill.active { border-color: var(--orange); color: var(--orange); background: rgba(240,90,26,0.08); }

.perche-bar { margin-top: 2rem; }
.bar-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.bar-name {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}
.bar-val { font-size: 0.65rem; font-weight: 700; color: var(--orange); }
.bar-track { height: 3px; background: rgba(255,255,255,0.08); margin-bottom: 12px; }
.bar-fill { height: 3px; background: var(--orange); }

/* ============================================================
   CONTATTI
   ============================================================ */
#contatti {
  background: var(--gray-bg);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
  padding: 5.5rem var(--px);
}

.contatti-info { margin-top: 2rem; }

.info-row {
  display: flex;
  gap: 1.2rem;
  align-items: flex-start;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--gray-card);
}
.info-row:first-child { border-top: 1px solid var(--gray-card); }

.info-icon {
  width: 40px; height: 40px;
  flex-shrink: 0;
  background: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}
.info-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gray-mid);
  margin-bottom: 3px;
}
.info-val {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--black);
  line-height: 1.5;
}
.info-val a { color: var(--orange); text-decoration: none; }
.info-val .highlight { color: var(--orange); font-size: 0.8rem; font-weight: 700; }

.cta-block {
  background: var(--black);
  padding: 3rem 2.5rem;
  position: relative;
  overflow: hidden;
}
.cta-block::after {
  content: 'EFC';
  position: absolute;
  bottom: -1.5rem; right: -0.5rem;
  font-size: 7rem;
  font-weight: 900;
  color: rgba(255,255,255,0.02);
  letter-spacing: -0.05em;
  line-height: 1;
  pointer-events: none;
}
.cta-block h3 {
  font-size: 1.6rem;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 0.8rem;
  letter-spacing: -0.01em;
}
.cta-block h3 span { color: var(--orange); }
.cta-block > p {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.4);
  line-height: 1.75;
  margin-bottom: 2rem;
}

.cta-tel {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 1.2rem 1.4rem;
  border: 1px solid rgba(240,90,26,0.3);
  margin-bottom: 1rem;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}
.cta-tel:hover { border-color: var(--orange); background: rgba(240,90,26,0.06); }
.cta-tel-icon {
  width: 36px; height: 36px;
  background: var(--orange);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.cta-tel-label {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
}
.cta-tel-num {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--white);
}

.cta-badge {
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.9rem 1.2rem;
  background: rgba(240,90,26,0.1);
  border-left: 3px solid var(--orange);
}
.cta-badge-txt {
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(255,255,255,0.6);
}
.cta-badge-txt strong {
  color: var(--orange);
  display: block;
  font-size: 0.82rem;
}

/* ============================================================
   CTA FINALE
   ============================================================ */
#cta-finale {
  background:
    linear-gradient(rgba(0,0,0,0.70), rgba(0,0,0,0.70)),
    url('images/edil-falgari-costruzioni-risotrutturazioni-lavori-in-quota-richiedi-sopralluogo.jpg') center / cover no-repeat;
  padding: 5.5rem var(--px);
  text-align: center;
  position: relative;
  overflow: hidden;
}
#cta-finale::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(240,90,26,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(240,90,26,0.05) 1px, transparent 1px);
  background-size: 60px 60px;
}
#cta-finale::after {
  content: 'EFC';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 18rem;
  font-weight: 900;
  color: rgba(255,255,255,0.02);
  letter-spacing: -0.05em;
  line-height: 1;
  pointer-events: none;
}
.cta-finale-inner {
  position: relative;
  z-index: 1;
}
#cta-finale .s-tag { color: var(--orange); justify-content: center; }
#cta-finale .s-tag::before { display: none; }
#cta-finale h2 {
  color: var(--white);
  font-size: clamp(2rem, 4vw, 3.2rem);
  margin-bottom: 1.2rem;
}
.cta-finale-desc {
  font-size: 1rem;
  color: rgba(255,255,255,0.45);
  line-height: 1.8;
  margin-bottom: 2.5rem;
}
.cta-finale-actions {
  display: flex;
  gap: 1.2rem;
  justify-content: center;
  flex-wrap: wrap;
}
.cta-finale-actions .btn-primary { font-size: 0.78rem; padding: 16px 34px; gap: 10px; }
.cta-finale-actions .btn-ghost   { font-size: 0.78rem; padding: 16px 34px; }

@media (max-width: 640px) {
  #cta-finale { padding: 4rem var(--px-mobile); }
  #cta-finale h2 { font-size: clamp(1.6rem, 7vw, 2.2rem); }
  .cta-finale-actions { flex-direction: column; align-items: stretch; }
  .cta-finale-actions .btn-primary,
  .cta-finale-actions .btn-ghost { text-align: center; justify-content: center; }
}

/* ============================================================
   MAPPA
   ============================================================ */
.mappa-wrap {
  width: 100%;
  height: 420px;
  display: block;
  line-height: 0;
}
.mappa-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: var(--black);
  padding: 1.8rem var(--px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  border-top: 2px solid var(--orange);
}
.f-logo {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
}
.f-logo span { color: var(--orange); }
.f-copy {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.08em;
}
.f-copy a {
  color: var(--orange);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}
.f-copy a:hover { color: var(--orange-light); }
.f-links { display: flex; gap: 1.8rem; flex-wrap: wrap; }
.f-links a {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  transition: color 0.2s;
}
.f-links a:hover { color: var(--orange); }

/* ============================================================
   RESPONSIVE — TABLET (641px – 1024px)
   ============================================================ */
@media (max-width: 1024px) {

  :root { --px: var(--px-tablet); }

  /* Nav */
  nav { padding: 0 var(--px-tablet); }
  nav ul { gap: 1.4rem; }
  nav a { font-size: 0.65rem; }

  /* Hero */
  .hero-content { padding: 0 var(--px-tablet); }
  .hero-stripe { width: 30%; }

  /* Chi siamo */
  #chi-siamo {
    padding: 5rem var(--px-tablet);
    gap: 2.5rem;
  }

  /* Servizi */
  #servizi {
    padding: 5rem var(--px-tablet);
  }
  .servizi-grid { grid-template-columns: repeat(2, 1fr); }

  /* Perché */
  #perche { padding: 5rem var(--px-tablet); }
  .perche-layout { gap: 2.5rem; }
  .perche-right { position: static; }

  /* Contatti */
  #contatti {
    padding: 5rem var(--px-tablet);
    gap: 2.5rem;
  }

  /* Footer */
  footer { padding: 1.8rem var(--px-tablet); }
}

/* ============================================================
   RESPONSIVE — MOBILE (max 640px)
   ============================================================ */
@media (max-width: 640px) {

  :root { --px: var(--px-mobile); }

  /* Nav */
  nav { padding: 0 var(--px-mobile); height: 60px; }
  nav ul { display: none; }           /* replaced by drawer */
  .nav-hamburger { display: flex; }

  /* Hero */
  #hero {
    height: auto;
    min-height: unset;
    max-height: unset;
    padding-top: 60px;
    padding-bottom: 0;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
  }
  .hero-stripe { display: none; }
  .hero-bg-grad { background: radial-gradient(ellipse 80% 50% at 50% 30%, rgba(240,90,26,0.14) 0%, transparent 70%); }
  .hero-content {
    padding: 3rem var(--px-mobile) 2rem;
    width: 100%;
  }
  h1 { font-size: clamp(2rem, 8vw, 2.8rem); margin-bottom: 1rem; }
  .hero-desc { font-size: 0.82rem; max-width: 100%; margin-bottom: 1.8rem; }
  .hero-actions { flex-direction: column; align-items: stretch; gap: 0.75rem; }
  .btn-primary, .btn-ghost { text-align: center; justify-content: center; padding: 14px 20px; }

  /* Chi siamo — stack verticale */
  #chi-siamo {
    grid-template-columns: 1fr;
    padding: 4rem var(--px-mobile);
    gap: 2rem;
  }
  .chi-visual-block { aspect-ratio: 16/9; }
  .chi-kpi { grid-template-columns: 1fr 1fr; }
  .kpi-val { font-size: 1.5rem; }

  /* Servizi */
  #servizi { padding: 4rem var(--px-mobile); }
  .servizi-grid { grid-template-columns: 1fr; }
  .srv-card { padding: 1.8rem 1.4rem; }
  .srv-n { font-size: 2.2rem; }
  .srv-arrow { opacity: 1; transform: translateX(0); }

  /* Perché */
  #perche { padding: 4rem var(--px-mobile); }
  .perche-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 2rem;
  }
  .perche-right {
    position: static;
    padding: 2rem 1.5rem;
  }
  .perche-right h3 { font-size: 1.2rem; }

  /* Contatti */
  #contatti {
    grid-template-columns: 1fr;
    padding: 4rem var(--px-mobile);
    gap: 2.5rem;
  }
  .contatti-info { margin-top: 1rem; }
  .cta-block { padding: 2rem 1.5rem; }
  .cta-block h3 { font-size: 1.3rem; }

  /* Footer */
  footer {
    flex-direction: column;
    align-items: flex-start;
    padding: 2rem var(--px-mobile);
    gap: 1rem;
  }
  .f-links { gap: 1.2rem; }

  /* Sezioni h2 */
  h2 { font-size: clamp(1.5rem, 6vw, 2rem); }
  .s-lead { font-size: 0.92rem; }
}

/* ============================================================
   GALLERY
   ============================================================ */
#gallery {
  background: var(--black);
  padding: 5.5rem var(--px);
}
#gallery .s-tag { color: var(--orange); }
#gallery h2 { color: var(--white); }
#gallery .s-lead { color: rgba(255,255,255,0.35); margin-bottom: 3rem; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: 6px;
  margin-top: 3rem;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.gallery-img {
  width: 100%;
  aspect-ratio: 4/3;
  position: relative;
  overflow: hidden;
  transition: transform 0.5s ease;
}
.gallery-item:hover .gallery-img {
  transform: scale(1.04);
}

/* Bottom note */
.gallery-note {
  margin-top: 2rem;
  padding: 1.2rem 1.6rem;
  border: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.95rem;
  color: rgba(255,255,255,0.35);
  font-weight: 400;
  line-height: 1.6;
}
.gallery-note i {
  color: var(--orange);
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* Font Awesome icon sizing inside info-icon and cta-tel-icon */
.info-icon i,
.cta-tel-icon i {
  font-size: 1rem;
  color: var(--orange);
}
.cta-tel-icon i {
  color: var(--white);
  font-size: 0.95rem;
}

/* ── GALLERY RESPONSIVE ── */
@media (max-width: 1024px) {
  #gallery { padding: 5rem var(--px-tablet); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  #gallery { padding: 4rem var(--px-mobile); }
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* ============================================================
   COOKIE BANNER & MODAL
   ============================================================ */

/* Banner */
.cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 9999;
  background: #424143;
  border-top: 2px solid var(--orange);
  box-shadow: 0 -8px 40px rgba(0,0,0,0.6);
  transform: translateY(100%);
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.cookie-banner.visible {
  transform: translateY(0);
}
.cookie-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.6rem 3.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.cookie-icon {
  font-size: 1.8rem;
  color: var(--orange);
  flex-shrink: 0;
}
.cookie-text {
  flex: 1;
}
.cookie-text strong {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--white);
  margin-bottom: 4px;
}
.cookie-text p {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.45);
  line-height: 1.65;
  font-weight: 400;
  margin: 0;
}
.cookie-actions {
  display: flex;
  gap: 0.6rem;
  flex-shrink: 0;
  align-items: center;
}

/* Buttons */
.cookie-btn {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  padding: 10px 18px;
  transition: background 0.2s, color 0.2s, transform 0.15s;
  white-space: nowrap;
}
.cookie-btn:hover { transform: translateY(-1px); }

.cookie-btn--reject {
  background: transparent;
  color: rgba(255,255,255,0.4);
  border: 1px solid rgba(255,255,255,0.15);
}
.cookie-btn--reject:hover {
  border-color: rgba(255,255,255,0.35);
  color: rgba(255,255,255,0.7);
}
.cookie-btn--settings {
  background: transparent;
  color: var(--orange);
  border: 1px solid rgba(240,90,26,0.4);
}
.cookie-btn--settings:hover {
  background: rgba(240,90,26,0.08);
  border-color: var(--orange);
}
.cookie-btn--accept {
  background: var(--orange);
  color: var(--white);
  border: 1px solid var(--orange);
}
.cookie-btn--accept:hover {
  background: var(--orange-light);
  border-color: var(--orange-light);
}

/* Modal overlay */
.cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0,0,0,0.75);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 0;
}
.cookie-modal.visible {
  opacity: 1;
  pointer-events: all;
}
.cookie-modal-box {
  background: #424143;
  border-top: 2px solid var(--orange);
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(30px);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 0;
}
.cookie-modal.visible .cookie-modal-box {
  transform: translateY(0);
}

.cookie-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--white);
}
.cookie-modal-header i { color: var(--orange); margin-right: 8px; }
.cookie-modal-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.4);
  font-size: 1rem;
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.2s;
}
.cookie-modal-close:hover { color: var(--white); }

.cookie-modal-body {
  padding: 1.2rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.cookie-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.3rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.cookie-option:last-child { border-bottom: none; }

.cookie-option-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 4px;
  letter-spacing: 0.04em;
}
.cookie-option-desc {
  font-size: 0.76rem;
  color: rgba(255,255,255,0.38);
  line-height: 1.6;
  font-weight: 400;
}

/* Toggle switch */
.cookie-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}
.cookie-toggle--disabled { opacity: 0.5; cursor: not-allowed; }
.cookie-toggle input { opacity: 0; width: 0; height: 0; }
.cookie-slider {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.12);
  border-radius: 24px;
  transition: background 0.25s;
}
.cookie-slider::before {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  left: 3px; top: 3px;
  background: var(--white);
  border-radius: 50%;
  transition: transform 0.25s;
}
.cookie-toggle input:checked + .cookie-slider {
  background: var(--orange);
}
.cookie-toggle input:checked + .cookie-slider::before {
  transform: translateX(20px);
}

.cookie-modal-footer {
  padding: 1.2rem 2rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.cookie-privacy-link {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.35);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.08em;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.cookie-privacy-link:hover { color: var(--orange); }
.cookie-privacy-link i { font-size: 0.8rem; }

/* ── RESPONSIVE COOKIE ── */
@media (max-width: 1024px) {
  .cookie-inner { padding: 1.4rem var(--px-tablet); gap: 1.2rem; }
}

@media (max-width: 640px) {
  .cookie-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.4rem var(--px-mobile);
    gap: 1rem;
  }
  .cookie-icon { display: none; }
  .cookie-actions {
    width: 100%;
    flex-direction: column;
    gap: 0.5rem;
  }
  .cookie-btn {
    width: 100%;
    padding: 12px;
    font-size: 0.72rem;
  }
  .cookie-modal-box { max-height: 85vh; }
  .cookie-modal-header,
  .cookie-modal-body,
  .cookie-modal-footer { padding-left: 1.2rem; padding-right: 1.2rem; }
  .cookie-modal-footer { flex-direction: column; align-items: stretch; }
  .cookie-modal-footer .cookie-btn { text-align: center; }
}
