/* Home beans banner (Mark, 8 Nov 2026, round 18): full-width, hero-style. The wide beans photo
   is the background with the bags on the right, a dark gradient on the left for the text.
   Beans marketing is the main future traffic driver, so this is the loudest block after the hero.
   One markup, two homes: inside .jos-dhome (1024px+) and as #shop on phones and tablets. */

.jos-beans-banner {
  background: #1c1408;
  color: var(--jos-cream, #f0f4e6);
  display: block;
  isolation: isolate;
  overflow: hidden;
  position: relative;
}

.jos-beans-banner picture {
  display: block;
}

.jos-beans-banner .jos-beans-banner-img {
  aspect-ratio: 1672 / 941;
  display: block;
  height: auto;
  object-fit: cover;
  object-position: 100% 60%;
  width: 100%;
}

.jos-beans-banner .jos-beans-banner-label {
  color: var(--jos-gold-on-dark, #caae78);
  font-family: "Josefin Sans", "Josefin Sans Fallback", sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.22em;
  line-height: 1.2;
  margin: 0 0 14px;
  text-transform: uppercase;
}

.jos-beans-banner h2 {
  color: var(--jos-cream, #f0f4e6);
  font-family: "Baron Neue", sans-serif;
  font-size: clamp(32px, 3.5vw, 54px);
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1.1;
  margin: 0 0 18px;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
  text-transform: uppercase;
}

.jos-beans-banner .jos-beans-banner-text {
  color: var(--jos-cream, #f0f4e6);
  font-family: "Josefin Sans", "Josefin Sans Fallback", sans-serif;
  font-size: clamp(15px, 1.35vw, 20px);
  line-height: 1.5;
  margin: 0 0 28px;
  max-width: 34em;
}

.jos-beans-banner-btn {
  background: var(--jos-gold-on-dark, #caae78);
  border: 2px solid var(--jos-gold-on-dark, #caae78);
  color: var(--jos-ink, #3a320c);
  display: inline-block;
  font-family: "Josefin Sans", "Josefin Sans Fallback", sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1;
  padding: 17px 44px;
  text-decoration: none;
  text-transform: uppercase;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.jos-beans-banner-btn:hover,
.jos-beans-banner-btn:focus-visible {
  background: transparent;
  color: var(--jos-cream, #f0f4e6);
}

.jos-beans-banner-btn:focus-visible {
  outline: 2px solid var(--jos-cream, #f0f4e6);
  outline-offset: 3px;
}

/* Tablet and desktop (700px+): the photo sits on the right 76% and fades into the dark left,
   so the text never runs over the bags. Dark gradient behind the words for contrast. */
@media (min-width: 700px) {
  /* width:100% is load-bearing. With aspect-ratio plus max-height and an auto width, the browser
     shrinks the WIDTH to keep the ratio once the height hits the cap (1800px+ wide screens), which
     left a cream strip down the right edge (Mark, 8 Nov 2026, round 19). */
  .jos-beans-banner {
    aspect-ratio: 2.2 / 1;
    max-height: 800px;
    width: 100%;
  }

  .jos-beans-banner picture {
    height: 100%;
    position: absolute;
    right: 0;
    top: 0;
    width: 76%;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 34%);
    mask-image: linear-gradient(90deg, transparent 0%, #000 34%);
  }

  .jos-beans-banner .jos-beans-banner-img {
    aspect-ratio: auto;
    height: 100%;
    object-position: 100% 60%;
  }

  .jos-beans-banner::after {
    background: linear-gradient(90deg, rgba(28, 20, 8, 0.92) 0%, rgba(28, 20, 8, 0.8) 30%, rgba(28, 20, 8, 0.35) 48%, rgba(28, 20, 8, 0) 60%);
    content: "";
    inset: 0;
    pointer-events: none;
    position: absolute;
    z-index: 1;
  }

  .jos-beans-banner-copy {
    left: max(24px, min(calc((100% - 1280px) / 2 + 56px), 6vw));
    max-width: min(40%, 520px);
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
  }
}

@media (min-width: 700px) and (max-width: 1023px) {
  .jos-beans-banner-copy {
    left: clamp(32px, 5vw, 48px);
    max-width: 40%;
  }

  .jos-beans-banner .jos-beans-banner-text {
    font-size: 15px;
    margin-bottom: 20px;
  }

  .jos-beans-banner-btn {
    padding: 15px 34px;
  }
}

/* Phone (under 700px): the bags first, then the words on the same dark ground, 24px gutter */
@media (max-width: 699px) {
  .jos-beans-banner .jos-beans-banner-img {
    aspect-ratio: 16 / 11;
    object-position: 78% 60%;
  }

  .jos-beans-banner::after {
    background: linear-gradient(180deg, rgba(28, 20, 8, 0) 0%, rgba(28, 20, 8, 0) 62%, #1c1408 100%);
    content: "";
    inset: 0 0 auto 0;
    aspect-ratio: 16 / 11;
    pointer-events: none;
    position: absolute;
    z-index: 1;
  }

  .jos-beans-banner-copy {
    padding: 4px 24px 40px;
    position: relative;
    z-index: 2;
  }

  .jos-beans-banner h2 {
    font-size: clamp(30px, 8.4vw, 40px);
  }

  .jos-beans-banner-btn {
    text-align: center;
    width: 100%;
  }
}

/* Phone slot (Mark, 8 Nov 2026, round 20): "on mobile we'll use the previous image", the portrait
   three-bags photo the home page used before round 18 (768x1024, 3:4). Ratio reserved in CSS. */
@media (max-width: 699px) {
  .jos-beans-banner--m .jos-beans-banner-img {
    aspect-ratio: 3 / 4;
    object-position: 50% 50%;
  }

  .jos-beans-banner--m::after {
    aspect-ratio: 3 / 4;
  }
}

/* Desktop shows the copy inside .jos-dhome; the phone and tablet copy is hidden there */
@media (min-width: 1024px) {
  .jos-beans-banner--m {
    display: none;
  }
}

/* Desktop band: full bleed inside .jos-dhome, no side padding (its siblings pad themselves) */
.jos-dhome > .jos-beans-banner {
  padding: 0;
}

/* The alternating sand and cream rule (jos-home-round4.css) also matches these sections by
   position. Repeat the class so the dark banner ground always wins, wherever the band moves. */
.jos-dhome > section.jos-beans-banner.jos-beans-banner {
  background: #1c1408;
}

/* Events and hire strip (Mark, 8 Nov 2026, round 19): same full-width banner, the truck and flag
   photo on the right fading into the dark left, two text links over the gradient. The source photo is
   1269px wide, so it covers the right 62% only (1180px at 1920) and is never stretched past its pixels. */
.jos-events-strip h2 {
  text-wrap: balance;
  font-size: clamp(28px, 2.9vw, 44px);
}

.jos-events-strip .jos-link-cta {
  color: var(--jos-gold-on-dark, #caae78);
  margin: 0 28px 0 0;
}

.jos-events-strip .jos-link-cta:hover,
.jos-events-strip .jos-link-cta:focus-visible {
  color: var(--jos-cream, #f0f4e6);
}

.jos-events-strip .jos-events-strip-ctas {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
}

.jos-events-strip .jos-events-strip-proof {
  font-family: "Josefin Sans", "Josefin Sans Fallback", sans-serif;
  font-size: 14px;
  margin: 14px 0 0;
}

.jos-events-strip .jos-events-strip-proof a {
  color: var(--jos-cream, #f0f4e6);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.jos-events-strip .jos-beans-banner-img {
  object-position: 50% 62%;
}

@media (min-width: 700px) {
  .jos-events-strip {
    aspect-ratio: 2.3 / 1;
    max-height: 760px;
  }

  .jos-events-strip picture {
    width: 62%;
  }

  .jos-events-strip::after {
    background: linear-gradient(90deg, rgba(28, 20, 8, 0.94) 0%, rgba(28, 20, 8, 0.84) 36%, rgba(28, 20, 8, 0.4) 54%, rgba(28, 20, 8, 0) 70%);
  }

  .jos-events-strip .jos-beans-banner-copy {
    max-width: min(50%, 660px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .jos-beans-banner-btn {
    transition: none;
  }
}

/* Phone and tablet banner: the photo links to the shop (Mark, 8 Nov 2026, round 21), same pattern as
   the hero image link. Sits under the copy (z-index 2) so the Shop button and text still win. */
.jos-beans-banner-link {
  inset: 0;
  position: absolute;
  z-index: 1;
}

.jos-beans-banner-link:focus-visible {
  outline: 3px solid var(--jos-gold-on-dark, #caae78);
  outline-offset: -6px;
}

/* Gift vouchers band (preview only until voucher go-live). Text only, same dark ground and button
   as the beans banner. One markup, two homes like the banner: in .jos-dhome and, --m, on phones. */
.jos-gift-band {
  background: var(--jos-ink, #3a320c);
  border-top: 3px solid var(--jos-gold-on-dark, #caae78);
  color: var(--jos-cream, #f0f4e6);
  padding: 48px 24px;
  text-align: center;
}
.jos-gift-band .jos-beans-banner-label {
  color: var(--jos-gold-on-dark, #caae78);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.22em;
  margin: 0 0 14px;
  text-transform: uppercase;
}
.jos-gift-band h2 {
  color: var(--jos-cream, #f0f4e6);
  font-family: "Baron Neue", sans-serif;
  font-size: clamp(30px, 3.5vw, 46px);
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1.1;
  margin: 0 0 16px;
  text-transform: uppercase;
}
.jos-gift-band p.jos-beans-banner-text {
  color: var(--jos-cream, #f0f4e6);
  font-size: clamp(15px, 1.35vw, 19px);
  line-height: 1.5;
  margin: 0 auto 28px;
  max-width: 36em;
}
/* Beat the sand and cream alternation in .jos-dhome, as the beans banner does above. */
.jos-dhome > section.jos-gift-band.jos-gift-band {
  background: var(--jos-ink, #3a320c);
}
@media (min-width: 1024px) {
  .jos-gift-band { padding: 64px 48px; }
  .jos-gift-band--m { display: none; }
}
@media (max-width: 699px) {
  .jos-gift-band { text-align: left; }
  .jos-gift-band .jos-beans-banner-btn { text-align: center; width: 100%; }
}
