/* Coffee: split hero for the portrait photo, product-shot treatment, feature variants */

/* ---- hero: photo sits on the right, text on forest green (desktop + tablet) ---- */
.page-coffee .phero__bg img { object-position: 50% 38%; }
/* copy side is a dark panel: faint grid + green glow */
.page-coffee .phero {
  background-image: radial-gradient(60% 90% at 8% 0%, rgba(37, 228, 145, 0.14), transparent 62%), linear-gradient(rgba(255, 255, 255, 0.032) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.032) 1px, transparent 1px);
  background-size: auto, 56px 56px, 56px 56px;
}
.page-coffee .nw { white-space: nowrap; }
/* phones: photo band on top that fades into the dark grid panel, copy sits below it */
@media (max-width: 799px) {
  .page-coffee .phero { display: block; min-height: 0; }
  .page-coffee .phero::after { display: none; }
  .page-coffee .phero__bg {
    position: relative; z-index: 0; height: clamp(200px, 56vw, 320px);
    -webkit-mask-image: linear-gradient(180deg, #000 45%, transparent);
    mask-image: linear-gradient(180deg, #000 45%, transparent);
  }
  .page-coffee .phero__in { position: relative; z-index: 1; padding-top: 0; margin-top: -22px; }
  .page-coffee .phero__actions .btn { flex: 1 1 auto; }
}
@media (min-width: 800px) {
  .page-coffee .phero__bg {
    inset: 0 0 0 auto; width: 46%;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 30%);
    mask-image: linear-gradient(90deg, transparent 0, #000 30%);
  }
  .page-coffee .phero::after { background: linear-gradient(0deg, rgba(5, 22, 14, 0.55), rgba(5, 22, 14, 0) 40%); }
  .page-coffee .phero .lede { max-width: 42ch; }
}
@media (min-width: 800px) and (max-width: 1099px) {
  .page-coffee .phero .lede { max-width: 33ch; }
}
@media (min-width: 1100px) {
  .page-coffee .phero__bg { width: 52%; }
}

/* ---- cards ---- */
.page-coffee .item__cta { margin-top: 10px; }

/* white-background product shots: sit them on the cool mint-gray surface and zoom in so the product fills the frame */
.page-coffee .item__media--product { background: var(--cream); }
.page-coffee .item__media--product img { --z: 1.2; mix-blend-mode: multiply; transform: scale(var(--z)); }
.page-coffee .item:hover .item__media--product img { transform: scale(calc(var(--z) * 1.04)); }
.page-coffee .item__media--dispenser img { --z: 1.55; }

/* the Beanery story card is the dark, closing feature: faint grid + green glow */
.page-coffee .item--text {
  background-image: radial-gradient(70% 90% at 0% 0%, rgba(37, 228, 145, 0.16), transparent 62%), linear-gradient(rgba(255, 255, 255, 0.032) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.032) 1px, transparent 1px);
  background-size: auto, 44px 44px, 44px 44px;
}
.page-coffee .item--text .item__media { background: var(--forest-2); }
/* when the card stacks (16:10), keep the bags and the mug in frame instead of the garden */
.page-coffee #beanery .item__media img { object-position: 50% 82%; }
.page-coffee .item--text .item__cap { border-top-color: rgba(255, 255, 255, 0.22); }


@media (min-width: 961px) {
  /* portrait feature photo: narrower panel so the card does not become a tower */
  .page-coffee .item--portrait .item__media { flex: 0 0 36%; aspect-ratio: 4/5; min-height: 0; }
  .page-coffee .item--portrait .item__media img { object-position: 50% 28%; }
  .page-coffee .item--flip { flex-direction: row-reverse; }
  /* keep captions on one baseline across the 3-up row */
  .page-coffee .items > .item:not(.item--feature) .item__body { grid-template-rows: auto auto 1fr auto; }
  .page-coffee .items > .item:not(.item--feature) .item__cap { align-self: end; }
}
@media (max-width: 960px) {
  .page-coffee .item--portrait .item__media { aspect-ratio: 4/3; }
  .page-coffee .item--portrait .item__media img { object-position: 50% 36%; }
}
@media (max-width: 560px) {
  .page-coffee .item--portrait .item__media { aspect-ratio: 4/5; }
  /* let the longest kicker ("Espresso · Cappuccino · Latte · Mocha") sit on one line */
  .page-coffee .item__kicker { font-size: 0.66rem; letter-spacing: 0.1em; }
}
@media (max-width: 720px) {
  /* shorter product frames on phones so the pale surface does not dominate the card */
  .page-coffee .item__media--product { aspect-ratio: 16/10; }
  .page-coffee .item__media--dispenser img { --z: 1.3; }
  .page-coffee .avail { flex-wrap: nowrap; gap: 8px; }
  .page-coffee .avail li { min-width: 0; flex: 1 1 0; padding: 12px 10px; }
  .page-coffee .avail span { font-size: 0.8rem; white-space: nowrap; }
}
/* tablet: the shared grid is 2-up, so the last card runs full width as a horizontal card instead of orphaning */
@media (min-width: 721px) and (max-width: 960px) {
  .page-coffee #condiments { flex-basis: 100%; flex-direction: row; }
  .page-coffee #condiments .item__media { flex: 1 1 0; aspect-ratio: auto; min-height: 300px; }
  .page-coffee #condiments .item__body { flex: 1 1 0; align-content: center; padding: 28px 32px; }
  /* the 2-up pair shares one caption baseline, like the 3-up row on desktop */
  .page-coffee #brewed .item__body, .page-coffee #seasonal .item__body { grid-template-rows: auto auto 1fr auto; }
  .page-coffee #brewed .item__cap, .page-coffee #seasonal .item__cap { align-self: end; }
}
