/* Cerea — esperienza mobile (caricato solo fino a 760 px)
   Hero a tutto schermo con parallasse, comparsa progressiva dei contenuti, carosello prodotti,
   menu a schermo intero, barra di avanzamento e barra rapida. Le animazioni si spengono con
   "riduci movimento" attivo. */

:root {
  --gutter: 20px;
  --section: 68px;
  --out: cubic-bezier(.16, 1, .3, 1);
}

html { scroll-padding-top: 64px; }
body.menu-open { overflow: hidden; }

/* ───── Barra di avanzamento ───── */
.progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 300; pointer-events: none;
  background: var(--accent); transform-origin: 0 50%; transform: scaleX(var(--p, 0));
}

/* ───── Header: si nasconde scorrendo in giù, torna scorrendo in su ───── */
.site-header {
  background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none;   /* il filtro bloccherebbe la posizione fissa del menu */
  transition: transform .5s var(--out);
}
.site-header.is-hidden { transform: translateY(-100%); }
.site-header .wrap { height: 60px; }
.brand img { height: 34px; }
.menu-btn { position: relative; z-index: 120; }

/* ───── Menu a schermo intero ───── */
.nav {
  position: fixed; inset: 60px 0 0 0; z-index: 110; display: flex; flex-direction: column; justify-content: center;
  align-items: flex-start; gap: 2px; padding: 24px var(--gutter) 64px; background: var(--bg); border: 0;
  opacity: 0; visibility: hidden; transform: translateY(-14px);
  transition: opacity .35s ease, transform .5s var(--out), visibility 0s linear .35s;
}
.nav.open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.nav a {
  font-family: var(--serif); font-size: clamp(2.1rem, 10vw, 2.9rem); line-height: 1.15; letter-spacing: -.015em;
  text-transform: none; border: 0; padding: 8px 0; width: 100%;
  opacity: 0; transform: translateY(22px); transition: opacity .55s var(--out), transform .7s var(--out), color .2s;
}
.nav.open a { opacity: 1; transform: none; }
.nav.open a:nth-child(1) { transition-delay: .08s; }
.nav.open a:nth-child(2) { transition-delay: .14s; }
.nav.open a:nth-child(3) { transition-delay: .20s; }
.nav.open a:nth-child(4) { transition-delay: .26s; }
.nav.open a:nth-child(5) { transition-delay: .32s; }

/* ───── Hero a tutto schermo ───── */
.hero {
  position: relative; padding: 0; min-height: calc(100vh - 60px); min-height: calc(100svh - 60px);
  display: flex; background: #1d1d1b; color: #fff; overflow: hidden;
}
.hero-grid {
  position: relative; z-index: 2; display: flex; flex-direction: column; justify-content: flex-end; gap: 0;
  width: 100%; padding-top: 0; padding-bottom: 96px;
}
.hero-media { position: absolute; inset: 0; z-index: 0; margin: 0; order: 0; }
.hero-media img {
  position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover;
  object-position: 64% 50%; border-radius: 0; transform: translate3d(0, var(--y, 0px), 0) scale(1.16);
  will-change: transform;
}
.hero-media::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(29, 29, 27, .30) 0%, rgba(29, 29, 27, .10) 28%, rgba(29, 29, 27, .55) 62%, rgba(29, 29, 27, .92) 100%);
}
.hero-text { position: relative; z-index: 2; padding-top: 120px; }
.hero .eyebrow { color: rgba(255, 255, 255, .82); margin-bottom: 18px; }
.hero .eyebrow::before { background: #e3a999; }
.hero .h1 { color: #fff; font-size: clamp(2.8rem, 14vw, 3.9rem); line-height: 1.02; margin-bottom: 20px; }
.hero .h1 em { color: #efb9a8; }
.hero .lead { color: rgba(255, 255, 255, .86); font-size: 1rem; line-height: 1.65; margin-bottom: 28px; }
.hero-actions { gap: 10px; }
.hero-actions .btn { flex: 1 1 auto; padding: 0 20px; }
.hero .btn--ghost { color: #fff; border-color: rgba(255, 255, 255, .6); }
.hero .btn--ghost:hover { background: #fff; color: var(--ink); border-color: #fff; }

.js .hero-text > * { animation: rise 1s var(--out) both; }
.js .hero-text > :nth-child(1) { animation-delay: .15s; }
.js .hero-text > :nth-child(2) { animation-delay: .27s; }
.js .hero-text > :nth-child(3) { animation-delay: .42s; }
.js .hero-text > :nth-child(4) { animation-delay: .55s; }
.js .hero-media img { animation: zoom-out 2.2s var(--out) both; }
@keyframes rise { from { opacity: 0; transform: translateY(34px); } to { opacity: 1; transform: none; } }
@keyframes zoom-out { from { filter: brightness(.7); } to { filter: none; } }

.scroll-cue {
  position: absolute; left: 50%; bottom: 26px; z-index: 3; width: 44px; height: 44px; margin-left: -22px;
  border: 1px solid rgba(255, 255, 255, .55); border-radius: 50%; display: grid; place-items: center;
  color: #fff; font-size: 1.1rem; transition: opacity .4s; animation: bob 2s ease-in-out infinite;
}
.scroll-cue.is-off { opacity: 0; pointer-events: none; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(7px); } }

/* ───── Numeri ───── */
.facts ul { grid-template-columns: 1fr 1fr; }
.facts li { padding: 26px 18px; }
.facts b { font-size: 2.3rem; }

/* ───── Sezioni e titoli ───── */
.section { padding-block: var(--section); }
.section--tight { padding-block: 40px; }
.h2 { font-size: clamp(2.05rem, 9.5vw, 2.7rem); line-height: 1.06; }
.lead { font-size: 1.05rem; }
.eyebrow { margin-bottom: 16px; }
.section-head { margin-bottom: 32px; }
.prose p { font-size: 1rem; line-height: 1.75; }

/* ───── Storia / team / premi: foto a tutta larghezza con parallasse ───── */
.split { gap: 32px; }
.split-media { margin-inline: calc(var(--gutter) * -1); overflow: hidden; position: relative; }
.split-media img { aspect-ratio: 4 / 5; border-radius: 0; transform: translate3d(0, var(--y, 0px), 0) scale(1.16); will-change: transform; }
.quote { margin-top: 28px; }
.quote p { font-size: 1.15rem; }
.mini-stats li { padding-right: 8px; }
.mini-stats b { font-size: 1.8rem; }
.statement .h2 { margin-bottom: 22px; }
.award { padding: 24px; }

/* ───── Prodotti: carosello orizzontale ───── */
.product-grid {
  display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  margin-inline: calc(var(--gutter) * -1); padding: 6px var(--gutter) 10px; scroll-padding-inline: var(--gutter);
  scrollbar-width: none; overscroll-behavior-x: contain;
}
.product-grid::-webkit-scrollbar { display: none; }
.product {
  flex: 0 0 78%; scroll-snap-align: start; transform: scale(var(--s, 1)); opacity: var(--o, 1);
  transform-origin: 50% 60%; will-change: transform, opacity;
}
.product img { aspect-ratio: 4 / 5; border-radius: 14px; margin-bottom: 16px; }
.product .h3 { font-size: 1.4rem; }
.carousel-dots { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 22px; }
.carousel-dots span { width: 7px; height: 7px; border-radius: 99px; background: var(--line); transition: width .35s var(--out), background .35s; }
.carousel-dots span.on { width: 26px; background: var(--accent); }

/* ───── Galleria editoriale ───── */
.gallery { grid-template-columns: 1fr; gap: 14px; }
.gallery .g-item { overflow: hidden; border-radius: 14px; width: 88%; }
.gallery .g-item:nth-child(even) { margin-left: auto; }
.gallery img { border-radius: 0; aspect-ratio: 4 / 3; width: 100%; transform: translate3d(0, var(--y, 0px), 0) scale(1.14); }

/* ───── Materie prime: elenco numerato ───── */
.grid-6 { grid-template-columns: 1fr; border: 0; }
.grid-6 > li {
  border: 0; border-top: 1px solid var(--line); padding: 26px 0; display: grid; grid-template-columns: 58px 1fr; column-gap: 6px;
}
.grid-6 > li:last-child { border-bottom: 1px solid var(--line); }
.grid-6 .num { grid-row: 1 / span 2; font-family: var(--serif); font-size: 2.3rem; line-height: 1; color: var(--accent); margin: 0; }
.grid-6 .h3 { margin-bottom: 6px; }

/* ───── Contatti ───── */
.contact-grid { grid-template-columns: 1fr 1fr; }
.contact-grid > div { padding: 24px 16px 28px 0; }
.contact-grid dd { font-size: 1.05rem; }
.contact-grid .link {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--ink); border-radius: 10px;
  border-bottom-width: 1px; font-size: .75rem;
}

/* ───── FAQ ───── */
.faq summary { font-size: 1.12rem; }
.faq details[open] p { animation: rise .5s var(--out) both; }

/* ───── Footer ───── */
.site-footer { padding-block: 48px 120px; }
.footer-grid { gap: 28px; }

/* ───── Barra rapida (WhatsApp / Indicazioni) ───── */
.dock {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 90;
  display: flex; gap: 8px; padding: 8px; border-radius: 18px; background: rgba(29, 29, 27, .92);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  transform: translateY(150%); opacity: 0; transition: transform .6s var(--out), opacity .35s;
}
.dock.is-on { transform: none; opacity: 1; }
.dock a {
  flex: 1; min-height: 48px; display: flex; align-items: center; justify-content: center; border-radius: 12px;
  color: #fff; text-decoration: none; font-size: .8125rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, .28);
}
.dock a:first-child { background: var(--accent); border-color: var(--accent); }

/* ───── Comparsa progressiva (classi messe da site.js) ───── */
.js .rv { opacity: 0; transform: translateY(34px); transition: opacity .9s var(--out), transform 1.05s var(--out); transition-delay: calc(var(--i, 0) * 90ms); }
.js .rv.rv-in { opacity: 1; transform: none; }
.js .rv-box img { clip-path: inset(0 0 100% 0); transition: clip-path 1.25s var(--out); }
.js .rv-box.rv-in img { clip-path: inset(0); }

@media (prefers-reduced-motion: reduce) {
  .js .hero-text > *, .js .hero-media img, .scroll-cue, .faq details[open] p { animation: none; }
  .js .rv { opacity: 1; transform: none; transition: none; }
  .js .rv-box img { clip-path: none; transition: none; }
  .hero-media img, .split-media img, .gallery img { transform: none !important; }
  .product { transform: none !important; opacity: 1 !important; }
  .site-header, .dock, .nav, .nav a { transition-duration: .01ms !important; }
}
