/* =========================================================
   STUDIO ING. MATTEO ALESINA — style.css
   ========================================================= */

/* ── Reset & Variables ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --navy:        #0f2b4a;
  --navy-dark:   #091e33;
  --navy-light:  #1a4473;
  --steel:       #2c4a6e;
  --gold:        #F07820;
  --gold-light:  #F5A040;
  --gold-dim:    rgba(240,120,32,.15);
  --bg-light:    #f5f7fa;
  --bg-white:    #ffffff;
  --text-dark:   #1a2332;
  --text-mid:    #4a5568;
  --text-light:  #718096;
  --text-white:  #ffffff;
  --border:      #e2e8f0;
  --shadow:      0 4px 24px rgba(15,43,74,.10);
  --shadow-lg:   0 16px 56px rgba(15,43,74,.18);
  --grad-navy:   linear-gradient(135deg,#0f2b4a 0%,#1a4473 100%);
  --grad-gold:   linear-gradient(135deg,#F07820 0%,#F5A040 100%);
  --font-h:      'Montserrat', sans-serif;
  --font-b:      'Open Sans', sans-serif;
  --sec-py:      100px;
  --cmax:        1200px;
  --cpx:         28px;
  --ease:        all .3s ease;
  --ease-slow:   all .6s ease;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-b);
  color: var(--text-dark);
  background: var(--bg-white);
  line-height: 1.75;
  overflow-x: hidden;
}

h1,h2,h3,h4,h5 { font-family: var(--font-h); font-weight: 700; line-height: 1.2; }
p { margin-bottom: 1.2rem; }
p:last-child { margin-bottom: 0; }
a { color: var(--gold); text-decoration: none; transition: var(--ease); }
a:hover { color: var(--gold-light); }
img { max-width: 100%; height: auto; display: block; }

/* ── Layout ── */
.container { max-width: var(--cmax); margin: 0 auto; padding: 0 var(--cpx); }
.section   { padding: var(--sec-py) 0; }
.accent    { color: var(--gold); }

/* ── Section Header ── */
.section-header        { text-align: center; margin-bottom: 64px; }
.section-tag {
  display: inline-block;
  font-family: var(--font-h);
  font-size: .72rem; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold);
  background: var(--gold-dim);
  border: 1px solid rgba(200,164,92,.3);
  padding: 4px 18px; border-radius: 20px;
  margin-bottom: 14px;
}
.section-title {
  font-size: clamp(2rem,4vw,3rem);
  font-weight: 800; color: var(--navy);
  margin-bottom: 20px;
}
.section-header.light .section-title { color: #fff; }
.section-header.light .section-description { color: rgba(255,255,255,.65); }
.section-divider {
  width: 60px; height: 4px;
  background: var(--grad-gold);
  margin: 0 auto; border-radius: 2px;
}
.section-description {
  margin-top: 20px;
  color: var(--text-mid); font-size: 1.05rem;
  max-width: 580px; margin-left: auto; margin-right: auto;
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 34px;
  font-family: var(--font-h); font-size: .85rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  border: 2px solid transparent; border-radius: 4px;
  cursor: pointer; transition: var(--ease); text-decoration: none;
}
.btn-primary {
  background: var(--grad-gold); color: var(--navy);
  border-color: var(--gold);
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(200,164,92,.45);
  color: var(--navy);
}
.btn-outline {
  background: transparent; color: #fff;
  border-color: rgba(255,255,255,.55);
}
.btn-outline:hover {
  background: rgba(255,255,255,.1); border-color: #fff;
  color: #fff; transform: translateY(-3px);
}
.btn-full { width: 100%; justify-content: center; }

/* ── Navbar ── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 1000; padding: 10px 0;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
  transition: var(--ease);
}
.navbar.scrolled {
  background: #fff;
  padding: 6px 0;
  box-shadow: 0 3px 20px rgba(0,0,0,.13);
}
.nav-container {
  max-width: var(--cmax); margin: 0 auto;
  padding: 0 var(--cpx);
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  display: flex; align-items: center;
  text-decoration: none;
}
.nav-logo-img { height: 60px; border-radius: 3px; display: block; }
.nav-menu { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav-link {
  display: block; padding: 8px 16px;
  color: var(--navy);
  font-family: var(--font-h); font-size: .78rem; font-weight: 600;
  letter-spacing: .07em; text-transform: uppercase;
  border-radius: 4px; text-decoration: none;
  transition: var(--ease);
}
.nav-link:hover        { color: var(--gold); background: var(--gold-dim); }
.nav-link.active       { color: var(--gold); }
.nav-link.nav-cta      { background: var(--gold); color: #fff; border-radius: 4px; }
.nav-link.nav-cta:hover { background: var(--gold-light); color: #fff; transform: translateY(-1px); }
.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px; z-index: 1100;
}
.nav-toggle span {
  display: block; width: 24px; height: 2px;
  background: var(--navy); border-radius: 2px; transition: var(--ease);
}

/* ── Hero ── */
.hero {
  position: relative; height: 100vh; min-height: 620px;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.slideshow { position: absolute; inset: 0; }
.slide {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0; transition: opacity 1.4s ease;
}
.slide.active { opacity: 1; }
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(9,30,51,.30) 0%,
    rgba(9,30,51,.42) 50%,
    rgba(9,30,51,.62) 100%
  );
  z-index: 1;
}
/* Blueprint grid texture */
.hero::after {
  content: '';
  position: absolute; inset: 0; z-index: 1;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}
.hero-content {
  position: relative; z-index: 3;
  text-align: center; color: #fff;
  padding: 0 var(--cpx); max-width: 920px;
}
.hero-eyebrow {
  font-family: var(--font-h); font-size: .78rem; font-weight: 600;
  letter-spacing: .32em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 20px;
  animation: fadeDown .9s ease .2s both;
}
.hero-title {
  font-size: clamp(3.2rem,8.5vw,6.4rem);
  font-weight: 900; line-height: 1.02;
  margin-bottom: 24px;
  text-shadow: 0 4px 24px rgba(0,0,0,.3);
  animation: fadeDown .9s ease .42s both;
}
.hero-subtitle {
  font-size: clamp(.95rem,2vw,1.25rem);
  font-weight: 300; letter-spacing: .1em;
  color: rgba(255,255,255,.80);
  margin-bottom: 44px;
  animation: fadeDown .9s ease .64s both;
}
.hero-cta {
  display: flex; gap: 16px; justify-content: center; flex-wrap: wrap;
  animation: fadeUp .9s ease .86s both;
}

/* Slide controls */
.slide-controls {
  position: absolute; bottom: 90px; left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  display: flex; align-items: center; gap: 16px;
}
.slide-btn {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.3);
  color: #fff; width: 40px; height: 40px;
  border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: .82rem; transition: var(--ease);
}
.slide-btn:hover { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.slide-dots { display: flex; gap: 8px; }
.slide-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,.35);
  border: none; cursor: pointer; transition: var(--ease); padding: 0;
}
.slide-dot.active { background: var(--gold); transform: scale(1.35); }
.scroll-down {
  position: absolute; bottom: 32px; left: 50%;
  transform: translateX(-50%); z-index: 4;
  color: rgba(255,255,255,.55); font-size: 1.3rem;
  animation: bounce 2.2s ease infinite;
}

/* ── La Mia Storia ── */
.storia-section { background: var(--bg-white); }
.storia-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 80px; align-items: start;
}
.storia-text .lead {
  font-size: 1.15rem; color: var(--navy); line-height: 1.85;
  border-left: 4px solid var(--gold); padding-left: 22px;
  margin-bottom: 1.5rem; font-weight: 400;
}
.storia-text p { color: var(--text-mid); }

/* Timeline */
.timeline { margin-top: 44px; padding-left: 28px; border-left: 2px solid var(--border); }
.tl-item {
  position: relative; display: flex; gap: 18px;
  align-items: flex-start; margin-bottom: 26px;
}
.tl-item::before {
  content: '';
  position: absolute; left: -35px; top: 5px;
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--gold); border: 2px solid #fff;
  box-shadow: 0 0 0 3px var(--gold);
}
.tl-year {
  font-family: var(--font-h); font-weight: 700; font-size: .88rem;
  color: var(--gold); min-width: 46px; padding-top: 2px;
}
.tl-content { font-size: .92rem; color: var(--text-mid); padding-top: 2px; }

/* Image frame */
.storia-img-side { position: sticky; top: 100px; }
.img-frame {
  border-radius: 8px; overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4/3; position: relative;
}
.img-frame img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.img-frame:hover img { transform: scale(1.04); }
.img-frame::after {
  content: '';
  position: absolute; inset: 0;
  border: 3px solid var(--gold); border-radius: 8px;
  opacity: .25; pointer-events: none;
}

/* Stats */
.stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin-top: 22px; }
.stat {
  background: var(--bg-light); border-radius: 8px;
  padding: 20px 10px; text-align: center;
  border-bottom: 3px solid var(--gold);
  transition: var(--ease);
}
.stat:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.stat-n {
  font-family: var(--font-h); font-size: 2rem; font-weight: 900;
  color: var(--navy); line-height: 1;
}
.stat-l {
  font-size: .72rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-light); margin-top: 6px;
}

/* ── Che Cosa Faccio ── */
.servizi-section {
  background: var(--navy); position: relative; overflow: hidden;
}
.servizi-section::before {
  content: ''; position: absolute;
  top: -120px; right: -120px; width: 500px; height: 500px;
  border-radius: 50%; background: rgba(200,164,92,.04);
  pointer-events: none;
}
.servizi-section::after {
  content: ''; position: absolute;
  bottom: -150px; left: -100px; width: 550px; height: 550px;
  border-radius: 50%; background: rgba(26,68,115,.25);
  pointer-events: none;
}
.servizi-section .section-tag   { color: var(--gold); border-color: rgba(200,164,92,.35); background: rgba(200,164,92,.12); }
.servizi-section .section-divider { background: var(--grad-gold); }
.servizi-grid {
  display: grid; grid-template-columns: 1fr 1.35fr;
  gap: 80px; align-items: start; position: relative; z-index: 1;
}
.servizi-img {
  border-radius: 8px; overflow: hidden;
  box-shadow: var(--shadow-lg); position: sticky; top: 100px;
  aspect-ratio: 3/4;
}
.servizi-img img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.9) contrast(1.05); }
.servizi-lead {
  font-size: 1.1rem; color: rgba(255,255,255,.88);
  border-left: 4px solid var(--gold); padding-left: 22px;
  line-height: 1.85; margin-bottom: 36px;
}
.service-list { display: flex; flex-direction: column; gap: 18px; }
.svc {
  display: flex; gap: 18px; align-items: flex-start;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 8px; padding: 22px;
  transition: var(--ease);
}
.svc:hover {
  background: rgba(200,164,92,.07);
  border-color: rgba(200,164,92,.28);
  transform: translateX(6px);
}
.svc-icon {
  flex-shrink: 0; width: 46px; height: 46px;
  background: var(--grad-gold); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--navy); font-size: 1.15rem;
}
.svc h3 { font-size: .97rem; font-weight: 700; color: #fff; margin-bottom: 7px; }
.svc p  { font-size: .87rem; color: rgba(255,255,255,.62); margin: 0; line-height: 1.6; }

/* ── Referenze ── */
.referenze-section { background: var(--bg-light); }
.ref-grid {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 22px;
}
.ref-card {
  background: var(--bg-white); border-radius: 8px;
  overflow: hidden; cursor: pointer;
  box-shadow: 0 2px 12px rgba(15,43,74,.07);
  transition: var(--ease);
}
.ref-card:hover { transform: translateY(-7px); box-shadow: var(--shadow-lg); }
.ref-img-wrap {
  overflow: hidden; aspect-ratio: 4/3; position: relative;
}
.ref-img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .55s ease;
}
.ref-card:hover .ref-img { transform: scale(1.06); }
.ref-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top,rgba(9,30,51,.82) 0%,transparent 55%);
  opacity: 0; transition: var(--ease);
  display: flex; align-items: flex-end; padding: 14px;
}
.ref-card:hover .ref-overlay { opacity: 1; }
.ref-overlay-label {
  color: #fff; font-family: var(--font-h);
  font-size: .78rem; font-weight: 600; letter-spacing: .06em;
}
.ref-zoom {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-50%) scale(0);
  background: var(--gold); color: var(--navy);
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; transition: transform .3s ease;
}
.ref-card:hover .ref-zoom { transform: translate(-50%,-50%) scale(1); }
.ref-body { padding: 16px; }
.ref-meta {
  font-family: var(--font-h); font-size: .68rem; font-weight: 700;
  color: var(--gold); letter-spacing: .14em; text-transform: uppercase;
  margin-bottom: 7px;
}
.ref-title {
  font-size: .88rem; font-weight: 700; color: var(--navy);
  line-height: 1.4; margin-bottom: 8px;
}
.ref-desc {
  font-size: .8rem; color: var(--text-light); line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ── Lightbox ── */
.lightbox {
  position: fixed; inset: 0; z-index: 9000;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .3s ease;
}
.lightbox.open { opacity: 1; pointer-events: all; }
.lb-bg {
  position: absolute; inset: 0;
  background: rgba(9,30,51,.96);
}
.lb-wrap {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 18px;
  max-width: 96vw; padding: 20px;
}
.lb-main {
  max-width: 900px; display: flex; flex-direction: column;
  align-items: center; gap: 18px;
}
.lb-main img {
  max-width: 100%; max-height: 68vh;
  border-radius: 6px; object-fit: contain;
  transition: opacity .25s ease, transform .25s ease;
}
.lb-caption { text-align: center; max-width: 680px; }
.lb-caption h3 { color: #fff; font-size: 1.05rem; margin-bottom: 8px; }
.lb-caption p  { color: rgba(255,255,255,.65); font-size: .88rem; margin: 0; }
.lb-close {
  position: fixed; top: 18px; right: 18px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.3);
  color: #fff; width: 44px; height: 44px; border-radius: 50%;
  cursor: pointer; font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  transition: var(--ease); z-index: 2;
}
.lb-close:hover { background: var(--gold); color: var(--navy); border-color: var(--gold); }
.lb-nav {
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.3);
  color: #fff; width: 50px; height: 50px; border-radius: 50%;
  cursor: pointer; font-size: 1rem; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: var(--ease);
}
.lb-nav:hover { background: var(--gold); color: var(--navy); border-color: var(--gold); }

/* ── Contatti ── */
.contatti-section { background: var(--bg-white); }
.contatti-grid {
  display: grid; grid-template-columns: 1fr 1.5fr;
  gap: 60px; align-items: start;
}
.contact-card {
  background: var(--grad-navy); border-radius: 12px;
  padding: 44px; color: #fff; box-shadow: var(--shadow-lg);
}
.contact-card h3 {
  font-size: 1.25rem; font-weight: 400;
  color: rgba(255,255,255,.75); margin-bottom: 32px;
  padding-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,.12);
}
.contact-card h3 strong {
  display: block; font-size: 1.6rem; font-weight: 900;
  color: #fff; margin-top: 4px;
}
.cinfo-list { display: flex; flex-direction: column; gap: 22px; }
.cinfo-item { display: flex; gap: 16px; align-items: flex-start; }
.cinfo-icon {
  width: 40px; height: 40px; flex-shrink: 0;
  background: rgba(200,164,92,.15); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--gold);
}
.cinfo-body { display: flex; flex-direction: column; gap: 2px; }
.cinfo-label {
  font-family: var(--font-h); font-size: .68rem; font-weight: 700;
  color: var(--gold); text-transform: uppercase; letter-spacing: .12em;
}
.cinfo-body span, .cinfo-body a {
  font-size: .93rem; color: rgba(255,255,255,.82); text-decoration: none;
}
.cinfo-body a:hover { color: var(--gold-light); }

/* Contact form */
.contact-form-wrap {
  background: var(--bg-light); border-radius: 12px; padding: 44px;
}
.contact-form-wrap h3 {
  font-size: 1.4rem; color: var(--navy);
  margin-bottom: 28px; padding-bottom: 16px;
  border-bottom: 2px solid var(--border);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-family: var(--font-h); font-size: .75rem; font-weight: 700;
  color: var(--text-mid); text-transform: uppercase; letter-spacing: .09em;
  margin-bottom: 8px;
}
.form-group input,
.form-group textarea {
  width: 100%; padding: 12px 16px;
  border: 1.5px solid var(--border); border-radius: 6px;
  font-family: var(--font-b); font-size: .95rem; color: var(--text-dark);
  background: var(--bg-white); transition: var(--ease); outline: none;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(15,43,74,.08);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-note {
  margin-top: 12px; font-size: .76rem;
  color: var(--text-light); margin-bottom: 0;
}
/* Checkbox consenso privacy */
.form-check { margin-top: 4px; }
.check-label {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: .85rem; color: var(--text-light); cursor: pointer; line-height: 1.5;
}
.check-label input[type="checkbox"] {
  margin-top: 3px; flex-shrink: 0;
  width: 16px; height: 16px; accent-color: var(--gold); cursor: pointer;
}
.check-label a { color: var(--navy); text-decoration: underline; }
.check-label a:hover { color: var(--gold); }
/* Form feedback AJAX */
.form-feedback {
  display: none; padding: 12px 16px; border-radius: 6px;
  font-size: .9rem; margin-bottom: 16px;
  display: flex; align-items: flex-start; gap: 10px;
}
.form-feedback:empty { display: none; }
.form-feedback.success {
  background: #ecfdf5; color: #065f46;
  border: 1px solid #6ee7b7;
}
.form-feedback.error {
  background: #fef2f2; color: #991b1b;
  border: 1px solid #fca5a5;
}
.form-feedback a { color: inherit; text-decoration: underline; }

/* ── Back to Top ── */
#backTop {
  position: fixed; bottom: 32px; right: 32px;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--navy); color: var(--gold);
  border: none; cursor: pointer; font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow);
  opacity: 0; transform: translateY(12px);
  transition: opacity .3s ease, transform .3s ease, background .2s ease;
  z-index: 500;
}
#backTop.show  { opacity: 1; transform: translateY(0); }
#backTop:hover { background: var(--gold); color: var(--navy); }

/* ── Footer ── */
.footer {
  background: var(--navy-dark); color: rgba(255,255,255,.65);
  padding: 44px 0 20px;
}
.footer-inner {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  text-align: center; margin-bottom: 24px; padding-bottom: 24px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-brand {
  display: flex; align-items: center; gap: 12px;
}
.footer-logo-img { height: 36px; border-radius: 4px; display: block; }
.footer-info { font-size: .84rem; line-height: 1.9; }
.footer-links {
  display: flex; align-items: center; gap: 12px;
  flex-wrap: wrap; justify-content: center;
}
.footer-links a { color: var(--gold); font-size: .84rem; }
.footer-links a:hover { color: var(--gold-light); }
.sep { color: rgba(255,255,255,.25); }
.footer-bottom {
  text-align: center; font-size: .76rem;
  color: rgba(255,255,255,.38);
  display: flex; flex-direction: column; gap: 4px;
}
.footer-bottom a { color: rgba(255,255,255,.5); }
.footer-bottom a:hover { color: var(--gold); }

/* ── Cookie Banner ── */
.cookie-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: rgba(9,30,51,.97); backdrop-filter: blur(10px);
  color: rgba(255,255,255,.78);
  padding: 16px var(--cpx);
  display: flex; align-items: center; gap: 24px;
  z-index: 8000; font-size: .84rem;
  transform: translateY(100%); transition: transform .4s ease;
}
.cookie-bar.show { transform: translateY(0); }
.cookie-bar p { margin: 0; flex: 1; }
.cookie-link { color: var(--gold); text-decoration: underline; }
.cookie-link:hover { color: var(--gold-light); }
.cookie-ok {
  background: var(--gold); color: var(--navy);
  border: none; padding: 8px 28px; border-radius: 4px;
  font-family: var(--font-h); font-weight: 700; font-size: .84rem;
  cursor: pointer; flex-shrink: 0; transition: var(--ease);
}
.cookie-ok:hover { background: var(--gold-light); }

/* ── Animations ── */
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-22px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes bounce {
  0%,100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(9px); }
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  :root { --sec-py: 80px; }
  .storia-grid, .servizi-grid, .contatti-grid { grid-template-columns: 1fr; gap: 48px; }
  .storia-img-side { position: static; }
  .servizi-img { position: static; aspect-ratio: 16/9; }
  .ref-grid { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 768px) {
  :root { --sec-py: 64px; }
  /* Mobile nav */
  .nav-menu {
    position: fixed; top: 0; right: -100%; width: 280px; height: 100vh;
    background: var(--navy-dark); flex-direction: column;
    align-items: flex-start; padding: 84px 24px 24px; gap: 4px;
    transition: right .3s ease; box-shadow: -4px 0 24px rgba(0,0,0,.35);
  }
  .nav-menu.open { right: 0; }
  .nav-logo-img { height: 42px; }
  .nav-link { font-size: .92rem; padding: 12px 16px; width: 100%; color: rgba(255,255,255,.85); }
  .nav-link:hover { color: var(--gold); background: rgba(240,120,32,.15); }
  .nav-link.active { color: var(--gold); }
  .nav-link.nav-cta { background: var(--gold); color: #fff; }
  .nav-toggle { display: flex; }
  .nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

  .hero-title { font-size: 3rem; }
  .hero-cta   { flex-direction: column; align-items: center; }
  .stats      { grid-template-columns: repeat(3,1fr); }
  .form-row   { grid-template-columns: 1fr; }
  .cookie-bar { flex-direction: column; align-items: flex-start; gap: 10px; }
  .lb-wrap    { flex-direction: column; padding: 60px 16px 20px; }
  .lb-nav.prev { position: fixed; left: 8px; top: 50%; transform: translateY(-50%); }
  .lb-nav.next { position: fixed; right: 8px; top: 50%; transform: translateY(-50%); }
  #backTop { bottom: 20px; right: 20px; }
}

@media (max-width: 540px) {
  .ref-grid { grid-template-columns: 1fr; }
  .stats    { grid-template-columns: repeat(3,1fr); }
  .contact-card, .contact-form-wrap { padding: 28px; }
}
