/* ============================================================
   PLANT MEAT — homepage only
   ------------------------------------------------------------
   Loaded by index.html and nowhere else. The section-colour
   "mood engine" that used to live here has been retired — the
   brief bans overlapping-element effects and scroll affordances,
   and the site now runs one deliberate palette throughout.
   What's left: the 3D hero canvas, the image reel, the compact
   product grid, and the process-step parallax frames.
   ============================================================ */

/* ------------------------------------------------------------
   3D HERO CANVAS
   Page-level and fixed, so the assembling burger persists past
   the hero and resolves while you read. Sits behind all content.
   ------------------------------------------------------------ */

.stage-3d {
  position: fixed;
  inset: 0;
  z-index: -5;
  pointer-events: none;
}
.stage-3d canvas {
  width: 100% !important;
  height: 100% !important;
  transition: opacity .25s linear;
}

/* ------------------------------------------------------------
   IMAGE REEL
   Two rows sliding against each other. Tiles are cropped tall
   so you read texture and movement, not a whole photograph.
   ------------------------------------------------------------ */

.reel {
  position: relative;
  overflow: hidden;
  padding-block: clamp(2rem, 5vw, 4rem);
  display: flex;
  flex-direction: column;
  gap: clamp(.6rem, 1.2vw, 1rem);
}

.reel__row { overflow: hidden; }
.reel__track {
  display: flex;
  width: max-content;
  animation: reel-l var(--reel-speed, 54s) linear infinite;
}
.reel__group { display: flex; gap: clamp(.6rem, 1.2vw, 1rem); flex: none; }
/* keep the seam between the two groups the same width as the gaps */
.reel__group + .reel__group { margin-left: clamp(.6rem, 1.2vw, 1rem); }
.reel__row[data-reel="right"] .reel__track { animation-name: reel-r; }
.reel:hover .reel__track { animation-play-state: paused; }

.reel__cell {
  flex: none;
  width: clamp(190px, 22vw, 340px);
  aspect-ratio: 5 / 3.4;
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--sage);
}
.reel__cell img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease-out);
}
.reel__cell:hover img { transform: scale(1.06); }

/* the track holds two copies, so -50% is a seamless loop */
@keyframes reel-l { to { transform: translateX(-50%); } }
@keyframes reel-r { from { transform: translateX(-50%); } to { transform: none; } }

/* fade the ends so tiles enter and leave rather than clipping.
   --reel-edge lets a section on a non-ivory background (e.g. one
   sitting on --ink) override the fade colour locally; it defaults
   to the page's own paper tone. */
.reel::before,
.reel::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: clamp(40px, 9vw, 150px);
  z-index: 2;
  pointer-events: none;
}
.reel::before { left: 0;  background: linear-gradient(90deg,  var(--reel-edge, var(--paper)), transparent); }
.reel::after  { right: 0; background: linear-gradient(270deg, var(--reel-edge, var(--paper)), transparent); }

@media (prefers-reduced-motion: reduce) {
  .reel__track { animation: none; }
  .reel__row { overflow-x: auto; }
}

/* ------------------------------------------------------------
   PRODUCT GRID — all ten, at a glance
   Photo, 2-line description, protein callout, one CTA. Walking
   a food counter, not reading a spec sheet.
   ------------------------------------------------------------ */

.pgrid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(.85rem, 1.8vw, 1.75rem) clamp(.75rem, 1.4vw, 1.4rem);
}
@media (min-width: 760px)  { .pgrid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1180px) { .pgrid { grid-template-columns: repeat(4, 1fr); } }

.pcard { display: flex; flex-direction: column; gap: .5rem; }
.pcard__plate {
  display: block;
  aspect-ratio: 4 / 3.4;          /* reserved up front — nothing shifts on load */
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--plate, var(--sage));
}
.pcard__plate svg,
.pcard__plate img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 1s var(--ease-out);
}
.pcard:hover .pcard__plate svg,
.pcard:hover .pcard__plate img { transform: scale(1.05); }

.pcard__name {
  font-family: var(--display);
  font-weight: 500;
  font-variation-settings: "wdth" 92;
  font-size: clamp(1rem, 1.3vw, 1.2rem);
  letter-spacing: -.022em;
  line-height: 1.15;
}
.pcard__desc {
  font-size: var(--t-sm);
  color: var(--ink-3);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pcard__protein {
  font-family: var(--mono);
  font-size: var(--t-micro);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--verde-deep);
}
.pcard__cta {
  margin-top: .15rem;
  font-family: var(--mono);
  font-size: var(--t-xs);
  letter-spacing: .04em;
  color: var(--verde);
  transition: gap .35s var(--ease-out);
  display: inline-flex; align-items: center; gap: .35em;
}
.pcard:hover .pcard__cta { gap: .65em; }
/* two-up columns on a phone are ~160px: at the default size the label
   breaks and strands its arrow on a line of its own */
@media (max-width: 560px) {
  .pcard__cta { font-size: var(--t-micro); white-space: nowrap; }
}

/* ============================================================
   PROCESS — parallax frames
   The frame clips; the image is taller than it and drifts
   inside. Travel is capped by that headroom, so it stays subtle.
   ============================================================ */

.step__media {
  position: relative;             /* anchors the .frame__cap placeholder chip */
  margin: 0 0 1.15rem;
  aspect-ratio: 4 / 3;            /* reserved before load */
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--sage);
}
.step__media img {
  width: 100%;
  height: 118%;                   /* the 18% is the parallax headroom */
  object-fit: cover;
  display: block;
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  .step__media img { height: 100%; transform: none !important; }
}

/* ============================================================
   HERO — stat strip + pea-pod marquee
   The strip is deliberately contained rather than full-bleed:
   it reads as emerging from the pods at either end, not as a
   site-wide ticker. The pods drop away at phone widths so the
   words keep the whole line.
   ============================================================ */

/* Desktop hero is two clean columns: type left, the 3D stack right.
   Capping the panel is what keeps them from overlapping — the brief
   rules out anything bleeding across a text block. */
@media (min-width: 1000px) {
  .hero__panel { max-width: min(58%, 44rem); }
  /* sized to that column, not to the viewport, so the tagline holds
     two lines instead of breaking into four */
  .hero__title { font-size: clamp(2.6rem, 6.2vw, 6rem); }
}

/* Below that the stack would sit under the copy, so it doesn't run at
   all — the hero keeps its CSS bloom, and phones skip a WebGL context.
   With nothing occupying the lower half, the hero also stops reserving
   a full screen: the words start just under the nav instead of after
   400px of nothing. */
@media (max-width: 999px) {
  .stage-3d { display: none; }
  .hero {
    min-height: 0;
    justify-content: flex-start;
    padding-top: calc(var(--nav-h) + clamp(2rem, 8vw, 3.5rem));
    padding-bottom: clamp(2.5rem, 8vw, 4rem);
  }
}

.hero__wordmark {
  display: block;
  margin-bottom: clamp(.9rem, 2vw, 1.4rem);
  color: var(--verde);
}

/* Each claim is its own item, so the line can only break between claims —
   never inside one. The dot is a separator, not part of the last claim. */
.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem 0;
  max-width: 44ch;
  margin-top: 1.15rem;
  color: var(--ink-3);
}
.hero__stats span { white-space: nowrap; }
/* trailing, not leading — a wrapped line must never open with a dot */
.hero__stats span:not(:last-child)::after {
  content: "·";
  margin-inline: .6em;
  color: var(--verde);
}

.hero__marquee {
  display: flex;
  align-items: center;
  gap: .8rem;
  max-width: 34rem;
  margin-top: clamp(2.25rem, 5vw, 3.5rem);
  color: var(--verde);            /* the pods inherit this */
}
.hero__marquee .marquee {
  flex: 1 1 auto;
  min-width: 0;                   /* let it shrink inside the flex row */
  --speed: 30s;
  border: 0;
  background: transparent;
  padding-block: .35rem;
  /* the words fade in and out at the pods rather than clipping */
  -webkit-mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
}
.hero__marquee .marquee__item {
  padding-inline: 1rem;
  gap: 1rem;
  color: var(--ink-2);
}
.hero__pod { flex: none; }
.hero__pod--end { transform: scaleX(-1); }
@media (max-width: 560px) {
  .hero__marquee { max-width: none; gap: 0; }
  .hero__pod { display: none; }
}

/* ============================================================
   PULL QUOTE
   One line, set in the serif accent, given room to breathe.
   ============================================================ */

.pullquote {
  font-size: clamp(1.35rem, 3.2vw, 2.35rem);
  line-height: 1.3;
  color: var(--verde-deep);
  max-width: 30ch;
  text-wrap: pretty;
}

/* ============================================================
   GALLERY — "wait… this is plant-based?"
   Real photography where we have it, clearly-labelled holding
   tiles where we don't. Same recipe as .frame so the two read
   as one system; grid items never overlap, they only resize.
   ============================================================ */

/* A direct child of the section, so it is already viewport-wide — no 100vw
   trick (which overflows by the width of the scrollbar). The side padding
   matches the grid gap so the edge spacing reads as part of the rhythm. */
.gallery-wrap { padding-inline: clamp(.5rem, 1vw, .9rem); }

.gallery {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: clamp(92px, 13vw, 168px);
  grid-auto-flow: dense;
  gap: clamp(.5rem, 1vw, .9rem);
}
.gallery__tile {
  position: relative;
  grid-column: span 2;
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--sage);
}
.gallery__tile--big  { grid-column: span 4; grid-row: span 2; }
/* closes the last row instead of leaving one square stranded */
.gallery__tile--wide { grid-column: span 6; }
.gallery__tile img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.4s var(--ease-out);
}
.gallery__tile:hover img { transform: scale(1.04); }

@media (max-width: 900px) {
  .gallery { grid-template-columns: repeat(4, 1fr); }
  /* span 2, not 4: at four columns the wide tile has to pair with the
     leftover square or the last row keeps a hole in it */
  .gallery__tile--wide { grid-column: span 2; }
}
@media (max-width: 560px) {
  /* phones get a plain two-up: the feature tile stops being a
     feature and nothing ends up tall and letterboxed */
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 132px; }
  .gallery__tile,
  .gallery__tile--big,
  .gallery__tile--wide { grid-column: span 1; grid-row: span 1; }
}

/* ============================================================
   SEGMENT CARDS — partner with us
   Quieter than anything above them, but unmistakably clickable.
   ============================================================ */

.segments {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: .6rem;
}
.segment {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.05rem 1.25rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  font-family: var(--mono);
  font-size: var(--t-xs);
  letter-spacing: .04em;
  color: var(--ink-2);
  transition: border-color .3s var(--ease-out),
              background .3s var(--ease-out),
              color .3s var(--ease-out);
}
.segment:hover {
  border-color: var(--verde);
  background: var(--paper-lift);
  color: var(--ink);
}
.segment__arrow { flex: none; color: var(--verde); transition: transform .35s var(--ease-out); }
.segment:hover .segment__arrow { transform: translateX(3px); }
