/* Jo's Neuro Cafe — mobile and tablet responsive overrides */

:root {
  /* Mobile header stack: logo (68px) + padding + tagline row */
  --jos-mobile-hero-header: 82px;
}

html,
body {
  overflow-x: clip;
  max-width: 100%;
}

/* Reserve space for the fixed header (height set by jos-nav.js) */
body:has(.jos-header) {
  padding-top: var(--jos-header-h, 88px);
}

html {
  scroll-padding-top: var(--jos-header-h, 88px);
}

/* Real header heights as the starting value, so the page does not jump when jos-nav.js
   measures the fixed header and sets --jos-header-h (CLS). The script's inline value wins. */
html:has(.jos-header--alt) {
  --jos-header-h: 95px;
}

@media (min-width: 1024px) {
  html:has(.jos-header--alt) {
    --jos-header-h: 125px;
  }
}

html:has(.jos-header--alt) {
  scroll-padding-top: var(--jos-header-h, 120px);
}

@media (max-width: 900px) {
  html:has(.jos-header--alt) {
    scroll-padding-top: var(--jos-header-h, 88px);
  }
}

body:has(.cookie-consent:not([hidden])) {
  padding-bottom: 11rem;
}

body.jos-menu-open {
  overflow: hidden;
}

/* Dim the page behind the open burger menu */
body.jos-menu-open::before {
  background: rgba(26, 24, 20, 0.55);
  content: "";
  inset: 0;
  position: fixed;
  z-index: 350;
}

/* Header */
.jos-header {
  gap: 0.75rem 1rem;
}

.jos-header--alt {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.jos-brand {
  flex-shrink: 0;
}

.jos-logo {
  height: 164px;
  width: auto;
}

.jos-logo--landscape {
  display: block;
  height: auto;
  max-height: 230px;
  max-width: min(1400px, 85vw);
  width: auto;
}

.jos-nav-toggle {
  align-items: center;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: #3a320c;
  cursor: pointer;
  display: none;
  flex-shrink: 0;
  height: 44px;
  justify-content: center;
  margin: 0;
  padding: 0;
  width: 44px;
}

.jos-header--alt .jos-nav-toggle {
  align-self: center;
  color: var(--jos-alt-cream, #f0f4e6);
  display: inline-flex !important;
  grid-area: toggle;
  justify-self: end;
  position: relative;
  z-index: 2;
}

.jos-header--alt .jos-nav-toggle-bars span {
  background: var(--jos-alt-cream, #f0f4e6);
}

.jos-header--alt .jos-header-cta {
  display: none !important;
}

.jos-header--alt .jos-nav {
  align-items: stretch;
  align-self: stretch;
  background: var(--jos-alt-bg, #3a320c) !important;
  border-top: 1px solid rgba(240, 244, 230, 0.12);
  display: none !important;
  flex-direction: column;
  gap: 0;
  grid-area: nav;
  margin: 12px calc(-1 * var(--jos-header-inline-pad)) 0;
  padding: 0.35rem var(--jos-header-inline-pad) 1rem;
  width: calc(100% + 2 * var(--jos-header-inline-pad));
}

.jos-header--alt .jos-nav.is-open {
  border-top: 1px solid rgba(240, 244, 230, 0.12);
  bottom: auto;
  display: flex !important;
  height: calc(100dvh - var(--jos-header-h, 88px));
  left: 0;
  margin: 0 !important;
  max-height: none;
  max-width: none;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.75rem var(--jos-header-inline-pad) 2rem;
  position: fixed;
  right: 0;
  top: var(--jos-header-h, 88px);
  width: 100vw !important;
  z-index: 420;
}

.jos-header--alt .jos-nav a {
  border-bottom: 1px solid rgba(240, 244, 230, 0.12) !important;
  border-radius: 0 !important;
  color: var(--jos-alt-cream, #f0f4e6) !important;
  font-family: "Josefin Sans", "Josefin Sans Fallback", sans-serif !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  letter-spacing: 0.12em !important;
  line-height: 1.35 !important;
  padding: 1rem 0 !important;
  text-align: left !important;
  text-transform: uppercase !important;
}

.jos-header--alt .jos-nav a.is-active,
.jos-header--alt .jos-nav a[aria-current="page"] {
  border-bottom-color: var(--jos-alt-gold, #ad8330) !important;
  color: var(--jos-alt-gold, #ad8330) !important;
}

.jos-header--alt .jos-nav a.jos-nav-enquire {
  -webkit-text-fill-color: var(--jos-ink, #3a320c);
  background: var(--jos-alt-gold, #ad8330) !important;
  border-bottom: none !important;
  border-radius: 999px !important;
  color: var(--jos-ink, #3a320c) !important;
  display: block !important;
  font-weight: 600 !important;
  margin-top: 0.75rem;
  padding: 0.95rem 1.25rem !important;
  text-align: center !important;
}

.jos-nav-toggle-bars {
  display: flex;
  flex-direction: column;
  gap: 5px;
  height: 16px;
  justify-content: center;
  width: 22px;
}

.jos-nav-toggle-bars span {
  background: #3a320c;
  border-radius: 1px;
  display: block;
  height: 2px;
  transition: transform 0.22s ease, opacity 0.22s ease, width 0.22s ease;
  width: 100%;
}

.jos-nav-toggle[aria-expanded="true"] .jos-nav-toggle-bars span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.jos-nav-toggle[aria-expanded="true"] .jos-nav-toggle-bars span:nth-child(2) {
  opacity: 0;
}

.jos-nav-toggle[aria-expanded="true"] .jos-nav-toggle-bars span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.jos-nav {
  align-items: center;
  display: flex;
  gap: 40px;
}

.jos-header-cta {
  flex-shrink: 0;
  white-space: nowrap;
}

.jos-nav-enquire {
  display: none;
}

.jos-nav a.jos-nav-enquire {
  display: none;
}

.jos-header--alt .jos-nav a.jos-nav-enquire {
  display: block !important;
}

/*
 * Homepage hero — intentional desktop vs mobile split (Mark / James 2026-08).
 *
 * Same HTML (#hero .jos-hero-video); different assets and @media rules — not a bug if crop differs.
 *
 * DESKTOP (min-width: 901px):
 *   Asset: /assets/hero-coffee-reel.mp4 (1920×1080, 16:9 landscape)
 *   Container: 16:9, object-fit cover; overlay fades near end-of-loop for logo frame
 *
 * MOBILE + TABLET PORTRAIT (max-width: 900px; JS picks mobile src ≤900px):
 *   Asset: /assets/hero-coffee-reel-mobile-r25.mp4 (540×960, 9:16 portrait)
 *   Container: 9:16 capped to viewport height; object-fit cover within portrait box
 *   Rules: @media (max-width: 767px) and @media (768px–900px) blocks below — do not mirror desktop 16:9
 *
 * Source pick: index.html inline JS (browsers ignore <source media> on <video>).
 * SSOT: site/assets/README-assets.md
 */

/* Homepage hero — Reiss pattern: video leads, copy overlaid bottom-left */
.jos-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0;
  background: transparent;
  overflow: hidden;
}

/* Cream pinstripe under logo reads as a harsh band against hero video */
body:has(.jos-hero) .jos-header-pinstripe {
  display: none;
}

.jos-hero-atmosphere {
  position: relative;
  order: 1;
  width: 100%;
  display: flex;
  justify-content: stretch;
  align-items: stretch;
  padding: 0;
  background: transparent;
}

.jos-hero-visual {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0;
}

/* Bottom-left scrim — headline and copy sit in lower ~45% of frame */
.jos-hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 0;
  background: linear-gradient(
    to top,
    rgba(58, 50, 12, 0.72) 0%,
    rgba(58, 50, 12, 0.48) 24%,
    rgba(58, 50, 12, 0.16) 42%,
    transparent 58%
  );
  pointer-events: none;
  opacity: var(--hero-overlay-opacity, 1);
  transition: opacity 0.35s linear;
}

/* Fade overlay + scrim when video logo appears at end of loop */
.jos-hero-visual.is-logo-frame::after,
.jos-hero-visual.is-logo-frame .jos-hero-overlay {
  opacity: 0;
}

.jos-hero-video {
  position: relative;
  z-index: 0;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center center;
  background: #3a3834;
  border-radius: 0;
  filter: saturate(0.97);
}

.jos-hero-overlay {
  position: absolute;
  z-index: 2;
  bottom: clamp(32px, 7vw, 72px);
  left: 0;
  right: 0;
  top: auto;
  padding: clamp(16px, 4vw, 32px);
  text-align: left;
  opacity: var(--hero-overlay-opacity, 1);
  transition: opacity 0.35s linear;
}

.jos-hero-title {
  margin: 0;
  max-width: 14ch;
  font-family: "Baron Neue", sans-serif;
  font-weight: 700;
  font-size: clamp(28px, 7.5vw, 44px);
  line-height: 0.92;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #F0F4E6;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.42);
}

.jos-hero-content {
  position: relative;
  width: 100%;
  max-width: min(100%, 420px);
  margin: clamp(12px, 2vw, 20px) 0 0;
  padding: 0;
  text-align: left;
}

.jos-hero-lead {
  font-family: "Josefin Sans", "Josefin Sans Fallback", sans-serif;
  font-weight: 400;
  font-size: clamp(16px, 4.2vw, 20px);
  line-height: 1.45;
  color: #F0F4E6;
  margin: 0;
  max-width: none;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.38);
}

/* Hero background tap target (Mark, 8 Nov 2026, round 20): the visible SHOP link is gone, the photo
   or reel still opens the shop. A real link under the text; the overlay lets taps through and the
   headline and subline stay selectable. */
.jos-hero-image-link {
  inset: 0;
  position: absolute;
  z-index: 1;
}

.jos-hero-image-link:focus-visible {
  outline: 2px solid #f0f4e6;
  outline-offset: -6px;
}

.jos-hero-overlay {
  pointer-events: none;
}

.jos-hero-overlay > * {
  pointer-events: auto;
}

.jos-hero-overlay > .jos-hero-title,
.jos-hero-overlay > .jos-hero-subline {
  width: fit-content;
}

@media (min-width: 901px) {
  /* Reiss-style full-bleed hero flush under header (desktop landscape reel) */
  .jos-hero-atmosphere {
    padding: 0;
    background: transparent;
  }

  .jos-hero-visual {
    width: 100%;
    max-width: 100%;
    margin: 0;
    aspect-ratio: 16 / 9;
    max-height: min(56.25vw, calc(100svh - 200px));
    overflow: hidden;
    background: #3a3834;
  }

  .jos-hero-visual::after {
    border-radius: 0;
  }

  .jos-hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    aspect-ratio: unset;
    transform: none;
    border-radius: 0;
    object-fit: cover;
    object-position: center center;
  }

  .jos-hero-overlay {
    bottom: clamp(40px, 5vw, 80px);
    padding: clamp(24px, 3.5vw, 40px);
  }

  .jos-hero-title {
    font-size: clamp(36px, 4.2vw, 60px);
    max-width: 12ch;
  }

  .jos-hero-content {
    max-width: min(100%, 440px);
    margin-top: clamp(14px, 2vw, 22px);
  }

  .jos-hero-lead {
    font-size: clamp(17px, 1.35vw, 21px);
  }
}

/* MOBILE/TABLET PORTRAIT HERO ONLY (768–900px, same reel as phone) */
@media (min-width: 768px) and (max-width: 900px) {
  .jos-hero-atmosphere {
    padding: 0;
    background: transparent;
  }

  .jos-hero-visual {
    width: 100%;
    max-width: 100%;
    margin: 0;
    aspect-ratio: 9 / 16;
    height: min(calc(100vw * 16 / 9), calc(100dvh - var(--jos-mobile-hero-header)));
    max-height: calc(100dvh - var(--jos-mobile-hero-header));
    min-height: 0;
    overflow: hidden;
    background: #3a3834;
  }

  .jos-hero-visual::after {
    border-radius: 0;
  }

  .jos-hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    aspect-ratio: unset;
    transform: none;
    border-radius: 0;
    object-fit: cover;
    object-position: center center;
    background: #3a3834;
  }

  .jos-hero-overlay {
    /* Mark Aug 2026: hero copy sits lower on portrait reel */
    bottom: clamp(48px, 12vw, 72px);
    padding: clamp(14px, 4vw, 20px);
    padding-bottom: clamp(20px, 5.5vw, 32px);
  }

  .jos-hero-title {
    font-size: clamp(26px, 8vw, 40px);
  }

  .jos-hero-lead {
    font-size: clamp(16px, 4.4vw, 18px);
  }
}

/* Layout helpers */
.jos-pillar-grid,
.jos-story-grid,
.jos-testimonial-grid {
  min-width: 0;
}

.jos-pillar-card {
  min-height: 360px;
}

.jos-story-photos {
  min-height: 520px;
}

.jos-story-photo {
  overflow: hidden;
  border-radius: 4px;
}

.jos-story-photo img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

@media (max-width: 900px) {
  .jos-header {
    padding: 12px 16px 12px !important;
  }

  .jos-header--alt {
    --jos-header-inline-pad: 16px;
    align-items: center;
    column-gap: 10px;
    padding: 6px var(--jos-header-inline-pad) 8px !important;
    row-gap: 0;
  }

  .jos-header--alt .jos-brand {
    align-self: start;
    grid-area: brand;
    min-width: 0;
    overflow: hidden;
  }

  .jos-header--alt .jos-nav-toggle {
    align-self: start;
    margin-top: 2px;
  }

  .jos-header-pinstripe {
    height: 2px;
    margin-top: 2px;
  }

  .jos-header--alt .jos-brand-tagline {
    font-size: 9px;
    grid-area: tagline;
    justify-self: end;
    letter-spacing: 0.1em;
    margin: 0;
    max-width: 100%;
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
  }

  .jos-logo {
    height: 56px !important;
  }

  .jos-logo--landscape {
    height: auto !important;
    max-height: 68px !important;
    max-width: min(72vw, 280px) !important;
    width: auto !important;
  }
}

/* Desktop only: base rule above sizes the logo for mobile (max-height: 230px
   unconstrained), which makes the fixed header take up ~260px of every
   desktop viewport. Shrink it to a normal compact header on wider screens. */
@media (min-width: 901px) {
  .jos-header--alt {
    padding-bottom: 6px;
    padding-top: 10px;
  }

  .jos-logo--landscape {
    max-height: 64px;
    max-width: min(220px, 30vw);
  }
}

@media (max-width: 767px) {
  [data-screen-label="Brand statement"],
  [data-screen-label="Explore pillars"],
  [data-screen-label="Categories"],
  [data-screen-label="Carousel"],
  [data-screen-label="Our Story"],
  [data-screen-label="Testimonials"],
  [data-screen-label="See you soon"],
  [data-screen-label="Instagram"],
  [data-screen-label="Explore"],
  [data-screen-label="Book the truck"],
  [data-screen-label="About intro"],
  [data-screen-label="Story feature"],
  [data-screen-label="Story body"],
  [data-screen-label="Book intro"],
  main > section:not(.jos-hero) {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  .jos-categories,
  .jos-instagram,
  .jos-explore,
  .jos-promo {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  .jos-carousel-head,
  .jos-carousel-viewport {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  /* Coloured band and dark sections: text keeps 24px from the coloured edge
     (global rule). The section gutter stays 20px so photos, video and their
     ratios are untouched; text blocks take the extra 4px each side. One shared
     rule for every page. Lists that hold images (hire grid, partner logos) and text inside list items are left alone. */
  main > section.jos-section--band :is(h1, h2, h3, h4, p, ul, ol, figcaption):not(li *):not(:has(img)),
  main > section.jos-section--dark :is(h1, h2, h3, h4, p, ul, ol, figcaption):not(li *):not(:has(img)) {
    padding-left: 4px;
    padding-right: 4px;
  }

  /* MOBILE HERO ONLY (portrait reel) — see file header; not comparable to desktop 16:9 crop */
  #hero.jos-hero,
  main > section.jos-hero,
  .jos-hero {
    width: 100vw;
    max-width: 100vw;
    margin: 0 !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    padding: 0 !important;
    overflow: hidden;
    background: #3a3834;
    border-radius: 0;
    min-height: 0;
  }

  body.jos-reiss-page:has(.jos-hero) > main {
    padding: 0;
    overflow-x: clip;
  }

  .jos-hero-atmosphere {
    width: 100%;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent;
    min-height: 0;
  }

  .jos-hero-visual {
    position: relative;
    width: 100%;
    max-width: none !important;
    margin: 0 !important;
    /* Portrait reel (1080×1920): cap to viewport — avoids overflow clip on ~667px loads */
    aspect-ratio: 9 / 16;
    height: min(calc(100vw * 16 / 9), calc(100dvh - var(--jos-mobile-hero-header)));
    max-height: calc(100dvh - var(--jos-mobile-hero-header));
    min-height: 0;
    overflow: hidden;
    border-radius: 0;
    background: #3a3834;
  }

  .jos-hero-visual::after {
    border-radius: 0;
    background: linear-gradient(
      to top,
      rgba(58, 50, 12, 0.78) 0%,
      rgba(58, 50, 12, 0.54) 24%,
      rgba(58, 50, 12, 0.2) 42%,
      transparent 58%
    );
  }

  .jos-hero-video {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    aspect-ratio: unset;
    min-height: unset;
    max-height: none;
    object-fit: cover;
    object-position: center center;
    background: #3a3834;
    border-radius: 0;
  }

  .jos-hero-overlay {
    /* Mark Aug 2026: hero copy sits lower on portrait reel */
    bottom: clamp(48px, 12vw, 72px);
    padding: clamp(14px, 4vw, 20px);
    padding-bottom: clamp(20px, 5.5vw, 32px);
  }

  .jos-hero-title {
    font-size: clamp(26px, 8vw, 40px);
  }

  .jos-hero-lead {
    font-size: clamp(16px, 4.4vw, 18px);
  }

  [data-screen-label="Explore pillars"],
  [data-screen-label="Our Story"],
  [data-screen-label="Testimonials"] {
    padding-top: 72px !important;
    padding-bottom: 72px !important;
  }

  .jos-pillar-grid {
    gap: 18px !important;
    grid-template-columns: 1fr !important;
  }

  .jos-pillar-card {
    height: auto !important;
    min-height: 300px;
  }

  .jos-pillar-card h3 {
    font-size: 28px !important;
  }

  .jos-pillar-card [style*="left:34px"] {
    bottom: 24px !important;
    left: 20px !important;
    right: 20px !important;
  }

  .jos-story-grid {
    gap: 40px !important;
    grid-template-columns: 1fr !important;
  }

  .jos-story-copy {
    order: 1;
  }

  .jos-story-photos {
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr;
    height: auto !important;
    min-height: 0;
    order: 2;
  }

  .jos-story-photo {
    bottom: auto !important;
    height: 240px !important;
    left: auto !important;
    position: relative !important;
    right: auto !important;
    top: auto !important;
    width: 100% !important;
  }

  .jos-story-photo img {
    height: 100% !important;
    position: relative !important;
    top: 0 !important;
    transform: none !important;
  }

  .jos-testimonial-grid {
    gap: 36px !important;
    grid-template-columns: 1fr !important;
  }

  [data-screen-label="See you soon"] [style*="gap:64px"] {
    gap: 32px !important;
  }

  [data-screen-label="Story feature"] > div {
    height: 280px !important;
  }

  [data-screen-label="Book intro"] {
    padding-top: 72px !important;
    padding-bottom: 48px !important;
  }

  [data-screen-label="Enquiry"] {
    padding-top: 24px !important;
    padding-bottom: 72px !important;
  }

  .jos-enquire-grid {
    gap: 40px !important;
    grid-template-columns: 1fr !important;
  }

  .jos-enquire-form-wrap {
    order: 1;
    padding: 28px 22px !important;
  }

  .jos-enquire-aside {
    order: 2;
  }

  .jos-form-row {
    gap: 20px !important;
    grid-template-columns: 1fr !important;
  }

  .jos-enquire-form-wrap input,
  .jos-enquire-form-wrap select,
  .jos-enquire-form-wrap textarea {
    max-width: 100%;
    width: 100%;
  }

  .enquire-form button[type="submit"] {
    align-self: stretch !important;
    margin-top: 0.25rem;
    width: 100%;
  }

  .jos-page-hero {
    padding-bottom: var(--jos-space-hero-bottom) !important;
    padding-top: clamp(64px, 14vw, 88px) !important;
  }

  .jos-page-hero h1 {
    font-size: var(--jos-script-size-mobile) !important;
    letter-spacing: 0.01em !important;
    line-height: var(--jos-script-lh) !important;
    margin-bottom: calc((var(--jos-script-lh) - 1.15) * -1em + var(--jos-script-air)) !important; /* r30 */
    margin-inline: auto !important;
    margin-top: calc(clamp(24px, 6.5vw, 36px) - 0.2em + var(--jos-script-air)) !important; /* r26/r27: script title sits nearer the eyebrow, De Haviland has tall ascenders */
    max-width: 100% !important;
    padding-top: 0.32em !important;
    text-align: center !important;
    width: 100% !important;
  }

  .jos-page-hero h1:has(.jos-coming-badge) {
    gap: calc(1.25rem + 0.2em - (var(--jos-script-lh) - 1.15) / 2 * 1em) !important;
    margin-bottom: calc((var(--jos-script-lh) - 1.15) / -2 * 1em + var(--jos-script-air)) !important; /* r30 */
  }

  .jos-section {
    padding-bottom: var(--jos-space-section-y) !important;
    padding-top: var(--jos-space-section-y) !important;
  }

  .jos-section:not(.jos-section--band):not(.jos-section--dark)
    + .jos-section:not(.jos-section--band):not(.jos-section--dark) {
    padding-top: 0 !important;
  }

  .jos-section:not(.jos-section--band):not(.jos-section--dark):has(
      + .jos-section:not(.jos-section--band):not(.jos-section--dark)
    ) {
    padding-bottom: var(--jos-space-section-gap) !important;
  }

  .jos-section:not(.jos-section--band):not(.jos-section--dark):has(
      + .jos-section:not(.jos-section--band):not(.jos-section--dark)
        > .jos-section-inner
        > .jos-section-media:first-child
    ) {
    padding-bottom: var(--jos-space-media-before) !important;
  }

  .jos-section:not(.jos-section--band):not(.jos-section--dark):has(
      > .jos-section-inner
      > .jos-section-media:first-child
    ) {
    padding-top: 0 !important;
  }

  .jos-section--band + .jos-section:not(.jos-section--band):not(.jos-section--dark):has(
      > .jos-section-inner > .jos-section-media:first-child
    ),
  .jos-section--dark + .jos-section:not(.jos-section--band):not(.jos-section--dark):has(
      > .jos-section-inner > .jos-section-media:first-child
    ) {
    padding-top: 0 !important;
  }

  .jos-section--band:has(
      + .jos-section:not(.jos-section--band):not(.jos-section--dark)
        > .jos-section-inner
        > .jos-section-media:first-child
    ),
  .jos-section--dark:has(
      + .jos-section:not(.jos-section--band):not(.jos-section--dark)
        > .jos-section-inner
        > .jos-section-media:first-child
    ) {
    display: flow-root !important;
    padding-bottom: var(--jos-space-section-y) !important;
  }

  .jos-section--band:has(
      + .jos-section:not(.jos-section--band):not(.jos-section--dark)
        > .jos-section-inner
        > .jos-section-media:first-child
    )
    .jos-section-inner
    > :last-child,
  .jos-section--dark:has(
      + .jos-section:not(.jos-section--band):not(.jos-section--dark)
        > .jos-section-inner
        > .jos-section-media:first-child
    )
    .jos-section-inner
    > :last-child {
    margin-bottom: 0 !important;
  }

  .jos-section--band + .jos-section:not(.jos-section--band):not(.jos-section--dark) > .jos-section-inner > .jos-section-media:first-child,
  .jos-section--dark + .jos-section:not(.jos-section--band):not(.jos-section--dark) > .jos-section-inner > .jos-section-media:first-child {
    border-radius: 0 !important;
    margin-inline: -24px !important;
    margin-top: 0 !important;
    max-width: none !important;
    width: calc(100% + 48px) !important;
  }

  main > .jos-section:last-of-type,
  main > .jos-section:has(+ .jos-page-nav) {
    padding-bottom: var(--jos-space-section-y) !important;
  }

  .jos-page-nav {
    padding-bottom: var(--jos-space-section-y) !important;
    padding-top: var(--jos-space-section-gap) !important;
  }

  .jos-shop-grid {
    grid-template-columns: 1fr !important;
  }

  .jos-modal-panel {
    max-height: 90vh;
    overflow-y: auto;
    padding: 28px 22px;
  }

  .jos-modal-actions {
    flex-direction: column;
  }

  .jos-modal-actions .jos-btn {
    text-align: center;
    width: 100%;
  }

  /* Footer text keeps 24px from the coloured edge (global rule). */
  footer.jos-footer-min {
    padding-left: 24px;
    padding-right: 24px;
  }

  .jos-footer-min nav,
  .jos-footer-min .jos-footer-nav {
    flex-direction: column;
    gap: 10px;
  }

  footer[data-screen-label="Footer"]:not(.jos-footer-min) {
    padding: 40px 24px 28px !important;
  }

  footer[data-screen-label="Footer"]:not(.jos-footer-min) > div:first-of-type {
    align-items: center !important;
    flex-direction: column !important;
    gap: 20px !important;
    text-align: center;
  }

  footer[data-screen-label="Footer"]:not(.jos-footer-min) > div:first-of-type > div {
    gap: 16px !important;
    justify-content: center !important;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .jos-pillar-grid {
    grid-template-columns: 1fr !important;
  }

  .jos-story-grid {
    gap: 48px !important;
    grid-template-columns: 1fr !important;
  }

  .jos-story-copy {
    order: 1;
  }

  .jos-story-photos {
    order: 2;
    height: 420px !important;
    margin: 0 auto;
    max-width: 560px;
    width: 100%;
  }

  .jos-testimonial-grid {
    grid-template-columns: 1fr !important;
  }

  .jos-enquire-grid {
    gap: 48px !important;
    grid-template-columns: 1fr !important;
  }

  .jos-enquire-form-wrap {
    order: 1;
  }

  .jos-enquire-aside {
    order: 2;
  }
}

/* Cookie consent (analytics.js — Stitch pages do not load styles.css) */
.cookie-consent {
  background: #f0f4e6;
  border-top: 1px solid rgba(58, 50, 12, 0.12);
  bottom: 0;
  box-shadow: 0 -8px 24px rgba(58, 50, 12, 0.08);
  font-family: "Josefin Sans", "Josefin Sans Fallback", sans-serif;
  inset: auto 0 0 0;
  left: 0;
  padding: 1rem 1.25rem;
  position: fixed;
  right: 0;
  z-index: 1000;
}

.cookie-consent[hidden] {
  display: none !important;
}

.cookie-consent-inner {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 0 auto;
  max-width: 1080px;
}

.cookie-consent-title {
  color: #3a320c;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  margin: 0;
  text-transform: uppercase;
  width: 100%;
}

.cookie-consent-desc {
  color: #545454;
  flex: 1 1 240px;
  font-size: 0.9rem;
  line-height: 1.55;
  margin: 0;
}

.cookie-consent-desc a {
  color: #836424;
  text-decoration: underline;
}

.cookie-consent-desc a:hover {
  color: #3a320c;
}

.cookie-consent-actions {
  display: flex;
  flex-shrink: 0;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.cookie-consent-actions .btn {
  appearance: none;
  border-radius: 999px;
  cursor: pointer;
  font-family: "Josefin Sans", "Josefin Sans Fallback", sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1.2;
  padding: 0.75rem 1.35rem;
  text-transform: uppercase;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

/* Reject and Accept look the same: same fill, size and weight (ICO) */
.cookie-consent-actions .cookie-consent-accept,
.cookie-consent-actions .cookie-consent-reject {
  background: #3a320c;
  border: 2px solid #3a320c;
  color: #f0f4e6;
}

.cookie-consent-actions .cookie-consent-accept:hover,
.cookie-consent-actions .cookie-consent-reject:hover {
  background: #2e2809;
  border-color: #2e2809;
  color: #f0f4e6;
}

.cookie-consent-actions .btn:focus-visible {
  outline: 3px solid #2e2809;
  outline-offset: 3px;
}

@media (max-width: 640px) {
  .cookie-consent-actions {
    width: 100%;
  }

  .cookie-consent-actions .btn {
    flex: 1 1 auto;
    min-width: 0;
    text-align: center;
  }
}

/* Still frame while the hero video loads: the video element shows its background until the first frame. Last in the file so it wins over the shorthand resets above. */
.jos-hero-video {
  background-image: url("/assets/hero-coffee-reel-poster.webp");
  background-size: cover;
  background-position: center;
}

@media (max-width: 900px) {
  .jos-hero-video {
    background-image: url("/assets/hero-coffee-reel-mobile-poster.webp");
  }
}


/* Hero fills the screen under the header on every format, phone to desktop
   (Mark Oct 2026: "make sure the hero is full page on all formats").
   --jos-header-h is the real header height, set by jos-nav.js. */
.jos-hero-visual {
  aspect-ratio: auto;
  height: calc(100svh - var(--jos-header-h, 88px));
  max-height: none;
}

/* Hero subline links (Mark, 9 Nov 2026, round 22): each phrase opens its page. Same colour as the
   line, a quiet underline, a clear focus ring. On touch the hit area grows with padding that a
   negative margin cancels, so the line spacing is unchanged. */
p.jos-hero-subline a, /* p. beats the global "p a:not([class])" underline in jos-brand.css */
.jos-hero-a .jos-hero-a-sub a {
  color: inherit;
  display: inline;
  text-decoration: none; /* r27 Mark: no resting underline */
  text-decoration-color: currentColor;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

/* Hover underline only where a pointer can hover; touch has none. */
@media (hover: hover) {
  .jos-hero-subline a:hover,
  .jos-hero-a .jos-hero-a-sub a:hover {
    text-decoration: underline;
    text-decoration-thickness: 1px;
  }
}

.jos-hero-subline a:focus-visible,
.jos-hero-a .jos-hero-a-sub a:focus-visible {
  border-radius: 2px;
  outline: 2px solid #f0f4e6;
  outline-offset: 3px;
}

@media (pointer: coarse), (max-width: 1023px) {
  .jos-hero-subline a {
    display: inline-block;
    margin: -12px -4px;
    padding: 12px 4px;
  }
}
