/* =========================================================
   Quartaroli — Forniture per l'edilizia
   Palette: rosso brand #D6262A, antracite #1C1C1C, bianco
   ========================================================= */

:root {
  --red: #D6262A;
  --red-dark: #A81E22;
  --ink: #1C1C1C;
  --ink-soft: #4A4A4A;
  --grey-bg: #F5F4F2;
  --white: #FFFFFF;
  --border: #E4E2DF;
  --header-dark: #33312E;

  --header-h: 104px;
  --container-w: 1240px;

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

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }

ul { list-style: none; }

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 32px;
}

h1, h2, h3, h4 {
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

/* ---------- Fade-in on scroll ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
   HERO LOGO — standalone, centered, visible only at page top
   ========================================================= */
.hero-logo {
  position: fixed;
  top: 28px;
  left: 50%;
  z-index: 700;
  display: flex;
  align-items: center;
  height: 130px;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.hero-logo.is-hidden {
  opacity: 0;
  transform: translateX(-50%) translateY(-16px);
  pointer-events: none;
}
.hero-logo img { height: 100%; width: auto; object-fit: contain; }

/* =========================================================
   HEADER — hidden until the user scrolls
   ========================================================= */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  height: var(--header-h);
  background: transparent;
  opacity: 0;
  transform: translateY(-12px);
  pointer-events: none;
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), background 0.35s var(--ease), box-shadow 0.35s var(--ease), height 0.35s var(--ease);
}

.site-header.scrolled {
  background: rgba(51, 49, 46, 0.97);
  backdrop-filter: blur(8px);
  box-shadow: 0 24px 48px -24px rgba(0,0,0,0.45), 0 2px 0 rgba(0,0,0,0.15);
  height: 92px;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.header-inner {
  max-width: var(--container-w);
  margin: 0 auto;
  height: 100%;
  padding: 0 32px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-logo {
  position: absolute;
  left: 32px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  height: 62px;
}
.header-logo img { height: 100%; width: auto; object-fit: contain; }

.main-nav ul {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
}

.main-nav a {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--white);
  position: relative;
  padding: 6px 0;
}

.main-nav a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0;
  height: 2px;
  background: var(--red);
  transition: width 0.3s var(--ease);
}

.main-nav a:hover::after { width: 100%; }

.main-nav a.nav-cta {
  background: var(--red);
  color: var(--white);
  padding: 10px 20px;
  border-radius: 2px;
  transition: background 0.25s var(--ease);
}
.main-nav a.nav-cta::after { display: none; }
.main-nav a.nav-cta:hover { background: var(--red-dark); }

.nav-toggle {
  display: none;
  position: absolute;
  right: 32px;
  top: 50%;
  transform: translateY(-50%);
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
}
.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--white);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  height: 100vh;
  min-height: 560px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,10,10,0.55) 0%, rgba(10,10,10,0.35) 45%, rgba(10,10,10,0.65) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 32px;
  color: var(--white);
  text-align: center;
}

.hero h1 {
  font-size: clamp(2.2rem, 5.5vw, 4.2rem);
  max-width: 30ch;
  margin: 0 auto 20px;
  text-wrap: balance;
}

.hero-sub {
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  max-width: 46ch;
  font-weight: 400;
  color: rgba(255,255,255,0.9);
  margin: 0 auto 36px;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 15px 30px;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 2px;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.btn-primary {
  background: var(--red);
  color: var(--white);
}
.btn-primary:hover { background: var(--red-dark); }

.btn-ghost {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,0.7);
}
.btn-ghost:hover {
  background: var(--white);
  color: var(--ink);
  border-color: var(--white);
}

.scroll-cue {
  position: absolute;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  width: 30px;
  height: 46px;
  border: 1.5px solid rgba(255,255,255,0.7);
  border-radius: 20px;
}
.scroll-cue span {
  position: absolute;
  top: 8px; left: 50%;
  width: 4px; height: 4px;
  margin-left: -2px;
  background: var(--white);
  border-radius: 50%;
  animation: scroll-cue-move 1.8s infinite;
}
@keyframes scroll-cue-move {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(16px); opacity: 0; }
  100% { opacity: 0; }
}

/* Indicatore di scorrimento nella sezione Azienda: versione scura (sfondo bianco),
   opacità pilotata da JS in base al progresso dello scroll. */
.scroll-cue--dark {
  z-index: 3;
  border-color: rgba(28,28,28,0.45);
  pointer-events: none;
  transition: opacity 0.35s var(--ease);
}
.scroll-cue--dark span { background: var(--ink); }

/* =========================================================
   SECTIONS — shared
   ========================================================= */
.section { padding: 110px 0; }
.section-alt { background: var(--grey-bg); }

.section-heading {
  max-width: 640px;
  margin: 0 auto 56px;
  text-align: center;
}

.kicker {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--red);
  margin-bottom: 2px;
  padding-bottom: 12px;
  position: relative;
  display: inline-block;
}
.kicker::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--red);
  transform: translateX(-50%);
  transition: width 0.7s var(--ease) 0.15s;
}
.is-visible .kicker::after {
  width: 36px;
}

.section-heading h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.5rem);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink);
  border-bottom: 1.5px solid var(--ink);
  padding-bottom: 2px;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease), gap 0.25s var(--ease);
  gap: 6px;
}
.link-arrow::after {
  content: '\2192';
  transition: transform 0.25s var(--ease);
}
.link-arrow:hover {
  color: var(--red);
  border-color: var(--red);
}
.link-arrow:hover::after { transform: translateX(4px); }

/* ---------- Azienda: pinned scroll section ---------- */
.pin-section {
  position: relative;
  height: 220vh;
}
.pin-track {
  position: sticky;
  top: 0;
  height: 100vh;
  min-height: 560px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--white);
}
.pin-track .container { width: 100%; }

/* ---------- Azienda: stage — immagine e testo assoluti, sovrapponibili ---------- */
.azienda-stage {
  position: relative;
  width: 100%;
  height: clamp(440px, 62vh, 620px);
}

.azienda-media {
  position: absolute;
  left: 54%;
  top: 13%;
  width: 46%;
  height: 74%;
  z-index: 1;
  overflow: hidden;
  border-radius: 2px;
  box-shadow: 0 30px 60px -28px rgba(28,28,28,0.28);
  opacity: 0;
  transform: scale(0.97);
  will-change: transform, opacity;
}
.azienda-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.azienda-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(255deg, rgba(15,13,12,0) 35%, rgba(15,13,12,0.55) 62%, rgba(15,13,12,0.88) 100%),
    linear-gradient(180deg, rgba(15,13,12,0) 55%, rgba(15,13,12,0.4) 100%);
  opacity: 0;
}

.azienda-text {
  position: absolute;
  left: 0;
  top: 34%;
  width: 40%;
  z-index: 2;
  isolation: isolate;
  opacity: 0;
  will-change: opacity;
}
/* Alone scuro sfumato dietro al testo: garantisce leggibilità del bianco
   qualunque sia la porzione di immagine (legno chiaro/scuro) alle spalle. */
.azienda-text::before {
  content: '';
  position: absolute;
  inset: -30px -40px -34px -34px;
  z-index: -1;
  background: radial-gradient(130% 120% at 28% 50%, rgba(10,9,8,0.78) 0%, rgba(10,9,8,0.5) 45%, rgba(10,9,8,0) 78%);
  border-radius: 10px;
  pointer-events: none;
}
.azienda-text h2 {
  color: var(--ink);
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  margin-bottom: 22px;
}
.azienda-text .editorial-cta {
  margin-bottom: 24px;
}
.azienda-text p:not(.kicker) {
  color: var(--ink-soft);
  font-size: 1rem;
  margin-bottom: 0;
  max-width: 46ch;
}

/* ---------- Product cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.product-card {
  background: var(--white);
  border: 1px solid var(--border);
  box-shadow: 0 0 0 rgba(28,28,28,0);
  transition: opacity 0.8s var(--ease), transform 0.5s var(--ease), box-shadow 0.9s var(--ease) 0.05s;
}
.product-card.is-visible {
  box-shadow: 0 26px 52px -28px rgba(28,28,28,0.22);
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 56px -20px rgba(28,28,28,0.28);
}

.product-card-media {
  height: 240px;
  overflow: hidden;
}
.product-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}
.product-card:hover .product-card-media img { transform: scale(1.06); }

/* Ritocchi inquadratura/tono di singole foto prodotto */
.product-card-media img.pc-up { object-position: center 8%; }
.product-card-media img.pc-dim { filter: brightness(0.86) saturate(1.04); }

.product-card-body { padding: 30px 28px 34px; }
.product-card-body h3 {
  font-size: 1.3rem;
  margin-bottom: 12px;
}
.product-card-body p {
  color: var(--ink-soft);
  font-size: 0.98rem;
  margin-bottom: 22px;
}

/* Intera card cliccabile (stretched link): un click ovunque sulla box
   apre la pagina collegata, senza dover centrare "Scopri di più". */
.card-grid .product-card { position: relative; cursor: pointer; }
.card-grid .product-card .link-arrow::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
}
/* Al passaggio del mouse sull'intera card, evidenzia anche "Scopri di più". */
.card-grid .product-card:hover .link-arrow {
  color: var(--red);
  border-color: var(--red);
}
.card-grid .product-card:hover .link-arrow::after { transform: translateX(4px); }

/* =========================================================
   GALLERY
   ========================================================= */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 260px;
  gap: 6px;
  padding: 0 6px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  grid-column: span 2;
  box-shadow: 0 0 0 rgba(0,0,0,0);
  transition: box-shadow 0.9s var(--ease);
}
.gallery-item:nth-child(1) { grid-column: span 4; }
.gallery-item:nth-child(2) { grid-column: span 2; }
.gallery-item:nth-child(3) { grid-column: span 2; }
.gallery-item:nth-child(4) { grid-column: span 2; }
.gallery-item:nth-child(5) { grid-column: span 2; }

.gallery-grid.is-visible .gallery-item {
  box-shadow: 0 24px 44px -24px rgba(0,0,0,0.35);
}
.gallery-grid.is-visible .gallery-item:nth-child(2) { transition-delay: 0.08s; }
.gallery-grid.is-visible .gallery-item:nth-child(3) { transition-delay: 0.16s; }
.gallery-grid.is-visible .gallery-item:nth-child(4) { transition-delay: 0.24s; }
.gallery-grid.is-visible .gallery-item:nth-child(5) { transition-delay: 0.32s; }

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.gallery-item:hover img { transform: scale(1.08); }

.gallery-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,0.6) 100%);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}
.gallery-item:hover::before { opacity: 1; }

.gallery-caption {
  position: absolute;
  left: 20px;
  bottom: -30px;
  color: var(--white);
  font-weight: 700;
  font-size: 1rem;
  opacity: 0;
  transition: opacity 0.35s var(--ease), bottom 0.35s var(--ease);
}
.gallery-item:hover .gallery-caption {
  opacity: 1;
  bottom: 20px;
}

/* =========================================================
   STATS
   ========================================================= */
.stats-band {
  background: var(--ink);
  color: var(--white);
  padding: 90px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  text-align: center;
}

.stat-number {
  font-size: clamp(2.6rem, 5vw, 3.6rem);
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.02em;
}
.stat-suffix {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--red);
}
.stat-label {
  display: block;
  margin-top: 10px;
  font-size: 0.95rem;
  color: rgba(255,255,255,0.7);
  font-weight: 500;
}

/* =========================================================
   CONTATTI
   ========================================================= */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 72px;
}

.contact-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 28px;
}

.contact-card {
  padding: 22px 22px 24px;
  border-radius: 4px;
}
.contact-card h3 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}
.contact-card p { font-size: 0.98rem; line-height: 1.45; }
.contact-card a:hover { text-decoration: underline; }

.contact-card--light {
  background: var(--white);
  border: 1px solid var(--border);
}
.contact-card--light h3 { color: var(--red); }
.contact-card--light p { color: var(--ink-soft); }
.contact-card--light a { color: var(--ink); }

.contact-card--tint {
  background: var(--grey-bg);
}
.contact-card--tint h3 { color: var(--red); }
.contact-card--tint p { color: var(--ink-soft); }
.contact-card--tint a { color: var(--ink); }

.contact-card--dark {
  background: var(--header-dark);
}
.contact-card--dark h3 { color: rgba(255,255,255,0.65); }
.contact-card--dark p, .contact-card--dark a { color: var(--white); }

.contact-card--red {
  background: rgba(214, 38, 42, 0.08);
}
.contact-card--red h3 { color: var(--red); }
.contact-card--red p { color: var(--ink); }

.contact-map {
  margin-top: 8px;
}
.contact-map iframe {
  display: block;
  width: 100%;
  border-radius: 2px;
  filter: grayscale(15%);
}
.contact-map .map-link {
  margin-top: 14px;
}

/* Home: solo recapiti + mappa affiancata (il modulo vive nella pagina Contatti).
   Le due colonne si allungano insieme, così la mappa chiude alla stessa
   altezza del blocco di schede. */
.contact-grid--map {
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: stretch;
}
.contact-grid--map .contact-cards { margin-bottom: 0; }
.contact-grid--map .contact-map {
  margin-top: 0;
  display: flex;
  flex-direction: column;
}
.contact-grid--map .contact-map iframe {
  flex: 1;
  min-height: 260px;
  height: auto;
}

.contact-form {
  background: var(--grey-bg);
  padding: 40px;
  border-radius: 2px;
  box-shadow: 0 0 0 rgba(28,28,28,0);
  transition: box-shadow 1s var(--ease) 0.15s;
}
.contact-grid.is-visible .contact-form {
  box-shadow: 0 36px 64px -32px rgba(28,28,28,0.22);
}

.form-row { margin-bottom: 22px; }
.form-row label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.form-row input,
.form-row textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--border);
  background: var(--white);
  font-family: inherit;
  font-size: 0.98rem;
  color: var(--ink);
  border-radius: 2px;
  transition: border-color 0.25s var(--ease);
}
.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--red);
}
.form-row textarea { resize: vertical; }

.form-note {
  margin-top: 16px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--red);
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,0.75);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr;
  gap: 40px;
  padding: 80px 32px 60px;
}

.footer-brand .footer-logo {
  height: 64px;
  width: auto;
  margin-bottom: 20px;
}
.footer-brand p { font-size: 0.92rem; max-width: 32ch; }

.footer-col h4 {
  color: var(--white);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
}

.footer-col ul li { margin-bottom: 12px; }
.footer-col a {
  font-size: 0.94rem;
  transition: color 0.25s var(--ease);
}
.footer-col a:hover { color: var(--white); }

/* Link con icona (telefono, email, Instagram) */
.footer-icon-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.footer-icon-link .fi {
  flex: 0 0 auto;
  opacity: 0.85;
  transition: opacity 0.25s var(--ease);
}
.footer-icon-link:hover .fi { opacity: 1; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
}
.footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 24px 32px;
  font-size: 0.85rem;
}
.legal-links { display: flex; gap: 20px; }

/* =========================================================
   BANNER CONSENSO COOKIE (GDPR)
   ========================================================= */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1200;
  display: flex;
  justify-content: center;
  padding: 16px;
  transform: translateY(130%);
  transition: transform 0.4s var(--ease);
  pointer-events: none;
}
.cookie-banner.is-visible { transform: translateY(0); }
.cookie-banner[hidden] { display: none; }

.cookie-inner {
  pointer-events: auto;
  width: 100%;
  max-width: 1080px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 22px 54px -16px rgba(28,28,28,0.4);
  padding: 20px 26px;
}
.cookie-text { flex: 1 1 340px; }
.cookie-text p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--ink-soft);
}
.cookie-text strong { color: var(--ink); }
.cookie-text a {
  color: var(--red);
  font-weight: 600;
  text-decoration: underline;
}
.cookie-actions {
  display: flex;
  gap: 12px;
  flex: 0 0 auto;
}
.cookie-btn {
  padding: 12px 22px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.92rem;
  white-space: nowrap;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.cookie-btn--accept { background: var(--red); color: var(--white); }
.cookie-btn--accept:hover { background: var(--red-dark); }
.cookie-btn--ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--border);
}
.cookie-btn--ghost:hover { border-color: var(--ink); }

@media (max-width: 640px) {
  .cookie-inner { flex-direction: column; align-items: stretch; gap: 16px; padding: 18px; }
  .cookie-actions { justify-content: stretch; }
  .cookie-btn { flex: 1; text-align: center; }
}

/* =========================================================
   LIGHTBOX
   ========================================================= */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(10,10,10,0.94);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 60px 20px;
}
.lightbox.is-open { display: flex; }

.lightbox-img {
  max-width: min(1100px, 90vw);
  max-height: 76vh;
  object-fit: contain;
  border-radius: 2px;
}

.lightbox-caption {
  color: var(--white);
  margin-top: 18px;
  font-size: 1rem;
  font-weight: 600;
}

.lightbox-close {
  position: absolute;
  top: 24px; right: 32px;
  font-size: 2.2rem;
  color: var(--white);
  line-height: 1;
}
.lightbox-close:hover { color: var(--red); }

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 3rem;
  color: var(--white);
  padding: 10px 16px;
  line-height: 1;
}
.lightbox-nav:hover { color: var(--red); }
.lightbox-prev { left: 12px; }
.lightbox-next { right: 12px; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 900px) {
  .hero-logo { height: 96px; top: 20px; }

  /* Pinning disattivato su tablet/mobile: torna a una sezione normale in flusso, immagine e testo impilati */
  .pin-section { height: auto; }
  .pin-track {
    position: static;
    height: auto;
    padding: 90px 0;
    overflow: visible;
  }
  .azienda-stage {
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 32px;
  }
  .azienda-media {
    position: static;
    width: 100% !important;
    height: 320px !important;
    opacity: 1 !important;
    transform: none !important;
    box-shadow: 0 30px 60px -30px rgba(28,28,28,0.25) !important;
  }
  .azienda-scrim { display: none !important; }
  .azienda-text {
    position: static;
    width: 100% !important;
    opacity: 1 !important;
  }
  .azienda-text::before { display: none !important; }
  .azienda-text h2 { color: var(--ink) !important; text-shadow: none !important; }
  .azienda-text p { color: var(--ink-soft) !important; text-shadow: none !important; }

  .contact-grid { grid-template-columns: 1fr; gap: 40px; }

  .card-grid { grid-template-columns: 1fr; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 40px 24px; }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    padding: 60px 32px 40px;
  }
  .footer-brand { grid-column: span 2; }

  .gallery-grid { grid-auto-rows: 220px; }
}

@media (max-width: 720px) {
  :root { --header-h: 68px; }

  .hero-logo { height: 56px; top: 14px; }

  .contact-cards { grid-template-columns: 1fr; }

  .site-header.scrolled { height: 68px; }
  .header-logo { left: 20px; height: 42px; }

  .nav-toggle { display: flex; }

  .main-nav {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    background: var(--white);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s var(--ease);
  }
  .main-nav.is-open { max-height: 400px; }
  .main-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 32px 24px;
  }
  .main-nav ul li { width: 100%; border-bottom: 1px solid var(--border); }
  .main-nav a { display: block; padding: 16px 0; color: var(--ink); }
  .main-nav a.nav-cta { display: inline-block; margin-top: 14px; color: var(--white); }

  .section { padding: 72px 0; }

  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 200px; }
  .gallery-item,
  .gallery-item:nth-child(1),
  .gallery-item:nth-child(2),
  .gallery-item:nth-child(3),
  .gallery-item:nth-child(4),
  .gallery-item:nth-child(5) { grid-column: span 1; }

  .stats-grid { grid-template-columns: 1fr; gap: 32px; }

  .footer-grid { grid-template-columns: 1fr; }
  .footer-brand { grid-column: span 1; }

  .contact-form { padding: 28px 24px; }

  .lightbox-nav { font-size: 2.2rem; padding: 8px 10px; }
}

/* =========================================================
   PAGINE INTERNE (Legname, Attrezzature, Elettroutensili, Eventi, Chi Siamo)
   Header sempre visibile (non nascosto come in homepage). Contenuto placeholder.
   ========================================================= */
body.page-sub .site-header {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  background: rgba(51, 49, 46, 0.97);
  backdrop-filter: blur(8px);
  box-shadow: 0 24px 48px -24px rgba(0,0,0,0.45), 0 2px 0 rgba(0,0,0,0.15);
  height: 92px;
}

.subpage-hero {
  padding: 152px 0 64px; /* spazio per l'header fisso */
  background: var(--grey-bg);
  border-bottom: 1px solid var(--border);
}
.subpage-hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 14px;
}
.subpage-hero p {
  color: var(--ink-soft);
  font-size: 1.05rem;
  max-width: 60ch;
}

.subpage-body {
  padding: 72px 0 110px;
  min-height: 34vh;
}
.subpage-placeholder {
  color: var(--ink-soft);
  font-size: 1.02rem;
  max-width: 62ch;
}
.back-home {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 28px;
  font-weight: 700;
  color: var(--red);
}
.back-home:hover { text-decoration: underline; }

/* =========================================================
   VETRINA PRODOTTI (e-commerce showroom)
   ========================================================= */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-bottom: 56px;
}

.product-card {
  /* accento uniforme (colore del brand) per tutte le card */
  --accent: var(--red);
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: 14px;
  overflow: hidden;
  transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease), border-color 0.3s var(--ease);
}
.product-card:hover {
  box-shadow: 0 18px 40px rgba(28,28,28,0.10);
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
  border-top-color: var(--accent);
}

.product-media {
  position: relative;
  aspect-ratio: 1 / 1;
  /* colore chiaro uniforme per tutte le caselle */
  background: var(--grey-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.product-media img {
  max-width: 82%;
  max-height: 82%;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform 0.4s var(--ease);
}
.product-card:hover .product-media img { transform: scale(1.04); }

/* Pulsante/indicatore specifiche (freccia) */
.spec-toggle {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 4px 12px rgba(28,28,28,0.14);
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.3s var(--ease);
  z-index: 2;
}
.spec-toggle:hover { background: var(--accent); color: var(--white); }
.spec-toggle svg { transition: transform 0.3s var(--ease); }

/* Overlay specifiche: compare al passaggio del mouse sulla foto */
.product-specs {
  position: absolute;
  inset: 0;
  background: rgba(28,28,28,0.9);
  color: var(--white);
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0.3s var(--ease);
  z-index: 1;
}
.product-media:hover .product-specs,
.product-card.is-open .product-specs {
  opacity: 1;
  visibility: visible;
}
.product-card.is-open .spec-toggle svg { transform: rotate(180deg); }

.spec-title {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: color-mix(in srgb, var(--accent) 62%, white);
  font-weight: 700;
  margin-bottom: 14px;
}
.product-specs ul { display: flex; flex-direction: column; gap: 10px; }
.product-specs li {
  position: relative;
  padding-left: 18px;
  font-size: 0.92rem;
  line-height: 1.35;
}
.product-specs li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 62%, white);
}

.product-info { padding: 18px 20px 22px; }
.product-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  text-align: center;
}

@media (max-width: 900px) {
  .shop-grid { grid-template-columns: repeat(2, 1fr); gap: 22px; }
}
@media (max-width: 560px) {
  .shop-grid { grid-template-columns: 1fr; max-width: 380px; margin-left: auto; margin-right: auto; }
}

@media (max-width: 720px) {
  body.page-sub .site-header { height: 68px; }
  .subpage-hero { padding: 108px 0 48px; }
}

/* =========================================================
   CHI SIAMO — Storia (design storico/vintage)
   ========================================================= */
.storia .kicker::after { width: 36px; }   /* accento rosso sempre visibile in pagina */

/* ---- Hero storia: testo centrato sopra le due foto sovrapposte ---- */
.storia-hero {
  position: relative;
  overflow: hidden;
  padding: 150px 0 120px;
  background:
    radial-gradient(120% 80% at 50% -10%, #fbf7ef 0%, #f2ead9 55%, #ece0c9 100%);
  border-bottom: 1px solid rgba(120,90,50,0.18);
}
.storia-year {
  position: absolute;
  top: 84px;
  right: -10px;
  font-size: clamp(9rem, 26vw, 24rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: rgba(120, 60, 35, 0.055);
  pointer-events: none;
  z-index: 0;
}
.storia-intro {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}
.storia-intro .kicker { color: var(--red); }
.storia-intro h1 {
  font-size: clamp(2.1rem, 4.4vw, 3.2rem);
  margin: 6px auto 22px;
}
.storia-intro p {
  color: #5b4a35;
  font-size: 1.06rem;
  line-height: 1.7;
  max-width: 62ch;
  margin: 0 auto 16px;
}
.storia-intro strong { color: #3a2c18; font-weight: 700; }

/* ---- Galleria storica: due foto incorniciate e sovrapposte ---- */
.storia-gallery {
  position: relative;
  z-index: 1;
  max-width: 880px;
  margin: 70px auto 0;
  min-height: 360px;
}
.storia-photo {
  background: #fdfbf5;
  padding: 12px 12px 40px;
  border: 1px solid rgba(120,90,50,0.22);
  border-radius: 2px;
  box-shadow:
    0 34px 60px -26px rgba(58,38,18,0.55),
    0 10px 22px -12px rgba(0,0,0,0.35);
}
.storia-photo img {
  display: block;
  width: 100%;
  height: auto;
  filter: sepia(0.45) saturate(0.88) contrast(1.03) brightness(0.98);
}
.storia-photo--back {
  position: relative;
  z-index: 1;
  width: 64%;
  transform: rotate(-2.5deg);
}
.storia-photo--front {
  position: absolute;
  right: 0;
  top: 30%;
  z-index: 2;
  width: 50%;
  transform: rotate(2.5deg);
}
.storia-photo::after {
  /* leggera patina calda da vecchia fotografia */
  content: '';
  position: absolute;
  inset: 12px 12px 40px;
  background: linear-gradient(160deg, rgba(255,240,210,0.12), rgba(80,50,20,0.14));
  pointer-events: none;
  mix-blend-mode: multiply;
}

/* ---- Sezioni contenuto (Valori / Cosa facciamo / Sede) ---- */
.storia-section { padding: 96px 0; }
.storia-section--alt { background: #f7f2e9; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-lead {
  margin: 16px auto 0;
  max-width: 60ch;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.valori-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.valore-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 3px solid var(--red);
  border-radius: 3px;
  padding: 26px 24px 28px;
  box-shadow: 0 18px 36px -26px rgba(28,28,28,0.35);
}
.valore-card h3 {
  font-size: 1.12rem;
  margin-bottom: 10px;
}
.valore-card p {
  color: var(--ink-soft);
  font-size: 0.96rem;
  line-height: 1.55;
}

/* ---- Sede + claim di chiusura ---- */
.sede-block {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
}
.sede-block .kicker { display: inline-block; }
.sede-text {
  color: var(--ink-soft);
  font-size: 1.08rem;
  line-height: 1.7;
  margin: 4px auto 34px;
  max-width: 60ch;
}
.storia-claim {
  font-size: clamp(1.3rem, 2.6vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--ink);
  max-width: 20ch;
  margin: 0 auto;
  padding: 28px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.storia-claim + .back-home { margin-top: 34px; }

@media (max-width: 900px) {
  .valori-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .storia-hero { padding: 118px 0 80px; }
  .storia-gallery { min-height: 0; margin-top: 48px; }
  .storia-photo--back { width: 82%; transform: rotate(-2deg); }
  .storia-photo--front {
    position: relative;
    right: auto; top: auto;
    width: 74%;
    margin: -26px 0 0 auto;
    transform: rotate(2deg);
  }
  .valori-grid { grid-template-columns: 1fr; }
}

/* =========================================================
   EVENTI — sezione unica (no scroll pagina) con carosello
   orizzontale scorrevole, stile "Our Global Presence".
   ========================================================= */
/* L'hero eventi riempie il primo schermo; il footer resta raggiungibile scorrendo. */
.eventi-hero {
  height: 100vh;
  min-height: 600px;
  box-sizing: border-box;
  padding: 118px 0 46px;                         /* margine bianco sotto l'header e sopra il footer */
  display: grid;
  grid-template-columns: minmax(300px, 34%) 1fr;
  overflow: hidden;
  background: var(--white);
}

.eventi-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 clamp(24px, 4vw, 72px);
  border-right: 1px solid var(--border);
}
.eventi-left .kicker { color: var(--red); }
.eventi-left h1 {
  font-size: clamp(2.1rem, 4.2vw, 3.6rem);
  color: var(--ink);
  margin: 8px 0 18px;
}
.eventi-sub {
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 40ch;
}

.eventi-carousel {
  position: relative;
  overflow: hidden;
}

/* Comando drag/frecce, centrato in alto sul carosello */
.eventi-drag {
  position: absolute;
  top: 26px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(20,18,16,0.72);
  backdrop-filter: blur(6px);
  border-radius: 40px;
  padding: 6px 8px;
  box-shadow: 0 12px 30px -14px rgba(0,0,0,0.6);
}
.eventi-arrow {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--white);
  font-size: 1.35rem;
  line-height: 1;
  border-radius: 50%;
  transition: background 0.2s var(--ease);
}
.eventi-arrow:hover { background: rgba(255,255,255,0.16); }
.eventi-hand { font-size: 1.15rem; padding: 0 6px; }

/* Traccia scorrevole orizzontale */
.eventi-track {
  display: flex;
  gap: 6px;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
  cursor: grab;
}
.eventi-track::-webkit-scrollbar { display: none; }
.eventi-track.is-dragging { cursor: grabbing; scroll-behavior: auto; }

/* Card evento */
.evento-card {
  position: relative;
  flex: 0 0 clamp(300px, 27vw, 410px);
  height: 100%;
  overflow: hidden;
  background: #14110f;
  user-select: none;
}
.evento-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-user-drag: none;
}
.evento-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 42%, rgba(0,0,0,0.86) 100%);
}
.evento-info {
  position: absolute;
  left: 30px;
  right: 30px;
  bottom: 40px;
  z-index: 2;
  color: var(--white);
}
.evento-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #ff6b6e;
  margin-bottom: 12px;
}
.evento-name {
  font-size: 1.5rem;
  line-height: 1.15;
  margin-bottom: 12px;
  padding-bottom: 14px;
  position: relative;
}
.evento-name::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 38px;
  height: 3px;
  background: var(--red);
}
.evento-meta {
  font-size: 0.92rem;
  line-height: 1.45;
  color: rgba(255,255,255,0.82);
}

/* Card "in arrivo" (slot per eventi futuri) */
.evento-card--soon {
  display: flex;
  align-items: flex-end;
  background:
    radial-gradient(120% 80% at 80% 0%, rgba(214,38,42,0.28), rgba(214,38,42,0) 60%),
    linear-gradient(160deg, #2b2724 0%, #17140f 100%);
}
.evento-card--soon .evento-info {
  position: static;
  margin: 0 30px 40px;
}
.evento-card--soon .evento-name { color: rgba(255,255,255,0.9); }

@media (max-width: 900px) {
  .eventi-hero {
    height: auto;
    min-height: 0;
    grid-template-columns: 1fr;
  }
  .eventi-left {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 34px clamp(20px, 6vw, 40px) 30px;
  }
  .eventi-carousel { height: 70vh; min-height: 460px; }
}

@media (max-width: 720px) {
  .eventi-hero { padding-top: 68px; }
  .evento-card { flex-basis: 82%; }
  .eventi-carousel { height: 64vh; min-height: 420px; }
}

/* =========================================================
   EVENTI — titolo più accattivante / "live"
   ========================================================= */
.kicker--live {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--red);
  position: relative;
  flex: 0 0 auto;
}
.live-dot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--red);
  animation: live-pulse 1.8s ease-out infinite;
}
@keyframes live-pulse {
  0%   { transform: scale(1);   opacity: 0.7; }
  70%  { transform: scale(3.4); opacity: 0; }
  100% { transform: scale(3.4); opacity: 0; }
}

.eventi-title { position: relative; }
.ev-accent {
  position: relative;
  display: inline-block;
  background: linear-gradient(100deg, var(--red) 0%, #ff5a4d 30%, #ffb199 45%, var(--red) 62%, var(--red-dark) 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--red);                 /* fallback */
  animation: ev-sheen 4.5s ease-in-out infinite;
}
.ev-accent::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -0.12em;
  height: 5px;
  width: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--red), #ff7a5c);
  transform: scaleX(0);
  transform-origin: left center;
  animation: ev-underline 2.4s var(--ease) 0.3s forwards;
}
@keyframes ev-sheen {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}
@keyframes ev-underline {
  to { transform: scaleX(1); }
}

@media (prefers-reduced-motion: reduce) {
  .live-dot::after,
  .ev-accent,
  .ev-accent::after { animation: none; }
  .ev-accent::after { transform: scaleX(1); }
}

/* =========================================================
   EVENTO — card cliccabile + galleria a "tendina"
   ========================================================= */
.evento-card--has-gallery { cursor: pointer; }
.evento-card--has-gallery img { transition: transform 0.6s var(--ease); }
.evento-card--has-gallery:hover img { transform: scale(1.05); }
.evento-card--has-gallery:focus-visible { outline: 3px solid var(--red); outline-offset: -3px; }

.evento-gallery-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(0,0,0,0.5);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
}
.evento-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 16px;
  font-weight: 700;
  font-size: 0.92rem;
  color: #fff;
  transition: gap 0.25s var(--ease);
}
.evento-card--has-gallery:hover .evento-cta { gap: 12px; }

/* Overlay + tendina */
.ev-gallery {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}
.ev-gallery[hidden] { display: none; }
body.ev-gallery-lock { overflow: hidden; }

.ev-gallery-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15,13,12,0.74);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  opacity: 0;
  transition: opacity 0.45s var(--ease);
}
.ev-gallery.is-open .ev-gallery-backdrop { opacity: 1; }

/* La "tendina" che scende dall'alto */
.ev-gallery-sheet {
  position: relative;
  width: min(1080px, 94vw);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-radius: 0 0 20px 20px;
  box-shadow: 0 46px 90px -24px rgba(0,0,0,0.55);
  overflow: hidden;
  transform: translateY(-102%);
  transition: transform 0.6s var(--ease);
  will-change: transform;
}
.ev-gallery.is-open .ev-gallery-sheet { transform: translateY(0); }

.ev-gallery-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 26px;
  border-bottom: 1px solid var(--border);
  flex: 0 0 auto;
}
.ev-gallery-heading .evento-tag { margin-bottom: 6px; color: var(--red); }
.ev-gallery-heading h3 { font-size: 1.35rem; color: var(--ink); }
.ev-gallery-close {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.9rem;
  line-height: 1;
  color: var(--ink);
  background: var(--grey-bg);
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}
.ev-gallery-close:hover { background: var(--red); color: #fff; transform: rotate(90deg); }

.ev-gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  padding: 22px 26px 30px;
  overflow-y: auto;
}
.ev-shot {
  margin: 0;
  overflow: hidden;
  border-radius: 12px;
  aspect-ratio: 4 / 3;
  background: var(--grey-bg);
  opacity: 0;
  transform: translateY(26px) scale(0.98);
}
.ev-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.55s var(--ease);
}
.ev-shot:hover img { transform: scale(1.06); }
.ev-gallery.is-open .ev-shot { animation: ev-shot-in 0.6s var(--ease) forwards; }
.ev-gallery.is-open .ev-shot:nth-child(1) { animation-delay: 0.30s; }
.ev-gallery.is-open .ev-shot:nth-child(2) { animation-delay: 0.38s; }
.ev-gallery.is-open .ev-shot:nth-child(3) { animation-delay: 0.46s; }
.ev-gallery.is-open .ev-shot:nth-child(4) { animation-delay: 0.54s; }
@keyframes ev-shot-in { to { opacity: 1; transform: none; } }

@media (max-width: 640px) {
  .ev-gallery-sheet { width: 100vw; max-height: 100vh; border-radius: 0; }
  .ev-gallery-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .ev-gallery-sheet,
  .ev-gallery-backdrop { transition-duration: 0.001s; }
  .ev-gallery.is-open .ev-shot { animation-duration: 0.001s; animation-delay: 0s; }
}

/* =========================================================
   PAGINA CONTATTI (stile Apple: pulita, ariosa)
   ========================================================= */
.contatti-hero {
  padding: 152px 0 10px;              /* clearance header fisso */
  text-align: center;
  position: relative;
  overflow: hidden;
}
.contatti-hero .container { max-width: 900px; position: relative; z-index: 1; }

/* ---- Effetto di sfondo "innovativo" esteso a tutta la pagina ---- */
.contatti-page { position: relative; z-index: 0; }
.contatti-page > section { position: relative; z-index: 1; }

.contatti-fx {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
/* griglia tecnologica sottile, sfumata ai bordi, su tutta la pagina */
.contatti-fx::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(28,28,28,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(28,28,28,0.04) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(90% 70% at 50% 22%, #000 55%, transparent 100%);
          mask-image: radial-gradient(90% 70% at 50% 22%, #000 55%, transparent 100%);
}
/* bagliori morbidi animati (aurora) nei toni del brand, distribuiti in verticale */
.fx-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(78px);
  will-change: transform;
}
.fx-blob--1 {
  width: 480px; height: 480px; left: -7%; top: -60px;
  background: radial-gradient(circle at 30% 30%, rgba(214,38,42,0.40), rgba(214,38,42,0) 70%);
  animation: fx-float-1 17s ease-in-out infinite;
}
.fx-blob--2 {
  width: 420px; height: 420px; right: -6%; top: 20%;
  background: radial-gradient(circle at 50% 50%, rgba(255,138,74,0.32), rgba(255,138,74,0) 70%);
  animation: fx-float-2 21s ease-in-out infinite;
}
.fx-blob--3 {
  width: 380px; height: 380px; left: -5%; top: 56%;
  background: radial-gradient(circle at 50% 50%, rgba(58,110,190,0.18), rgba(58,110,190,0) 70%);
  animation: fx-float-3 24s ease-in-out infinite;
}
.fx-blob--4 {
  width: 440px; height: 440px; right: 4%; bottom: -80px;
  background: radial-gradient(circle at 50% 50%, rgba(214,38,42,0.24), rgba(214,38,42,0) 70%);
  animation: fx-float-2 19s ease-in-out infinite;
}
@keyframes fx-float-1 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(46px,34px) scale(1.08); } }
@keyframes fx-float-2 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-52px,26px) scale(1.06); } }
@keyframes fx-float-3 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(34px,-34px) scale(1.1); } }
@media (prefers-reduced-motion: reduce) {
  .fx-blob { animation: none; }
}
.contatti-title {
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  font-weight: 800;
  margin: 10px 0 22px;
}
.contatti-lead {
  color: var(--ink-soft);
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  line-height: 1.6;
  max-width: 62ch;
  margin: 0 auto;
}

/* ----- Tile contatto rapido ----- */
.ct-tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 54px 0 20px;
}
.ct-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 26px 24px;
  background: var(--grey-bg);
  border: 1px solid transparent;
  border-radius: 20px;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
}
a.ct-tile:hover {
  transform: translateY(-4px);
  background: var(--white);
  border-color: var(--border);
  box-shadow: 0 22px 44px -26px rgba(28,28,28,0.4);
}
.ct-tile-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: var(--white);
  color: var(--red);
  margin-bottom: 12px;
  box-shadow: 0 6px 14px -8px rgba(28,28,28,0.3);
}
a.ct-tile:hover .ct-tile-ico { background: var(--red); color: #fff; }
.ct-tile-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 700;
  color: var(--ink-soft);
}
.ct-tile-value { font-size: 1.15rem; font-weight: 700; color: var(--ink); }
.ct-tile-note { font-size: 0.86rem; color: var(--ink-soft); }

/* ----- Split media + form ----- */
.ct-split {
  position: relative;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 30px;
  margin: 34px 0 110px;
  align-items: start;
}

/* Colonna media (predisposta per la foto) */
.ct-media {
  position: sticky;
  top: 120px;
  z-index: 1;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(160deg, #2b2724 0%, #17140f 100%);
  min-height: 520px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.ct-photo {
  position: absolute;
  inset: 0;
  /* sfondo di riserva finché la foto non è caricata */
  background:
    radial-gradient(120% 80% at 80% 0%, rgba(214,38,42,0.30), rgba(214,38,42,0) 58%),
    linear-gradient(160deg, #2b2724 0%, #17140f 100%);
}
.ct-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ct-media-caption {
  position: relative;
  z-index: 1;
  padding: 28px 30px 30px;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.7) 100%);
  color: #fff;
}
.ct-media-quote { font-size: 1.15rem; font-weight: 600; line-height: 1.4; margin-bottom: 8px; }
.ct-media-by { font-size: 0.85rem; color: rgba(255,255,255,0.7); }

/* Colonna form */
.ct-form-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 40px clamp(24px, 4vw, 46px);
  box-shadow: 0 30px 60px -40px rgba(28,28,28,0.35);
}
.ct-form-title { font-size: clamp(1.5rem, 2.4vw, 2rem); letter-spacing: -0.01em; margin-bottom: 8px; }
.ct-form-sub { color: var(--ink-soft); font-size: 0.98rem; margin-bottom: 30px; }
.ct-form-sub strong { color: var(--ink); }

.ct-field { display: flex; flex-direction: column; margin-bottom: 20px; }
.ct-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.ct-field label { font-size: 0.9rem; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.ct-opt { color: var(--ink-soft); font-weight: 500; }

.ct-field input,
.ct-field textarea,
.ct-field select {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--grey-bg);
  border: 1.5px solid transparent;
  border-radius: 13px;
  padding: 14px 16px;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.ct-field textarea { resize: vertical; min-height: 130px; }
.ct-field input::placeholder,
.ct-field textarea::placeholder { color: #a8a4a0; }
.ct-field input:focus,
.ct-field textarea:focus,
.ct-field select:focus {
  outline: none;
  background: var(--white);
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(214,38,42,0.12);
}

.ct-select-wrap { position: relative; }
.ct-select-wrap select { appearance: none; -webkit-appearance: none; padding-right: 44px; cursor: pointer; }
.ct-select-caret {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-soft);
  pointer-events: none;
}

.ct-consent {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  margin: 6px 0 26px;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--ink-soft);
}
.ct-consent input { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 2px; accent-color: var(--red); }
.ct-consent a { color: var(--red); text-decoration: underline; }

.ct-submit {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 15px 30px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  transition: background 0.25s var(--ease), gap 0.25s var(--ease), transform 0.2s var(--ease);
}
.ct-submit:hover { background: var(--red-dark); gap: 13px; }
.ct-submit:active { transform: scale(0.98); }

.ct-form-status {
  margin-top: 18px;
  font-size: 0.9rem;
  color: var(--ink-soft);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.ct-form-status.is-visible { opacity: 1; }

@media (max-width: 980px) {
  .ct-tiles { grid-template-columns: repeat(2, 1fr); }
  .ct-split { grid-template-columns: 1fr; }
  .ct-media { position: static; min-height: 340px; }
}
@media (max-width: 560px) {
  .ct-tiles { grid-template-columns: 1fr; }
  .ct-row { grid-template-columns: 1fr; gap: 0; }
  .contatti-hero { padding-top: 116px; }
}

/* =========================================================
   AZIENDA — Scrollytelling a scene sovrapposte (stile ASML)
   ========================================================= */
.story { position: relative; background: #0c0a09; }
.story-scene {
  /* --enter: 0 = scena che sta salendo, 1 = scena a pieno schermo
     --leave: 0 = scena in primo piano, 1 = coperta dalla successiva */
  --enter: 1;
  --leave: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  background: #0c0a09;
  /* Ombra "che si diffonde": cresce mentre la scena risale e copre la
     precedente, poi si riassorbe una volta a pieno schermo (effetto ASML). */
  box-shadow:
    0 calc(-16px - 54px * (1 - var(--enter))) calc(40px + 90px * (1 - var(--enter)))
    calc(2px + 14px * (1 - var(--enter))) rgba(0,0,0, calc(0.32 + 0.4 * (1 - var(--enter))));
  will-change: box-shadow;
}
.story-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  /* Messa a fuoco progressiva: la scena entra leggermente ingrandita e
     sfocata, si assesta nitida, poi arretra appena mentre viene coperta. */
  transform: scale(calc(1 + 0.10 * (1 - var(--enter)) + 0.05 * var(--leave)));
  filter: blur(calc(6px * (1 - var(--enter)))) saturate(calc(0.85 + 0.15 * var(--enter)));
  will-change: transform, filter;
}
/* Velo scuro che si intensifica mentre la scena viene coperta: dà profondità
   agli strati sovrapposti, come le transizioni a lastre di ASML. */
.story-scene::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: #080705;
  opacity: calc(0.58 * var(--leave));
}

.story-veil {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,0.30) 0%, rgba(0,0,0,0) 24%, rgba(0,0,0,0) 60%, rgba(0,0,0,0.5) 100%);
}

/* Scritta "nel cielo" — si materializza durante lo scorrimento */
.story-word {
  position: absolute;
  z-index: 2;
  margin: 0;
  color: #fff;
  font-weight: 800;
  /* il tracking si stringe man mano che la scritta si assesta */
  letter-spacing: calc(-0.02em + 0.10em * (1 - var(--enter)));
  line-height: 1.02;
  /* alone che si allarga mentre la scritta entra: profondità sul cielo */
  text-shadow: 0 calc(4px + 16px * (1 - var(--enter))) calc(30px + 50px * (1 - var(--enter))) rgba(0,0,0, calc(0.32 + 0.3 * (1 - var(--enter))));
  opacity: calc(var(--enter) * (1 - var(--leave)));
  transform:
    translateY(calc(46px * (1 - var(--enter)) - 26px * var(--leave)))
    scale(calc(1 - 0.04 * var(--leave)));
  filter: blur(calc(5px * (1 - var(--enter)) + 3px * var(--leave)));
  will-change: transform, opacity, filter;
}

.story-word--tl {
  /* ancorata all'altezza reale dell'header (si adatta anche su mobile),
     con un margine fisso: così l'header non arriva mai quasi a toccarla */
  top: calc(var(--header-h) + 24px);
  left: 6vw;
  text-align: left;
  font-size: clamp(2.6rem, 6.6vw, 6.4rem);
  max-width: 54vw;
}
.story-word--tl span { color: rgba(255,255,255,0.8); font-weight: 700; }

.story-word--tr {
  top: calc(var(--header-h) + 24px);
  right: 6vw;
  text-align: right;
  font-size: clamp(1.9rem, 4.2vw, 4.3rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  max-width: 60vw;
}
.story-word--tr span { color: rgba(255,255,255,0.78); font-weight: 700; }

/* ---- Cromature del testo (palette armonica calda, ancorata al brand) ----
   avorio caldo → rosso Quartaroli → ambra dorata. Sul cielo azzurro danno
   un contrasto complementare che le rende nitide e riconoscibili. */
.grad {
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #fff;                       /* fallback se il clip non è supportato */
  /* Il gradiente è dipinto solo dentro il box: senza questo margine le
     discendenti (g, p) resterebbero tagliate. Il margine negativo annulla
     l'aumento di altezza, così l'interlinea resta identica. */
  padding-bottom: 0.18em;
  margin-bottom: -0.18em;
  /* con il testo trasparente l'ombra va applicata alla forma, non al glifo */
  text-shadow: none;
  filter: drop-shadow(0 6px 20px rgba(0,0,0,0.45));
}
.grad--ivory { background-image: linear-gradient(104deg, #ffffff 0%, #fff1e2 52%, #ffdcc0 100%); }
.grad--red   { background-image: linear-gradient(104deg, #ff9b6f 0%, #ff6a48 46%, #d6262a 100%); }
.grad--amber { background-image: linear-gradient(104deg, #ffdca6 0%, #ffb75f 50%, #ef8a2c 100%); }

/* Scena 2 — tre slogan impilati, uno per riga */
.story-slogans { line-height: 1.04; }
.story-word--tr.story-slogans .sl {
  display: block;
  font-weight: 800;
  /* ingresso a cascata: le righe si assestano una dopo l'altra */
  transform: translateY(calc(var(--sl-rise, 26px) * (1 - var(--enter))));
  will-change: transform;
}
.story-word--tr.story-slogans .sl-1 { --sl-rise: 26px; }
.story-word--tr.story-slogans .sl-2 { --sl-rise: 46px; }
.story-word--tr.story-slogans .sl-3 { --sl-rise: 66px; }
@media (prefers-reduced-motion: reduce) {
  .story-word--tr.story-slogans .sl { transform: none; }
}

/* Scena 1 — invito al magazzino, in basso a destra sul piazzale scuro.
   Stessa cromatura avorio di "Progettazione" ma in corpo secondario, così
   resta chiaramente subordinata ai tre slogan. */
.story-word--br {
  bottom: 23vh;
  right: 6vw;
  text-align: right;
  font-size: clamp(1rem, 1.85vw, 1.75rem);
  font-weight: 700;
  line-height: 1.3;
  max-width: 52vw;
}
/* entra per ultima, dopo la cascata dei tre slogan */
.story-invite .inv {
  display: block;
  transform: translateY(calc(88px * (1 - var(--enter))));
  will-change: transform;
}
@media (prefers-reduced-motion: reduce) {
  .story-invite .inv { transform: none; }
}

/* Scena 3 — pannello richiesta preventivo */
.story-veil--cta {
  background:
    radial-gradient(72% 62% at 50% 52%, rgba(12,10,9,0.74) 0%, rgba(12,10,9,0.32) 62%, rgba(12,10,9,0) 100%),
    linear-gradient(180deg, rgba(12,10,9,0.52) 0%, rgba(12,10,9,0.28) 45%, rgba(12,10,9,0.82) 100%);
}
.story-cta {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  /* entra dal basso e si assesta seguendo lo scorrimento */
  transform: translate(-50%, calc(-50% + 44px * (1 - var(--enter))))
             scale(calc(0.97 + 0.03 * var(--enter)));
  width: min(680px, 88vw);
  text-align: center;
  color: #fff;
  opacity: var(--enter);
  filter: blur(calc(6px * (1 - var(--enter))));
  will-change: transform, opacity, filter;
}
.story-cta .kicker { color: #ff6b6e; display: block; text-align: center; }
.story-cta h2 { font-size: clamp(2rem, 4.6vw, 3.4rem); margin-bottom: 16px; }
.story-cta p {
  color: rgba(255,255,255,0.86);
  font-size: 1.06rem;
  line-height: 1.6;
  max-width: 52ch;
  margin: 0 auto 30px;
}

/* Indicatore di scorrimento (scena 1) */
.story-cue {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  width: 26px;
  height: 42px;
  border: 2px solid rgba(255,255,255,0.65);
  border-radius: 14px;
  /* visibile solo finché la scena è in primo piano: sfuma appena si scorre */
  opacity: calc(var(--enter) * (1 - var(--leave) * 2.6));
}
.story-cue span {
  position: absolute;
  left: 50%;
  top: 8px;
  width: 4px;
  height: 8px;
  border-radius: 2px;
  background: #fff;
  transform: translateX(-50%);
  animation: story-cue 1.6s infinite;
}
@keyframes story-cue {
  0% { opacity: 0; transform: translate(-50%, 0); }
  40% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, 13px); }
}

@media (max-width: 760px) {
  .story-word--tl { max-width: 82vw; font-size: clamp(2rem, 9vw, 3.1rem); top: 13vh; }
  .story-word--tr { max-width: 80vw; font-size: clamp(1.3rem, 5.2vw, 2rem); top: 13vh; }
  .story-word--br { max-width: 84vw; font-size: clamp(0.9rem, 3.5vw, 1.15rem); bottom: 15vh; }
}
@media (prefers-reduced-motion: reduce) {
  .story-scene { box-shadow: 0 -16px 40px 2px rgba(0,0,0,0.4); }
  .story-scene::after { opacity: 0; }
  .story-bg { transform: none; filter: none; }
  .story-word, .story-cta {
    opacity: 1;
    transform: none;
    filter: none;
    letter-spacing: -0.02em;
    text-shadow: 0 4px 30px rgba(0,0,0,0.32);
  }
  .story-cta { transform: translate(-50%, -50%); }
  .story-cue span { animation: none; }
}

/* Texture di sfondo (griglia + aurora) nella sezione Contatti della home */
#contatti.section { position: relative; overflow: hidden; }
#contatti.section > .container { position: relative; z-index: 1; }

/* =========================================================
   ATTREZZATURE E VERNICI
   ========================================================= */

/* --- Sezione 1: striscia orizzontale, foto attaccate come una griglia unica --- */
.strip-section { padding: 72px 0 0; }
.strip-section .section-heading { margin-bottom: 30px; }
.strip-hint {
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.strip {
  display: flex;
  gap: 0;                       /* nessuno spazio: sembrano un'unica immagine */
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grab;
  background: var(--ink);
}
.strip::-webkit-scrollbar { display: none; }
.strip.is-dragging { cursor: grabbing; scroll-behavior: auto; }
.strip img {
  flex: 0 0 auto;
  height: clamp(300px, 44vw, 540px);
  width: auto;
  display: block;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}

/* --- Sezione 2: nome vernice con pallino del colore --- */
.vernice-name {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.color-dot {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--dot, #ccc);
  /* contorno interno: rende visibili anche i colori chiarissimi */
  box-shadow: inset 0 0 0 1px rgba(28,28,28,0.22), 0 1px 3px rgba(28,28,28,0.18);
}
/* "Trasparente": nessun colore, indicato con una barra diagonale */
.color-dot--clear {
  background:
    linear-gradient(135deg,
      transparent 43%, rgba(28,28,28,0.45) 43%,
      rgba(28,28,28,0.45) 57%, transparent 57%),
    #ffffff;
}

@media (max-width: 720px) {
  .strip-section { padding-top: 52px; }
  .strip img { height: clamp(230px, 62vw, 340px); }
}

/* =========================================================
   SCENA CTA — impaginazione in stile Apple
   Titolo fuori dalla card (in alto a sinistra), card arrotondata
   con la foto e, al centro, testo + bottone.
   ========================================================= */
/* Sabbia calda: richiama il legno e stacca dalla sezione Prodotti,
   che usa lo stesso grigio chiaro del resto del sito */
.story-scene--cta { background: #F2EBE0; }

.cta-apple {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
  /* entra assecondando lo scorrimento, come le altre scene */
  opacity: var(--enter);
  transform: translateY(calc(30px * (1 - var(--enter))));
  will-change: transform, opacity;
}
.cta-apple > .container { width: 100%; }

/* Titolo fuori dalla card: sfumato in trasparenza, staccato dall'ovale */
.cta-apple-title {
  font-size: clamp(1.9rem, 4vw, 3.1rem);
  font-weight: 700;
  letter-spacing: -0.032em;
  line-height: 1.05;
  text-align: left;
  /* sale e si stacca: resta a metà tra il bordo della sezione e la card */
  margin: 0 0 clamp(36px, 6.5vh, 76px);
  /* dissolvenza da sinistra a destra + alone morbido = effetto "semi sfuocato" */
  background-image: linear-gradient(96deg,
      rgba(28,28,28,0.74) 0%,
      rgba(28,28,28,0.40) 58%,
      rgba(28,28,28,0.24) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: rgba(28,28,28,0.5);          /* fallback se il clip non è supportato */
  filter: drop-shadow(0 2px 18px rgba(28,28,28,0.12));
  /* il gradiente è dipinto nel box: questo margine evita tagli sulle lettere */
  padding-bottom: 0.14em;
}

/* La "card" arrotondata con dentro la foto */
.cta-card {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  height: clamp(300px, 52vh, 470px);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 24px 60px -30px rgba(28,28,28,0.45);
}
.cta-card-media {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(calc(1 + 0.05 * (1 - var(--enter))));
  transition: transform 0.6s var(--ease);
}
/* velo scuro: rende nitidi testo e bottone sopra la foto */
.cta-card-veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(72% 78% at 50% 50%, rgba(12,10,9,0.62) 0%, rgba(12,10,9,0.34) 60%, rgba(12,10,9,0.2) 100%);
}

/* Contenuto centrato dentro la card */
.cta-card-inner {
  position: relative;
  z-index: 1;
  width: min(620px, 86%);
  text-align: center;
  color: #fff;
}
.cta-card-text {
  font-size: clamp(1.3rem, 2.2vw, 1.85rem);   /* più grande di prima */
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: -0.02em;
  margin: 0 0 26px;
  text-shadow: 0 2px 18px rgba(0,0,0,0.35);
}

/* Bottone a pillola in stile Apple, nel rosso del brand */
.cta-card-btn {
  display: inline-block;
  border-radius: 980px;
  padding: 13px 27px;
  font-size: 1.0625rem;
  font-weight: 400;              /* i CTA Apple non sono in grassetto */
  letter-spacing: -0.01em;
  background: var(--red);
  color: #fff;
  transition: background 0.2s ease, transform 0.2s ease;
}
.cta-card-btn:hover { background: var(--red-dark); }
.cta-card-btn:active { transform: scale(0.98); }

@media (max-width: 720px) {
  .cta-card { height: clamp(280px, 58vh, 400px); border-radius: 22px; }
  .cta-apple-title { margin-bottom: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .cta-apple { transform: none; }
  .cta-card-media { transform: none; }
}

/* =========================================================
   REALIZZAZIONI — texture a righe diagonali dietro la galleria
   ========================================================= */
#realizzazioni { position: relative; }
#realizzazioni::before {
  content: '';
  position: absolute;
  inset: 0;
  /* Righe diagonali disegnate dal browser: stesso angolo (65°) e proporzioni
     dell'originale, ma vettoriali — nitide a qualsiasi dimensione e senza file. */
  background-image: repeating-linear-gradient(
    115deg,
    rgba(28,28,28,1) 0 20px,
    transparent 20px 86px
  );
  opacity: 0.11;                     /* texture, non protagonista */
  pointer-events: none;
}
@media (max-width: 720px) {
  #realizzazioni::before {
    background-image: repeating-linear-gradient(
      115deg,
      rgba(28,28,28,1) 0 12px,
      transparent 12px 52px
    );
  }
}
/* titolo e galleria restano sopra alla texture */
#realizzazioni > .container,
#realizzazioni > .gallery-grid { position: relative; z-index: 1; }

/* =========================================================
   LEGNAME — impaginazione editoriale asimmetrica
   Testo in alto, immagini di formati diversi sfalsate fra loro.
   ========================================================= */
.legno-section { padding: 84px 0 96px; }
.legno-section--tagli { background: var(--grey-bg); }

.edit-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 26px;
  align-items: start;
}

.edit-text h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.9rem);
  letter-spacing: -0.028em;
  line-height: 1.08;
  margin: 6px 0 16px;
}
.edit-text p {
  color: var(--ink-soft);
  font-size: 1.02rem;
  line-height: 1.6;
  max-width: 46ch;
}

.edit-shot {
  position: relative;          /* riferimento per l'immagine */
  margin: 0;
  overflow: hidden;
  border-radius: 22px;
  background: var(--border);
  box-shadow: 0 26px 60px -36px rgba(28,28,28,0.55);
}
/* L'immagine è fuori dal flusso: così non impone la propria altezza
   naturale alle righe della griglia e i riquadri chiudono allineati. */
.edit-shot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.7s var(--ease);
}
.edit-shot:hover img { transform: scale(1.04); }

/* --- Sezione 1: testo in alto a sinistra, foto orizzontale sotto,
       verticale a destra che sale più in alto e scende più in basso --- */
.edit-text--a    { grid-column: 1 / 7;  grid-row: 1; padding-top: 8px; }
.edit-shot--wide { grid-column: 1 / 8;  grid-row: 2; aspect-ratio: 16 / 10; }
.edit-shot--tall { grid-column: 8 / 13; grid-row: 1 / span 2; align-self: stretch; margin-top: 30px; min-height: 0; }

/* --- Sezione 2: testo in alto a destra, tre verticali --- */
.edit-text--b   { grid-column: 8 / 13; grid-row: 1; padding-top: 8px; }
.edit-shot--t1  { grid-column: 1 / 7;  grid-row: 1 / span 2; align-self: stretch; min-height: 0; }
/* le due foto della macchina restano allineate fra loro */
.edit-shot--t2  { grid-column: 7 / 10; grid-row: 2; aspect-ratio: 3 / 4; margin-top: 44px; }
.edit-shot--t3  { grid-column: 10 / 13; grid-row: 2; aspect-ratio: 3 / 4; margin-top: 44px; }

@media (max-width: 900px) {
  .edit-grid { grid-template-columns: repeat(6, 1fr); gap: 18px; }
  .edit-text--a, .edit-text--b { grid-column: 1 / 7; grid-row: auto; }
  .edit-shot--wide { grid-column: 1 / 7; grid-row: auto; }
  .edit-shot--tall { grid-column: 1 / 7; grid-row: auto; margin-top: 0; aspect-ratio: 4 / 5; }
  .edit-shot--t1   { grid-column: 1 / 7; grid-row: auto; aspect-ratio: 4 / 5; }
  .edit-shot--t2   { grid-column: 1 / 4; grid-row: auto; margin-top: 0; }
  .edit-shot--t3   { grid-column: 4 / 7; grid-row: auto; margin-top: 0; }
}

/* =========================================================
   PROMO — sezione "Promo News" (iscrizione via email)
   ========================================================= */
.promo-soon {
  max-width: 720px;
  margin: 0 auto 8px;
  padding: 48px clamp(24px, 5vw, 56px);
  background: var(--grey-bg);
  border: 1px solid var(--border);
  border-radius: 24px;
  text-align: center;
}
.promo-soon-text { margin-bottom: 30px; }
.promo-soon-text .kicker--live { justify-content: center; margin-bottom: 12px; }
.promo-soon-text h2 {
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.promo-soon-text .subpage-placeholder {
  max-width: 54ch;
  margin: 0 auto;
}
.promo-soon-text strong { color: var(--ink); }

.promo-news-form {
  max-width: 440px;
  margin: 0 auto;
  text-align: left;
}
.promo-news-field { margin-bottom: 18px; }
/* La card di sfondo è già grigia (var(--grey-bg)): il campo, che di norma
   condivide quello stesso grigio, ci si confonderebbe finché non viene
   cliccato. Qui resta bianco e con bordo visibile fin da subito. */
.promo-news-field input {
  background: var(--white);
  border-color: var(--border);
  box-shadow: 0 2px 8px rgba(28,28,28,0.06);
}
.promo-news-field input:hover { border-color: #cfcbc6; }
.promo-news-field input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(214,38,42,0.12);
}
.promo-news-form .ct-consent { text-align: left; }
.promo-news-form .ct-submit { width: 100%; justify-content: center; }

@media (max-width: 560px) {
  .promo-soon { padding: 36px 22px; border-radius: 18px; }
}

/* =========================================================
   PROMO — sfondo animato dietro la sezione "Promo News"
   (scoperto a .page-promo: non tocca le altre sottopagine
   che condividono .subpage-body)
   ========================================================= */
.page-promo .subpage-body { position: relative; overflow: hidden; }
.page-promo .subpage-body > .container { position: relative; z-index: 1; }

.promo-fx {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
/* griglia tecnica sottile, sfumata verso i bordi */
.promo-fx::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(28,28,28,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(28,28,28,0.045) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(85% 75% at 50% 40%, #000 45%, transparent 100%);
          mask-image: radial-gradient(85% 75% at 50% 40%, #000 45%, transparent 100%);
}
/* accento a righe diagonali (stesso linguaggio della sezione Realizzazioni),
   confinato a un angolo così non compete con la card del form */
.promo-fx::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    115deg,
    rgba(214,38,42,1) 0 3px,
    transparent 3px 34px
  );
  opacity: 0.09;
  -webkit-mask-image: radial-gradient(60% 55% at 90% 8%, #000 0%, transparent 72%);
          mask-image: radial-gradient(60% 55% at 90% 8%, #000 0%, transparent 72%);
}

/* i bagliori (.fx-blob) sono già definiti globalmente: qui solo la posizione,
   pensata per una sezione più bassa e centrata sulla card */
.page-promo .fx-blob--1 { left: -8%; top: -80px; }
.page-promo .fx-blob--2 { right: -6%; top: 10%; }
.page-promo .fx-blob--3 { left: 30%; bottom: -140px; }

/* ---- Scheda "Colore personalizzato" (vernici) ---- */
.product-card--custom .product-media {
  display: flex;
  align-items: center;
  justify-content: center;
}
.can-blank {
  width: 46%;
  max-width: 190px;
  height: auto;
  color: #a8a29b;            /* linea neutra, in tono col grigio della scheda */
  transition: color 0.3s var(--ease), transform 0.5s var(--ease);
}
.product-card--custom:hover .can-blank { color: #8d8781; transform: scale(1.03); }

.product-specs--custom { text-align: center; align-items: center; }
.custom-text {
  font-size: 0.92rem;
  line-height: 1.45;
  color: rgba(255,255,255,0.88);
  max-width: 30ch;
  margin: 0 auto 18px;
}
.custom-btn {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 980px;
  background: var(--red);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  transition: background 0.2s ease, transform 0.2s ease;
}
.custom-btn:hover { background: var(--red-dark); }
.custom-btn:active { transform: scale(0.98); }

/* ---- Scheda "Catalogo completo" (elettroutensili) ----
   Stessa meccanica della scheda "Colore personalizzato": disegno al tratto
   sulla card, overlay con bottone al passaggio del mouse. */
.tool-blank {
  width: 78%;
  max-width: 260px;
  height: auto;
  color: #a8a29b;            /* linea neutra, in tono col grigio della scheda */
  transition: color 0.3s var(--ease), transform 0.5s var(--ease);
}
.product-card--custom:hover .tool-blank { color: #8d8781; transform: scale(1.03); }

/* il testo del bottone è lungo: pillola più morbida che può andare a capo */
.custom-btn--wide {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  max-width: 27ch;
  padding: 12px 22px;
  border-radius: 20px;
  line-height: 1.35;
  text-align: left;
}
.custom-btn--wide svg { flex: none; }

/* pallino multicolore: suggerisce "qualsiasi tonalità" */
.color-dot--custom {
  background: conic-gradient(#e5484d, #ffb75f, #46a758, #3a6ebe, #8e4ec6, #e5484d);
}

/* ---- Attrezzature e Vernici: intestazione con sfondo fotografico ----
   Il velo chiaro sfuma da sinistra a destra: il titolo resta su un fondo
   pulito e leggibile, mentre lo splash di colore rimane visibile a destra. */
.page-av .subpage-hero {
  position: relative;
  background-image: url('../img/background-attrezzature-vernici.jpg');
  background-size: cover;
  background-position: center 42%;
  overflow: hidden;
}
.page-av .subpage-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg,
    rgba(245,244,242,0.82) 0%,
    rgba(245,244,242,0.74) 30%,
    rgba(245,244,242,0.38) 52%,
    rgba(245,244,242,0.08) 78%,
    rgba(245,244,242,0) 100%);
}
.page-av .subpage-hero > .container { position: relative; z-index: 1; }

@media (max-width: 720px) {
  /* su schermi stretti il testo occupa tutta la larghezza: velo più uniforme */
  .page-av .subpage-hero::before {
    background: linear-gradient(180deg,
      rgba(245,244,242,0.95) 0%,
      rgba(245,244,242,0.88) 60%,
      rgba(245,244,242,0.7) 100%);
  }
}

/* ---- Legname e Pellet: intestazione con sfondo fotografico ----
   Stessa impostazione della pagina Attrezzature e Vernici: velo chiaro che
   sfuma da sinistra a destra, così il titolo resta leggibile e la venatura
   del legno rimane ben visibile sul lato destro. */
.page-lp .subpage-hero {
  position: relative;
  background-image: url('../img/background-legname-pellet.jpg');
  background-size: cover;
  background-position: center 55%;
  overflow: hidden;
}
.page-lp .subpage-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg,
    rgba(245,244,242,0.82) 0%,
    rgba(245,244,242,0.74) 30%,
    rgba(245,244,242,0.38) 52%,
    rgba(245,244,242,0.08) 78%,
    rgba(245,244,242,0) 100%);
}
.page-lp .subpage-hero > .container { position: relative; z-index: 1; }

@media (max-width: 720px) {
  /* su schermi stretti il testo occupa tutta la larghezza: velo più uniforme */
  .page-lp .subpage-hero::before {
    background: linear-gradient(180deg,
      rgba(245,244,242,0.95) 0%,
      rgba(245,244,242,0.88) 60%,
      rgba(245,244,242,0.7) 100%);
  }
}

/* ---- Elettroutensili: intestazione con sfondo fotografico ----
   Stessa impostazione delle altre pagine prodotto. Qui la foto ha un fondo
   scuro, quindi il velo parte più coprente a sinistra per non perdere il
   contrasto del titolo, e si apre a destra sugli utensili. */
.page-el .subpage-hero {
  position: relative;
  background-image: url('../img/background-elettroutensili.jpg');
  background-size: cover;
  background-position: center 45%;
  overflow: hidden;
}
.page-el .subpage-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg,
    rgba(245,244,242,0.90) 0%,
    rgba(245,244,242,0.82) 30%,
    rgba(245,244,242,0.44) 52%,
    rgba(245,244,242,0.10) 78%,
    rgba(245,244,242,0) 100%);
}
.page-el .subpage-hero > .container { position: relative; z-index: 1; }

@media (max-width: 720px) {
  /* su schermi stretti il testo occupa tutta la larghezza: velo più uniforme */
  .page-el .subpage-hero::before {
    background: linear-gradient(180deg,
      rgba(245,244,242,0.96) 0%,
      rgba(245,244,242,0.90) 60%,
      rgba(245,244,242,0.74) 100%);
  }
}

/* ---- Promo: intestazione con sfondo fotografico ----
   A differenza delle pagine prodotto la foto è quasi nera: un velo chiaro la
   spegnerebbe in un grigio sporco, quindi qui si tiene lo sfondo scuro e si
   ribalta il testo in bianco, con una sfumatura nera a sinistra che regge il
   contrasto senza coprire il carrello e i riflessi dorati sulla destra. */
.page-promo .subpage-hero {
  position: relative;
  background-color: #0d0b09;
  background-image: url('../img/background-promo.jpg');
  background-size: cover;
  background-position: center 28%;
  border-bottom: 0;
  overflow: hidden;
}
.page-promo .subpage-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg,
    rgba(10,9,8,0.88) 0%,
    rgba(10,9,8,0.78) 30%,
    rgba(10,9,8,0.42) 54%,
    rgba(10,9,8,0.14) 78%,
    rgba(10,9,8,0) 100%);
}
.page-promo .subpage-hero > .container { position: relative; z-index: 1; }
.page-promo .subpage-hero h1 { color: var(--white); }
.page-promo .subpage-hero p { color: rgba(255,255,255,0.82); }
.page-promo .subpage-hero .kicker { color: #ffc86b; }

@media (max-width: 720px) {
  /* su schermi stretti il testo occupa tutta la larghezza: velo più uniforme */
  .page-promo .subpage-hero::before {
    background: linear-gradient(180deg,
      rgba(10,9,8,0.86) 0%,
      rgba(10,9,8,0.74) 60%,
      rgba(10,9,8,0.5) 100%);
  }
}

/* ---- "Di cosa hai bisogno?": scelta multipla a caselle ---- */
.ct-choices { border: 0; padding: 0; margin-bottom: 20px; }
.ct-choices legend {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 10px;
  padding: 0;
}
.ct-choices-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 14px;
}
.ct-choice {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border-radius: 11px;
  background: var(--grey-bg);
  border: 1.5px solid transparent;
  font-size: 0.92rem;
  line-height: 1.3;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.ct-choice:hover { border-color: #d8d4cf; }
.ct-choice input {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  accent-color: var(--red);
  cursor: pointer;
}
/* la voce scelta si riconosce a colpo d'occhio */
.ct-choice:has(input:checked) {
  background: var(--white);
  border-color: var(--red);
}

@media (max-width: 560px) {
  .ct-choices-grid { grid-template-columns: 1fr; }
}
