/* Home page, concept A "Photo-led" (board docs/concepts/2026-10-26-home-concepts.html, DMS 3298534926700; Matt 26 Oct 2026:
   "option A but with a carosell with all the images we hold of the meals, ideally in a 2x2 grid for mobile").
   Loaded on / only (site/build.mjs). Every rule is scoped to .home-a so site.css's page rules stay untouched elsewhere.
   One deep-green hero panel carries the still photo, the headline, the delivery facts and Order Here; below it a single
   column: the three steps as cards, this week's meals + the four extras, the "From the kitchen" photo carousel
   (js/home-carousel.js; a plain horizontal scroller without JS), the green delivery band. The top strip, header and
   footer are the shared partials. Tokens: site.css :root. */

/* L31 (Matt, 26 Oct 2026): the hero is ~30% shorter (pin 7f5d8e8f11: "This whole hero section is too big. Would you size by 30%?"), its picture is a
   carousel of the meal photos (pin 42bbea40ec), and the rest of the page runs ~20% smaller in type and spacing ("Everything feels too big") —
   the headings follow site.css's scale tokens; the hero numbers below are the 30% figure, not the 20% plus the 30%. */
.home-a {
  --ha-pad: 32px;
  --ha-gap: 20px;
}

/* ---- hero panel ---- */
.home-a .ha-hero {
  display: grid;
  grid-template-columns: 1fr;
  margin-top: 24px;
  background: var(--green-deep);
  color: var(--white);
  border-radius: var(--r-panel);
  overflow: hidden;
}

.home-a .ha-copy {
  padding: 20px 16px 0;
}

.home-a .ha-hero h1 {
  font-size: 32px;
  line-height: 1.04;
  letter-spacing: -0.01em;
  color: var(--white);
  text-wrap: balance;
}

.home-a .ha-sub {
  margin: 8px 0 0;
  font-size: 16px;
  font-weight: 500;
  color: var(--mint-text);
}

.home-a .ha-sup {
  margin: 6px 0 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--mint-text);
  max-width: 40ch;
}

.home-a .ha-cta {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  margin-top: 16px;
  text-align: center;
}

.home-a .ha-cta .button {
  background: var(--white);
  border-color: var(--white);
  color: var(--green-deep);
  font-size: 16px;
  font-weight: 700;
  width: 100%;
}

.home-a .ha-cta .button:hover {
  background: var(--mint-light);
  border-color: var(--mint-light);
  color: var(--green-deep);
}

.home-a .ha-cta .text-link {
  justify-content: center;
  color: var(--white);
  text-decoration-color: var(--pink);
  text-decoration-thickness: 2px;
}

.home-a .ha-cta .text-link:hover {
  color: var(--mint-text);
}

.home-a .ha-acct {
  margin: 12px 0 0;
  text-align: center;
  font-size: 14px;
  color: var(--mint-text);
}

.home-a .ha-acct a {
  display: inline-block;
  padding: 10px 2px;
  font-weight: 700;
  color: var(--white);
  text-decoration: underline;
  text-decoration-color: var(--pink);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.home-a .ha-photo {
  position: relative;
  display: grid;
  margin: 16px 16px 0;
  border-radius: var(--r-photo);
  overflow: hidden;
  background: var(--mint-light);
}

/* Hero carousel (L31; markup src/pages/pages.mjs, script js/home-carousel.js): every slide sits in the same grid cell and only its opacity changes,
   so the box is one photo tall and a change of photo never moves the layout. The dots are read-only position marks; the one control is a 44px
   play/pause button the script reveals — a focus stop that pauses the rotation, and the way to run it under prefers-reduced-motion. */
.home-a .ha-photo .ha-slide {
  grid-area: 1 / 1;
  min-width: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.home-a .ha-photo .ha-slide.is-active {
  opacity: 1;
}

.home-a .ha-photo img {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.home-a .ha-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  display: flex;
  justify-content: center;
  gap: 6px;
  pointer-events: none;
}

.home-a .ha-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(252, 251, 245, 0.55);
  box-shadow: 0 0 0 1px rgba(8, 60, 34, 0.35);
}

.home-a .ha-dot.is-active {
  background: var(--white);
}

.home-a .ha-reel-toggle {
  appearance: none;
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(252, 251, 245, 0.88);
  color: var(--green-deep);
  cursor: pointer;
  font: inherit;
}

.home-a .ha-reel-toggle[hidden] {
  display: none;
}

.home-a .ha-reel-toggle svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.home-a .ha-reel-toggle .ha-ic-play,
.home-a .ha-reel-toggle[data-state="paused"] .ha-ic-pause {
  display: none;
}

.home-a .ha-reel-toggle[data-state="paused"] .ha-ic-play {
  display: block;
}

.home-a .ha-reel-toggle:hover {
  background: var(--white);
}

.home-a .ha-reel-toggle:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .home-a .ha-photo .ha-slide {
    transition: none;
  }
}

.home-a .ha-facts {
  display: flex;
  gap: 14px;
  margin: 12px 16px 0;
  padding: 10px 0 14px;
  border-top: 1px solid rgba(221, 245, 211, 0.28);
  font-size: 13px; /* site floor: exercise-browser asserts every visible text ≥ 13px */
  color: var(--mint-text);
}

.home-a .ha-facts > div {
  display: flex;
  flex-direction: column-reverse;
  flex: 1 1 0;
  min-width: 0;
}

.home-a .ha-facts dt {
  margin: 0;
}

.home-a .ha-facts dd {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--white);
}

.home-a .ha-hero .button:focus-visible,
.home-a .ha-hero a:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 3px;
}

/* ---- the three steps as cards ---- */
.home-a .steps-strip.ha-steps {
  padding-block: 24px 0;
  border-bottom: 0;
}

.home-a .ha-steps .steps--inline {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-a .ha-steps .steps--inline li {
  display: block;
  padding: 16px 16px 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.home-a .ha-steps .steps--inline .step-number {
  display: inline-block;
  margin: 0 0 10px;
  padding-bottom: 4px;
  border-bottom: 2px solid var(--pink);
  font-family: var(--display);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--green-text);
}

.home-a .ha-steps .steps--inline h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.15;
}

.home-a .ha-steps .steps--inline p {
  margin: 6px 0 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--green-text);
}

/* ---- On the table ---- */
.home-a .menu-preview.section {
  padding-block: 32px 0;
  border-bottom: 0;
}

.home-a .menu-preview .section-heading {
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 20px;
  margin-bottom: 8px;
}

.home-a .menu-preview .section-heading h2 {
  font-size: 28px;
  line-height: 1.08;
}

.home-a .menu-preview .section-aside {
  display: flex;
  align-items: baseline;
  gap: 20px;
  margin: 0;
}

/* Concept A: "£7 each" is plain display type, not the site-wide dark pill (site.css .menu-price). */
.home-a .menu-preview .menu-price {
  margin: 0;
  padding: 0;
  gap: 6px;
  background: none;
  border-radius: 0;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 600;
  color: var(--green-text);
}

.home-a .menu-preview .menu-price strong,
.home-a .menu-preview .section-aside .menu-price strong {
  font-size: 18px;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.home-a .menu-preview .menu-price .each {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0;
  font-variant-caps: normal;
  color: var(--green-text);
}

.home-a .menu-preview .menu-week,
.home-a .menu-preview .menu-changes {
  display: inline;
  margin: 0;
  font-size: 14px;
  color: var(--green-text);
}

.home-a .menu-preview .menu-week::after {
  content: " · ";
}

.home-a .menu-preview .menu-week + .menu-changes + * {
  margin-top: 20px;
}

.home-a .menu-preview .meal-grid {
  margin-top: 20px;
}

/* the four extras: one mint band, name + price rows with their small photos */
.home-a .home-extras {
  margin-top: 26px;
  padding: 16px;
  background: var(--mint-light);
  border: 1px solid var(--line);
  border-radius: var(--r-photo);
}

.home-a .home-extras-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 20px;
  margin: 0;
}

.home-a .home-extras-head h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

.home-a .home-extras-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 12px;
}

.home-a .home-extra-card {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 56px;
  padding: 0;
  background: none;
  border: 0;
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
}

.home-a .home-extra-card .product-photo {
  margin: 0;
  width: 56px;
  aspect-ratio: 1;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
}

.home-a .home-extra-card .product-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-a .home-extra-card h4 {
  margin: 0;
  font-family: var(--body);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
}

.home-a .home-extra-card .product-price {
  margin: 2px 0 0;
  font-size: 14px;
  color: var(--green-text);
}

.home-a .home-extra-card:hover h4 {
  text-decoration: underline;
  text-decoration-color: var(--pink);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

/* ---- From the kitchen: the photo carousel ---- */
.home-a .home-kitchen {
  padding-block: 32px 0;
  border-bottom: 0;
}

.home-a .hk-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 20px;
}

.home-a .hk-head h2 {
  font-size: 28px;
  line-height: 1.08;
}

.home-a .hk-head p {
  margin: 0;
  font-size: 14px;
  color: var(--green-text);
}

.home-a .hk-carousel {
  --hk-cols: 2;
  --hk-gap: 12px;
  margin-top: 20px;
}

.home-a .hk-track {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(2, auto);
  grid-auto-columns: calc((100% - (var(--hk-cols) - 1) * var(--hk-gap)) / var(--hk-cols));
  gap: 16px var(--hk-gap);
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.home-a .hk-track::-webkit-scrollbar {
  display: none;
}

/* a snap point at the start of every slide: 2 rows x the columns per slide (2 / 3 / 4 across the breakpoints) */
.home-a .hk-tile {
  scroll-snap-align: none;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
}

/* site.css gives every link a 44px inline-flex box (a[href]:not(.brand)…, specificity 0,5,1); a tile is a photo over its name, so this heavier selector takes the box back. */
.home-a .hk-carousel .hk-track > a.hk-tile[href] {
  display: block;
  padding-block: 0;
  min-height: 0;
}

.home-a .hk-tile:nth-child(4n + 1) {
  scroll-snap-align: start;
}

.home-a .hk-tile img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--r-photo);
  background: var(--mint-light);
}

.home-a .hk-name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  margin-top: 8px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}

.home-a .hk-tile:hover .hk-name {
  text-decoration: underline;
  text-decoration-color: var(--pink);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.home-a .hk-tile:focus-visible {
  outline: 3px solid var(--green-deep);
  outline-offset: 3px;
  border-radius: var(--r-photo);
}

.home-a .hk-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.home-a .hk-step {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 1.5px solid var(--green-deep);
  border-radius: 50%;
  background: var(--white);
  color: var(--green-deep);
  cursor: pointer;
  font: inherit;
}

.home-a .hk-step svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.home-a .hk-step:hover {
  background: var(--green-deep);
  color: var(--white);
}

.home-a .hk-step[aria-disabled="true"] {
  opacity: 0.35;
  cursor: default;
}

.home-a .hk-step[aria-disabled="true"]:hover {
  background: var(--white);
  color: var(--green-deep);
}

.home-a .hk-dots {
  display: flex;
  align-items: center;
  margin: 0 4px;
}

.home-a .hk-dot {
  appearance: none;
  position: relative;
  width: 24px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.home-a .hk-dot::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 17px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid var(--green-deep);
  background: var(--white);
  box-sizing: border-box;
}

.home-a .hk-dot[aria-current="true"]::before {
  background: var(--green-deep);
}

.home-a .hk-step:focus-visible,
.home-a .hk-dot:focus-visible {
  outline: 3px solid var(--green-deep);
  outline-offset: 2px;
  border-radius: 999px;
}

.home-a .hk-status {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---- delivery band (the allergen lines fold in here, as on the board) ---- */
.home-a .ha-dband {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 32px;
  padding: 32px 16px;
  background: var(--green-deep);
  color: var(--white);
  border-radius: var(--r-panel);
}

.home-a .ha-dband h2 {
  font-size: 26px;
  line-height: 1.1;
  color: var(--white);
  text-wrap: balance;
}

.home-a .ha-dband ul {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  font-size: 16px;
  color: var(--mint-text);
}

.home-a .ha-dband li,
.home-a .ha-dband .delivery-promo-row p {
  margin: 0;
  padding: 9px 0;
  border-top: 1px solid rgba(221, 245, 211, 0.28);
  line-height: 1.45;
}

.home-a .ha-dband .delivery-promo-row {
  border-top: 0;
  font-size: 16px;
  color: var(--mint-text);
}

.home-a .ha-dband .delivery-promo-row p:first-child {
  color: var(--mint-text);
}

.home-a .ha-dband .ha-side p {
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
  color: var(--mint-text);
}

.home-a .ha-dband .ha-side p + p {
  margin-top: 8px;
}

.home-a .ha-dband .ha-side .text-link {
  color: var(--white);
  text-decoration-color: var(--pink);
  text-decoration-thickness: 2px;
}

.home-a .ha-dband .ha-side .button {
  margin-top: 22px;
  width: 100%;
  background: var(--white);
  border-color: var(--white);
  color: var(--green-deep);
  font-weight: 700;
}

.home-a .ha-dband .ha-side .button:hover {
  background: var(--mint-light);
  border-color: var(--mint-light);
  color: var(--green-deep);
}

.home-a .ha-dband a:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 3px;
}

.home-a .ha-end {
  height: 38px;
}

/* ---- tablet ---- */
@media (min-width: 768px) {
  .home-a .hk-carousel {
    --hk-cols: 3;
    --hk-gap: 20px;
  }
  .home-a .hk-tile:nth-child(4n + 1) {
    scroll-snap-align: none;
  }
  .home-a .hk-tile:nth-child(6n + 1) {
    scroll-snap-align: start;
  }
  .home-a .hk-name {
    font-size: 15px;
  }
  .home-a .ha-steps .steps--inline {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
  .home-a .home-extras-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px 24px;
  }
  .home-a .ha-dband {
    grid-template-columns: 1.2fr 1fr;
    gap: 38px;
    padding: 38px var(--ha-pad);
  }
  .home-a .ha-dband .ha-side .button {
    width: auto;
  }
}

/* ---- desktop: the two-column hero ---- */
@media (min-width: 900px) {
  .home-a .ha-hero {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr auto;
    grid-template-areas: "copy photo" "facts photo";
    min-height: 518px; /* 30% under the 740px the live hero measured at 1280 (L31) */
  }
  .home-a .ha-copy {
    grid-area: copy;
    padding: 34px 34px 0 40px;
  }
  .home-a .ha-hero h1 {
    font-size: clamp(40px, 4.2vw, 54px);
  }
  .home-a .ha-sub {
    margin-top: 10px;
    font-size: 18px;
  }
  .home-a .ha-sup {
    font-size: 15px;
  }
  .home-a .ha-cta {
    flex-direction: row;
    align-items: center;
    gap: 18px;
    margin-top: 18px;
    text-align: left;
  }
  .home-a .ha-cta .button {
    width: auto;
    padding: 11px 20px;
  }
  .home-a .ha-acct {
    display: none;
  }
  /* The photo column takes the hero's height, never the other way round: with contain: size the slides' 960x1200 aspect ratio no longer sizes the row
     (the 25 Oct hero measured 740px at 1280 for that reason, not its 560px min-height), the one grid row fills the box and each slide's img is 100% of it. */
  .home-a .ha-photo {
    grid-area: photo;
    grid-template-rows: minmax(0, 1fr);
    margin: 0;
    border-radius: 0;
    contain: size;
  }
  .home-a .ha-photo img {
    height: 100%;
    min-height: 0;
  }
  .home-a .ha-facts {
    grid-area: facts;
    gap: 24px;
    margin: 0 34px 0 40px;
    padding: 14px 0 24px;
    font-size: 14px;
  }
  .home-a .ha-facts > div {
    flex: 0 1 auto;
  }
  .home-a .ha-facts dd {
    font-size: 16px;
  }
  .home-a .steps-strip.ha-steps {
    padding-top: 32px;
  }
  .home-a .ha-steps .steps--inline li {
    padding: 18px 20px 20px;
  }
  .home-a .menu-preview.section,
  .home-a .home-kitchen {
    padding-top: 45px;
  }
  .home-a .menu-preview .section-heading h2,
  .home-a .hk-head h2 {
    font-size: var(--fs-h2);
  }
  .home-a .menu-preview .menu-week,
  .home-a .menu-preview .menu-changes,
  .home-a .hk-head p {
    font-size: 15px;
  }
  .home-a .home-extras {
    margin-top: 38px;
    padding: 18px 22px;
  }
  .home-a .home-extras-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .home-a .ha-dband {
    margin-top: 45px;
    padding: 45px var(--ha-pad);
  }
  .home-a .ha-dband h2 {
    font-size: 30px;
  }
  .home-a .ha-end {
    height: 51px;
  }
}

@media (min-width: 1024px) {
  .home-a .hk-carousel {
    --hk-cols: 4;
    --hk-gap: 24px;
  }
  .home-a .hk-tile:nth-child(6n + 1) {
    scroll-snap-align: none;
  }
  .home-a .hk-tile:nth-child(8n + 1) {
    scroll-snap-align: start;
  }
  .home-a .hk-controls {
    justify-content: flex-start;
  }
}

/* No CSS scroll-behavior on the track: home-carousel.js asks for smooth or instant on each move itself, so focus and tool scrolls stay instant and never leave the track mid-animation. */

/* Phones: Phase-3 ui-check floor is 16px for text on a touch viewport. The hero facts become three stacked rows
   (value left, caption right) because three 16px columns do not fit in 339px. */
@media (max-width: 767px) {
  .home-a .ha-sup,
  .home-a .ha-acct a,
  .home-a .ha-facts dt,
  .home-a .ha-facts dd,
  .home-a .ha-steps .steps--inline li p,
  .home-a .menu-preview .menu-week,
  .home-a .menu-preview .menu-changes,
  .home-a .home-extra-card h4,
  .home-a .home-extra-card .product-price,
  .home-a .hk-head p,
  .home-a .hk-name {
    font-size: 16px;
  }

  .home-a .ha-facts {
    display: grid;
    gap: 0;
    padding-bottom: 8px;
  }

  .home-a .ha-facts > div {
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 6px 0;
  }

  .home-a .ha-facts > div + div {
    border-top: 1px solid rgba(221, 245, 211, 0.18);
  }
}
