/* ==========================================================================
   MATTEUCCI GARAGE — Foglio di stile principale
   Stack: HTML5 + Bootstrap 5.3.8 (CDN) + CSS custom + JS vanilla
   Palette: bianco dominante, nero/grigio come secondari, bronzo come accento.
   --------------------------------------------------------------------------
   INDICE
   01. Token / variabili
   02. Base & tipografia
   03. Layout & utility
   04. Header / navigazione
   05. Bottoni
   06. Hero + carosello hero
   07. Sezioni contenuto (officina, dettagli, chi sono)
   08. Marquee
   09. Le mie moto (slider per anno)
   10. E-Bike
   11. Contatti / CTA
   12. Footer
   13. Pagina progetto
   14. Animazioni & reveal
   15. Responsive & accessibilità
   ========================================================================== */

/* ---------- 01. Token / variabili ---------------------------------------- */
:root {
  /* Palette */
  --mg-bg: #FBFBF9;
  --mg-white: #FFFFFF;
  --mg-ink: #15150F;
  --mg-body: #45453C;
  --mg-muted: #8A8A80;
  --mg-faint: #A8A8A0;
  --mg-line: #EAEAE4;
  --mg-line-soft: #F0F0EA;
  --mg-line-strong: #D8D8D0;
  --mg-accent: #8A5A1E;
  --mg-accent-soft: #C79A5E;
  --mg-dark: #15150F;
  --mg-dark-line: #3A3A32;
  --mg-dark-text: #D9D9D0;

  /* Tipografia */
  --mg-display: 'Big Shoulders Display', 'Arial Narrow', Impact, sans-serif;
  --mg-sans: 'Jost', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  /* Misure */
  --mg-maxw: 1560px;
  --mg-gutter: clamp(18px, 3.6vw, 64px);
  --mg-nav-h: 88px;
  --mg-nav-h-sm: 68px;
  --mg-ease: cubic-bezier(.2, .7, .2, 1);

  /* Override Bootstrap */
  --bs-body-bg: var(--mg-bg);
  --bs-body-color: var(--mg-ink);
  --bs-body-font-family: var(--mg-sans);
  --bs-body-font-weight: 300;
  --bs-body-font-size: 1rem;
  --bs-border-color: var(--mg-line);
  --bs-link-color: var(--mg-ink);
  --bs-link-hover-color: var(--mg-accent);
  --bs-emphasis-color: var(--mg-ink);
  --bs-secondary-color: var(--mg-muted);
  --bs-focus-ring-color: rgba(138, 90, 30, .28);
  --bs-focus-ring-width: 2px;
}

/* ---------- 02. Base & tipografia ---------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--mg-nav-h-sm) + 12px);
}

body {
  margin: 0;
  background: var(--mg-bg);
  color: var(--mg-ink);
  font-family: var(--mg-sans);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: var(--mg-ink); text-decoration: none; transition: color .3s ease; }
a:hover { color: var(--mg-accent); }

img { max-width: 100%; }

::selection { background: var(--mg-ink); color: var(--mg-bg); }

:focus-visible {
  outline: 2px solid var(--mg-accent);
  outline-offset: 3px;
}

/* Titoli */
.ttl {
  font-family: var(--mg-display);
  font-weight: 700;
  text-transform: uppercase;
  line-height: .92;
  letter-spacing: 0;
  margin: 0;
}
.ttl--xxl { font-weight: 800; font-size: clamp(46px, 8.4vw, 132px); line-height: .86; letter-spacing: -.01em; }
.ttl--xl  { font-size: clamp(38px, 6.4vw, 96px); line-height: .9; }
.ttl--lg  { font-size: clamp(34px, 4.8vw, 76px); }
.ttl--md  { font-size: clamp(30px, 4.2vw, 64px); line-height: .94; }
.ttl--sm  { font-size: clamp(26px, 3.2vw, 46px); line-height: .96; }
.ttl--soft { color: var(--mg-muted); font-weight: 400; }

/* Occhiello / eyebrow */
.eyebrow {
  margin: 0;
  font-size: 10.5px;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--mg-faint);
}
.eyebrow--accent { color: var(--mg-accent); }
.eyebrow--light { color: var(--mg-accent-soft); }

.eyebrow-rule {
  display: flex;
  align-items: center;
  gap: 14px;
}
.eyebrow-rule::before {
  content: "";
  width: 44px;
  height: 1px;
  background: var(--mg-accent);
  flex: none;
}

/* Testi */
.txt-lead { font-size: clamp(16px, 1.3vw, 21px); line-height: 1.7; color: var(--mg-ink); font-weight: 300; }
.txt-body { font-size: clamp(15px, 1.15vw, 18px); line-height: 1.8; color: var(--mg-body); }
.txt-sm   { font-size: 14.5px; line-height: 1.75; color: var(--mg-body); }
.txt-muted { color: var(--mg-muted); }
.txt-faint { color: var(--mg-faint); }

.label-xs {
  display: block;
  font-size: 10px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--mg-faint);
  margin-bottom: 6px;
}

.meta {
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--mg-faint);
}

/* ---------- 03. Layout & utility ----------------------------------------- */
.container-mg {
  width: 100%;
  max-width: var(--mg-maxw);
  margin-inline: auto;
  padding-inline: var(--mg-gutter);
}

.section { padding-block: clamp(64px, 10vh, 140px); }
.section--sm { padding-block: clamp(44px, 6vw, 92px); }
.section--white { background: var(--mg-white); border-top: 1px solid var(--mg-line); border-bottom: 1px solid var(--mg-line); }
.section--dark { background: var(--mg-dark); color: var(--mg-bg); }
.section--dark .ttl { color: var(--mg-white); }
.section--dark .txt-body { color: var(--mg-dark-text); }

.rule-top { border-top: 1px solid var(--mg-line); }
.rule-ink { border-top: 1px solid var(--mg-ink); }

/* Immagini prodotto su fondo bianco */
.img-blend {
  display: block;
  width: 100%;
  height: auto;
  mix-blend-mode: multiply;
}

.frame {
  background: var(--mg-white);
  border: 1px solid var(--mg-line);
  padding: clamp(10px, 1.4vw, 20px);
  margin: 0;
}
.frame--plain { border: none; }
.frame figcaption,
.frame .frame-cap {
  margin-top: 12px;
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--mg-faint);
}

/* Numeri grandi */
.stat-num {
  font-family: var(--mg-display);
  font-weight: 700;
  font-size: clamp(38px, 3.4vw, 50px);
  line-height: 1;
  margin: 0 0 8px;
}
.stat-lbl { margin: 0; font-size: 12.5px; letter-spacing: .06em; color: var(--mg-muted); }

/* Tag / pill */
.pill {
  display: inline-block;
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  padding: 9px 18px;
  border: 1px solid var(--mg-line-strong);
  color: var(--mg-body);
  transition: border-color .3s ease, color .3s ease, background-color .3s ease;
}
.pill:hover { border-color: var(--mg-ink); color: var(--mg-ink); }
.section--dark .pill { border-color: var(--mg-dark-line); color: var(--mg-dark-text); }
.section--dark .pill:hover { border-color: var(--mg-accent-soft); color: var(--mg-white); }

/* ---------- 04. Header / navigazione ------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: rgba(251, 251, 249, .88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .35s ease, background-color .35s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--mg-line); }

.site-header .container-mg {
  height: var(--mg-nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  transition: height .35s ease;
}
.site-header.is-scrolled .container-mg { height: var(--mg-nav-h-sm); }

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  flex: none;
}
.brand:hover { color: var(--mg-ink); }
.brand-mark {
  width: 38px;
  height: 38px;
  border: 1px solid var(--mg-ink);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mg-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: .04em;
  flex: none;
  transition: background-color .35s ease, color .35s ease, transform .5s var(--mg-ease);
}
.brand:hover .brand-mark { background: var(--mg-ink); color: var(--mg-bg); transform: rotate(-8deg); }
.brand-txt {
  font-family: var(--mg-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: .2em;
  text-transform: uppercase;
  line-height: 1;
}
.brand-txt small {
  display: block;
  font-weight: 400;
  color: var(--mg-muted);
  font-size: 15px;
  letter-spacing: .3em;
}

.nav-mg {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.2vw, 32px);
}
.nav-mg .nav-link {
  position: relative;
  padding: 8px 0;
  font-size: 11.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
  font-weight: 400;
  color: var(--mg-ink);
  background: none;
  border: 0;
}
.nav-mg .nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--mg-ink);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .4s var(--mg-ease);
}
.nav-mg .nav-link:hover::after,
.nav-mg .nav-link.is-active::after { transform: scaleX(1); transform-origin: left; }
.nav-mg .nav-link.is-active { color: var(--mg-ink); }

.lang-switch {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--mg-faint);
}
.lang-switch a { color: var(--mg-faint); }
.lang-switch a.is-active { color: var(--mg-ink); font-weight: 500; }

.nav-toggle {
  width: 44px;
  height: 44px;
  border: 1px solid var(--mg-line-strong);
  background: none;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  padding: 0;
  transition: border-color .3s ease;
}
.nav-toggle:hover { border-color: var(--mg-ink); }
.nav-toggle span {
  display: block;
  width: 18px;
  height: 1px;
  background: var(--mg-ink);
}

/* Offcanvas mobile */
.offcanvas-mg {
  background: var(--mg-bg);
  --bs-offcanvas-width: min(420px, 86vw);
}
.offcanvas-mg .offcanvas-header { border-bottom: 1px solid var(--mg-line); padding: 22px var(--mg-gutter); }
.offcanvas-mg .offcanvas-body { padding: 10px var(--mg-gutter) 32px; }
.offcanvas-mg .oc-link {
  display: block;
  font-family: var(--mg-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 30px;
  letter-spacing: .06em;
  padding: 16px 0;
  border-bottom: 1px solid var(--mg-line);
  transition: padding-left .35s var(--mg-ease), color .3s ease;
}
.offcanvas-mg .oc-link:hover { padding-left: 12px; color: var(--mg-accent); }

/* Barra di avanzamento lettura */
.read-progress {
  height: 2px;
  background: var(--mg-line);
}
.read-progress > span {
  display: block;
  height: 2px;
  width: 0;
  background: var(--mg-accent);
  transition: width .1s linear;
}

/* ---------- 05. Bottoni --------------------------------------------------- */
.btn-mg {
  --btn-bg: transparent;
  --btn-fg: var(--mg-ink);
  --btn-bd: var(--mg-line-strong);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--mg-display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  padding: 16px 38px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1px solid var(--btn-bd);
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: color .35s ease, border-color .35s ease;
}
.btn-mg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--mg-ink);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform .45s var(--mg-ease);
  z-index: -1;
}
.btn-mg:hover::before { transform: scaleY(1); }
.btn-mg:hover { color: var(--mg-bg); border-color: var(--mg-ink); }

.btn-mg--solid { --btn-bg: var(--mg-ink); --btn-fg: var(--mg-bg); --btn-bd: var(--mg-ink); }
.btn-mg--solid::before { background: var(--mg-accent); transform-origin: bottom; }
.btn-mg--solid:hover { color: var(--mg-white); border-color: var(--mg-accent); }

.btn-mg--light { --btn-fg: var(--mg-bg); --btn-bd: var(--mg-dark-line); }
.btn-mg--light::before { background: var(--mg-bg); }
.btn-mg--light:hover { color: var(--mg-ink); border-color: var(--mg-bg); }

.btn-mg--sm { padding: 12px 26px; font-size: 12.5px; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mg-display);
  font-size: 13px;
  letter-spacing: .2em;
  text-transform: uppercase;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--mg-line-strong);
  transition: border-color .3s ease, gap .3s ease;
}
.link-arrow:hover { border-bottom-color: var(--mg-ink); gap: 16px; }

/* ---------- 06. Hero ------------------------------------------------------ */
.hero {
  position: relative;
  background: var(--mg-white);
  border-bottom: 1px solid var(--mg-line);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(12px, 2.5vw, 48px);
  align-items: center;
  padding-block: clamp(28px, 5vw, 70px) clamp(20px, 3vw, 44px);
}
.hero-copy { position: relative; z-index: 2; }
.hero-copy h1 { margin-bottom: 0; }
.hero-txt { margin: clamp(20px, 2.6vw, 36px) 0 0; font-size: clamp(14.5px, 1.05vw, 17.5px); line-height: 1.75; color: var(--mg-body); max-width: 40ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: clamp(26px, 3vw, 42px); }

/* Carosello hero */
.hero-slider { position: relative; }
.hero-slider .carousel-item {
  transition: opacity .9s ease;
}
.hero-slider .carousel-inner { overflow: hidden; }
.hero-slide-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: contain;
  object-position: center;
  mix-blend-mode: multiply;
  animation: mgZoom 7s var(--mg-ease) both;
}
.carousel-item.active .hero-slide-img { animation: mgZoom 7s var(--mg-ease) both; }

.hero-caption {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--mg-line);
  padding-top: 12px;
  margin-top: 6px;
  min-height: 46px;
}
.hero-caption .name {
  font-family: var(--mg-display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.hero-caption .note { font-size: 11px; letter-spacing: .18em; color: var(--mg-faint); text-transform: uppercase; }

.hero-dots {
  position: static;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0 0;
  padding: 0;
  justify-content: flex-start;
}
.hero-dots [data-bs-slide-to] {
  width: 34px;
  height: 2px;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--mg-line-strong);
  opacity: 1;
  text-indent: -9999px;
  position: relative;
  overflow: hidden;
  transition: background-color .3s ease;
  cursor: pointer;
}
.hero-dots [data-bs-slide-to]:hover { background: var(--mg-muted); }
.hero-dots [data-bs-slide-to].active { background: var(--mg-line-strong); }
.hero-dots [data-bs-slide-to].active::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--mg-ink);
  transform-origin: left;
  animation: mgBar var(--mg-hero-interval, 5s) linear forwards;
}

.hero-arrows { display: flex; gap: 8px; }
.arrow-btn {
  width: 42px;
  height: 42px;
  border: 1px solid var(--mg-line-strong);
  background: var(--mg-white);
  color: var(--mg-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: background-color .3s ease, color .3s ease, border-color .3s ease;
}
.arrow-btn:hover { background: var(--mg-ink); color: var(--mg-bg); border-color: var(--mg-ink); }

.scroll-hint {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
  padding-bottom: clamp(18px, 2.4vw, 30px);
}
.scroll-hint span:first-child {
  font-size: 9.5px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--mg-faint);
}
.scroll-hint i {
  display: block;
  width: 1px;
  height: 26px;
  background: var(--mg-ink);
  transform-origin: top;
  animation: mgLine 2.4s ease-in-out infinite;
}

/* ---------- 07. Sezioni contenuto ---------------------------------------- */
.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: clamp(26px, 5vw, 88px);
  align-items: start;
}
.split--center { align-items: center; }
.split--tight { gap: clamp(24px, 4vw, 72px); }

.tri-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(24px, 3.4vw, 56px);
}

.principle-title {
  margin: 0 0 12px;
  font-family: var(--mg-display);
  font-size: 12px;
  letter-spacing: .3em;
  color: var(--mg-accent);
  text-transform: uppercase;
}

/* ---------- 08. Marquee --------------------------------------------------- */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--mg-line);
  border-bottom: 1px solid var(--mg-line);
  background: var(--mg-white);
  padding: 18px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: mgMarquee 38s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span {
  font-family: var(--mg-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(22px, 2.6vw, 38px);
  letter-spacing: .12em;
  color: var(--mg-ink);
  padding-inline: clamp(18px, 2.4vw, 38px);
  display: inline-flex;
  align-items: center;
  gap: clamp(18px, 2.4vw, 38px);
  white-space: nowrap;
}
.marquee-track span::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mg-accent);
  flex: none;
}
.marquee--ghost .marquee-track span { color: var(--mg-line); -webkit-text-stroke: 0; }

/* ---------- 09. Le mie moto (slider per anno) ---------------------------- */
.moto-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: clamp(20px, 2.6vw, 34px);
}

.year-rail {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: stretch;
  gap: clamp(22px, 3.4vw, 58px);
  border-top: 1px solid var(--mg-ink);
  border-bottom: 1px solid var(--mg-line);
  padding: 0;
  margin-bottom: clamp(26px, 3.4vw, 50px);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.year-rail::-webkit-scrollbar { display: none; }

.year-btn {
  position: relative;
  background: none;
  border: 0;
  padding: 16px 0 15px;
  cursor: pointer;
  font-family: var(--mg-display);
  font-weight: 600;
  font-size: clamp(18px, 1.7vw, 26px);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--mg-faint);
  white-space: nowrap;
  flex: none;
  transition: color .3s ease;
}
.year-btn:hover { color: var(--mg-ink); }
.year-btn .n {
  font-family: var(--mg-sans);
  font-size: 10px;
  letter-spacing: .06em;
  vertical-align: super;
  color: var(--mg-faint);
}
.year-btn.active { color: var(--mg-ink); }
.year-btn.active .n { color: var(--mg-accent); }
.year-btn::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--mg-line-strong);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s var(--mg-ease);
}
.year-btn:hover::after { transform: scaleX(1); }
.year-btn.active::after {
  background: var(--mg-accent);
  transform: scaleX(0);
  animation: mgBar var(--mg-year-interval, 4s) linear forwards;
}
.moto-slider.is-paused .year-btn.active::after { animation-play-state: paused; }

.moto-slider .carousel-item { transition: transform .75s var(--mg-ease), opacity .6s ease; }

.moto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: clamp(22px, 2.6vw, 44px) clamp(18px, 2.2vw, 36px);
}

.card-moto {
  margin: 0;
  background: var(--mg-white);
  border: 1px solid var(--mg-line);
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: border-color .35s ease, transform .5s var(--mg-ease), box-shadow .5s var(--mg-ease);
}
.card-moto:hover {
  border-color: var(--mg-ink);
  transform: translateY(-6px);
  box-shadow: 0 18px 40px -28px rgba(21, 21, 15, .55);
}
.card-moto a { display: block; color: inherit; }
.card-moto-media {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  padding: 10px;
}
.card-moto-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
  transition: transform .8s var(--mg-ease);
}
.card-moto:hover .card-moto-media img { transform: scale(1.06); }
.card-moto-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--mg-muted);
  background: rgba(255, 255, 255, .86);
  padding: 5px 10px;
  border: 1px solid var(--mg-line);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity .4s ease, transform .4s var(--mg-ease);
}
.card-moto:hover .card-moto-badge { opacity: 1; transform: none; }
.card-moto figcaption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px 18px;
  border-top: 1px solid var(--mg-line-soft);
  margin-top: auto;
}
.card-moto .name {
  display: block;
  font-family: var(--mg-display);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.card-moto .note { display: block; font-size: 12px; color: var(--mg-muted); margin-top: 3px; }
.card-moto .year { font-size: 11px; letter-spacing: .16em; color: var(--mg-faint); flex: none; }

.moto-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: clamp(24px, 3vw, 44px);
  border-top: 1px solid var(--mg-line);
  padding-top: 22px;
}

/* ---------- 10. E-Bike ---------------------------------------------------- */
.ebike-intro {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: clamp(26px, 4.6vw, 80px);
  align-items: end;
}

.spec-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: clamp(18px, 2.4vw, 40px);
  border-top: 1px solid var(--mg-ink);
  border-bottom: 1px solid var(--mg-line);
  padding: clamp(22px, 2.6vw, 34px) 0;
  margin-top: clamp(30px, 4vw, 56px);
}
.spec-strip .k {
  font-family: var(--mg-display);
  font-weight: 700;
  font-size: clamp(26px, 2.4vw, 38px);
  line-height: 1;
  margin: 0 0 8px;
}
.spec-strip .v { margin: 0; font-size: 12.5px; letter-spacing: .06em; color: var(--mg-muted); }

.ebike-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: clamp(20px, 2.4vw, 38px);
  margin-top: clamp(34px, 4.4vw, 64px);
}

.card-ebike {
  background: var(--mg-white);
  border: 1px solid var(--mg-line);
  display: flex;
  flex-direction: column;
  transition: border-color .35s ease, transform .5s var(--mg-ease), box-shadow .5s var(--mg-ease);
}
.card-ebike:hover {
  border-color: var(--mg-ink);
  transform: translateY(-6px);
  box-shadow: 0 18px 40px -28px rgba(21, 21, 15, .55);
}
.card-ebike-media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  padding: clamp(10px, 1.4vw, 20px);
  background: var(--mg-white);
}
.card-ebike-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
  transition: transform .8s var(--mg-ease);
}
.card-ebike:hover .card-ebike-media img { transform: scale(1.07) rotate(-.6deg); }
.card-ebike-body {
  padding: clamp(18px, 2vw, 26px);
  border-top: 1px solid var(--mg-line-soft);
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}
.card-ebike-body h3 {
  margin: 0;
  font-family: var(--mg-display);
  font-weight: 700;
  font-size: clamp(22px, 1.8vw, 28px);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.card-ebike-body p { margin: 0; font-size: 14.5px; line-height: 1.7; color: var(--mg-body); }

/* Accordion specifiche */
.accordion-mg {
  --bs-accordion-bg: transparent;
  --bs-accordion-border-color: var(--mg-line);
  --bs-accordion-btn-color: var(--mg-ink);
  --bs-accordion-active-bg: transparent;
  --bs-accordion-active-color: var(--mg-ink);
  --bs-accordion-btn-focus-box-shadow: none;
  --bs-accordion-border-radius: 0;
  --bs-accordion-inner-border-radius: 0;
  --bs-accordion-btn-padding-x: 0;
  --bs-accordion-btn-padding-y: 14px;
  --bs-accordion-body-padding-x: 0;
  --bs-accordion-body-padding-y: 4px 18px;
  margin-top: auto;
}
.accordion-mg .accordion-item { border-left: 0; border-right: 0; }
.accordion-mg .accordion-item:first-of-type { border-top: 1px solid var(--mg-line); }
.accordion-mg .accordion-button {
  font-family: var(--mg-display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .22em;
  text-transform: uppercase;
  box-shadow: none;
}
.accordion-mg .accordion-button::after {
  width: 14px;
  height: 14px;
  background-size: 14px;
  --bs-accordion-btn-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%2315150F' stroke-width='1.4'%3e%3cpath d='M2 6l6 6 6-6'/%3e%3c/svg%3e");
  --bs-accordion-btn-active-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%238A5A1E' stroke-width='1.4'%3e%3cpath d='M2 6l6 6 6-6'/%3e%3c/svg%3e");
}
.accordion-mg .accordion-body { padding-bottom: 18px; }

.spec-list { margin: 0; display: grid; gap: 10px; }
.spec-list > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px dotted var(--mg-line-strong);
  padding-bottom: 8px;
}
.spec-list dt {
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--mg-faint);
  flex: none;
  padding-top: 2px;
}
.spec-list dd { margin: 0; font-size: 13.5px; line-height: 1.5; text-align: right; color: var(--mg-body); }

/* ---------- 11. Contatti / CTA ------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(32px, 5vw, 90px);
}
.contact-list { display: grid; gap: 22px; font-size: 15.5px; }
.contact-list a { border-bottom: 1px solid var(--mg-line); transition: border-color .3s ease; }
.contact-list a:hover { border-bottom-color: var(--mg-accent); }

.form-mg { display: grid; gap: 26px; align-content: start; max-width: 560px; width: 100%; }
.form-mg label { display: grid; gap: 8px; }
.form-mg .form-control {
  border: 0;
  border-bottom: 1px solid var(--mg-line-strong);
  border-radius: 0;
  background: none;
  padding: 10px 0;
  font-size: 16px;
  color: var(--mg-ink);
  box-shadow: none;
  transition: border-color .3s ease;
}
.form-mg .form-control:focus { border-bottom-color: var(--mg-ink); background: none; box-shadow: none; }
.form-mg .form-control::placeholder { color: var(--mg-faint); }
.form-mg .form-control:user-invalid { border-bottom-color: var(--mg-accent); }
.form-mg .invalid-feedback { font-size: 12px; color: var(--mg-accent); }
.form-note { font-size: 12px; color: var(--mg-faint); line-height: 1.6; }

/* ---------- 12. Footer ---------------------------------------------------- */
.site-footer { background: var(--mg-dark); color: var(--mg-muted); }
.footer-top {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: clamp(28px, 3.4vw, 60px);
  padding-block: clamp(44px, 6vw, 84px) clamp(30px, 3.4vw, 50px);
}
.footer-brand {
  font-family: var(--mg-display);
  font-weight: 700;
  font-size: clamp(30px, 3.2vw, 46px);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--mg-white);
  line-height: .95;
  margin: 0 0 14px;
}
.footer-txt { margin: 0; font-size: 13.5px; line-height: 1.75; color: var(--mg-muted); max-width: 34ch; }
.footer-h {
  margin: 0 0 16px;
  font-size: 10px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--mg-accent-soft);
}
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-links a {
  color: var(--mg-muted);
  font-size: 13px;
  letter-spacing: .08em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color .3s ease, gap .3s ease;
}
.footer-links a:hover { color: var(--mg-white); gap: 14px; }
.footer-bottom {
  border-top: 1px solid var(--mg-dark-line);
  padding-block: clamp(20px, 2.2vw, 30px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  font-size: 11px;
  letter-spacing: .12em;
}
.footer-bottom a { color: var(--mg-muted); }
.footer-bottom a:hover { color: var(--mg-white); }
.to-top {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-transform: uppercase;
  letter-spacing: .18em;
}

/* ---------- 13. Pagina progetto ------------------------------------------ */
.project-hero { position: relative; background: var(--mg-dark); }
.project-hero img {
  display: block;
  width: 100%;
  height: clamp(420px, 86vh, 940px);
  object-fit: cover;
  opacity: .92;
}
.project-hero .veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,10,8,.5) 0%, rgba(10,10,8,.2) 34%, rgba(10,10,8,.62) 62%, rgba(10,10,8,.9) 100%);
}
.project-hero .inner {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: clamp(24px, 4vw, 64px) 0;
}
.project-hero h1 {
  margin: 0;
  font-family: var(--mg-display);
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(58px, 15vw, 250px);
  line-height: .82;
  letter-spacing: -.01em;
  color: var(--mg-white);
}
.tag-dark {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: rgba(10, 10, 8, .72);
  padding: 9px 18px 9px 14px;
  margin-bottom: 18px;
}
.tag-dark::before { content: ""; width: 30px; height: 1px; background: var(--mg-accent-soft); }
.tag-dark p { margin: 0; font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: #F2E7D5; }

.chapter-dl { margin: clamp(28px, 3.4vw, 46px) 0 0; display: grid; gap: 18px; border-top: 1px solid var(--mg-line); padding-top: 24px; }
.chapter-dl > div { display: flex; justify-content: space-between; gap: 16px; }
.chapter-dl dt { font-size: 10px; letter-spacing: .24em; text-transform: uppercase; color: var(--mg-faint); }
.chapter-dl dd { margin: 0; font-size: 14.5px; text-align: right; }

.paint-dot {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  flex: none;
  transition: transform .5s var(--mg-ease);
}
.paint-chip:hover .paint-dot { transform: scale(1.12); }
.paint-chip { display: flex; align-items: center; gap: 12px; }
.paint-chip span:last-child { font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--mg-muted); }

.quote-band { position: relative; background: var(--mg-dark); }
.quote-band img { display: block; width: 100%; height: clamp(380px, 76vh, 820px); object-fit: cover; opacity: .94; }
.quote-band .veil { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,10,8,.12) 0%, rgba(10,10,8,.18) 40%, rgba(10,10,8,.78) 100%); }
.quote-band .inner { position: absolute; left: 0; right: 0; bottom: 0; padding: clamp(26px, 4vw, 70px) 0; }
.quote-band p {
  margin: 0;
  font-family: var(--mg-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(26px, 3.6vw, 58px);
  line-height: 1.02;
  color: var(--mg-white);
  max-width: 26ch;
}

.spec-dl {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 26px 32px;
  border-top: 1px solid var(--mg-ink);
  padding-top: 28px;
}
.spec-dl dt { font-size: 10px; letter-spacing: .24em; text-transform: uppercase; color: var(--mg-faint); margin-bottom: 8px; }
.spec-dl dd { margin: 0; font-size: 15.5px; }

/* Galleria con lightbox */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(16px, 2vw, 32px);
}
.zoomable { cursor: zoom-in; display: block; overflow: hidden; }
.zoomable img { transition: transform .8s var(--mg-ease); }
.zoomable:hover img { transform: scale(1.04); }

.modal-mg .modal-content { background: var(--mg-white); border: 0; border-radius: 0; }
.modal-mg .modal-body { padding: clamp(14px, 2vw, 28px); }
.modal-mg .btn-close { position: absolute; top: 14px; right: 14px; z-index: 2; }

/* ---------- 14. Animazioni & reveal --------------------------------------- */
@keyframes mgLine {
  0%, 100% { transform: scaleY(.25); opacity: .4; }
  50% { transform: scaleY(1); opacity: 1; }
}
@keyframes mgBar {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
@keyframes mgMarquee {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-50%, 0, 0); }
}
@keyframes mgZoom {
  from { transform: scale(1.04); opacity: .6; }
  to { transform: scale(1); opacity: 1; }
}
@keyframes mgFadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: none; }
}

[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .9s ease, transform .9s var(--mg-ease);
  will-change: opacity, transform;
}
[data-reveal].is-in { opacity: 1; transform: none; }
[data-reveal][data-reveal-delay="1"] { transition-delay: .1s; }
[data-reveal][data-reveal-delay="2"] { transition-delay: .2s; }
[data-reveal][data-reveal-delay="3"] { transition-delay: .3s; }
[data-reveal][data-reveal-delay="4"] { transition-delay: .4s; }

.no-js [data-reveal] { opacity: 1; transform: none; }

/* ---------- 15. Responsive & accessibilità ------------------------------- */
@media (max-width: 991.98px) {
  .nav-mg,
  .lang-switch,
  .site-header .btn-mg { display: none !important; }
  .nav-toggle { display: flex; }
  :root { --mg-nav-h: 72px; --mg-nav-h-sm: 62px; }
  .brand-txt { font-size: 16px; }
  .brand-txt small { font-size: 13px; }
}

@media (max-width: 767.98px) {
  .hero-grid { padding-top: clamp(20px, 6vw, 40px); }
  .moto-grid { grid-template-columns: 1fr; }
  .hero-caption { flex-direction: column; gap: 4px; align-items: flex-start; }
  .chapter-dl > div { flex-direction: column; gap: 4px; }
  .chapter-dl dd { text-align: left; }
  .spec-list > div { flex-direction: column; gap: 2px; }
  .spec-list dd { text-align: left; }
  .project-hero img { height: clamp(360px, 70vh, 600px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .marquee-track { animation: none !important; }
}

@media print {
  .site-header, .site-footer, .marquee, .scroll-hint { display: none !important; }
  body { background: #fff; }
}

/* ---------- 16. Override indicatori Bootstrap ---------------------------- */
/* Le tab "anno" e i pallini della hero sono indicatori di carosello:
   ripuliamo gli stili di default di Bootstrap mantenendone il comportamento. */
/* Gli indicatori di Bootstrap sono in position:absolute sopra alle slide:
   qui tornano nel flusso normale, sopra al carosello e con i propri margini. */
.year-rail.carousel-indicators,
.hero-dots.carousel-indicators {
  position: relative;
  z-index: 3;
  padding: 0;
  list-style: none;
  justify-content: flex-start;
}
.year-rail.carousel-indicators { margin: 0 0 clamp(26px, 3.4vw, 50px); }
.hero-dots.carousel-indicators { margin: 16px 0 0; }

.year-rail .year-btn,
.hero-dots [data-bs-slide-to] {
  box-sizing: border-box;
  border: 0;
  opacity: 1;
  text-indent: 0;
  background-clip: border-box;
  flex: none;
  transition: color .3s ease, background-color .3s ease;
}
.year-rail .year-btn {
  /* Bootstrap impone width:30px / height:3px agli indicatori: qui lo annulliamo,
     altrimenti la barra collassa e gli anni finiscono sopra alle foto. */
  width: auto;
  height: auto;
  min-width: 0;
  line-height: 1;
  background: none;
  margin: 0;
  padding: 18px 0 17px;
  text-align: center;
}
.hero-dots [data-bs-slide-to] { text-indent: -9999px; margin: 0; width: 34px; height: 2px; }

/* ---------- 17. Correzioni finali ---------------------------------------- */
/* Il bottone del form non deve occupare tutta la colonna della griglia */
.form-mg .form-submit { justify-self: start; }

/* Validazione Bootstrap: teniamo l'estetica minimale (solo filetto inferiore) */
.form-mg.was-validated .form-control:valid,
.form-mg.was-validated .form-control:invalid {
  border: 0;
  border-bottom: 1px solid var(--mg-line-strong);
  background-image: none;
  padding-right: 0;
  box-shadow: none;
}
.form-mg.was-validated .form-control:invalid { border-bottom-color: var(--mg-accent); }
.form-mg.was-validated .form-control:valid { border-bottom-color: var(--mg-line-strong); }

/* La barra di avanzamento della tab/indicatore si ferma col carosello in pausa */
.is-paused .carousel-indicators .active::after { animation-play-state: paused; }
