/* =========================================================
   BDG — Pagina CHI SIAMO
   Stili di tutte le sezioni (classi .cs-*). Stesso linguaggio della home:
   Alfa Slab One per i titoli, arancio/rosso/giallo del brand, ingredienti
   fotografici dall'atlas come accenti. Mobile-first.
   ========================================================= */

:root {
  --cs-orange: #E03E15;
  --cs-red: #9F1B14;
  --cs-yellow: #EBCF47;
  --cs-ink: #1d1d1b;
  --cs-muted: #5c544d;
  --cs-cream: #faf6f0;
  --cs-radius: 24px;
  --cs-header: 72px;
  --cs-slab: "Alfa Slab One", serif;
}

.cs-container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}
@media (min-width: 960px) { .cs-container { padding: 0 40px; } }

.cs-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--cs-orange);
}
.cs-eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: currentColor;
}
.cs-title {
  margin: 0;
  font-family: var(--cs-slab);
  font-size: clamp(34px, 8.5vw, 64px);
  line-height: 1.04;
  letter-spacing: -.01em;
  color: var(--cs-ink);
}
.cs-title em { font-style: normal; color: var(--cs-orange); }
.cs-lead {
  margin: 22px 0 0;
  font-size: 17px;
  line-height: 1.65;
  color: var(--cs-muted);
}
@media (min-width: 960px) { .cs-lead { font-size: 19px; } }

/* sprite ingredienti fotografici (stesso atlas della home): background-size = 100/w,
   background-position = u/(1-w) e (1-v-h)/(1-h) delle coordinate UV dell'atlas */
.cs-sprite {
  position: absolute;
  background: url(/wp-content/3d/bdg-ingredients-atlas.webp) no-repeat;
  pointer-events: none;
  filter: drop-shadow(0 10px 14px rgba(60, 25, 5, .22));
  z-index: 0;
}
.cs-sprite--basil  { width: 96px;  height: 134px; background-size: 588.5% 419.67%; background-position: 95.18% 0.77%; }
.cs-sprite--tomato { width: 110px; height: 108px; background-size: 419.67% 428.45%; background-position: 66.41% 1.02%; }
.cs-sprite--olive  { width: 52px;  height: 56px;  background-size: 424.9% 419.67%; background-position: 33.59% 66.41%; }
.cs-sprite--ring   { width: 54px;  height: 53px;  background-size: 419.67% 428.45%; background-position: 0.77% 66.24%; }
.cs-sprite--pepper { width: 76px;  height: 98px;  background-size: 541.8% 419.67%; background-position: 65.27% 99.23%; }

/* ---------- 1. HERO ---------- */
.cs-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: calc(100svh - var(--cs-header));
  overflow: hidden;
  color: #fff;
  background: #2a1a12;
}
.cs-hero__media {
  position: absolute;
  inset: 0;
  margin: 0;
}
.cs-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
  transform-origin: 50% 40%;
  will-change: transform;
}
/* sfumatura calda dal basso: leggibilità del titolo senza spegnere la foto */
.cs-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(30, 14, 6, 0) 35%, rgba(30, 14, 6, .55) 68%, rgba(30, 14, 6, .88) 100%),
    linear-gradient(90deg, rgba(30, 14, 6, .35) 0%, rgba(30, 14, 6, 0) 55%);
  pointer-events: none;
}
.cs-hero__content {
  position: relative;
  z-index: 1;
  width: 100%;
  padding-bottom: clamp(36px, 7vh, 72px);
}
.cs-hero__grid { display: grid; gap: 20px; align-items: end; }
@media (min-width: 960px) { .cs-hero__grid { grid-template-columns: 1.4fr 1fr; gap: 48px; } }
.cs-hero__badge {
  display: inline-block;
  margin-bottom: 18px;
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--cs-orange);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.cs-hero__title {
  margin: 0;
  font-family: var(--cs-slab);
  font-size: clamp(44px, 12vw, 104px);
  line-height: .95;
  letter-spacing: -.01em;
  text-transform: uppercase;
  color: #fff;
}
.cs-hero__title span { display: block; }
.cs-hero__title .cs-accent { color: var(--cs-yellow); }
.cs-hero__lead {
  margin: 0;
  max-width: 40ch;
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255, 255, 255, .9);
}
@media (min-width: 960px) { .cs-hero__lead { font-size: 18px; } }
.cs-hero__scroll {
  display: none;
  margin-top: 22px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .75);
}
@media (min-width: 960px) { .cs-hero__scroll { display: inline-flex; align-items: center; gap: 10px; } }
.cs-hero__scroll::after {
  content: "";
  width: 1px;
  height: 34px;
  background: linear-gradient(rgba(255,255,255,.8), rgba(255,255,255,0));
  animation: cs-scroll-cue 1.8s ease-in-out infinite;
  transform-origin: top;
}
@keyframes cs-scroll-cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ---------- 2. MANIFESTO ---------- */
.cs-manifesto {
  position: relative;
  overflow: hidden;
  padding: clamp(80px, 14vw, 170px) 0;
  text-align: center;
}
.cs-manifesto__text {
  position: relative;
  z-index: 1;
  max-width: 18ch;
  margin: 0 auto;
  font-family: var(--cs-slab);
  font-size: clamp(32px, 7.4vw, 78px);
  line-height: 1.1;
  color: var(--cs-ink);
}
.cs-manifesto__text .cs-word { display: inline-block; opacity: 1; }
.cs-manifesto__text .cs-word--accent { color: var(--cs-orange); }
.cs-manifesto__note {
  position: relative;
  z-index: 1;
  margin: 28px auto 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--cs-muted);
}
.cs-manifesto .cs-sprite--basil  { left: -14px; top: 14%; transform: rotate(-28deg); }
.cs-manifesto .cs-sprite--tomato { right: -22px; bottom: 12%; transform: rotate(18deg); }
.cs-manifesto .cs-sprite--olive  { right: 12%; top: 10%; }
.cs-manifesto .cs-sprite--ring   { left: 14%; bottom: 8%; }
@media (min-width: 960px) {
  .cs-manifesto .cs-sprite--basil  { left: 6%; width: 130px; height: 182px; }
  .cs-manifesto .cs-sprite--tomato { right: 7%; width: 150px; height: 147px; }
}

/* ---------- 3. STORIA ---------- */
.cs-story { padding: clamp(40px, 8vw, 120px) 0 clamp(70px, 10vw, 140px); }
.cs-story__grid { display: grid; gap: 56px; align-items: center; }
@media (min-width: 960px) { .cs-story__grid { grid-template-columns: 1fr 1fr; gap: 88px; } }
.cs-story__media {
  position: relative;
  margin: 0 18px 40px 0;
}
.cs-story__photo {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--cs-radius);
  box-shadow: 0 30px 60px -30px rgba(60, 25, 5, .45);
}
.cs-story__photo--small {
  position: absolute;
  right: -18px;
  bottom: -40px;
  width: 52%;
  aspect-ratio: 4 / 3;
  border: 6px solid #fff;
  border-radius: 18px;
  transform: rotate(4deg);
}
.cs-story__media .cs-sprite--basil { left: -26px; top: -30px; transform: rotate(-20deg); z-index: 2; }
.cs-story__body p { margin: 0 0 16px; font-size: 17px; line-height: 1.7; color: var(--cs-muted); }
.cs-quote {
  position: relative;
  margin: 32px 0 0;
  padding: 26px 26px 26px 30px;
  border-radius: 18px;
  background: var(--cs-cream);
  border-left: 4px solid var(--cs-orange);
  font-family: var(--cs-slab);
  font-size: clamp(21px, 4.6vw, 28px);
  line-height: 1.25;
  color: var(--cs-red);
}

/* ---------- 4. INGREDIENTI ---------- */
.cs-ingredients {
  position: relative;
  overflow: hidden;
  padding: clamp(70px, 10vw, 130px) 0;
  background: var(--cs-orange);
  color: #fff;
}
.cs-ingredients .cs-eyebrow { color: #fff; }
.cs-ingredients .cs-title { color: #fff; max-width: 14ch; }
.cs-ingredients .cs-title em { color: var(--cs-yellow); }
.cs-ingredients__intro { display: grid; gap: 18px; align-items: end; margin-bottom: 48px; }
@media (min-width: 960px) { .cs-ingredients__intro { grid-template-columns: 1.3fr 1fr; } }
.cs-ingredients__intro p { margin: 0; font-size: 17px; line-height: 1.65; color: rgba(255, 255, 255, .9); }
.cs-cards {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 960px) { .cs-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; } }
.cs-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 210px;
  padding: 22px 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .28);
  transition: background .35s ease, transform .35s cubic-bezier(.2, .7, .2, 1);
}
@media (min-width: 960px) { .cs-card { min-height: 270px; padding: 28px 24px; } }
.cs-card:hover { background: rgba(255, 255, 255, .17); transform: translateY(-4px); }
.cs-card__icon { width: 52px; height: 52px; margin-bottom: auto; color: var(--cs-yellow); }
.cs-card__number {
  margin-top: 26px;
  font-family: var(--cs-slab);
  font-size: 15px;
  color: rgba(255, 255, 255, .6);
}
.cs-card__title {
  margin: 4px 0 8px;
  font-family: var(--cs-slab);
  font-size: clamp(20px, 4.8vw, 26px);
  line-height: 1.1;
  color: #fff;
}
.cs-card__text { margin: 0; font-size: 14px; line-height: 1.5; color: rgba(255, 255, 255, .88); }
@media (min-width: 960px) { .cs-card__text { font-size: 15px; } }
.cs-ingredients__note {
  margin: 36px 0 0;
  font-family: var(--cs-slab);
  font-size: clamp(20px, 4.4vw, 28px);
  color: var(--cs-yellow);
}

/* ---------- 5. GRANO: percorso a tappe ---------- */
.cs-grain { position: relative; overflow: hidden; padding: clamp(70px, 10vw, 140px) 0; background: var(--cs-cream); }
.cs-grain__head { max-width: 640px; margin-bottom: 56px; }
.cs-steps {
  --cs-progress: 0;
  position: relative;
  display: grid;
  gap: 34px;
  margin: 0;
  padding: 0 0 0 34px;
  list-style: none;
}
/* linea del percorso: grigia di base, arancio che si riempie con lo scroll */
.cs-steps::before,
.cs-steps::after {
  content: "";
  position: absolute;
  left: 9px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: rgba(29, 29, 27, .12);
}
.cs-steps::after {
  background: var(--cs-orange);
  transform-origin: top;
  transform: scaleY(var(--cs-progress));
}
.cs-step { position: relative; }
.cs-step::before {
  content: "";
  position: absolute;
  left: -32px;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--cs-orange);
  box-sizing: border-box;
  z-index: 1;
}
.cs-step__label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--cs-orange);
}
.cs-step__title { margin: 0 0 8px; font-family: var(--cs-slab); font-size: clamp(24px, 5.6vw, 30px); line-height: 1.1; color: var(--cs-ink); }
.cs-step__text { margin: 0; font-size: 16px; line-height: 1.6; color: var(--cs-muted); }
@media (min-width: 960px) {
  .cs-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 36px; padding: 40px 0 0; }
  .cs-steps::before, .cs-steps::after { left: 8px; right: 8px; top: 7px; bottom: auto; width: auto; height: 2px; }
  .cs-steps::after { transform-origin: left; transform: scaleX(var(--cs-progress)); }
  .cs-step::before { left: 0; top: -40px; }
}
.cs-grain .cs-sprite--pepper { right: -10px; top: 40px; transform: rotate(30deg); }
@media (min-width: 960px) { .cs-grain .cs-sprite--pepper { right: 6%; top: 70px; width: 100px; height: 129px; } }

/* ---------- 6. LABORATORIO: galleria orizzontale ---------- */
.cs-lab { padding: clamp(70px, 10vw, 120px) 0 clamp(40px, 6vw, 80px); overflow: hidden; }
.cs-lab__head { display: grid; gap: 14px; margin-bottom: 36px; }
@media (min-width: 960px) { .cs-lab__head { grid-template-columns: 1fr auto; align-items: end; } }
.cs-lab__hint { margin: 0; font-size: 13px; font-weight: 600; color: var(--cs-muted); }
.cs-lab__track {
  display: flex;
  gap: 14px;
  padding: 0 20px 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.cs-lab__track::-webkit-scrollbar { display: none; }
.cs-lab__item {
  flex: 0 0 auto;
  margin: 0;
  scroll-snap-align: center;
}
.cs-lab__item img {
  display: block;
  height: 340px;
  width: auto;
  aspect-ratio: var(--ratio, 4 / 3);
  object-fit: cover;
  border-radius: 20px;
}
.cs-lab__item--tall img { --ratio: 3 / 4; }
/* mobile: ogni foto occupa ~80% dello schermo, si intravede la successiva */
@media (max-width: 959.98px) {
  .cs-lab__item img { width: 78vw; height: auto; }
  .cs-lab__item--tall img { width: 62vw; }
}
.cs-lab__item figcaption { margin-top: 10px; font-size: 13px; font-weight: 600; color: var(--cs-muted); }
/* desktop: la sezione si blocca e la striscia scorre di lato (gestito in JS) */
@media (min-width: 960px) {
  .cs-lab.is-pinned .cs-lab__track { overflow: visible; padding: 0 40px; gap: 22px; }
  .cs-lab__item img { height: min(50vh, 460px); }
}

/* ---------- 7. CTA ---------- */
.cs-cta { position: relative; padding: clamp(60px, 9vw, 130px) 0; }
.cs-cta__box {
  position: relative;
  display: grid;
  gap: 32px;
  overflow: hidden;
  padding: 20px;
  border-radius: 32px;
  background: var(--cs-cream);
}
@media (min-width: 960px) { .cs-cta__box { grid-template-columns: 1fr 1fr; align-items: center; gap: 64px; padding: 28px 64px 28px 28px; } }
.cs-cta__photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 22px; }
.cs-cta__body { position: relative; z-index: 1; padding: 0 6px 12px; }
.cs-cta__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.cs-cta__actions .uk-button { border-radius: 999px; }
.cs-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.cs-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 16px 5px 5px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 6px 18px -8px rgba(60, 25, 5, .35);
  color: var(--cs-ink);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: transform .3s ease, color .3s ease;
}
.cs-chip:hover { color: var(--cs-orange); text-decoration: none; transform: translateY(-2px); }
.cs-chip img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: #f4efe9; }
.cs-cta .cs-sprite--tomato { right: -30px; bottom: -26px; transform: rotate(-18deg); }
.cs-cta .cs-sprite--olive { right: 22px; top: 22px; transform: rotate(20deg); }

/* ---------- ingressi (classe aggiunta via JS solo se c'è motion) ---------- */
.cs-motion [data-cs-reveal] { opacity: 0; transform: translateY(26px); }

@media (prefers-reduced-motion: reduce) {
  .cs-hero__scroll::after { animation: none; }
  .cs-card, .cs-chip { transition: none; }
}
