/* =========================================================
   THE WEEKLY HARVEST — shared theme (every page)
   - colours: the home page palette (olive, rust, mustard, cream yellow,
     sky blue, white), shared by every page
   - fonts (Brand_Style_Sheet.docx): Lora only for the wordmark and section
     headers, Inter for everything else (labels, recipe cards, body copy)
   Also gives every page the same menu bar and footer.
   Loaded after style.css and before any page's own stylesheet.
   ========================================================= */

:root {
  /* Site palette (lightened home page palette) */
  --olive:        #5C6E35;
  --olive-dark:   #4A5A2B;
  --mustard:      #DDA75A;
  --rust:         #B9533A;
  --rust-dark:    #9E4430;
  --butter:       #F6E3A1;   /* cream yellow */
  --sky:          #AFD8E6;
  --photo-sky:    #A6D2DF;   /* the blue behind the box in the welcome photo */
  --ink:          #1F2414;
  --paper:        #FFFFFF;
  --cream-text:   #FAEEDA;   /* light text, in place of white */
  --sage-light:   #E4EBCF;   /* pale olive: the big green blocks, lightened */
  --mustard-light:#F5DCAE;   /* pale mustard */

  /* The original brand tokens (style.css), pointed at the same palette
     so every page picks it up without changing its own rules */
  --harvest-green:   var(--olive);
  --deep-green:      var(--olive-dark);
  --terracotta:      var(--rust);
  --terracotta-dark: var(--rust-dark);
  --leaf:            var(--butter);
  --cream-light:     var(--paper);
  --cream:           var(--paper);   /* the old cream page/section backgrounds go white */
}

body { background: var(--paper); }

/* ---------- Header: white bar at 50%, the page showing through (lightly blurred) ---------- */
.site-header,
.site-header.is-visible {
  background: rgba(255, 255, 255, .5);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.site-header.is-scrolled { box-shadow: 0 1px 0 rgba(31, 36, 20, .1); }
/* Logo mark alone, in the middle of the bar; the menu stays on the right */
.site-header { justify-content: flex-end; }
.brand {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}
.brand__mark { width: 48px; height: 48px; }
@media (max-width: 900px) {
  .brand__mark { width: 42px; height: 42px; }
}
.site-nav__links a::after { background: var(--rust); }
.site-nav__actions .btn--outline { background: var(--olive); border-color: transparent; color: var(--cream-text); }
.site-nav__actions .btn--outline:hover { background: var(--olive-dark); }
/* Home page: the menu (and phone menu button) fades in once "Picked this
   week" reaches the bar (main.js adds .is-nav-waiting until then) */
.nav-toggle { transition: opacity .4s ease, visibility .4s; }
@media (min-width: 901px) {   /* phones keep the drop-down menu's own slide */
  .site-nav { transition: opacity .4s ease, visibility .4s; }
}
.site-header.is-nav-waiting .site-nav,
.site-header.is-nav-waiting .nav-toggle { opacity: 0; visibility: hidden; }

/* Menu links, Sign Up and the footer links: the paragraphs' typewriter font, in capitals */
.site-nav__links a,
.site-nav__actions .btn,
.site-foot__links a {
  font-family: "IBM Plex Mono", monospace;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
}
@media (max-width: 900px) {
  .site-nav { background: var(--paper); }
}

/* ---------- Footer: pale olive band ---------- */
.site-foot,
.bg-scroll .site-foot {
  border-top: 0;
  background: var(--sage-light);
  color: var(--olive-dark);
}
.site-foot__links a { color: var(--olive-dark); }
.site-foot__links a:hover { color: var(--rust); }
.site-foot__form input { border-color: var(--paper); background: var(--paper); color: var(--ink); }
.site-foot__form button { background: var(--olive); color: var(--cream-text); }
.site-foot__form button:hover { background: var(--olive-dark); }
.site-foot .news__thanks { color: var(--olive-dark); }

/* ---------- Section headers ---------- */
.rc-hero__line,
.rc-missed__title,
.fb-head__title,
.co-title {
  font-family: var(--font-heading);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.rc-hero__line--solid,
.rc-missed__title,
.fb-head__title span { filter: none; }
.rc-hero { --fs: clamp(38px, 4.6vw, 64px); --lh: 0px; }   /* no visible title: the photo starts at the top */          /* was 52px–144px, then 38px–104px */
.fb-head__title { font-size: clamp(40px, 6.3vw, 104px); }   /* was 56px–144px */
.rc-missed__title { font-size: clamp(30px, 3.9vw, 60px); }  /* same as the home page section titles */  /* was 48px–99px, then 36px–76px, then 30px–48px */
.co-title { font-size: clamp(28px, 3vw, 42px); }

/* ---------- Everything else in the sans-serif (labels, recipe cards, body copy) ---------- */
.plate__name,
.co-size__name,
.co-side__name,
.co-item__img--letter,
.fb-box__price,
.co-size__price,
.co-sub,
.co-side__title,
.co-totals__due,
.co-week__date,
.hm-intro__text p:not(.hm-intro__hi),
.rc-missed__empty,
.rc-month__name,
.rc__label,
.steps li::before,
.news__thanks,
.site-foot__form .news__thanks {
  font-family: var(--font-sans);
  font-style: normal;
}
.plate__name,
.co-size__name,
.co-side__name { font-weight: 700; letter-spacing: .02em; }
.plate__name { font-size: clamp(14px, 1.15vw, 17px); }
.fb-box__name {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: clamp(18px, 1.5vw, 22px);
  letter-spacing: .02em;
}

/* ---------- Leftover one-off colours ---------- */
.login__field input:focus { background: var(--olive-dark); }
.login__join a,
.login__eyebrow { color: var(--butter); }
.login__status.is-error { color: var(--butter); }

/* ---------- 404 page (404.html): big "404" on pale olive ---------- */
.lost {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100svh - 120px);
  padding: calc(var(--header-h) + 48px) var(--gutter) 72px;
  background: var(--sage-light);
  text-align: center;
}
.lost__code {
  display: flex;
  align-items: center;
  gap: clamp(4px, 1vw, 12px);
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(110px, 20vw, 220px);
  line-height: 1;
  color: var(--olive-dark);
}
.lost__text {
  max-width: 34em;
  text-wrap: balance;   /* no single word left alone on the last line */
  margin: 18px 0 0;
  font-size: clamp(16px, 1.3vw, 18px);
  line-height: 1.6;
  color: var(--ink);
}
.lost__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}

/* ---------- Opening offer pop-up (initLaunchPopup in main.js) ----------
   A fruit sticker: oval label with a dark green edge, white rim and dashed
   stitch line, the name curving round the top and a PLU number; smaller
   stickers ("50% off", "Opens 30 Nov", the close) slapped on top */
.promo {
  width: min(calc(100% - 24px), 660px);
  max-width: none;
  max-height: none;
  padding: 34px 26px;             /* room for the stickers hanging off the edge */
  border: 0;
  background: transparent;
  overflow: visible;
  color: var(--olive-dark);
  text-align: center;
}
.promo::backdrop { background: rgba(31, 36, 20, .5); }
.promo[open] .promo__label-sticker { animation: sticker-slap .45s cubic-bezier(.2, 1.4, .4, 1); }
.promo[open] .promo__badge { animation: sticker-slap .45s .25s cubic-bezier(.2, 1.4, .4, 1) backwards; }
.promo[open] .promo__lemon { animation: sticker-slap .45s .4s cubic-bezier(.2, 1.4, .4, 1) backwards; }
@keyframes sticker-slap { from { opacity: 0; transform: scale(1.25) rotate(-10deg); } }
@media (prefers-reduced-motion: reduce) {
  .promo[open] .promo__label-sticker,
  .promo[open] .promo__badge,
  .promo[open] .promo__lemon { animation: none; }
}

/* The main label: a squircle (rounded square) */
.promo__label-sticker {
  --squircle: clamp(48px, 10vw, 76px);
  position: relative;
  padding: 34px clamp(32px, 7vw, 64px) 44px;
  border: 9px solid #27500A;   /* the site's dark green accent (logo, badge) */
  border-radius: var(--squircle);
  background:
    radial-gradient(ellipse 60% 40% at 30% 18%, rgba(255, 255, 255, .55), transparent 70%),   /* glossy shine */
    #FBE68A;   /* same butter yellow as "Picked this week" */
  box-shadow:
    inset 0 0 0 5px var(--paper),                 /* white rim inside the edge */
    0 3px 0 rgba(0, 0, 0, .08),
    0 22px 40px rgba(31, 36, 20, .35);
  transform: rotate(-2deg);
}
.promo__label-sticker::before {   /* dashed stitch line, like "Eat more veggies" */
  content: "";
  position: absolute;
  inset: 13px;
  border: 2px dashed rgba(39, 80, 10, .45);
  border-radius: calc(var(--squircle) - 13px);
  pointer-events: none;
}
.promo__arc { display: block; width: min(100%, 360px); margin: -6px auto -10px; overflow: visible; }
.promo__arc text {
  font: 700 24px var(--font-sans);
  letter-spacing: .22em;
  fill: #27500A;
}
.promo__mark { display: block; width: 42px; height: auto; margin: 0 auto 6px; }
/* Display title with cut-paper edges. */
.promo__title {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: clamp(26px, 4.4vw, 36px);
  line-height: 1.15;
  letter-spacing: .04em;
  text-transform: uppercase;
  filter: url(#cutPaper);   /* svg on every page */
  color: #27500A;
  text-wrap: balance;   /* even lines, never one word on its own */
}
.promo__text {
  max-width: 27em;
  margin: 14px auto 0;
  font-family: "IBM Plex Mono", monospace;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.55;
  letter-spacing: .04em;
  color: #1F4D2B;   /* the "Picked this week" text green */
}
.promo__text strong { color: #27500A; font-weight: 700; }
.promo__form { display: grid; gap: 10px; max-width: 320px; margin: 18px auto 0; }
.promo__form input {
  width: 100%;
  padding: 12px 18px;
  border: 2px solid var(--olive-dark);
  border-radius: 999px;
  background: var(--paper);
  font: inherit;
  font-size: 15px;
  text-align: center;
  color: var(--ink);
}
.promo__form input:focus { outline: none; border-color: #27500A; box-shadow: 0 0 0 3px rgba(39, 80, 10, .25); }
.promo__submit {
  padding: 13px 20px;
  border: 0;
  border-radius: 999px;
  background: var(--olive);   /* same green as the Sign Up button in the menu bar */
  color: var(--cream-text);
  font: 700 15px var(--font-sans);
  letter-spacing: .08em;
  text-transform: uppercase;
  box-shadow: 0 3px 0 var(--olive-dark);
  cursor: pointer;
  transition: transform .15s, box-shadow .15s, background-color .2s;
}
.promo__submit:hover { background: var(--olive-dark); }
.promo__submit:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--olive-dark); }
.promo__thanks {
  max-width: 300px;
  margin: 18px auto 0;
  font-family: "IBM Plex Mono", monospace;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: .04em;
  color: #27500A;
}
.promo__small {
  margin: 12px 0 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #27500A;
}

/* "50% off": a round sticker, top right */
.promo__badge {
  position: absolute;
  top: -4%;
  right: 2%;
  display: grid;
  place-content: center;
  width: clamp(84px, 18vw, 108px);
  aspect-ratio: 1;
  border: 4px solid var(--paper);
  border-radius: 50%;
  background: #27500A;
  color: #FBE68A;
  font: 700 13px/1 var(--font-sans);
  letter-spacing: .12em;
  text-transform: uppercase;
  box-shadow: 0 0 0 2px var(--olive-dark), 0 8px 16px rgba(31, 36, 20, .3);
  transform: rotate(12deg);
}
.promo__badge b { font: 800 clamp(26px, 5.4vw, 34px)/1 var(--font-sans); letter-spacing: 0; }

/* "Opens 30 Nov": a lemon-shaped sticker, bottom left */
.promo__lemon {
  position: absolute;
  left: 0;
  bottom: 0;
  display: grid;
  place-content: center;
  width: clamp(104px, 22vw, 130px);
  height: clamp(66px, 14vw, 80px);
  border: 3px solid var(--olive);
  border-radius: 55% 45% 55% 45% / 60% 50% 50% 40%;
  background: var(--mustard);
  color: var(--olive-dark);
  font: 700 11px/1.1 var(--font-sans);
  letter-spacing: .14em;
  text-transform: uppercase;
  box-shadow: inset 0 0 0 3px var(--butter), 0 8px 16px rgba(31, 36, 20, .3);
  transform: rotate(-14deg);
}
.promo__lemon b { display: block; font: 800 clamp(17px, 3.6vw, 21px)/1.05 var(--font-sans); letter-spacing: .02em; }

/* Close: a small round sticker hanging off the top-left corner */
.promo__close {
  position: absolute;
  top: -16px;
  left: 14px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 3px solid var(--paper);
  border-radius: 50%;
  background: #27500A;
  color: var(--cream-text);
  font: 400 28px/1 var(--font-sans);
  box-shadow: 0 0 0 2px #1F4D2B, 0 6px 12px rgba(31, 36, 20, .3);
  transform: rotate(-8deg);
  cursor: pointer;
  transition: transform .15s;
}
.promo__close:hover { transform: rotate(-8deg) scale(1.08); }
.promo__close:focus-visible { outline: 3px solid var(--butter); outline-offset: 2px; }
.promo__submit:focus-visible { outline: 3px solid #27500A; outline-offset: 3px; }   /* dark green focus ring, not the site-wide rust */

/* Phones: tighter padding so the form still fits inside the squircle */
@media (max-width: 520px) {
  .promo { padding: 30px 8px; }
  .promo__label-sticker { padding: 40px 26px 44px; }
  .promo__badge { top: -6%; right: -3%; }
  .promo__lemon { left: -4%; bottom: -4%; }
  .promo__close { top: -14px; left: 4px; }
}

/* ---------- Pale green page backgrounds (no fruit & veg silhouettes, no yellow):
   Veg & Fruit, Recipe, Harvest Mind, Log in, Join ---------- */
.fb,
.rc,
.rc-hero,
.rc-why,
.rc-missed,
.hm,
.login { background: var(--sage-light); }
@media (min-width: 761px) {
  .rc-why { background: transparent; }   /* rises over the hero video; no yellow band */
  /* the note's box covers the video's area: let clicks through to the video's
     play / sound controls, but keep the text itself selectable */
  .rc-why { pointer-events: none; }
  .rc-why__text > * { pointer-events: auto; }
  /* the note and its closing line stay in one column to the right of the video,
     centred on its height, so "Less waste..." always sits straight under the paragraphs */
  .rc-why__text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: var(--rise);
    padding-left: calc(max(0px, (100vw - var(--rc-max)) / 2 + var(--gutter)) + var(--photo-w) + 40px);
  }
  .rc-why__text::before { content: none; }
  .rc-why__text .rc-why__punch { clear: none; }
}
.rc-missed__search { background: var(--paper); }   /* search box: white, not yellow */

/* Sign-up didn't go through (sendSignup in main.js) */
.news__error { margin: 10px 0 0; font-size: 14px; font-weight: 600; color: var(--rust); }
.promo__submit:disabled,
.news__submit:disabled { opacity: .6; cursor: wait; }

/* Before opening day (initSignupGate): no Join / Log in forms or checkout for visitors */
.is-prelaunch .login__card,
.is-prelaunch .co { display: none; }

/* ---------- Other pages: the home page's fonts ---------- */
/* Page titles use the wordmark font with clean edges. */
body:not(.home) .rc-hero__line,
body:not(.home) .rc-missed__title,
body:not(.home) .login__title,
body:not(.home) .co-title,
body:not(.home) .co-side__title,
body:not(.home) .co-sub,
body:not(.home) .lost__code {
  font-family: var(--font-heading);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .04em;
  line-height: 1.15;
  -webkit-text-stroke: 0;
  filter: none;   /* clean edges, like "How your week works": the cut-paper filter looked drippy at these sizes */
}
body:not(.home) .hm-intro__name {
  font-family: "Nothing You Could Do", cursive;   /* handwritten, kept out of Food Think */
  font-weight: 400;
  text-transform: none;
  letter-spacing: .07em;
  line-height: 1.2;
  /* bigger, darker and thicker so the thin handwriting stands out */
  font-size: clamp(48px, 4.4vw, 64px);
  color: #27500A;
  -webkit-text-stroke: 1.5px #27500A;
  filter: url(#markerEdgeSm);
}
body:not(.home) main p:not(.hm-intro__hi):not(.hm-intro__sign):not(.login__kicker),
body:not(.home) main blockquote,
body:not(.home) main figcaption p {
  font-family: "IBM Plex Mono", monospace;
  font-weight: 500;
  letter-spacing: .04em;
}
/* Recipe page: the note's closing line ("Less waste...") in bold */
body:not(.home) main p.rc-why__punch { font-weight: 700; }

/* ---------- Recipe page (Ann Wigmore) and Harvest Mind (Rokhaya): the quote, big across the page ---------- */
/* First on the page: the paragraphs' typewriter font (IBM Plex Mono) at display
   size, key words in italic on a pale highlight, the name small below */
.rc .rc-quote,
.hm .rc-quote {
  max-width: var(--rc-max);
  margin: 0 auto;
  padding: clamp(48px, 7vw, 112px) var(--gutter);
  text-align: center;
  text-wrap: balance;
}
.rc .rc-quote__text,
.hm .rc-quote__text {
  margin: 0;
  font-family: "IBM Plex Mono", monospace;
  font-weight: 500;
  font-size: clamp(24px, 3vw, 44px);   /* was 26px–60px */
  line-height: 1.18;
  letter-spacing: -.02em;
  color: #27500A;
}
.rc .rc-quote__text em {
  font-style: italic;
  padding: 0 .08em;
  background: linear-gradient(transparent 12%, #FBE68A 12%, #FBE68A 88%, transparent 88%);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.rc .rc-quote__by,
/* Harvest Mind: the quote shares the top row with the photo, so it sits in
   its own column (no extra padding) at a smaller size */
.hm .hm-top .rc-quote { max-width: none; margin: 0; padding: 0; }
.hm .rc-quote__text em { font-style: italic; }   /* Harvest Mind: italic only, no yellow highlight (2026-11-26) */
.hm .hm-top .rc-quote__text { font-size: clamp(24px, 2.8vw, 42px); }
.hm .rc-quote__by {
  margin-top: clamp(20px, 2.4vw, 36px);
  font-family: "IBM Plex Mono", monospace;
  font-weight: 500;
  font-size: clamp(15px, 1.2vw, 18px);
  letter-spacing: .04em;
  color: #27500A;
}

/* ---------- Scroll highlights: key words in the story get a butter-yellow
   highlighter mark that sweeps across as they scroll into view
   (<mark class="text-highlight">, initTextHighlight in main.js) ---------- */
mark.text-highlight {
  color: inherit;
  background-color: transparent;
  background-image: linear-gradient(#FBE68A, #FBE68A);
  background-repeat: no-repeat;
  background-size: 0% 100%;
  padding: 0 .1em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  transition: background-size 1s cubic-bezier(.25, 1, .5, 1);
}
mark.text-highlight.active { background-size: 100% 100%; }
@media (prefers-reduced-motion: reduce) {
  mark.text-highlight { transition: none; }
}

/* ---------- Promotion banner: thin dark green strip above the menu bar, every page ----------
   (after Riverford / Abel & Cole). Fixed at the very top; its height is --promo-h (style.css),
   which is counted in --header-h so every page leaves room for it. */
.promo-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 51;
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--promo-h);
  padding: 0 var(--gutter);
  background: var(--olive);   /* same green as the Sign Up button in the menu bar */
  color: var(--cream-text);
  transition: transform .3s ease;
}
/* Scrolled down (main.js adds .is-promo-hidden to <html>): the banner slides up out of
   sight and the menu bar moves up into its place; back at the top, both return */
.is-promo-hidden .promo-bar,
/* ...and while a loading screen is up (first-visit loader, or the leaf-logo page change),
   so it can't show while the loader fades out; it slides down once that's gone */
body:has(.loader:not([hidden])) .promo-bar,
body:has(.tomato-nav.is-on) .promo-bar { transform: translateY(-100%); }
.is-promo-hidden .site-header,
body:has(.loader:not([hidden])) .site-header,
body:has(.tomato-nav.is-on) .site-header { top: 0; }
.is-promo-hidden .co-side { top: calc(var(--bar-h) + 20px); }
.promo-bar p {
  margin: 0;
  font-family: "IBM Plex Mono", monospace;
  font-weight: 500;
  font-size: 13px;
  line-height: 1;
  letter-spacing: .04em;
  white-space: nowrap;
}
.promo-bar strong { font-weight: 700; }
/* "50% OFF" on a butter-yellow tag, like Abel & Cole's code */
.promo-bar__chip {
  display: inline-block;
  margin: 0 .25em;
  padding: 3px 7px 2px;
  border-radius: 4px;
  background: #FBE68A;
  color: #27500A;
}
.promo-bar__short { display: none; }
@media (max-width: 760px) {
  .promo-bar p { font-size: 11.5px; }
  .promo-bar__chip { padding: 3px 6px 2px; }
  .promo-bar__long { display: none; }
  .promo-bar__short { display: inline; }
}

/* ---------- Recipe page: "Our baskets are made to be shared" — the note on
   the left, the basket video (landscape, 4:3) on the right ---------- */
.rc-basket {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(340px, 44vw, 620px);
  align-items: center;
  gap: clamp(32px, 5vw, 80px);
  padding: clamp(40px, 4vw, 57.6px) var(--rc-edge);
  background: var(--sage-light);
}
.rc-basket__text p {
  margin: 0;
  font-size: clamp(15px, calc((100vw - var(--gutter) * 2) / 87), 22px);   /* same size as the "I started The Weekly Harvest…" note above */
  line-height: 1.65;
}
.rc-basket__video { margin: 0; }
.rc-basket__video video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: clamp(14px, 1.28vw, 19.2px);
}
@media (max-width: 760px) {   /* phones: the note on top, the video under it */
  .rc-basket { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .rc-basket__video { max-width: 620px; width: 100%; justify-self: center; }
}

/* ---------- Recipe card pop-up (initRecipeCards in main.js) ----------
   Laid out like the printed recipe cards: title on a butter-yellow block,
   a polaroid of the dish clipped on top right, ingredients + method on a
   pale panel, tips down the left and the leaf logo bottom left */
.plate[data-recipe] { cursor: pointer; }
.plate[data-recipe]:focus-visible { outline: 3px solid #27500A; outline-offset: 6px; border-radius: 16px; }
.rpop-open { overflow: hidden; }

.rpop {
  width: min(calc(100% - 32px), 720px);
  max-width: none;
  max-height: min(calc(100svh - 48px), 760px);
  padding: 0;
  border: 0;
  border-radius: clamp(16px, 2vw, 24px);
  background: var(--sage-light);
  color: #27461F;
  overflow-y: auto;
  overscroll-behavior: contain;
  box-shadow: 0 24px 60px rgba(31, 36, 20, .35);
}
.rpop::backdrop { background: rgba(31, 36, 20, .55); }
.rpop[open] { animation: rpop-in .35s cubic-bezier(.2, 1.2, .4, 1); }
@keyframes rpop-in { from { opacity: 0; transform: translateY(24px) scale(.97); } }
@media (prefers-reduced-motion: reduce) { .rpop[open] { animation: none; } }

.rpop__close {
  position: sticky;
  top: 12px;
  float: right;
  z-index: 3;
  width: 36px;
  height: 36px;
  margin: 10px 10px -46px 0;
  border: 0;
  border-radius: 50%;
  background: var(--olive);
  color: var(--cream-text);
  font: 400 24px/1 var(--font-sans);
  cursor: pointer;
}
.rpop__close:hover { background: var(--olive-dark); }
.rpop__close:focus-visible { outline: 3px solid #27500A; outline-offset: 3px; }

.rcard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.65fr);
  grid-template-areas:
    "title photo"
    "side  main";
  gap: 0 24px;
  padding: 32px 36px 32px;
  font-family: "IBM Plex Mono", monospace;
  font-weight: 500;
  letter-spacing: .02em;
}
.rcard__title {
  grid-area: title;
  align-self: center;
  margin: 0;
  padding: 20px 16px;
  border-radius: 16px;
  background: #FBE68A;
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: clamp(22px, 3vw, 28px);
  line-height: 1.15;
  letter-spacing: 0;
  text-align: center;
  text-wrap: balance;
  color: #27461F;
}

/* Polaroid, overlapping the top of the panel, with a paper clip */
.rcard__photo {
  grid-area: photo;
  justify-self: end;
  align-self: start;
  position: relative;
  z-index: 2;
  width: clamp(150px, 46%, 200px);
  margin: 0 -14px -60px 0;
  padding: 8px 8px 34px;
  background: #FBFBF6;
  box-shadow: 0 12px 24px rgba(31, 36, 20, .25);
  transform: rotate(2.5deg);
}
.rcard__photo img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.rcard__clip {
  position: absolute;
  top: -26px;
  right: 22%;
  width: 22px;
  height: auto;
  color: #9AA08C;
}

.rcard__main {
  grid-area: main;
  margin-top: 24px;
  padding: 26px 26px;
  border-radius: 16px;
  background: #F2F5EA;
  font-size: 13px;
  line-height: 1.6;
}
.rcard__heading {
  margin: 0 0 10px;
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: clamp(24px, 3vw, 30px);
  line-height: 1.1;
  letter-spacing: 0;
  color: #27461F;
}
.rcard__main .rcard__heading:first-child { max-width: calc(100% - 130px); }   /* clear of the polaroid */
.rcard__list + .rcard__heading { margin-top: 30px; }
.rcard__label {
  margin: 14px 0 6px;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.rcard__heading + .rcard__label { margin-top: 0; }
.rcard__list { margin: 0 0 16px; padding-left: 1.4em; }
.rcard__list li::marker { color: var(--olive); }
.rcard__list li + li { margin-top: 2px; }
.rcard__steps { margin: 0; padding: 0; list-style: none; }
.rcard__steps li + li { margin-top: 1em; }
.rcard__steps mark {
  padding: 1px 4px;
  border-radius: 3px;
  background: #FBE68A;
  color: inherit;
}

.rcard__side {
  grid-area: side;
  display: flex;
  flex-direction: column;
  margin-top: 24px;
}
.rcard__tips {
  margin: auto 0;
  padding: 18px 18px 18px 34px;
  border-radius: 16px;
  background: #F2F5EA;
  font-size: 11.5px;
  line-height: 1.7;
}
.rcard__tips li + li { margin-top: 1.2em; }
.rcard__tips strong { font-weight: 700; }
.rcard__logo { width: 44px; height: 44px; margin-top: 20px; }

/* Phones: one column, title > photo > recipe > tips */
@media (max-width: 720px) {
  .rcard {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "title" "photo" "main" "side";
    padding: 50px 14px 20px;
  }
  .rcard__photo { justify-self: center; width: min(60%, 200px); margin: 22px 0 0; }
  .rcard__main { margin-top: 22px; padding: 22px 18px; }
  .rcard__main .rcard__heading:first-child { max-width: none; }
  .rcard__side { margin-top: 20px; align-items: center; }
  .rcard__tips { padding: 22px 22px 22px 38px; }
  .rcard__logo { margin-top: 24px; }
}

/* Checkout: the opening offer line, 50% off the first box */
.co-totals__off { color: var(--rust); font-weight: 600; }

/* =========================================================
   CHECKOUT LAYOUT (2026-11-25): one "Checkout" page like the reference —
   title on the left, Client details / Delivery details / Payment details
   as pill fields and tick tiles, a pill Submit under the form, and a small
   pale "Your order" card (Edit + Total) on the right. No step bar.
   ========================================================= */
.co-hello { text-align: left; margin: 0 0 18px; }
.co.is-checkout .co-grid { grid-template-columns: minmax(0, 1fr) minmax(260px, 320px); gap: clamp(24px, 6vw, 96px); }
.co.is-checkout .co-main { padding: 0; border-radius: 0; background: none; box-shadow: none; }
.co.is-checkout .co-perks,
.co.is-checkout .co-side__then { display: none; }

.co-checkout .co-title { margin-bottom: 8px; }
.co-checkout__note { margin: 8px 0 0; color: var(--rust); font-weight: 600; }
.co-checkout .co-form { max-width: 560px; gap: 14px 24px; }
.co-checkout .co-sub { margin: 26px 0 0; font-size: clamp(18px, 1.6vw, 22px); }

/* fields: small label over a thin pill */
.co-checkout .co-field { gap: 6px; font-size: 13px; font-weight: 500; }
.co-checkout .co-field input,
.co-checkout .co-field textarea {
  padding: 11px 18px;
  border: 1px solid rgba(31, 36, 20, .45);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
}
.co-checkout .co-field textarea { border-radius: 22px; resize: vertical; }
.co-checkout .co-field input::placeholder,
.co-checkout .co-field textarea::placeholder { color: rgba(31, 36, 20, .45); }
.co-checkout .co-field input:focus,
.co-checkout .co-field textarea:focus { border-color: var(--olive-dark); box-shadow: 0 0 0 3px rgba(92, 110, 53, .18); }
.co-checkout .co-field input[readonly] { background: var(--sage-light); color: rgba(31, 36, 20, .75); }

/* tiles: square-ish cards with an icon; the chosen one gets a tick badge */
.co-tiles { display: flex; flex-wrap: wrap; gap: 14px; margin: 0; padding: 0; border: 0; }
.co-tile {
  --tile-bg: var(--paper);
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  width: 150px;
  min-height: 104px;
  padding: 14px;
  border: 1px solid rgba(31, 36, 20, .45);
  border-radius: 14px;
  background: var(--tile-bg);
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
  cursor: pointer;
}
.co-tile input { position: absolute; opacity: 0; pointer-events: none; }
.co-tile__icon { width: 30px; height: 24px; color: var(--olive-dark); }
.co-tile:has(input:checked) { --tile-bg: var(--butter); border-color: var(--olive-dark); }
.co-tile:has(input:checked)::after {   /* the tick badge, top right */
  content: "";
  position: absolute;
  top: -9px;
  right: -9px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--olive-dark) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 12.5l3.2 3.2L17 9' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
}
.co-tile:has(input:focus-visible) { outline: 2px solid var(--olive); outline-offset: 3px; }
.co-checkout .co-hint { margin: 0; font-size: 13px; }

/* Submit: a wide pill, then a quiet way back */
.co-checkout__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin-top: 18px; }
.co-submit {
  min-width: 220px;
  padding: 13px 28px;
  border: 0;
  border-radius: 999px;
  background: var(--rust);
  color: var(--paper);
  font: 700 13px var(--font-sans);
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
}
.co-submit:hover { background: var(--rust-dark); }
.co-submit:disabled { opacity: .6; cursor: wait; }
.co-checkout__back { padding: 0; border: 0; background: none; color: var(--olive-dark); font: 500 13px var(--font-sans); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* "Your order": a small pale card, item lines like a receipt, Total at the bottom */
.co-side { background: var(--sage-light); box-shadow: none; border-radius: 12px; }
.co-side__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
body:not(.home) .co-side__title { margin: 0; font-size: 20px; }
.co-side__edit { padding: 0; border: 0; background: none; color: var(--olive-dark); font: 500 13px var(--font-sans); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.co-side__edit[hidden] { display: none; }
.co-side__line { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: baseline; font-size: 14px; }
.co-side__line .co-side__name { margin: 0; font-size: 14px; text-transform: none; }
.co-side__meta { margin: 6px 0 0; font-size: 12px; opacity: .75; }
.co-totals { margin: 16px 0 6px; padding-top: 12px; border-top: 1px solid rgba(31, 36, 20, .35); font-size: 14px; }
.co-totals__due { border-top: 0; padding-top: 6px; font-size: 18px; }
.co-totals div[hidden] { display: none; }

@media (max-width: 900px) {
  .co.is-checkout .co-grid { grid-template-columns: minmax(0, 1fr); }
  .co.is-checkout .co-side { order: -1; }   /* phones: the order card first, then the form */
}
@media (max-width: 640px) {
  .co-checkout .co-form { grid-template-columns: minmax(0, 1fr); }
  .co-tile { width: calc(50% - 7px); }
  .co-checkout__actions { justify-content: center; }
  .co-submit { width: min(100%, 260px); }
}

/* ---------- Footer: every link (pages + policies) in one row along the bottom ---------- */
.site-foot__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  width: 100%;
  padding-top: 18px;
  border-top: 1px solid rgba(74, 90, 43, .25);
}
.site-foot__legal a {
  border-bottom: 1px solid transparent;
  color: var(--olive-dark);
  font: 500 13px "IBM Plex Mono", monospace;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color .2s, border-color .2s;
}
.site-foot__legal a:hover { color: var(--rust); }
.site-foot__legal a[aria-current="page"] { border-color: currentColor; }

/* ---------- Policy pages (modern-slavery, cookies, data-protection, sustainability) ---------- */
.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: calc(var(--header-h) + 48px) var(--gutter) clamp(64px, 6.4vw, 88px);
  color: var(--ink);
}
body:not(.home) .legal__title {
  margin: 0 0 18px;
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.1;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--olive-dark);
}
.legal h2 {
  margin: 36px 0 10px;
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: clamp(19px, 1.8vw, 24px);
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--olive-dark);
}
.legal p,
.legal li,
.legal td,
.legal th { font-size: 15px; line-height: 1.65; }
.legal .legal__lead { font-size: clamp(16px, 1.3vw, 18px); }
.legal ul { padding-left: 1.2em; }
.legal li + li { margin-top: 6px; }
.legal a:not(.btn) { color: var(--olive-dark); font-weight: 600; text-underline-offset: 3px; }
.legal a:not(.btn):hover { color: var(--rust); }
.legal__todo { padding: 0 4px; border-radius: 4px; background: var(--butter); color: inherit; }   /* placeholders still to fill in */
.legal__sign { margin-top: 36px; font-size: 13px !important; opacity: .8; }
.legal__table { width: 100%; border-collapse: collapse; margin: 14px 0; }
.legal__table th,
.legal__table td { padding: 10px 12px; border-bottom: 1px solid rgba(74, 90, 43, .2); text-align: left; vertical-align: top; }
.legal__table th { background: var(--sage-light); font-weight: 700; }
.legal__clear { margin-top: 8px; cursor: pointer; }
.legal__cleared { color: var(--olive-dark); font-weight: 600; }

/* Pages without the footer newsletter (all but the home page): no line above the links */
.site-foot__legal:first-child { padding-top: 0; border-top: 0; }

/* Menu bar: "Sign Up" is a green outline person (account) icon (signed in, main.js turns it back into the "My box" button) */
.site-nav__actions .btn.site-nav__basket {
  padding: 4px;
  border: 0;
  background: none;
  color: var(--olive);
}
.site-nav__actions .btn.site-nav__basket:hover { background: none; color: var(--olive-dark); }
.site-nav__basket-icon { display: block; width: 22px; height: 22px; transition: transform .2s ease; }   /* was 34px, then 28px */
.site-nav__basket:hover .site-nav__basket-icon { transform: translateY(-2px); }
.site-nav__basket[aria-current="page"] .site-nav__basket-icon { color: var(--olive-dark); }
.site-nav__actions .btn.site-nav__basket { flex-direction: column; gap: 2px; }
.site-nav__basket-label {   /* "Account", small, under the icon */
  font: 500 11px "IBM Plex Mono", monospace;
  letter-spacing: .04em;
  text-transform: uppercase;
  line-height: 1;
}
@media (max-width: 900px) {   /* phone menu: the icon with "Account" next to it */
  .site-nav__actions .btn.site-nav__basket { flex-direction: row; gap: 10px; justify-content: flex-start; }
  .site-nav__basket-label { font-size: 15px; }
}

/* ---------- Account pop-up (menu bar "Account", main.js initAccountPopup) ----------
   Same pale-olive pop-up as the recipe cards, with the Log In / Join form inside */
.acct-pop { width: min(calc(100% - 32px), 580px); }
.acct-pop .login__card {
  width: auto;
  padding: 64px 64px 48px;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: var(--olive-dark);
}
.acct-pop .login__card[hidden] { display: none; }
.acct-pop .login__kicker { color: var(--rust); }
.acct-pop .login__title {
  margin: 0 0 32px;
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: clamp(34px, 5vw, 52px);
  letter-spacing: .04em;
  line-height: 1.1;
  text-transform: uppercase;
  color: var(--olive-dark);
}
.acct-pop .login__form { gap: 20px; }
.acct-pop .login__field input { padding: 18px 54px 18px 24px; font-size: 17px; background: var(--olive); color: var(--cream-text); }
.acct-pop .login__field svg { right: 22px; width: 20px; height: 20px; }
.acct-pop .login__field input:focus { border-color: var(--butter); background: var(--olive-dark); }
.acct-pop .login__forgot { color: var(--olive-dark); }
.acct-pop .login__submit { padding: 18px; font-size: 17px; background: var(--olive-dark); color: var(--cream-text); }
.acct-pop .login__forgot,
.acct-pop .login__join { font-size: 15px; }
.acct-pop .login__submit:hover { background: var(--rust); color: var(--cream-text); }
.acct-pop .login__status { color: var(--olive-dark); font-weight: 600; }
.acct-pop .login__status.is-error { color: var(--rust); }
.acct-pop .login__join { color: var(--olive-dark); }
.acct-pop .login__join a { color: var(--rust); }
@media (max-width: 760px) {
  .acct-pop .login__card { padding: 56px 24px 32px; }
  .acct-pop .join__row { grid-template-columns: 1fr; gap: 18px; }
}

/* ---------- Smooth scrolling (Lenis, main.js initSmoothScroll) ---------- */
html.lenis,
html.lenis body { height: auto; }
html.lenis.lenis-smooth { scroll-behavior: auto !important; }   /* Lenis does the gliding, not the browser */
.lenis.lenis-stopped { overflow: clip; }
.lenis.lenis-smooth iframe { pointer-events: none; }

/* ---------- Big footer (2026-11-26, after Riverford's): link columns with headings,
   a short "about" on the right, a small copyright line at the bottom ---------- */
.site-foot.site-foot--big {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(240px, 1.3fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
  padding: clamp(48px, 6vw, 88px) max(var(--gutter), calc((100% - 1240px) / 2 + var(--gutter))) 32px;
  background: var(--sage-light);
  color: var(--olive-dark);
}
.site-foot__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px clamp(24px, 3vw, 48px);
}
.site-foot__col { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.site-foot--big .site-foot__head {
  margin: 0 0 10px;
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: clamp(20px, 1.8vw, 26px);
  letter-spacing: .04em;
  line-height: 1.15;
  text-transform: uppercase;
  color: var(--olive-dark);
}
.site-foot--big .site-foot__grid a,
.site-foot--big .site-foot__about a {
  padding: 0;
  border: 0;
  color: var(--olive-dark);
  font: 500 clamp(15px, 1.2vw, 17px)/1.4 "IBM Plex Mono", monospace;
  letter-spacing: .02em;
  text-transform: none;
  text-decoration: none;   /* no underline (2026-11-26): the colour changes on hover instead */
  transition: color .2s;
}
.site-foot--big .site-foot__grid a:hover,
.site-foot--big .site-foot__about a:hover { color: var(--rust); }
.site-foot--big .site-foot__grid a[aria-current="page"] { color: var(--rust); }
.site-foot__about p { margin: 0 0 14px; font: 500 15px/1.65 "IBM Plex Mono", monospace; color: var(--olive-dark); }
.site-foot__brand { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }   /* the logo, then the name on its right */
.site-foot--big .site-foot__brand .site-foot__head { margin: 0; color: #27500A; }   /* the leaf logo's green */
.site-foot__mark { display: block; flex: none; width: 56px; height: 56px; }
.site-foot__small {
  grid-column: 1 / -1;
  margin: 8px 0 0;
  padding-top: 20px;
  border-top: 1px solid rgba(74, 90, 43, .25);
  font: 500 13px "IBM Plex Mono", monospace;
  letter-spacing: .04em;
  color: var(--olive-dark);
}
@media (max-width: 900px) {
  .site-foot.site-foot--big { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .site-foot__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

/* Join: "Send me offers, recipes and veg news" tick box (join.html + the Account pop-up) */
.login__consent { display: flex; align-items: flex-start; gap: 10px; font: 500 13px/1.5 var(--font-sans); text-align: left; cursor: pointer; }
.login__consent input { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--olive); cursor: pointer; }
.acct-pop .login__consent { color: var(--olive-dark); font-size: 14px; }

/* Recipe page (main.rc) and Harvest Mind (main.hm): the footer on beige, the same
   beige as the veg shapes on Harvest Mind (assets/images/mind/*-beige.png) */
main.rc ~ .site-foot.site-foot--big,
main.hm ~ .site-foot.site-foot--big { background: #F3ECE1; }
