/* =================================================================
   Lo Maset — Fulla d'estils
   Paleta monocroma: un únic vermell càlid (#C1272D) sobre crema.
   Mobile-first · Fraunces (titulars) + Poppins (cos) · molt d'aire.
   ================================================================= */

/* ---------- Design tokens ---------- */
:root {
  /* Vermell base i la seva família (mateix to, diferents lluminositats) */
  --red: #C1272D;
  --red-600: #a81f25;
  --red-700: #8c1a20;   /* text llarg */
  --red-800: #6b141a;   /* titulars foscos */
  --red-900: #4d0f13;

  /* Vermell translúcid sobre el crema (fons i línies subtils) */
  --red-04: rgba(193, 39, 45, 0.04);
  --red-06: rgba(193, 39, 45, 0.06);
  --red-10: rgba(193, 39, 45, 0.10);
  --red-14: rgba(193, 39, 45, 0.14);
  --red-22: rgba(193, 39, 45, 0.22);

  --white: #ffffff;
  --cream: #FBF7F2;     /* fons càlid de pàgina */
  --cream-2: #F4EDE4;   /* crema una mica més fosc → fa visible el ritme de seccions */

  /* Retall del logo. Era un cercle (50%) perquè l'emblema vell era rodó i hi
     cabia just. El d'ara porta "LO MASET" en arc PER SOBRE del cercle: amb el
     retall rodó, el text quedava fora i es menjava a tots cinc llocs on surt.
     Amb un quadrat arrodonit hi cap sencer i segueix semblant un segell. */
  --radius-logo: 18%;

  /* Gra de paper (vermell molt tènue) */
  --grain: rgba(193, 39, 45, 0.045);

  /* Ombres tenyides de vermell (monocromes) */
  --shadow-sm: 0 2px 10px -6px rgba(193, 39, 45, 0.30);
  --shadow-md: 0 18px 40px -26px rgba(193, 39, 45, 0.40);
  --shadow-lg: 0 30px 60px -30px rgba(193, 39, 45, 0.35);

  /* Tipografies */
  --font-body: 'Poppins', 'Helvetica Neue', Arial, sans-serif;
  --font-display: 'Fraunces', 'Bitter', Georgia, 'Times New Roman', serif;

  /* Tipografia fluida */
  --step--1: clamp(0.82rem, 0.79rem + 0.15vw, 0.9rem);
  --step-0:  clamp(1rem, 0.96rem + 0.2vw, 1.12rem);
  --step-1:  clamp(1.2rem, 1.12rem + 0.4vw, 1.45rem);
  --step-2:  clamp(1.5rem, 1.35rem + 0.75vw, 2rem);
  --step-3:  clamp(2rem, 1.7rem + 1.5vw, 3rem);
  --step-4:  clamp(2.6rem, 2rem + 3vw, 4.5rem);

  /* Espai i formes */
  --space-section: clamp(4.5rem, 3rem + 7vw, 8rem);
  --container: 1140px;
  --radius: 18px;
  --radius-lg: 26px;
  --radius-pill: 999px;

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

/* ---------- Reset lleuger ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.7;
  color: var(--red-700);
  background-color: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;  /* fallback navegadors antics */
  overflow-x: clip;    /* no crea contenidor de scroll → juga bé amb Lenis */
}

/* ---------- Lenis (smooth scroll) ----------
   Regles mínimes que la llibreria necessita, inlinades per estalviar una petició.
   Quan Lenis està actiu anul·la el scroll-behavior natiu; si no s'inicialitza
   (p. ex. prefers-reduced-motion o sense JS), el scroll natiu segueix funcionant. */
html.lenis,
html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }

/* Gra de paper sutil per tota la pàgina (estàtic, no distreu) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background-image: radial-gradient(var(--grain) 0.5px, transparent 0.6px);
  background-size: 6px 6px;
}

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

/* <picture> és només un embolcall per triar el format (AVIF si el navegador el té,
   JPG si no). No ha d'existir per al layout: qui té mida és la <img> de dins.
   IMPORTANT: 'display: contents' NO canvia el DOM, així que qualsevol selector amb
   '>' cap a la <img> s'ha de fer descendent. */
picture { display: contents; }

/* ---------- Titulars: Fraunces (old-style, càlid) ---------- */
h1, h2, h3 {
  color: var(--red);
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.005em;
  font-variation-settings: "opsz" 140;
}
.brand span,
.footer-brand,
.stamp__num {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 140;
}

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

/* Focus accessible i coherent */
:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Enllaç "salta al contingut" */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 1000;
  background: var(--red);
  color: var(--white);
  padding: 0.7rem 1.2rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 1rem; }

/* ---------- Utilitats ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 2.5rem);
}

.section { padding-block: var(--space-section); }
/* Seccions tintades: ara SÍ es diferencien del fons (abans eren idèntiques → el
   ritme d'alternança no es veia). Segueix sent monocrom: crema una mica més fosc. */
.section--tint { background: var(--cream-2); }

.section-head {
  max-width: 44rem;
  margin-inline: auto;
  text-align: center;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.section-head--left {
  text-align: left;
  margin-inline: 0;
}

/* Text de secció que continua un .section-head: mida de cos, no de subtítol.
   Va a 62ch perquè una línia més llarga que això ja costa de seguir. */
.section-intro {
  max-width: 62ch;
  margin: -1.5rem auto clamp(2.5rem, 5vw, 3.5rem);
  text-align: center;
}
.section-intro p + p { margin-top: 1.1rem; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 1rem;
}
.eyebrow::before,
.eyebrow::after {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--red-22);
}
.section-head--left .eyebrow::before { display: none; }

h2.section-title { font-size: var(--step-3); }

.section-head p {
  margin-top: 1rem;
  font-size: var(--step-1);
  color: var(--red-700);
  font-weight: 400;
}

/* Botons */
.btn {
  --btn-bg: var(--red);
  --btn-fg: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.95rem 1.8rem;
  border: 2px solid var(--red);
  border-radius: var(--radius-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
              background-color 0.25s var(--ease), color 0.25s var(--ease);
  box-shadow: var(--shadow-sm);
}
.btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.btn:active { transform: translateY(-1px); }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--red);
  box-shadow: none;
}
.btn--ghost:hover {
  --btn-bg: var(--red);
  --btn-fg: var(--white);
}

.btn__arrow { transition: transform 0.25s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(4px); }

/* ---------- Capçalera / navegació ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background-color 0.3s var(--ease), box-shadow 0.3s var(--ease),
              backdrop-filter 0.3s var(--ease);
}
.site-header.is-scrolled {
  background: rgba(251, 247, 242, 0.88);
  backdrop-filter: saturate(140%) blur(10px);
  box-shadow: 0 1px 0 var(--red-10);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 74px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 700;
  color: var(--red);
  letter-spacing: -0.01em;
}
.brand img { width: 42px; height: 42px; border-radius: var(--radius-logo); }
.brand span { font-size: 1.15rem; }

.nav-links {
  display: none;
  align-items: center;
  gap: 2rem;
  list-style: none;
  padding: 0;
}
.nav-links a {
  font-weight: 500;
  font-size: 0.98rem;
  color: var(--red-800);
  position: relative;
  padding-block: 0.3rem;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.28s var(--ease);
}
.nav-links a:hover::after,
.nav-links a:focus-visible::after { transform: scaleX(1); }

.nav-cta { display: none; }

/* Zona dreta de la barra (enllaços + idioma + CTA + hamburguesa) */
.nav-right {
  display: flex;
  align-items: center;
  gap: clamp(0.6rem, 2vw, 1.4rem);
}

/* Selector d'idioma CA / ES */
.lang-switch {
  display: inline-flex;
  border: 1.5px solid var(--red-22);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.lang-btn {
  font: inherit;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  padding: 0.34rem 0.66rem;
  border: none;
  background: transparent;
  color: var(--red);
  cursor: pointer;
  line-height: 1;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.lang-btn.is-active { background: var(--red); color: var(--white); }
.lang-btn:not(.is-active):hover { background: var(--red-06); }

/* Hamburguesa (mòbil) */
.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 46px;
  height: 46px;
  padding: 0 11px;
  border: 1px solid var(--red-14);
  border-radius: 12px;
  background: var(--white);
  cursor: pointer;
}
.nav-toggle span {
  height: 2px;
  width: 100%;
  background: var(--red);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Menú desplegable mòbil */
.mobile-menu {
  position: fixed;
  inset: 74px 0 auto 0;
  z-index: 99;
  background: var(--cream);
  border-bottom: 1px solid var(--red-10);
  box-shadow: var(--shadow-md);
  display: grid;
  gap: 0.25rem;
  padding: 1rem clamp(1.25rem, 5vw, 2.5rem) 1.75rem;
  transform: translateY(-12px);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease), visibility 0.3s;
}
.mobile-menu.is-open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}
.mobile-menu a {
  padding: 0.85rem 0.5rem;
  font-weight: 500;
  border-bottom: 1px solid var(--red-06);
  color: var(--red-800);
}
.mobile-menu .btn { margin-top: 1rem; }

/* ---------- Contenidor de foto (color natural) ----------
   La classe manté el nom .duotone perquè s'usa a tot l'HTML,
   però ara NO aplica cap filtre: les fotos es veuen tal qual.
   (Per recuperar el to vermell de marca, afegeix un filtre a .duotone img
    i un ::after amb background var(--red) i mix-blend-mode: multiply.) */
.duotone {
  position: relative;
  overflow: hidden;
  background: var(--red-06);
}
.duotone img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Hero (pantalla completa, cinematogràfic) ---------- */
.hero {
  position: relative;
  min-height: 92svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  color: #fff;
  padding: clamp(6rem, 14vh, 9rem) 0 clamp(5rem, 12vh, 7rem);
}
/* Fons a sang (carrusel de fotos) */
.hero__bg { position: absolute; inset: 0; z-index: 0; }
.hero__bg .carousel__slide { border-radius: 0; }
/* Vel per a la llegibilitat del text sobre la foto */
.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to top,
    rgba(28, 6, 7, 0.80) 0%,
    rgba(28, 6, 7, 0.32) 45%,
    rgba(28, 6, 7, 0.46) 100%);
}
.hero__inner { position: relative; z-index: 2; }

/* El wrapper és qui té mida, marge i animacions: així el medalló WebGL pot
   substituir la <img> sense moure res (CLS = 0) ni repetir l'entrada. */
.hero__logo-wrap {
  position: relative;
  display: block;
  width: clamp(120px, 22vw, 180px);
  aspect-ratio: 1;
  margin: 0 auto 1.6rem;
  animation: floaty 6s ease-in-out infinite;
}
.hero__logo {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-logo);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.4);
  transition: opacity 0.7s var(--ease);
}
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ---------- Entrada de l'emblema (CSS pur, sense GSAP) ----------
   Revelat circular tipus "iris" + escala + gir mínim. S'activa quan s'amaga el
   preloader (html.is-ready) i després cedeix el relleu al floaty de sempre.
   Nota: no s'usa GSAP perquè el logo és un PNG raster (no un SVG), de manera que
   el "dibuixat de traç" no és possible; i tot el que sí es pot fer sobre un raster
   surt gratis en CSS. Tot el bloc queda fora si l'usuari demana menys moviment. */
@media (prefers-reduced-motion: no-preference) {
  html.js .hero__logo-wrap { opacity: 0; }
  html.is-ready .hero__logo-wrap {
    animation:
      emblem-in 1.15s cubic-bezier(0.22, 1, 0.36, 1) both,
      floaty 6s ease-in-out 1.15s infinite;
  }
  @keyframes emblem-in {
    from {
      opacity: 0;
      transform: scale(0.86) rotate(-8deg);
      clip-path: circle(0% at 50% 50%);
    }
    55% { opacity: 1; }
    to {
      opacity: 1;
      transform: scale(1) rotate(0deg);
      clip-path: circle(75% at 50% 50%);
    }
  }
}

/* ---------- Entrada del hero (CSS pur, sense esperar cap script) ----------
   El titular, el lema i els botons ja NO són '.reveal'. Ho eren, i això volia dir:
   opacity 0 → esperar que main.js s'executi → 0,24 s de retard escalonat → 0,7 s de
   transició. El contingut principal de la web, el que ven, no es veia fins passat un
   segon llarg. I si el JS fallava, no es veia MAI.
   Ara entren amb una animació CSS que arrenca al pintar, curta i continguda. */
@media (prefers-reduced-motion: no-preference) {
  .hero__title,
  .hero__tagline,
  .hero__lead,
  .hero__actions {
    animation: hero-in 0.45s var(--ease) both;
  }
  .hero__tagline { animation-delay: 0.05s; }
  .hero__lead    { animation-delay: 0.10s; }
  .hero__actions { animation-delay: 0.15s; }
  @keyframes hero-in {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: none; }
  }
}

.hero__title {
  color: #fff;
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: 1.02;
  margin-bottom: 0.5rem;
  text-shadow: 0 6px 34px rgba(0, 0, 0, 0.4);
}
.hero__tagline {
  font-size: var(--step-2);
  font-weight: 600;
  font-style: italic;
  color: rgba(255, 255, 255, 0.94);
  max-width: 24ch;
  margin-inline: auto;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
}
.hero__lead {
  max-width: 46ch;
  margin: 1.4rem auto 0;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 2.2rem;
}
.hero .btn--ghost {
  --btn-fg: #fff;
  border-color: rgba(255, 255, 255, 0.85);
}
.hero .btn--ghost:hover {
  --btn-bg: #fff;
  --btn-fg: var(--red);
  border-color: #fff;
}

/* Tira de dades del hero (abans secció "Xifres") */
.hero__facts {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(1.4rem, 5vw, 3rem);
  margin: 2.2rem auto 0;
  padding: 0;
}
.hero__fact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  position: relative;
}
.hero__fact + .hero__fact::before {
  content: "";
  position: absolute;
  left: calc(-1 * clamp(0.7rem, 2.5vw, 1.5rem));
  top: 12%;
  height: 76%;
  width: 1px;
  background: rgba(255, 255, 255, 0.28);
}
.hero__fact-num {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  font-weight: 600;
  line-height: 1;
  color: #fff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
}
.hero__fact-label {
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}
@media (prefers-reduced-motion: no-preference) {
  .hero__facts { animation: hero-in 0.45s var(--ease) 0.2s both; }
}

.hero__scroll {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: clamp(1.1rem, 4vh, 2rem);
  transform: translateX(-50%);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  font-size: var(--step--1);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
}
.hero__scroll svg { animation: bob 1.8s ease-in-out infinite; }
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* Espiga decorativa divisòria */
.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  color: var(--red);
  margin-block: 0.5rem;
}
.divider::before,
.divider::after {
  content: "";
  height: 1px;
  width: min(90px, 18vw);
  background: linear-gradient(90deg, transparent, var(--red-22));
}
.divider::after { background: linear-gradient(90deg, var(--red-22), transparent); }
.divider svg { width: 26px; height: 26px; }

/* ---------- Qui som ---------- */
.about {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: center;
}
.about__text p + p { margin-top: 1.2rem; }
.about__text .lead {
  font-size: var(--step-1);
  color: var(--red-800);
  font-weight: 500;
}

/* Segell/medalló decoratiu (blanc, per contrastar sobre el crema) */
.stamp {
  position: relative;
  justify-self: center;
  width: min(340px, 80vw);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--red);
  border: 2px solid var(--red-14);
  border-radius: 50%;
  padding: 2rem;
  background: var(--white);
  box-shadow: var(--shadow-md);
}
.stamp::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px dashed var(--red-22);
  border-radius: 50%;
}
.stamp__num {
  font-size: clamp(3rem, 9vw, 4.5rem);
  font-weight: 700;
  line-height: 1;
  color: var(--red);
}
.stamp__label {
  margin-top: 0.4rem;
  font-size: var(--step--1);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--red-700);
}
.stamp__sub {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--red-700);
  max-width: 22ch;
}

/* ---------- Valors ---------- */
.values-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
.value-card {
  background: var(--white);
  border: 1px solid var(--red-10);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease),
              border-color 0.3s var(--ease);
}
.value-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--red-22);
}
.value-card__icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--red-06);
  color: var(--red);
  margin-bottom: 1.25rem;
}
.value-card__icon svg { width: 30px; height: 30px; }
.value-card h3 {
  font-size: var(--step-1);
  margin-bottom: 0.5rem;
}
.value-card p {
  font-size: 0.98rem;
  color: var(--red-700);
}

/* ---------- El producte ---------- */
.product {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: center;
}
.product__text .lead {
  font-size: var(--step-1);
  color: var(--red-800);
  font-weight: 500;
  margin-bottom: 1.2rem;
}
.product__features {
  list-style: none;
  padding: 0;
  margin-top: 1.75rem;
  display: grid;
  gap: 0.9rem;
}
.product__features li {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  font-weight: 500;
  color: var(--red-800);
}
.product__features .tick {
  flex: none;
  width: 26px; height: 26px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--red);
  color: var(--white);
  display: grid;
  place-items: center;
}
.product__features .tick svg { width: 14px; height: 14px; }

/* Marc de foto del producte (duotò) */
.product__visual {
  position: relative;
  justify-self: center;
  width: min(420px, 100%);
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  background: var(--white);
  isolation: isolate;
  display: grid;
  place-items: center;
}
/* Emblema dins del marc del producte */
.product__logo {
  width: 74%;
  height: auto;
  border-radius: var(--radius-logo);
}

/* Banda de vídeo (gallines al camp), sota "El producte" */
.video-band {
  background: var(--cream);
  padding-top: clamp(2rem, 5vw, 3.5rem);
}
/* El marc era apaïsat perquè el vídeo d'abans ho era. El de la granja està gravat
   amb el mòbil, dret: si el fiquéssim en un marc ample, l'object-fit: cover en
   retallaria tot menys una franja del mig. Per això ara el marc també és vertical
   i estret, com qualsevol vídeo de mòbil. */
.video-frame {
  margin: 0 auto;
  width: min(100%, 340px);
  aspect-ratio: 9 / 16;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: #ece9e5;
}
.farm-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Ja no cal cap zoom: la marca d'aigua s'ha retallat del fitxer. Abans s'ampliava
     el vídeo un 22% per tapar-la, i això li feia perdre nitidesa a tot el conjunt. */
}
.product__visual .corner {
  position: absolute;
  z-index: 2;
  background: var(--white);
  color: var(--red);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-pill);
  font-size: var(--step--1);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}
.product__visual .corner--tl { top: 1.1rem; left: 1.1rem; }
.product__visual .corner--br { bottom: 1.1rem; right: 1.1rem; }

/* ---------- Galeria (tira de 3 fotos duotò) ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
.gallery-item {
  aspect-ratio: 5 / 4;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}
.gallery-item figcaption {
  position: absolute;
  z-index: 2;
  left: 1rem;
  bottom: 1rem;
  background: var(--white);
  color: var(--red);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: var(--step--1);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

/* ---------- Carrusel (fotos que roten soles) ---------- */
.carousel { position: relative; overflow: hidden; }
.carousel__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.7s var(--ease), visibility 0s linear 0.7s;
}
.carousel__slide.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.7s var(--ease);
}
/* Totes les fotos de qualsevol carrusel omplen la diapositiva */
.carousel__slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.carousel__slide figcaption {
  position: absolute;
  z-index: 2;
  left: 1rem;
  bottom: 1rem;
  background: var(--white);
  color: var(--red);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: var(--step--1);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}
.carousel__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.85);
  color: var(--red);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background-color 0.2s var(--ease);
}
.carousel__btn:hover { background: #fff; }
.carousel__btn--prev { left: 0.7rem; }
.carousel__btn--next { right: 0.7rem; }
.carousel__btn svg { width: 22px; height: 22px; }
.carousel__dots {
  position: absolute;
  z-index: 4;
  left: 0;
  right: 0;
  bottom: 0.9rem;
  display: flex;
  justify-content: center;
  gap: 0.45rem;
}
.carousel__dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: width 0.25s var(--ease), background-color 0.25s var(--ease);
}
.carousel__dot.is-active { width: 22px; background: #fff; }

/* Carrusel de la galeria (format panoràmic) */
.gallery-carousel {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

/* ---------- Com funciona (passos) ---------- */
.steps {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  counter-reset: step;
}
.step-card {
  position: relative;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--red-10);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease),
              border-color 0.3s var(--ease);
}
.step-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--red-22);
}
.step-card__num {
  position: absolute;
  top: 0.4rem;
  right: 1.1rem;
  font-family: var(--font-display);
  font-variation-settings: "opsz" 140;
  font-weight: 700;
  font-size: 4.5rem;
  line-height: 1;
  color: var(--red-10);
}
.step-card__icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--red-06);
  color: var(--red);
  margin-bottom: 1.25rem;
}
.step-card__icon svg { width: 30px; height: 30px; }
.step-card h3 {
  font-size: var(--step-1);
  margin-bottom: 0.5rem;
}
.step-card p {
  font-size: 0.98rem;
  color: var(--red-700);
}

/* ---------- Passos apilats amb el scroll ----------
   Cada targeta queda enganxada (sticky) a dalt i la següent li puja a sobre.
   Les de sota es van fent una mica més petites (--depth, el posa js/steps.js)
   i s'aturen escalonades, així se'ls veu la vora i s'entén que hi són.
   La classe .is-stacked l'afegeix el JS: sense JS, la graella de tres es queda
   exactament com estava. */
.steps.is-stacked {
  --stick: clamp(72px, 14vh, 130px);   /* on s'aturen */
  --ladder: 18px;                      /* quant més avall s'atura cada una */
  display: block;
  padding-bottom: clamp(1rem, 6vh, 4rem);
}
.steps.is-stacked .step-card {
  position: sticky;
  top: calc(var(--stick) + var(--i, 0) * var(--ladder));
  margin: 0 0 clamp(2rem, 24vh, 15rem);
  min-height: clamp(190px, 28vh, 260px);
  padding: clamp(1.6rem, 3.5vw, 2.6rem);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.4rem 1.6rem;
  align-content: center;
  transform-origin: top center;
  /* Es fa més petita a mesura que li passen targetes per sobre */
  transform: scale(calc(1 - var(--depth, 0) * 0.035));
  transition: transform 0.55s var(--ease), box-shadow 0.55s var(--ease),
              border-color 0.55s var(--ease);
}
.steps.is-stacked .step-card:nth-child(1) { --i: 0; }
.steps.is-stacked .step-card:nth-child(2) { --i: 1; }
.steps.is-stacked .step-card:nth-child(3) { --i: 2; }
.steps.is-stacked .step-card:nth-child(4) { --i: 3; }
.steps.is-stacked .step-card:nth-child(5) { --i: 4; }
.steps.is-stacked .step-card:last-child { margin-bottom: clamp(1rem, 8vh, 5rem); }
/* La de dalt de tot, la que estàs llegint: més ombra i vora marcada */
.steps.is-stacked .step-card.is-top {
  box-shadow: var(--shadow-lg);
  border-color: var(--red-22);
}
/* En mode apilat el hover no ha de moure res: la posició la mana el scroll */
.steps.is-stacked .step-card:hover { transform: scale(calc(1 - var(--depth, 0) * 0.035)); }

.steps.is-stacked .step-card__icon {
  grid-row: span 2;
  margin-bottom: 0;
  width: 64px;
  height: 64px;
}
.steps.is-stacked .step-card__icon svg { width: 32px; height: 32px; }
.steps.is-stacked .step-card h3 { align-self: end; font-size: var(--step-2); }
.steps.is-stacked .step-card p { align-self: start; max-width: 54ch; font-size: 1.02rem; }
.steps.is-stacked .step-card__num {
  top: auto;
  bottom: -1.5rem;
  right: 1.5rem;
  font-size: clamp(6rem, 12vw, 10rem);
  /* Darrere del text: la targeta té transform, o sigui context d'apilat propi,
     així que el -1 el deixa sobre el fons de la targeta però sota el contingut. */
  z-index: -1;
}

@media (max-width: 620px) {
  .steps.is-stacked .step-card {
    grid-template-columns: 1fr;
    gap: 0.9rem;
  }
  .steps.is-stacked .step-card__icon { grid-row: auto; }
}

/* ---------- Contacte ---------- */
.contact {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: start;
}
.contact__info .lead {
  font-size: var(--step-1);
  color: var(--red-800);
  font-weight: 500;
  margin-bottom: 1.5rem;
}
.contact__list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}
.contact__list li {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.contact__list .ic {
  flex: none;
  width: 46px; height: 46px;
  border-radius: 14px;
  background: var(--red-06);
  color: var(--red);
  display: grid;
  place-items: center;
}
.contact__list .ic svg { width: 22px; height: 22px; }
.contact__list .k {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red-700);
  font-weight: 600;
}
.contact__list .v {
  font-weight: 600;
  color: var(--red-800);
  font-size: 1.05rem;
}
a.contact__list-link:hover .v { text-decoration: underline; }

/* Botó "Com arribar-hi" (Google Maps) */
.map-btn { margin-top: 1.75rem; }
.map-btn svg { flex: none; }

/* Formulari */
.form {
  background: var(--white);
  border: 1px solid var(--red-10);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  box-shadow: var(--shadow-md);
  display: grid;
  gap: 1.15rem;
}
.field { display: grid; gap: 0.45rem; }
.field label {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--red-800);
}
.field label .req { color: var(--red); }
.field input,
.field textarea {
  font: inherit;
  color: var(--red-900);
  padding: 0.85rem 1rem;
  border: 1.5px solid var(--red-14);
  border-radius: 12px;
  background: var(--white);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  width: 100%;
}
.field input::placeholder,
.field textarea::placeholder { color: rgba(107, 20, 26, 0.4); }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 4px var(--red-10);
}
.field textarea { resize: vertical; min-height: 120px; }

.form__note {
  font-size: 0.85rem;
  color: var(--red-700);
  margin-top: -0.25rem;
}
.form__status {
  display: none;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 1.1rem;
  border-radius: 12px;
  background: var(--red-06);
  border: 1px solid var(--red-14);
  color: var(--red-800);
  font-weight: 500;
  font-size: 0.95rem;
}
.form__status.is-visible { display: flex; }
.form__status svg { flex: none; width: 20px; height: 20px; color: var(--red); }

/* ---------- Parada / productes (targetes que obren WhatsApp) ---------- */
.order { margin: clamp(2rem, 5vw, 3.25rem) 0 clamp(2.5rem, 6vw, 4rem); }
.order__head { text-align: center; max-width: 46rem; margin: 0 auto 2rem; }
.order__title {
  font-size: var(--step-2);
  margin: 0.35rem 0 0.6rem;
}
.order__sub { color: var(--red-700); }

/* --- Carrusel de cartes col·leccionables (Pokédex) --- */
.pdex {
  --card-w: 320px;          /* amplada de la carta central (creix per breakpoints, més avall) */
  --card-gap: 26px;         /* separació entre carta central i les laterals */
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(0.25rem, 2vw, 1rem);
}
.pdex__stage {
  position: relative;
  height: 560px;
  perspective: 1500px;
}

/* La carta */
.pcard {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--card-w);
  /* posició per defecte (amagada); el JS sobreescriu --x/--scale/--rot per a cada carta */
  --x: 0px; --scale: 0.7; --rot: 0deg; --z: 0;
  transform: translate(-50%, -50%) translateX(var(--x)) scale(var(--scale)) rotateY(var(--rot));
  z-index: var(--z);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.5s var(--ease), opacity 0.5s var(--ease);
  will-change: transform;
}
.pdex.is-ready .pcard.is-visible { opacity: 1; }
.pdex.is-ready .pcard.is-side { opacity: 0.72; cursor: pointer; pointer-events: auto; }
.pdex.is-ready .pcard.is-center { pointer-events: auto; }
/* Nota: les laterals ja queden enrere amb l'opacitat. No hi posem filter:
   trencaria el backdrop-filter del vidre (.pcard__glass) que hi ha a dins. */

/* Marc de la carta: vora daurada + fons crema, aire de col·leccionable */
.pcard__frame {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 14px 14px 18px;
  border-radius: 22px;
  /* Vidre: crema translúcid + desenfocat del que hi ha darrere. Com que les cartes
     se solapen, per la central s'hi veuen les del costat difuminades: això és el
     que fa que es llegeixi com un vidre i no com un plàstic pintat. */
  background:
    linear-gradient(160deg, rgba(255, 253, 249, 0.86), rgba(246, 236, 224, 0.72));
  backdrop-filter: blur(18px) saturate(1.25);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
  border: 3px solid transparent;
  background-clip: padding-box;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  isolation: isolate;
  transition: box-shadow 0.5s var(--ease);
}
/* Sense backdrop-filter (navegadors antics): crema opac de tota la vida */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .pcard__frame { background: linear-gradient(160deg, #fffdf9, #f6ece0); }
}

/* Reflexos del vidre: llum a la cantonada de dalt a l'esquerra i cantells
   il·luminats. No tenyeix la carta, només hi posa la llum. */
.pcard__glass {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(115% 70% at 8% -12%, rgba(255,255,255,0.7), transparent 52%),
    linear-gradient(200deg, transparent 62%, rgba(255,255,255,0.35));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.95),
    inset 0 -1px 0 rgba(255,255,255,0.5);
}
/* La carta central: ombra profunda perquè sembli que sura sobre les altres */
.pcard.is-center .pcard__frame {
  box-shadow: 0 44px 76px -34px rgba(140, 45, 25, 0.55),
              0 12px 26px -18px rgba(140, 45, 25, 0.35);
}
/* Vora metàl·lica (daurat → vermell) amb un segon gradient sota la vora */
.pcard__frame::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 25px;
  padding: 3px;
  background: linear-gradient(150deg, #f4c66b, #e6a23c 30%, var(--red) 75%, #f4c66b);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  z-index: 2;
}
/* Reflex "holo" que travessa la carta central */
.pcard__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,0.55) 46%, rgba(255,255,255,0.05) 60%, transparent 72%);
  transform: translateX(-120%);
  transition: transform 0.9s var(--ease);
  pointer-events: none;
  z-index: 3;
  mix-blend-mode: screen;
}
.pcard.is-center .pcard__frame::after { transform: translateX(120%); }

.pcard__photo {
  position: relative;
  z-index: 2;               /* per sobre del vidre */
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 1 / 1;      /* foto gran i quadrada: molta més presència que el 3:2 */
  background: var(--cream-2);
  box-shadow: 0 14px 30px -18px rgba(60, 20, 10, 0.55);
}
.pcard__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Degradat a la base + cantell de llum: la foto també sembla encastada al vidre */
.pcard__photo::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(to top, rgba(60, 20, 10, 0.14), transparent 24%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
  pointer-events: none;
  z-index: 1;
}
/* Zoom lent (Ken Burns) mentre la carta és al centre */
.pcard.is-center .pcard__photo img { animation: pcard-zoom 9s var(--ease) forwards; }
@keyframes pcard-zoom {
  from { transform: scale(1); }
  to   { transform: scale(1.1); }
}

.pcard__tag {
  position: absolute;
  top: 24px;
  left: 24px;
  z-index: 4;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #6b3e00;
  background: linear-gradient(160deg, #ffe4a3, #f4c66b);
  border: 1px solid rgba(180, 120, 20, 0.4);
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  box-shadow: 0 2px 6px -2px rgba(120, 80, 0, 0.5);
}
.pcard__name {
  position: relative;
  z-index: 2;
  font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.6rem);
  margin: 0.9rem 0 0.4rem;
  color: var(--red-800);
}
.pcard__desc {
  position: relative;
  z-index: 2;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--red-700);
  margin-bottom: 1.1rem;
  min-height: 3.1em;
}
.pcard__btn { position: relative; z-index: 2; width: 100%; justify-content: center; }
.pcard__btn svg { flex: none; }

/* Fletxes de navegació */
.pdex__nav {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--white);
  color: var(--red);
  border: 1.5px solid var(--red-14);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  z-index: 40;             /* per sobre de la carta central (z 30) */
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease),
              background 0.2s var(--ease), color 0.2s var(--ease);
}
.pdex__nav:hover {
  background: var(--red);
  color: var(--white);
  transform: scale(1.08);
  box-shadow: var(--shadow-md);
}
.pdex__nav:active { transform: scale(0.96); }

/* Punts selectors */
.pdex__dots {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
}
.pdex__dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--red-14);
  cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease);
}
.pdex__dot:hover { background: var(--red-22); }
.pdex__dot.is-active { background: var(--red); transform: scale(1.35); }

/* Sense JS o mentre carrega: mostra les cartes en columna perquè sempre siguin accessibles */
.pdex:not(.is-ready) .pdex__stage {
  height: auto;
  display: grid;
  gap: 1.25rem;
  perspective: none;
}
.pdex:not(.is-ready) .pcard {
  position: static;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  transform: none;
  opacity: 1;
  pointer-events: auto;
}
.pdex:not(.is-ready) .pdex__nav,
.pdex:not(.is-ready) .pdex__dots { display: none; }

@media (max-width: 420px) {
  .pdex { --card-w: 280px; }
  .pdex__stage { height: 500px; }
  .pdex__nav { width: 44px; height: 44px; }
}
@media (min-width: 760px) {
  .pdex { --card-w: 360px; }
  .pdex__stage { height: 600px; }
}
@media (min-width: 1040px) {
  .pdex { --card-w: 400px; }
  .pdex__stage { height: 640px; }
}
/* En pantalles amples el carrusel surt una mica del contenidor per guanyar aire */
@media (min-width: 1280px) {
  .pdex { --card-w: 440px; margin-inline: -70px; }
  .pdex__stage { height: 680px; }
}

@media (prefers-reduced-motion: reduce) {
  .pcard { transition: opacity 0.3s ease; }
  .pcard__frame::after { display: none; }
  .pcard.is-center .pcard__photo img { animation: none; }
}

/* ---------- Botó flotant de WhatsApp ---------- */
.wa-float {
  position: fixed;
  right: clamp(1rem, 3vw, 1.75rem);
  bottom: clamp(1rem, 3vw, 1.75rem);
  z-index: 95;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--red);
  color: var(--white);
  box-shadow: var(--shadow-md);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.wa-float:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.wa-float svg { width: 32px; height: 32px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--red);
  color: var(--white);
  padding-block: clamp(3rem, 6vw, 4.5rem) 2rem;
}
.site-footer a { color: var(--white); }
.footer-grid {
  display: grid;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  font-weight: 700;
  font-size: 1.45rem;
}
.footer-brand img {
  width: 54px; height: 54px;
  border-radius: var(--radius-logo);
  /* Medalló blanc del logo sobre el fons vermell del footer */
  background: var(--white);
}
.footer-col h4 {
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.85);
}
.footer-col p,
.footer-col a { color: rgba(255, 255, 255, 0.92); }
.footer-col .footer-line { display: block; margin-bottom: 0.5rem; }
.footer-col a:hover { text-decoration: underline; }
.footer-tagline {
  margin-top: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
  font-style: italic;
  max-width: 26ch;
}

.socials { display: flex; gap: 0.75rem; }
.socials a {
  width: 44px; height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: background-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.socials a:hover {
  background: var(--white);
  color: var(--red);
  transform: translateY(-3px);
}
.socials svg { width: 20px; height: 20px; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.75rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
}

/* ---------- Animacions d'aparició (scroll) ----------
   La guarda 'html.js' NO és cosmètica: qui fa visible tot això és main.js afegint
   .is-visible. Sense la guarda, si main.js no carrega —un hipo de la xarxa, una
   excepció a qualsevol línia— TOTA la pàgina es queda invisible. No degradada:
   invisible. Amb la guarda, sense JS = contingut visible, que és com ha de ser.
   La classe 'js' ja l'afegeix l'<head> abans de pintar res.
   (Tampoc hi va 'will-change' permanent: el navegador ja promociona l'element
   mentre dura la transició, i deixar-lo fix obliga a mantenir una capa de
   composició viva per a cada .reveal de la pàgina, que n'hi ha desenes.) */
html.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
html.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}
/* Escalonat dins de graelles */
.stagger > .is-visible:nth-child(2) { transition-delay: 0.08s; }
.stagger > .is-visible:nth-child(3) { transition-delay: 0.16s; }
.stagger > .is-visible:nth-child(4) { transition-delay: 0.24s; }

/* ---------- Breakpoints ---------- */
@media (min-width: 620px) {
  .values-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat + .stat { border-left: 1px solid var(--red-10); }
}

@media (min-width: 900px) {
  .nav-links { display: flex; }
  .nav-cta { display: inline-flex; }
  .nav-toggle { display: none; }

  .values-grid { grid-template-columns: repeat(4, 1fr); }

  .about { grid-template-columns: 1.15fr 0.85fr; }
  .about--reverse .about__text { order: 2; }

  .product { grid-template-columns: 0.9fr 1.1fr; }
  .product__visual { order: -1; }

  /* Una sola columna: el formulari d'aquesta secció es va treure i,
     amb dues columnes, el text quedava estret amb mig buit al costat. */
  .contact { grid-template-columns: 1fr; max-width: 46rem; margin-inline: auto; }

  .testimonials { grid-template-columns: repeat(3, 1fr); }

  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}

/* ---------- Zoom lent (Ken Burns) a la foto activa ---------- */
.carousel__slide.is-active img { animation: kenburns 8s ease-out both; }
@keyframes kenburns {
  from { transform: scale(1.02); }
  to { transform: scale(1.1); }
}

/* Vel inferior a la galeria (perquè es llegeixin els rètols) + clic per ampliar */
.gallery-carousel .carousel__slide { cursor: zoom-in; }
.gallery-carousel .carousel__slide::before {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 45%;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to top, rgba(20, 4, 5, 0.55), transparent);
}
.gallery-carousel figcaption { z-index: 2; }

/* ---------- Navegació activa (scrollspy) ---------- */
.nav-links a.is-current { color: var(--red); }
.nav-links a.is-current::after { transform: scaleX(1); }

/* Capçalera sobre el hero fosc (abans de fer scroll): text clar */
.site-header:not(.is-scrolled) .brand,
.site-header:not(.is-scrolled) .brand span,
.site-header:not(.is-scrolled) .nav-links a { color: #fff; }
.site-header:not(.is-scrolled) .nav-links a::after { background: #fff; }
.site-header:not(.is-scrolled) .lang-switch { border-color: rgba(255, 255, 255, 0.55); }
.site-header:not(.is-scrolled) .lang-btn { color: #fff; }
.site-header:not(.is-scrolled) .lang-btn.is-active { background: #fff; color: var(--red); }
.site-header:not(.is-scrolled) .nav-toggle {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.14);
}
.site-header:not(.is-scrolled) .nav-toggle span { background: #fff; }

/* ---------- Banda de xifres (comptadors) ---------- */
.stats-band {
  padding-block: clamp(2.5rem, 6vw, 4rem);
  background: var(--cream);
  border-block: 1px solid var(--red-10);
}
.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem 1rem;
  text-align: center;
}
.stat { display: grid; gap: 0.3rem; }
.stat__num {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 140;
  font-weight: 700;
  font-size: clamp(3rem, 8vw, 4.5rem);
  line-height: 1;
  color: var(--red);
}
.stat__label {
  font-size: var(--step--1);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--red-700);
}

/* ---------- Banda de cita (parallax) ---------- */
.quote-band {
  position: relative;
  display: grid;
  place-items: center;
  text-align: center;
  min-height: clamp(320px, 55vh, 520px);
  padding: clamp(3rem, 8vw, 6rem) 0;
  /* Primer el JPG (navegadors antics), després l'AVIF via image-set: qui l'entengui
     es queda l'AVIF, que pesa la meitat. Qui no, ni s'assabenta. */
  background-image: url("../assets/hero-2.jpg");
  background-image: image-set(
    url("../assets/hero-2.avif") type("image/avif"),
    url("../assets/hero-2.jpg") type("image/jpeg"));
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}
.quote-band__scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: rgba(28, 6, 7, 0.62);
}
.quote-band__inner {
  position: relative;
  z-index: 1;
  max-width: 46rem;
  margin: 0;
  padding-inline: clamp(1.25rem, 5vw, 2.5rem);
  color: #fff;
}
.quote-band__text {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 140;
  font-weight: 600;
  font-style: italic;
  font-size: clamp(1.6rem, 4.5vw, 3rem);
  line-height: 1.2;
  text-shadow: 0 3px 24px rgba(0, 0, 0, 0.4);
}
.quote-band__author {
  display: block;
  margin-top: 1.2rem;
  font-style: normal;
  font-size: var(--step--1);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
}

/* ---------- Testimonis ---------- */
.testimonials {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
.testimonial {
  margin: 0;
  background: var(--white);
  border: 1px solid var(--red-10);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  box-shadow: var(--shadow-sm);
  display: grid;
  gap: 0.85rem;
}
.testimonial__stars { color: var(--red); letter-spacing: 0.15em; }
.testimonial blockquote {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.6;
  color: var(--red-800);
}
.testimonial figcaption {
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--red-700);
}

/* ---------- FAQ (acordió) ---------- */
.faq-list {
  max-width: 46rem;
  margin-inline: auto;
  display: grid;
  gap: 0.85rem;
}
.faq-item {
  background: var(--white);
  border: 1px solid var(--red-10);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 1.1rem 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--font-display);
  font-variation-settings: "opsz" 140;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--red-800);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-family: var(--font-body);
  font-size: 1.5rem;
  line-height: 1;
  color: var(--red);
  flex: none;
  transition: transform 0.25s var(--ease);
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item__a { padding: 0 1.4rem 1.25rem; color: var(--red-700); }
.faq-item__a p { margin: 0; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 3rem);
  background: rgba(20, 4, 5, 0.9);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0.3s;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox__img {
  max-width: 100%;
  max-height: 100%;
  border-radius: var(--radius);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  transform: scale(0.96);
  transition: transform 0.3s var(--ease);
}
.lightbox.is-open .lightbox__img { transform: scale(1); }
.lightbox__close {
  position: absolute;
  top: clamp(0.8rem, 3vw, 1.4rem);
  right: clamp(0.8rem, 3vw, 1.4rem);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background-color 0.2s var(--ease);
}
.lightbox__close:hover { background: rgba(255, 255, 255, 0.28); }

/* ---------- Pantalla de càrrega (preloader) ---------- */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: var(--cream);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s var(--ease), visibility 0.6s;
}
.preloading .preloader { opacity: 1; visibility: visible; }
.preloading { overflow: hidden; }
.preloader__logo {
  width: clamp(90px, 18vw, 130px);
  height: auto;
  border-radius: var(--radius-logo);
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.06); opacity: 1; }
}

/* ---------- Barra de progrés de scroll ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 150;
  height: 3px;
  width: 0;
  background: var(--red);
  transition: width 0.1s linear;
}

/* ---------- Cinta de paraules (marquee) ---------- */
.marquee {
  overflow: hidden;
  background: var(--red);
  color: #fff;
  padding-block: 0.85rem;
}
.marquee__track {
  display: inline-flex;
  align-items: center;
  gap: 1.6rem;
  white-space: nowrap;
  will-change: transform;
  animation: marquee 34s linear infinite;
  font-family: var(--font-display);
  font-variation-settings: "opsz" 140;
  font-weight: 600;
  font-style: italic;
  font-size: clamp(1.05rem, 2.4vw, 1.6rem);
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__sep { color: rgba(255, 255, 255, 0.5); font-style: normal; }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- Botó "torna a dalt" ---------- */
.to-top {
  position: fixed;
  left: clamp(1rem, 3vw, 1.75rem);
  bottom: clamp(1rem, 3vw, 1.75rem);
  z-index: 95;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1.5px solid var(--red-22);
  background: var(--cream);
  color: var(--red);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease),
              visibility 0.3s, background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--red); color: #fff; border-color: var(--red); }
.to-top svg { width: 22px; height: 22px; }

/* ---------- Línia d'accent animada sota els titulars centrats ---------- */
.section-head .section-title::after {
  content: "";
  display: block;
  width: 0;
  height: 3px;
  margin: 0.9rem auto 0;
  background: var(--red);
  border-radius: 2px;
  transition: width 0.7s var(--ease) 0.15s;
}
.section-head .section-title.is-visible::after { width: 54px; }

/* Escalonat estès (hero i graelles de 5-6 elements) */
.stagger > .is-visible:nth-child(5) { transition-delay: 0.32s; }
.stagger > .is-visible:nth-child(6) { transition-delay: 0.40s; }

/* ---------- Detalls d'alta qualitat ---------- */
/* Les àncores no queden amagades sota la capçalera fixa */
section[id] { scroll-margin-top: 84px; }

/* Caplletra a la primera frase de "Qui som" */
#qui-som .about__text .lead::first-letter {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 144;
  font-weight: 700;
  font-size: 3.4em;
  line-height: 0.78;
  float: left;
  margin: 0.06em 0.14em 0 0;
  color: var(--red);
}

/* L'espiga divisòria es dibuixa sola en aparèixer */
.divider svg path {
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  transition: stroke-dashoffset 0.9s var(--ease);
}
.divider.is-visible svg path { stroke-dashoffset: 0; }
.divider.is-visible svg path:nth-child(2) { transition-delay: 0.10s; }
.divider.is-visible svg path:nth-child(3) { transition-delay: 0.14s; }
.divider.is-visible svg path:nth-child(4) { transition-delay: 0.18s; }
.divider.is-visible svg path:nth-child(5) { transition-delay: 0.22s; }
.divider.is-visible svg path:nth-child(6) { transition-delay: 0.26s; }
.divider.is-visible svg path:nth-child(7) { transition-delay: 0.30s; }

/* Columnes responsive de xifres i testimonis.
   IMPORTANT: van DESPRÉS de les regles base .stats-grid / .testimonials
   perquè, amb la mateixa especificitat, guanya l'última regla de l'ordre. */
@media (min-width: 620px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat + .stat { border-left: 1px solid var(--red-10); }
}
@media (min-width: 800px) {
  .testimonials { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Contingut per idioma (per als textos llargs de modals) ---------- */
html[lang="es"] .lang-ca { display: none; }
html[lang="ca"] .lang-es { display: none; }


/* ---------- Receptes ---------- */
.recipe-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
/* La foto ocupa la targeta sencera i el text va a sobre, damunt d'un degradat.
   Al passar-hi el ratolí: la foto fa zoom lent i la descripció + "Veure recepta"
   pugen des de baix. Tota la targeta és clicable (::after de .recipe-card__cta). */
.recipe-card {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--red-800);
  box-shadow: var(--shadow-sm);
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
}
.recipe-card:hover,
.recipe-card:focus-within {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}
/* Degradat de llegibilitat. Va a la targeta i no a la foto perquè no li afecti el zoom. */
.recipe-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to top,
    rgba(46, 12, 8, 0.94) 0%,
    rgba(46, 12, 8, 0.72) 24%,
    rgba(46, 12, 8, 0.22) 50%,
    rgba(46, 12, 8, 0.04) 70%,
    transparent 88%);
  transition: opacity 0.45s var(--ease);
}
.recipe-card:hover::before,
.recipe-card:focus-within::before { opacity: 0.92; }

/* El zoom va al contenidor, no a l'<img>: la imatge ja té l'animació de scroll
   (photo-plane) i una animació guanya sempre a una regla normal. */
.recipe-card__media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--red-04);
  transform: scale(1.001);
  transition: transform 1.1s var(--ease);
}
.recipe-card:hover .recipe-card__media,
.recipe-card:focus-within .recipe-card__media { transform: scale(1.08); }
.recipe-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }

.recipe-card__body {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 1.5rem 1.4rem 1.5rem;
  color: var(--white);
}

/* Xips: temps, racions i dificultat */
.recipe-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  list-style: none;
  margin: 0 0 0.15rem;
  padding: 0;
}
.recipe-card__meta li {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 0.28rem 0.62rem;
  border-radius: 999px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.recipe-card__meta svg { width: 13px; height: 13px; flex: none; opacity: 0.9; }

.recipe-card__body h3 {
  font-size: var(--step-1);
  color: var(--white);
  margin: 0;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
}
.recipe-card__desc {
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0;
}

/* "Veure recepta": ara és un enllaç subratllat, no un botó gran */
.recipe-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.25rem;
  padding: 0 0 3px;
  border: 0;
  border-bottom: 2px solid rgba(255, 255, 255, 0.55);
  background: none;
  font: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--white);
  cursor: pointer;
  transition: gap 0.25s var(--ease), border-color 0.25s var(--ease);
}
.recipe-card__cta:hover { gap: 0.7rem; border-bottom-color: var(--white); }
.recipe-card__cta:focus-visible { outline: 2px solid var(--white); outline-offset: 4px; }
/* Enllaç estirat: clicar qualsevol punt de la targeta obre la recepta */
.recipe-card__cta::after { content: ""; position: absolute; inset: 0; z-index: 3; }
.recipe-card:hover .recipe-card__cta .btn__arrow { transform: translateX(4px); }

/* Amb ratolí i pantalla gran, la descripció i el CTA s'amaguen fins al hover.
   Al mòbil (sense hover) es veu tot sempre: allà no hi ha manera de descobrir-ho. */
@media (hover: hover) and (min-width: 760px) {
  .recipe-card__desc,
  .recipe-card__cta {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.45s var(--ease), transform 0.45s var(--ease),
                gap 0.25s var(--ease), border-color 0.25s var(--ease);
  }
  .recipe-card:hover .recipe-card__desc,
  .recipe-card:focus-within .recipe-card__desc,
  .recipe-card:hover .recipe-card__cta,
  .recipe-card:focus-within .recipe-card__cta {
    opacity: 1;
    transform: none;
  }
  .recipe-card:hover .recipe-card__cta,
  .recipe-card:focus-within .recipe-card__cta { transition-delay: 0.07s; }
  /* El títol puja per deixar-los lloc, en comptes de saltar */
  .recipe-card__body h3 { transition: transform 0.45s var(--ease); }
}

@media (prefers-reduced-motion: reduce) {
  .recipe-card,
  .recipe-card__media,
  .recipe-card__desc,
  .recipe-card__cta { transition: opacity 0.2s ease; }
  .recipe-card:hover,
  .recipe-card:focus-within { transform: none; }
  .recipe-card:hover .recipe-card__media,
  .recipe-card:focus-within .recipe-card__media { transform: none; }
}

/* ---------- Modals (històries i receptes) ---------- */
html.modal-open { overflow: hidden; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 210;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(0.75rem, 3vw, 2rem);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0.3s;
}
.modal.is-open { opacity: 1; visibility: visible; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(28, 6, 7, 0.62); }
.modal__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(680px, 100%);
  max-height: min(90vh, 920px);
  background: var(--cream);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: translateY(14px) scale(0.985);
  transition: transform 0.3s var(--ease);
}
.modal.is-open .modal__panel { transform: none; }
.modal__close {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  z-index: 3;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.88);
  color: var(--red);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background-color 0.2s var(--ease);
}
.modal__close:hover { background: #fff; }
.modal__body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: clamp(1.5rem, 4vw, 2.5rem);
}
.modal__img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
}
.modal__body h2 { font-size: var(--step-2); margin-bottom: 1rem; }
.modal__text p { color: var(--red-700); }
.modal__text p + p { margin-top: 0.9rem; }
.modal__text strong { color: var(--red-800); }
.modal__text h3 { font-size: var(--step-1); margin: 1.5rem 0 0.7rem; }
.modal__text ul, .modal__text ol { margin: 0; padding-left: 1.2rem; color: var(--red-700); display: grid; gap: 0.4rem; }
.modal__text li { padding-left: 0.15rem; }

@media (min-width: 760px) {
  .recipe-grid { grid-template-columns: repeat(3, 1fr); }
}

/* =================================================================
   CORRECCIONS DE L'AUDITORIA UI/UX
   ================================================================= */

/* A1 · El parallax (background-attachment: fixed) està trencat a iOS → al mòbil, scroll normal */
@media (max-width: 900px) {
  .quote-band { background-attachment: scroll; }
}

/* A2 + M5 · Àrees tàctils mínimes de 44×44 px */
.lang-btn {
  min-height: 44px;
  padding: 0 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.carousel__btn { width: 44px; height: 44px; }
.modal__close { width: 44px; height: 44px; }
/* Els punts del carrusel fan 9 px: els donem una zona de toc invisible de 44 px d'alt */
.carousel__dots { gap: 0.75rem; }
.carousel__dot { position: relative; }
.carousel__dot::before {
  content: "";
  position: absolute;
  inset: -18px -8px;
}

/* A3 · El placeholder del formulari fallava el contrast (2,34:1) → ara ~4,6:1 */
.field input::placeholder,
.field textarea::placeholder { color: rgba(107, 20, 26, 0.62); }

/* B1 · Copyright del footer: 80% de blanc fallava AA → 88% */
.footer-bottom { color: rgba(255, 255, 255, 0.88); }

/* B2 · Longitud de línia més còmoda (45-75 caràcters) */
.section-head { max-width: 40rem; }
.faq-list { max-width: 40rem; }

/* M1 · Jerarquia del hero: emblema més contingut i el missatge de venda més gran */
.hero__logo-wrap { width: clamp(104px, 17vw, 144px); }
.hero__lead {
  font-size: var(--step-1);
  max-width: 40ch;
  color: rgba(255, 255, 255, 0.95);
}

/* M2 · CTA a mitja pàgina (després d'"El producte") */
.product__cta { margin-top: 2rem; }

/* ---------- Capa WebGL (additiva) ----------
   El canvas només es fa visible quan la init ha anat bé (html.gl-on).
   Si no hi ha WebGL, si falla, si és mòbil o si l'usuari demana menys
   moviment → no hi ha canvas i el carrusel DOM segueix fent la seva feina. */
.hero__gl {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.9s var(--ease);
  pointer-events: none;
}
html.gl-on .hero__gl { opacity: 1; }
html.gl-on .hero__bg { display: none; }   /* el carrusel DOM feia de fallback */

/* Medalló 3D de l'emblema. Ocupa el mateix forat que la <img>, que segueix
   allà a sota fent de xarxa: si el canvas no arriba, no es nota res. */
.hero__medal {
  position: absolute;
  inset: -14%;                 /* marge perquè la llum i l'ombra puguin vessar */
  width: 128%;
  height: 128%;
  display: block;
  opacity: 0;
  transition: opacity 0.8s var(--ease);
  pointer-events: none;
}
.hero__logo-wrap.is-gl .hero__medal { opacity: 1; }
.hero__logo-wrap.is-gl .hero__logo { opacity: 0; }
/* Ombra sota la moneda. Abans la dibuixava el shader; ara que la moneda és un
   objecte 3D de veritat, va aquí: és estàtica i no costa res per fotograma. */
.hero__logo-wrap.is-gl::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7%;
  width: 72%;
  height: 14%;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(40, 8, 4, 0.42), transparent);
  filter: blur(5px);
  pointer-events: none;
  z-index: -1;
}

/* Distorsió al passar el rató per les fotos de receptes (només desktop).
   El canvas no rep clics: el botó "Veure recepta" segueix sent el de sempre. */
/* (la posició ja la fixa .recipe-card__media més amunt: absolute, omplint la
   targeta. Aquí NO la tornem a declarar o guanyaria per ser posterior.) */
.recipe-card__media .rc-gl {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  transition: opacity 0.5s var(--ease);
  pointer-events: none;
  border-radius: inherit;
}
.recipe-card__media.is-gl .rc-gl { opacity: 1; }
/* descendent, no '> img': ara la foto va dins d'un <picture> */
.recipe-card__media.is-gl img { opacity: 0; }

/* ---------- Fotos com a plans 3D lligats al scroll ----------
   Amb animacions natives de scroll: 0 KB de JavaScript. Si el navegador no
   les té (@supports), no passa absolutament res: les fotos es queden quietes,
   que és exactament com estan ara. */
@supports (animation-timeline: view()) {

  /* ---- El pla 3D: TAMBÉ al mòbil ----
     Anima NOMÉS 'transform', així que se'n va al compositor i no repinta res: és
     pràcticament gratis. Per això sí que val la pena al mòbil — és l'únic efecte de
     tota aquesta capa que arriba a qui de debò compra el pollastre, que obre la web
     al camp amb el telèfon. Amplitud continguda (4°), que no és un portafolis.

     NOTA: la galeria queda FORA a propòsit. La seva regla tenia la mateixa
     especificitat que '.carousel__slide.is-active img { animation: kenburns }' i,
     per ser posterior, guanyava i li MATAVA el zoom lent. La galeria ja entra amb
     la màscara i ja té el seu Ken Burns: no li cal res més. */
  @media (prefers-reduced-motion: no-preference) {
    .recipe-card__media img,
    .recipe-card__media > .rc-gl {
      animation: photo-plane-soft linear both;
      animation-timeline: view();
      animation-range: entry 8% cover 52%;
    }
    @keyframes photo-plane-soft {
      from { transform: perspective(900px) rotateX(4deg) scale(1.06) translateY(-1.5%); }
      to   { transform: perspective(900px) rotateX(0deg) scale(1) translateY(0); }
    }
  }

  /* ---- Amplitud sencera i màscares: només a escriptori ----
     El 'clip-path' NO es compositea: repinta al fil principal a cada fotograma. En un
     mòbil de gamma mitjana amb 4G això sí que es nota, i allà el pressupost de CPU ha
     d'anar a què la web CARREGUI, no a què llueixi. */
  @media (prefers-reduced-motion: no-preference) and (min-width: 1024px) {
    .recipe-card__media img,
    .recipe-card__media > .rc-gl {
      animation-name: photo-plane;
    }
    @keyframes photo-plane {
      from { transform: perspective(900px) rotateX(8deg) scale(1.12) translateY(-2.5%); }
      to   { transform: perspective(900px) rotateX(0deg) scale(1) translateY(0); }
    }

    /* Màscara: els blocs grans es descobreixen de baix a dalt */
    .gallery-carousel,
    .video-band .video-frame,
    .recipe-card__media {
      animation: mask-wipe linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 85%;
    }
    @keyframes mask-wipe {
      from { clip-path: inset(0 0 26% 0); }
      to   { clip-path: inset(0 0 0 0); }
    }
  }
}

/* ---------- Preferència de moviment reduït ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  /* 'html.js' i no només '.reveal': ha de tenir com a mínim la mateixa especificitat
     que la regla que amaga (html.js .reveal), o el contingut es quedaria invisible. */
  html.js .reveal { opacity: 1; transform: none; transition: none; }
  .hero__logo-wrap, .hero__scroll svg { animation: none; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ---------- Formulari de comanda (modal previ a WhatsApp) ----------
   Reaprofita .field i .btn del formulari de contacte; aquí només hi ha
   el que és propi: les dues columnes, la tria d'entrega i el bloc
   d'adreça que apareix només si cal. */
.comanda { gap: 1rem; margin-top: 1.25rem; }
.comanda__intro { color: var(--red-700); margin-bottom: 0.5rem; }
.comanda__fila { display: grid; gap: 1rem; }
@media (min-width: 560px) {
  .comanda__fila { grid-template-columns: 1fr 1fr; }
}
.comanda__tria {
  border: 1.5px solid var(--red-14);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  display: grid;
  gap: 0.6rem;
  margin: 0;
}
.comanda__tria legend {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--red-800);
  padding: 0 0.35rem;
}
.comanda__opcio {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  font-size: 0.98rem;
  color: var(--red-800);
}
.comanda__opcio input { accent-color: var(--red); width: 18px; height: 18px; flex: none; }
.comanda__adreca { display: grid; gap: 1rem; }
.comanda__nota { margin-top: 0.25rem; }
.comanda__enviar { width: 100%; justify-content: center; margin-top: 0.25rem; }

/* Total de la comanda, dins del formulari */
.comanda__total {
  display: grid;
  gap: 0.15rem;
  padding: 0.9rem 1.1rem;
  border-radius: 12px;
  background: var(--red-06);
  border: 1.5px solid var(--red-14);
  margin: 0;
}
.comanda__total-etiqueta {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red-700);
}
.comanda__total strong {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 36;
  font-size: 1.75rem;
  line-height: 1.1;
  color: var(--red);
  font-variant-numeric: tabular-nums;
}
.comanda__total-detall { font-size: 0.82rem; color: var(--red-700); }

/* Botó de comanda dins de la secció de contacte */
.contact__cta { margin: 1.75rem 0 0; }
.contact__cta .btn { width: 100%; max-width: 22rem; justify-content: center; }
