/* ==========================================================================
   DosErres — full de estils
   Colors, tipografia i mides es controlen des de les variables de :root.
   ========================================================================== */

:root {
  --ink: #151414;          /* negre de la marca */
  --ink-soft: #2a2827;
  --paper: #f4f0e9;        /* crema de fons */
  --paper-2: #ebe5da;      /* crema una mica més fosc */
  --white: #ffffff;
  --muted: #6e6862;        /* text secundari */
  --line: rgba(21, 20, 20, 0.14);
  --line-light: rgba(255, 255, 255, 0.18);
  --accent: #7d1f2c;       /* vermell vi, per a detalls petits */

  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  --container: 1280px;
  --gutter: clamp(16px, 4vw, 56px);
  --section: clamp(72px, 10vw, 140px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; line-height: 1.1; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.section { padding-block: var(--section); }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--white); padding: 10px 14px; border-radius: 4px;
}
.skip:focus { top: 16px; }

/* ---------- Tipografia ---------- */
.display {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.2rem, 4.6vw, 4.2rem);
  line-height: 1.04;
  letter-spacing: -0.01em;
  text-wrap: balance;
  margin-bottom: 0.5em;
}
.eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.4rem;
}
.eyebrow--light { color: rgba(255, 255, 255, 0.82); }
.lead {
  font-size: clamp(1.05rem, 1.35vw, 1.25rem);
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 62ch;
}
.section-head { max-width: 760px; margin-bottom: clamp(40px, 5vw, 72px); }
.section-head--wide { max-width: 980px; }
.section-head--row {
  max-width: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.section-head--row .display { margin-bottom: 0; }

/* ---------- Botons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 1rem 1.9rem;
  border: 1px solid currentColor;
  font-size: 0.76rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
  line-height: 1; white-space: nowrap;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn--solid { background: var(--ink); color: var(--white); border-color: var(--ink); }
.btn--solid:hover { background: var(--accent); border-color: var(--accent); }
.btn--light { color: var(--white); border-color: rgba(255, 255, 255, 0.7); }
.btn--light:hover { background: var(--white); color: var(--ink); border-color: var(--white); }
.btn--solid-light { background: var(--white); color: var(--ink); border-color: var(--white); }
.btn--solid-light:hover { background: var(--paper); }
.btn--big { padding: 1.15rem 2.4rem; }

.link-btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 0;
  font-size: 0.76rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
  position: relative;
}
.link-btn::after {
  content: "→"; font-family: var(--font-body); transition: transform 0.3s var(--ease);
}
.link-btn:hover::after { transform: translateX(4px); }
.link-btn::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform 0.35s var(--ease);
}
.link-btn:hover::before { transform: scaleX(1); }

/* ---------- Capçalera ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  color: var(--white);
  transition: background 0.4s var(--ease), color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.site-header::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to bottom, rgba(0,0,0,0.45), rgba(0,0,0,0));
  opacity: 1; transition: opacity 0.4s var(--ease);
}
.header-inner {
  width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  height: 84px;
}
.brand { display: block; width: 150px; position: relative; }
.brand-logo { width: 100%; height: auto; }
.brand-logo--dark { position: absolute; inset: 0; opacity: 0; transition: opacity 0.3s var(--ease); }
.nav { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 36px); }
.nav > a:not(.btn) {
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  position: relative; padding: 6px 0;
}
.nav > a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left; transition: transform 0.3s var(--ease);
}
.nav > a:not(.btn):hover::after { transform: scaleX(1); }
.nav-cta { padding: 0.8rem 1.4rem; margin-left: 8px; background: var(--white); color: var(--ink); border-color: var(--white); }
.nav-cta:hover { background: var(--paper); border-color: var(--paper); }

.site-header.is-scrolled { color: var(--ink); background: rgba(244, 240, 233, 0.9); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line); }
.site-header.is-scrolled::after { opacity: 0; }
.site-header.is-scrolled .brand-logo--light { opacity: 0; }
.site-header.is-scrolled .brand-logo--dark { opacity: 1; }
.site-header.is-scrolled .nav-cta { background: var(--ink); color: var(--white); border-color: var(--ink); }
.site-header.is-scrolled .nav-cta:hover { background: var(--accent); border-color: var(--accent); }
.site-header.is-scrolled .header-inner { height: 72px; }

.nav-toggle { display: none; width: 44px; height: 44px; position: relative; }
.nav-toggle span {
  position: absolute; left: 10px; right: 10px; height: 1.5px; background: currentColor;
  transition: transform 0.3s var(--ease), top 0.3s var(--ease);
}
.nav-toggle span:first-child { top: 17px; }
.nav-toggle span:last-child { top: 26px; }
.nav-toggle[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }

/* ---------- Portada ---------- */
.hero {
  position: relative; min-height: 100svh; display: grid; place-items: center;
  color: var(--white); background: var(--ink); overflow: hidden; isolation: isolate;
  padding: 140px var(--gutter) 120px;
}
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 38%;
  transform: scale(1.06); animation: heroZoom 14s var(--ease) forwards;
  filter: saturate(0.9) contrast(1.05);
}
@keyframes heroZoom { to { transform: scale(1); } }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(120% 80% at 50% 45%, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0.62) 70%, rgba(0,0,0,0.78) 100%),
    linear-gradient(to bottom, rgba(0,0,0,0.35), rgba(0,0,0,0.15) 40%, rgba(21,20,20,0.95) 100%);
}
.hero-content { text-align: center; max-width: 900px; }
.hero-title { margin: 0 auto; width: clamp(260px, 44vw, 640px); }
.hero-title img { width: 100%; height: auto; filter: drop-shadow(0 6px 30px rgba(0,0,0,0.35)); }
.hero-sub {
  font-family: var(--font-display); font-size: clamp(1.25rem, 2.1vw, 1.75rem); font-weight: 400; font-style: italic;
  color: rgba(255,255,255,0.9); margin: 2rem auto 2.4rem; max-width: 34ch; line-height: 1.35;
}
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-scroll {
  position: absolute; bottom: 34px; left: 50%; transform: translateX(-50%);
  width: 1px; height: 56px; overflow: hidden;
}
.hero-scroll span {
  display: block; width: 1px; height: 100%; background: rgba(255,255,255,0.7);
  animation: scrollLine 2.2s var(--ease) infinite;
}
@keyframes scrollLine { 0% { transform: translateY(-100%); } 60% { transform: translateY(0); } 100% { transform: translateY(100%); } }

/* ---------- Franja de confiança ---------- */
.trust { background: var(--paper); padding: 40px 0 44px; border-bottom: 1px solid var(--line); }
.trust-title {
  text-align: center; font-family: var(--font-display); font-size: clamp(1.3rem, 2.2vw, 1.8rem);
  margin: 0 0 22px; color: var(--ink-soft);
}
.trust-title strong { font-weight: 600; color: var(--ink); }
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; align-items: center; gap: clamp(40px, 5vw, 80px); width: max-content; padding: 6px 0; animation: marquee 55s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(calc(-50% - clamp(20px, 2.5vw, 40px))); } }

/* Logos de restaurants: mida uniforme i to monocrom */
.logo-box { display: flex; align-items: center; justify-content: center; width: 168px; height: 72px; flex: none; }
.logo-box img { max-height: 72px; max-width: 168px; }
.logo-box img, .logo-grid img, .featured-logo {
  max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain;
  filter: grayscale(1) contrast(1.05); opacity: 0.82; transition: opacity 0.3s var(--ease), filter 0.3s var(--ease);
}
.logo-box:hover img, .logo-grid li:hover img, .featured-item:hover .featured-logo { filter: none; opacity: 1; }
.logo-grid {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 1px; background: var(--line);
  border: 1px solid var(--line); margin-bottom: clamp(40px, 5vw, 72px);
}
.logo-grid li { background: var(--paper); display: grid; place-items: center; padding: 26px 22px; min-height: 124px; }
.logo-grid img { max-height: 64px; max-width: 150px; }
/* Cel·la buida per completar la darrera fila de la graella (11 logos) */
.logo-grid::after { content: ""; background: var(--paper); }
.featured-logo { max-height: 84px; max-width: 240px; display: block; }

/* ---------- Manifest ---------- */
.manifest { background: var(--paper); }
.manifest-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.manifest-media { margin: 0; aspect-ratio: 4 / 4.2; overflow: hidden; }
.manifest-media img { width: 100%; height: 100%; object-fit: cover; }
.values {
  margin-top: clamp(56px, 7vw, 96px);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  border-top: 1px solid var(--line);
}
.values li { padding: 36px 32px 8px 0; border-right: 1px solid var(--line); }
.values li + li { padding-left: 32px; }
.values li:last-child { border-right: 0; }
.values-num { display: block; font-size: 0.72rem; letter-spacing: 0.22em; color: var(--accent); font-weight: 600; margin-bottom: 18px; }
.values h3 { font-family: var(--font-display); font-size: 1.9rem; font-weight: 500; margin-bottom: 10px; }
.values p { color: var(--muted); font-size: 0.97rem; }

/* ---------- Productes ---------- */
.products { background: var(--white); }
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 44px); }
.product-media { display: block; aspect-ratio: 4 / 5; overflow: hidden; background: var(--paper-2); }
.product-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease); }
.product:hover .product-media img { transform: scale(1.04); }
.product-body { padding-top: 22px; }
.product-tag { font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin-bottom: 8px; }
.product-name { font-family: var(--font-display); font-size: 2rem; font-weight: 500; margin-bottom: 10px; }
.product-desc { color: var(--ink-soft); font-size: 0.98rem; }
.product-meta { margin: 18px 0 20px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 0.86rem; }
.product-meta div { display: grid; grid-template-columns: 96px 1fr; gap: 10px; margin-bottom: 6px; }
.product-meta dt { color: var(--muted); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.68rem; padding-top: 3px; }
.product-meta dd { margin: 0; color: var(--ink-soft); }
.products-note { margin-top: clamp(36px, 4vw, 56px); color: var(--muted); text-align: center; font-size: 0.95rem; }

/* ---------- L'origen ---------- */
.origin { background: var(--ink); color: var(--paper); }
.origin .display { color: var(--white); }
.origin .lead { color: rgba(244, 240, 233, 0.9); }
.origin p { color: rgba(244, 240, 233, 0.78); }
.origin-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(32px, 6vw, 110px); align-items: center; }
.origin-media { margin: 0; aspect-ratio: 4 / 5; overflow: hidden; }
.origin-media img { width: 100%; height: 100%; object-fit: cover; }
.stats {
  margin-top: clamp(36px, 4vw, 56px); display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
  border-top: 1px solid var(--line-light); padding-top: 28px;
}
.stats strong { display: block; font-family: var(--font-display); font-size: clamp(2rem, 3.4vw, 3rem); font-weight: 500; line-height: 1; color: var(--white); }
.stats span { display: block; margin-top: 6px; font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(244,240,233,0.6); font-weight: 600; }

/* ---------- Restaurants ---------- */
.restaurants { background: var(--paper); }
.featured {
  display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  margin-bottom: clamp(40px, 5vw, 72px);
}
.featured-item { padding: 36px 28px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 18px; justify-content: space-between; }
.featured-item:first-child { padding-left: 0; }
.featured-item:last-child { border-right: 0; }
.featured-label { font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.featured-name { font-family: var(--font-display); font-size: clamp(1.9rem, 3vw, 2.8rem); font-weight: 500; line-height: 1.05; }
.places { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(24px, 3vw, 48px); }
.places h3 { font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 14px; }
.places h3 + ul + h3 { margin-top: 28px; }
.places li { font-family: var(--font-display); font-size: 1.25rem; font-weight: 500; line-height: 1.35; padding: 6px 0; border-bottom: 1px solid var(--line); }
.places li small { font-family: var(--font-body); font-size: 0.72rem; color: var(--muted); letter-spacing: 0.04em; margin-left: 6px; }
.places-cta { background: var(--ink); color: var(--paper); padding: 32px; align-self: start; }
.places-cta p { font-family: var(--font-display); font-size: 1.5rem; line-height: 1.25; margin-bottom: 24px; }
.places-cta .btn--solid { background: var(--white); color: var(--ink); border-color: var(--white); }
.places-cta .btn--solid:hover { background: var(--paper); border-color: var(--paper); }

/* ---------- Com cuinar-la ---------- */
.cook { background: var(--white); }
.cook-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(32px, 6vw, 110px); align-items: center; }
.cook-media { margin: 0; aspect-ratio: 4 / 5; overflow: hidden; }
.cook-media img { width: 100%; height: 100%; object-fit: cover; }
.steps { margin-top: 32px; border-top: 1px solid var(--line); }
.steps li { display: grid; grid-template-columns: 56px 1fr; gap: 16px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.steps li > span { font-family: var(--font-display); font-size: 1.6rem; color: var(--accent); line-height: 1; padding-top: 2px; }
.steps h3 { font-family: var(--font-display); font-size: 1.55rem; font-weight: 500; margin-bottom: 4px; }
.steps p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* ---------- Comunitat ---------- */
.community { background: var(--paper); padding-bottom: calc(var(--section) * 0.8); }
.ig-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.ig-item { display: block; aspect-ratio: 1; overflow: hidden; background: var(--paper-2); }
.ig-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease), filter 0.5s var(--ease); }
.ig-item:hover img { transform: scale(1.05); filter: brightness(0.92); }

/* ---------- Com es fa (vídeo) ---------- */
.film { background: var(--ink); color: var(--white); padding-bottom: clamp(56px, 7vw, 96px); }
.film-stage { position: relative; height: min(88vh, 860px); min-height: 420px; overflow: hidden; }
.film-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.film-overlay {
  position: absolute; inset: 0; display: flex; align-items: flex-end; padding-bottom: clamp(40px, 6vw, 80px);
  background: linear-gradient(180deg, rgba(21,20,20,0.15) 0%, rgba(21,20,20,0) 35%, rgba(21,20,20,0.85) 100%);
}
.film-overlay .container { flex: 0 0 auto; }
.film-overlay .display { max-width: 14ch; color: var(--white); }
.film-sound {
  position: absolute; right: var(--gutter); bottom: clamp(40px, 6vw, 80px); padding: 10px 16px; border: 1px solid rgba(255,255,255,0.6);
  color: var(--white); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; background: rgba(21,20,20,0.35);
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}
.film-sound:hover { background: var(--white); color: var(--ink); }
.journey { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line-light); margin-top: clamp(40px, 5vw, 64px); }
.journey li { padding: 32px 32px 0 0; }
.journey li + li { padding-left: 32px; border-left: 1px solid var(--line-light); }
.journey-num { font-size: 0.74rem; font-weight: 600; letter-spacing: 0.14em; color: rgba(255,255,255,0.55); }
.journey h3 { font-family: var(--font-display); font-size: 1.9rem; font-weight: 500; margin: 10px 0 8px; }
.journey p { color: rgba(255,255,255,0.72); margin: 0; }

/* ---------- Comanda ---------- */
.order { background: var(--paper-2); }
.order-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.order-intro { position: sticky; top: 100px; }
.order-intro a { text-decoration: underline; text-underline-offset: 3px; }
.order-perks { margin-top: 28px; border-top: 1px solid var(--line); }
.order-perks li { padding: 12px 0 12px 22px; border-bottom: 1px solid var(--line); font-size: 0.93rem; color: var(--ink-soft); position: relative; }
.order-perks li::before { content: ""; position: absolute; left: 0; top: 22px; width: 8px; height: 8px; background: var(--accent); border-radius: 50%; }

.order-form { background: var(--white); padding: clamp(24px, 3.5vw, 48px); box-shadow: 0 30px 80px rgba(21,20,20,0.08); }
.order-form fieldset { margin-bottom: 34px; }
.order-form legend { font-family: var(--font-display); font-size: 1.6rem; font-weight: 500; margin-bottom: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; min-width: 0; }
.field label { font-size: 0.74rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.field label em { color: var(--accent); font-style: normal; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field--grow { grid-column: span 1; }
.field input:not([type="checkbox"]), .field select, .field textarea, .line-qty, .line-unit {
  width: 100%; padding: 12px 0; border: 0; border-bottom: 1px solid var(--line); background: transparent;
  font: inherit; font-size: 1rem; color: var(--ink); border-radius: 0; -webkit-appearance: none; appearance: none;
  transition: border-color 0.3s var(--ease);
}
.field select, .line-unit { background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23151414' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 4px center; padding-right: 24px; }
.field textarea { resize: vertical; min-height: 84px; }
.field input:focus, .field select:focus, .field textarea:focus, .line-qty:focus, .line-unit:focus { outline: none; border-bottom-color: var(--ink); }
.field input::placeholder, .field textarea::placeholder, .line-qty::placeholder { color: #b3ada5; }
.field.is-invalid input, .field.is-invalid select, .field.is-invalid textarea { border-bottom-color: var(--accent); }
.field-error { color: var(--accent); font-size: 0.85rem; margin: 6px 0 0; }

[hidden] { display: none !important; }

.order-min { padding: 14px 18px; background: var(--white); border-left: 3px solid var(--accent); font-size: 0.98rem; }

/* Restaurant o botiga / Particular */
.segmented { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--ink); }
.segmented label { position: relative; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.segmented span {
  display: block; padding: 14px 12px; text-align: center; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}
.segmented label + label span { border-left: 1px solid var(--ink); }
.segmented input:checked + span { background: var(--ink); color: var(--white); }
.segmented input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Línies de producte amb quilos */
.product-lines { border-top: 1px solid var(--line); }
.line { display: grid; grid-template-columns: 64px 1fr auto; gap: 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.line-thumb { width: 64px; height: 80px; object-fit: cover; transition: filter 0.3s var(--ease); }
.line:not(.is-active) .line-thumb { filter: grayscale(0.5) brightness(0.95); }
.line-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.line-name { font-family: var(--font-display); font-size: 1.35rem; font-weight: 500; line-height: 1.15; }
.line-sub { font-size: 0.78rem; color: var(--muted); }
.field--check input[type="checkbox"] {
  width: 18px; height: 18px; margin: 0; appearance: none; -webkit-appearance: none; border: 1px solid var(--ink); background: var(--white);
  display: grid; place-items: center; cursor: pointer; flex: none;
}
.field--check input[type="checkbox"]:checked { background: var(--ink); }
.field--check input[type="checkbox"]:checked::after {
  content: ""; width: 10px; height: 5px; border-left: 2px solid var(--white); border-bottom: 2px solid var(--white); transform: rotate(-45deg) translate(1px, -1px);
}
.stepper { display: flex; align-items: center; border: 1px solid var(--line); }
.step { width: 40px; height: 44px; font-size: 1.25rem; line-height: 1; display: grid; place-items: center; transition: background 0.2s var(--ease); }
.step:hover { background: var(--paper); }
.step:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.line-qty {
  width: 48px; padding: 0; border: 0; background: transparent; text-align: right; font: inherit; font-size: 1.05rem; font-weight: 600; color: var(--ink);
  -moz-appearance: textfield; appearance: textfield;
}
.line-qty::-webkit-outer-spin-button, .line-qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.line-qty:focus { outline: none; }
.step-unit { padding: 0 6px 0 4px; font-size: 0.85rem; color: var(--muted); }
.line.is-active .stepper { border-color: var(--ink); }

/* Total i comanda mínima */
.order-total { margin-top: 18px; }
.total-row { display: flex; justify-content: space-between; align-items: baseline; }
.total-row > span { font-size: 0.74rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.total-row strong { font-family: var(--font-display); font-size: 1.9rem; font-weight: 500; }
.total-bar { height: 4px; background: var(--line); margin: 8px 0 10px; overflow: hidden; }
.total-bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.4s var(--ease), background 0.3s var(--ease); }
.total-msg { margin: 0; font-size: 0.88rem; color: var(--ink-soft); }
.order-total.is-ok .total-bar span { background: #2f6b3a; }
.order-total.is-ok .total-msg { color: #2f6b3a; }
.order-total.is-invalid .total-msg { color: var(--accent); font-weight: 600; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.field--check label { display: flex; gap: 12px; align-items: flex-start; text-transform: none; letter-spacing: 0; font-size: 0.86rem; font-weight: 400; color: var(--ink-soft); line-height: 1.5; }
.field--check label a { text-decoration: underline; text-underline-offset: 3px; }
.field--check.is-invalid span { color: var(--accent); }
.form-actions { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-top: 8px; }
.form-note { margin: 0; font-size: 0.85rem; color: var(--muted); }
.form-status { margin: 16px 0 0; font-size: 0.9rem; color: var(--accent); min-height: 1em; }
.form-status.is-ok { color: #2f6b3a; }
.btn[disabled] { opacity: 0.6; cursor: wait; transform: none; }

.order-success { background: var(--white); padding: clamp(32px, 4vw, 56px); box-shadow: 0 30px 80px rgba(21,20,20,0.08); }
.order-success .display { font-size: clamp(1.9rem, 3.4vw, 3rem); }

/* ---------- Contacte ---------- */
.contact { background: var(--paper); border-top: 1px solid var(--line); }
.contact-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(32px, 6vw, 96px); align-items: end; }
.contact-list li { display: grid; grid-template-columns: 110px 1fr; gap: 6px 18px; padding: 18px 0; border-top: 1px solid var(--line); align-items: baseline; }
.contact-list li:last-child { border-bottom: 1px solid var(--line); }
.contact-list span { font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.contact-list a { font-family: var(--font-display); font-size: clamp(1.4rem, 2vw, 1.8rem); font-weight: 500; line-height: 1.2; grid-column: 2; }
.contact-list a:hover { color: var(--accent); }

/* ---------- Peu ---------- */
.site-footer { background: var(--ink); color: rgba(244,240,233,0.78); padding: clamp(56px, 7vw, 96px) 0 36px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: clamp(28px, 4vw, 64px); padding-bottom: clamp(36px, 5vw, 64px); border-bottom: 1px solid var(--line-light); }
.footer-brand img { width: 200px; height: auto; margin-bottom: 18px; }
.footer-brand p { font-size: 0.74rem; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(244,240,233,0.55); }
.footer-nav { display: flex; flex-direction: column; gap: 8px; }
.footer-nav h2 { font-size: 0.7rem; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(244,240,233,0.5); margin-bottom: 8px; font-weight: 600; }
.footer-nav a { font-size: 0.95rem; color: rgba(244,240,233,0.85); width: fit-content; }
.footer-nav a:hover { color: var(--white); text-decoration: underline; text-underline-offset: 3px; }
.footer-bottom { padding-top: 28px; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: end; font-size: 0.8rem; }
.footer-bottom p { margin: 0; }
.footer-grant { color: rgba(244,240,233,0.5); font-size: 0.74rem; max-width: 70ch; line-height: 1.5; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); z-index: 60;
  background: var(--ink); color: var(--white); padding: 12px 20px; font-size: 0.85rem; letter-spacing: 0.02em;
  opacity: 0; pointer-events: none; transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
  box-shadow: 0 16px 40px rgba(0,0,0,0.25);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Aparició en fer scroll ---------- */
/* Només s'amaguen els blocs si el JavaScript funciona (classe .js a <html>); sense JS es veu tot */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Pàgines legals ---------- */
.legal { padding: 160px 0 var(--section); background: var(--paper); }
.legal .container { max-width: 800px; }
.legal h1 { font-family: var(--font-display); font-size: clamp(2.2rem, 4.6vw, 3.6rem); font-weight: 500; margin-bottom: 8px; }
.legal h2 { font-family: var(--font-display); font-size: 1.7rem; font-weight: 500; margin: 40px 0 12px; }
.legal p, .legal li { color: var(--ink-soft); }
.legal ul { list-style: disc; padding-left: 22px; margin-bottom: 1em; }
.legal mark { background: #fff3b0; color: var(--ink); padding: 0 4px; }
.legal .updated { color: var(--muted); font-size: 0.85rem; margin-bottom: 32px; }
.legal a { text-decoration: underline; text-underline-offset: 3px; }
.site-header.is-solid { color: var(--ink); background: var(--paper); box-shadow: 0 1px 0 var(--line); }
.site-header.is-solid::after { opacity: 0; }
.site-header.is-solid .brand-logo--light { opacity: 0; }
.site-header.is-solid .brand-logo--dark { opacity: 1; }
.site-header.is-solid .nav-cta { background: var(--ink); color: var(--white); border-color: var(--ink); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .places { grid-template-columns: repeat(2, 1fr); }
  .ig-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .nav {
    position: fixed; inset: 0; background: var(--ink); color: var(--white);
    flex-direction: column; justify-content: center; gap: 28px;
    transform: translateY(-100%); opacity: 0; transition: transform 0.5s var(--ease), opacity 0.4s var(--ease);
    z-index: -1;
  }
  .nav.is-open { transform: none; opacity: 1; }
  .nav > a:not(.btn) { font-family: var(--font-display); font-size: 2rem; text-transform: none; letter-spacing: 0; font-weight: 500; }
  .nav-cta { margin: 12px 0 0; }
  .site-header.is-scrolled .nav-cta, .nav-cta { background: var(--white); color: var(--ink); border-color: var(--white); }
  .nav-toggle { display: block; }
  .site-header.menu-open { color: var(--white); background: transparent; box-shadow: none; }
  .site-header.menu-open .brand-logo--light { opacity: 1; }
  .site-header.menu-open .brand-logo--dark { opacity: 0; }
  .site-header.menu-open::after { opacity: 0; }

  .manifest-grid, .origin-grid, .cook-grid, .order-grid, .contact-grid { grid-template-columns: 1fr; }
  .manifest-media { order: -1; aspect-ratio: 4 / 3; }
  .origin-media, .cook-media { aspect-ratio: 4 / 3; }
  .cook-media { order: -1; }
  .order-intro { position: static; }
  .journey { grid-template-columns: 1fr; }
  .journey li, .journey li + li { padding: 24px 0; border-left: 0; border-bottom: 1px solid var(--line-light); }
  .film-stage { height: 70vh; }
  .film-sound { top: 96px; bottom: auto; }
  .values { grid-template-columns: 1fr; }
  .values li { border-right: 0; border-bottom: 1px solid var(--line); padding: 28px 0 20px; }
  .values li + li { padding-left: 0; }
  .values li:last-child { border-bottom: 0; }
  .product-grid { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .featured { grid-template-columns: 1fr; }
  .logo-grid { grid-template-columns: repeat(3, 1fr); }
  .featured-item { border-right: 0; border-bottom: 1px solid var(--line); padding: 22px 0; }
  .featured-item:last-child { border-bottom: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-bottom { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .hero { padding: 120px var(--gutter) 100px; }
  .hero-title { width: min(78vw, 360px); }
  .hero-actions .btn { width: 100%; }
  .product-grid { grid-template-columns: 1fr; }
  .places { grid-template-columns: 1fr; }
  .ig-grid { grid-template-columns: repeat(2, 1fr); }
  .logo-grid { grid-template-columns: repeat(2, 1fr); }
  .logo-grid li { min-height: 100px; padding: 18px 14px; }
  .logo-box { width: 132px; height: 60px; }
  .logo-box img { max-height: 60px; max-width: 132px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .line { grid-template-columns: 52px 1fr; row-gap: 10px; }
  .line-thumb { width: 52px; height: 64px; grid-row: span 2; }
  .stepper { justify-self: start; }
  .segmented span { padding: 12px 6px; font-size: 0.7rem; letter-spacing: 0.06em; }
  .contact-list li { grid-template-columns: 1fr; }
  .contact-list a { grid-column: 1; }
  .footer-grid { grid-template-columns: 1fr; }
  .brand { width: 124px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .hero-media img { animation: none; transform: none; }
  .marquee-track { animation: none; }
  .hero-scroll span { animation: none; }
}
