/* ==========================================================================
   Be Barista design (from the approved mockup)
   Mobile first. Breakpoints: 600 / 760 / 900 / 960.
   ========================================================================== */

:root {
  --bg: #F7F3F2;
  /* Brief value was #777777, which measures about 4.1:1 on --bg and misses the
     4.5:1 target. #6B6B6B is the nearest gray that passes (about 4.8:1). */
  --text: #6B6B6B;
  --heading: #191919;
  --accent: #B5562A;
  --line: rgba(25, 25, 25, 0.15);

  /* Supporting neutrals */
  --surface: #EEE9E7;          /* identical backdrop behind every product photo */
  --on-dark: #F7F3F2;
  --on-dark-muted: #B9B4B2;    /* about 8.6:1 on --heading */
  --line-on-dark: rgba(247, 243, 242, 0.16);
  --accent-on-dark: #E39A74;   /* placeholders only; burnt orange fails on near black */

  --font-head: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", "Helvetica Neue", Arial, sans-serif;

  --max: 1200px;
  --gutter: 20px;
  --section-y: 64px;
  --header-h: 64px;
  --ease: cubic-bezier(0.2, 0.6, 0.2, 1);
  --focus: var(--accent);
}

@media (min-width: 900px) {
  :root {
    --gutter: 40px;
    --section-y: 96px;
    --header-h: 80px;
  }
}

/* ---------- Base ---------- */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.menu-open { overflow: hidden; }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
p, figure, blockquote { margin: 0; }
button { font: inherit; color: inherit; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-head);
  font-stretch: 125%;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  line-height: 1.35;
  color: var(--heading);
  text-wrap: balance;
}

h2 { font-size: clamp(17px, 2.2vw, 24px); }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.on-dark { --focus: var(--on-dark); }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 12px; left: 12px;
  z-index: 300;
  padding: 12px 18px;
  background: var(--heading);
  color: var(--on-dark);
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

.container {
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section { padding: var(--section-y) 0; }

.section-head {
  margin-bottom: 40px;
  text-align: center;
}
.section-head h2 { padding-left: 0.2em; } /* balances trailing letter-spacing when centered */

@media (min-width: 900px) {
  .section-head { margin-bottom: 56px; }
}

.eyebrow {
  margin-bottom: 16px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

/* Unfilled content: stays visible on purpose */
.ph { color: var(--accent); }
.on-dark .ph { color: var(--accent-on-dark); }

.price {
  color: var(--heading);
  font-weight: 400;
  font-size: 14px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 14px 28px;
  background: transparent;
  color: var(--heading);
  border: 1px solid var(--heading);
  border-radius: 0;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
}

.btn-light { color: #fff; border-color: #fff; }

@media (hover: hover) {
  .btn:hover { background: var(--heading); color: var(--bg); }
  .btn-light:hover { background: #fff; color: var(--heading); }
}

.text-btn {
  min-height: 36px;
  padding: 8px 0 4px;
  background: none;
  border: 0;
  border-bottom: 1px solid currentColor;
  color: var(--heading);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.2s var(--ease);
}

.text-link {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--heading);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  transition: color 0.2s var(--ease);
}

@media (hover: hover) {
  .text-btn:hover,
  .text-link:hover { color: var(--accent); }
}

/* ---------- Image frames + missing-photo placeholders ---------- */

.media {
  position: relative;
  overflow: hidden;
  background: var(--surface);
}

.media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Supplier photos on white blend into the shared neutral */
.media .product-img {
  object-fit: contain;
  padding: 12%;
  mix-blend-mode: multiply;
}

.media.is-missing img { opacity: 0; }

.media.is-missing::after {
  content: attr(data-ph);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  color: #5C5C5C;
  overflow-wrap: anywhere;
}

/* ---------- 1. Header ---------- */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  color: #fff;
  border-bottom: 1px solid transparent;
  --focus: #fff;
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s var(--ease);
}

.site-header.is-solid {
  background: var(--bg);
  color: var(--heading);
  border-bottom-color: var(--line);
  --focus: var(--accent);
}

.header-inner {
  max-width: calc(var(--max) + 2 * var(--gutter));
  height: var(--header-h);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  color: inherit;
}

.logo img {
  width: auto;
  height: 30px;
  transition: filter 0.35s var(--ease);
}

@media (min-width: 900px) {
  .logo img { height: 36px; }
}

/* White logo while the header floats over the hero photo */
.site-header:not(.is-solid) .logo img { filter: brightness(0) invert(1); }

.logo-text {
  display: none;
  font-family: var(--font-head);
  font-stretch: 125%;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  white-space: nowrap;
}

.logo.is-missing img { position: absolute; width: 1px; height: 1px; opacity: 0; }
.logo.is-missing .logo-text { display: inline; }

.primary-nav { display: none; }

.primary-nav a {
  position: relative;
  display: inline-block;
  padding: 10px 0;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
}

.primary-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 4px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

@media (hover: hover) {
  .primary-nav a:hover::after { transform: scaleX(1); }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.cart-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 8px;
  justify-content: center;
  text-decoration: none;
}

.cart-count {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.04em;
  min-width: 1ch;
  display: inline-block;
  transition: transform 0.3s var(--ease);
}
.cart-count.is-bumped { transform: translateY(-3px); }

.menu-toggle {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 44px;
  height: 44px;
  margin-right: -11px;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 1px;
  background: currentColor;
}

@media (min-width: 960px) {
  .primary-nav { display: block; margin-left: auto; }
  .primary-nav ul { display: flex; gap: 36px; }
  .header-actions { margin-left: 20px; }
  .menu-toggle { display: none; }
  .cart-link { margin-right: -8px; }
}

/* Mobile menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  padding: 0 var(--gutter) 32px;
  background: var(--bg);
  color: var(--heading);
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0s linear 0.3s;
}

.mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s var(--ease);
}

.mobile-menu-top {
  flex: none;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.menu-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-right: -11px;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
}

.mobile-menu nav {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 32px 0;
}

.mobile-menu nav ul { width: 100%; }

.mobile-menu nav li {
  border-bottom: 1px solid var(--line);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

.mobile-menu.is-open nav li { opacity: 1; transform: none; }
.mobile-menu.is-open nav li:nth-child(2) { transition-delay: 0.04s; }
.mobile-menu.is-open nav li:nth-child(3) { transition-delay: 0.08s; }
.mobile-menu.is-open nav li:nth-child(4) { transition-delay: 0.12s; }
.mobile-menu.is-open nav li:nth-child(5) { transition-delay: 0.16s; }

.mobile-menu nav a {
  display: block;
  padding: 20px 0;
  font-family: var(--font-head);
  font-stretch: 125%;
  font-weight: 500;
  font-size: 17px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
}

.mobile-menu-foot {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text);
}

/* ---------- 2. Hero ---------- */

.hero {
  position: relative;
  display: grid;
  place-items: center;
  height: 80vh;
  height: 80svh;
  min-height: 540px;
  max-height: 980px;
  overflow: hidden;
  background: #2A2421;
  color: #fff;
  text-align: center;
}

.hero-media { position: absolute; inset: 0; background: #2A2421; }

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.hero-media.is-missing::after {
  align-items: flex-end;
  justify-content: flex-start;
  padding: 20px var(--gutter);
  color: rgba(255, 255, 255, 0.75);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: var(--header-h) var(--gutter) 0;
}

.hero h1 {
  color: #fff;
  font-size: clamp(20px, 4.1vw, 46px);
  line-height: 1.4;
  padding-left: 0.2em;
}

.hero h1 span { display: block; }

.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 40px;
}

.hero-actions .btn { min-width: 232px; }

@media (min-width: 600px) {
  .hero-actions { flex-direction: row; justify-content: center; gap: 16px; }
  .hero-actions .btn { min-width: 0; }
}

@media (min-width: 900px) {
  .hero-actions { margin-top: 48px; }
}

/* ---------- 3. Perks ---------- */

.perks { border-bottom: 1px solid var(--line); }

.perks-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);     /* shows through the gaps as hairline dividers */
}

.perks-list li {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 76px;
  padding: 16px 12px;
  background: var(--bg);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-align: center;
  color: var(--heading);
}

@media (min-width: 760px) {
  .perks-list { grid-template-columns: repeat(4, 1fr); }
  .perks-list li { min-height: 88px; }
}

/* ---------- 4. Featured products ---------- */

.featured-grid {
  display: grid;
  gap: 72px;
}

@media (min-width: 760px) {
  .featured-grid { grid-template-columns: 1fr 1fr; gap: 48px; }
}

.feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.feature-name {
  margin-bottom: 24px;
  padding-left: 0.2em;
  font-size: 14px;
}

.feature-media {
  width: 100%;
  aspect-ratio: 4 / 5;
  margin-bottom: 28px;
  background: var(--bg);
}

.feature-media.is-missing { outline: 1px solid var(--line); outline-offset: -1px; }

.feature-desc { max-width: 34ch; margin-bottom: 12px; }
.feature .price { margin-bottom: 24px; }

@media (min-width: 900px) {
  .feature-name { font-size: 16px; }
  .feature-media { aspect-ratio: 1 / 1; }
}

/* ---------- 5. Pull quote ---------- */

.quote {
  text-align: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.quote-inner { max-width: 900px; }

.quote-inner::before {
  content: "";
  display: block;
  width: 40px;
  height: 1px;
  margin: 0 auto 40px;
  background: var(--accent);
}

.quote blockquote p {
  font-style: italic;
  font-weight: 300;
  font-size: clamp(22px, 3vw, 28px);
  line-height: 1.5;
  color: var(--heading);
  text-wrap: balance;
}

.quote figcaption {
  margin-top: 28px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text);
}

/* ---------- 6. Categories ---------- */

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 36px 16px;
}

@media (min-width: 900px) {
  .category-grid { grid-template-columns: repeat(3, 1fr); gap: 56px 24px; }
}

.category { display: block; text-decoration: none; }

.category-media { aspect-ratio: 1 / 1; }

.category-media img { transition: transform 0.9s var(--ease); }

@media (hover: hover) {
  .category:hover .category-media img { transform: scale(1.03); }
}

.category-label {
  display: block;
  margin-top: 16px;
  padding-left: 0.2em;
  font-family: var(--font-head);
  font-stretch: 125%;
  font-weight: 500;
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-align: center;
  color: var(--heading);
  text-wrap: balance;
}

@media (min-width: 900px) {
  .category-label { margin-top: 20px; font-size: 13px; }
}

/* ---------- 7. Brew Lab ---------- */

.brew-lab {
  display: grid;
  border-top: 1px solid var(--line);
}

.brew-media { aspect-ratio: 4 / 5; }

.brew-content { padding: 48px var(--gutter) var(--section-y); }

.brew-content h2 {
  font-size: clamp(20px, 2.6vw, 30px);
  margin-bottom: 20px;
}

.brew-desc { max-width: 46ch; }

.ingredients-title {
  margin: 40px 0 0;
  padding-bottom: 14px;
  font-size: 11px;
  border-bottom: 1px solid var(--line);
}

.ingredients li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.ingredients a {
  color: var(--heading);
  font-weight: 400;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  text-decoration-color: var(--line);
  transition: text-decoration-color 0.2s var(--ease);
}

@media (hover: hover) {
  .ingredients a:hover { text-decoration-color: currentColor; }
}

.ingredient-meta {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  color: var(--text);
}

.ingredients-note {
  margin: 16px 0 32px;
  font-size: 14px;
}

@media (min-width: 900px) {
  .brew-lab {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }
  .brew-media {
    aspect-ratio: auto;
    align-self: stretch;
    min-height: 720px;
  }
  .brew-content {
    max-width: 620px;
    padding: var(--section-y) var(--gutter) var(--section-y) 80px;
  }
}

/* ---------- 8. Trending ---------- */

.trending { border-top: 1px solid var(--line); }

.section-head-split {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  text-align: left;
}
.section-head-split h2 { padding-left: 0; }

.trending-scroller {
  margin: 0 calc(-1 * var(--gutter));
  padding: 0 var(--gutter) 4px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 var(--gutter);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.trending-scroller::-webkit-scrollbar { display: none; }
.trending-scroller:focus-visible { outline-offset: -2px; }

.trending-list {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 68%;
  gap: 16px;
}

.product-card { position: relative; scroll-snap-align: start; } /* contains .sr-only so it can't escape the scroller */

.product-media {
  aspect-ratio: 1 / 1;
  margin-bottom: 16px;
}

.product-name {
  font-size: 11px;
  line-height: 1.55;
  letter-spacing: 0.15em;
}

.product-name a { text-decoration: none; }

@media (hover: hover) {
  .product-name a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
}

.product-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}

@media (min-width: 600px) {
  .trending-list { grid-auto-columns: 40%; }
}

@media (min-width: 900px) {
  .trending-scroller { margin: 0; padding: 0; overflow: visible; }
  .trending-list {
    grid-auto-flow: row;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
  }
  .product-name { font-size: 12px; }
}

/* ---------- 9. Brands ---------- */

.brands { border-top: 1px solid var(--line); }

.brands-title {
  margin-bottom: 40px;
  padding-left: 0.2em;
  font-size: 11px;
  text-align: center;
  color: var(--text);
}

.brand-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  align-items: center;
}

@media (min-width: 760px) {
  .brand-list { grid-template-columns: repeat(4, 1fr); gap: 40px; }
}

.brand {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 72px;
}

.brand img {
  width: auto;
  max-width: 150px;
  max-height: 48px;
  filter: grayscale(1);
  opacity: 0.55;
  mix-blend-mode: multiply;    /* drops white logo backgrounds into the page color */
  transition: filter 0.4s var(--ease), opacity 0.4s var(--ease);
}

@media (hover: hover) {
  .brand:hover img { filter: none; opacity: 1; }
}

.brand.is-missing img { position: absolute; width: 1px; height: 1px; opacity: 0; }

.brand.is-missing::after {
  content: attr(data-ph);
  font-family: var(--font-head);
  font-stretch: 125%;
  font-weight: 500;
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-align: center;
  color: var(--text);
}

/* ---------- 10. For cafes ---------- */

.on-dark {
  background: var(--heading);
  color: var(--on-dark-muted);
}
.on-dark h2 { color: var(--on-dark); }
.on-dark .eyebrow { color: var(--on-dark-muted); }

.cafes-grid {
  display: grid;
  gap: 48px;
}

.for-cafes h2 {
  margin-bottom: 24px;
  font-size: clamp(20px, 2.8vw, 32px);
}

.cafes-text { max-width: 42ch; font-size: 17px; }

.wholesale-points {
  margin-bottom: 32px;
  border-top: 1px solid var(--line-on-dark);
}

.wholesale-points li {
  padding: 20px 0;
  border-bottom: 1px solid var(--line-on-dark);
}

.wholesale-points h3 {
  margin-bottom: 6px;
  font-size: 12px;
  color: var(--on-dark);
}

.wholesale-points p { font-size: 15px; }

.partner-note {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--line-on-dark);
  font-size: 13px;
  text-align: center;
  color: var(--on-dark-muted);
}

.partner-note a {
  color: var(--on-dark);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

@media (min-width: 900px) {
  .cafes-grid {
    grid-template-columns: 1.1fr 1fr;
    gap: 96px;
    align-items: center;
  }
  .partner-note { margin-top: 96px; }
}

/* ---------- 11. Footer ---------- */

.site-footer {
  padding: 64px 0 32px;
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px 24px;
}

.footer-signup { grid-column: 1 / -1; }

.footer-title {
  margin-bottom: 16px;
  font-size: 11px;
}

.footer-col li a {
  display: inline-block;
  padding: 6px 0;
  font-size: 14px;
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

@media (hover: hover) {
  .footer-col li a:hover { color: var(--heading); }
}

.footer-signup p { font-size: 14px; max-width: 40ch; }

.signup {
  display: flex;
  margin-top: 20px;
  max-width: 440px;
}

.signup input {
  flex: 1;
  min-width: 0;
  padding: 0 16px;
  background: transparent;
  border: 1px solid var(--heading);
  border-right: 0;
  border-radius: 0;
  font: inherit;
  font-size: 14px;
  color: var(--heading);
}

.signup input::placeholder { color: var(--text); opacity: 1; }
.signup input[aria-invalid="true"] { border-color: var(--accent); }
.signup .btn { flex: none; }

.footer-bottom {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 12px;
}

@media (min-width: 900px) {
  .site-footer { padding-top: 96px; }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr 1.6fr; gap: 48px; }
  .footer-signup { grid-column: auto; }
  .footer-bottom { margin-top: 96px; }
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 200;
  width: max-content;
  max-width: calc(100% - 2 * var(--gutter));
  padding: 14px 22px;
  background: var(--heading);
  color: var(--on-dark);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}

.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Scroll reveal ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
    animation-duration: 0.01ms !important;
  }
}

/* ==========================================================================
   Inner pages: shop, product, cart, Brew Lab, For Cafes, Shipping, FAQs, Contact
   ========================================================================== */

:root { --field-line: #8C8786; } /* about 3.3:1 on --bg, enough for input borders */

body:not(.has-hero) main { padding-top: var(--header-h); }

.primary-nav a[aria-current="page"]::after { transform: scaleX(1); }
.mobile-menu nav a[aria-current="page"] { color: var(--accent); }

/* ---------- Page head + breadcrumb ---------- */

.page-head { padding: 48px 0 32px; }
.page-head h1 { font-size: clamp(22px, 3vw, 34px); }
.page-head .lede { margin-top: 16px; max-width: 56ch; }
.page-head.center { text-align: center; }
.page-head.center h1 { padding-left: 0.2em; }
.page-head.center .lede { margin-left: auto; margin-right: auto; }

@media (min-width: 900px) {
  .page-head { padding: 72px 0 48px; }
}

.breadcrumb { padding-top: 24px; margin-bottom: 24px; font-size: 11px; font-weight: 500; letter-spacing: 0.15em; text-transform: uppercase; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.breadcrumb li + li::before { content: "/"; margin-right: 8px; }
.breadcrumb a { text-decoration: none; }
.breadcrumb [aria-current] { color: var(--heading); }

@media (hover: hover) {
  .breadcrumb a:hover { color: var(--heading); text-decoration: underline; text-underline-offset: 3px; }
}

/* ---------- Form controls ---------- */

.label {
  display: block;
  margin-bottom: 8px;
  padding: 0;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--heading);
}

.label .optional { margin-left: 6px; font-weight: 300; letter-spacing: 0.04em; text-transform: none; color: var(--text); }

.input,
.select,
.textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  background: transparent;
  border: 1px solid var(--field-line);
  border-radius: 0;
  font: inherit;
  font-size: 15px;
  font-weight: 400;
  color: var(--heading);
}

.input::placeholder,
.textarea::placeholder { color: var(--text); opacity: 1; }

.select {
  padding-right: 40px;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23191919' stroke-width='1.2'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
}

.textarea { min-height: 140px; resize: vertical; }

.input[aria-invalid="true"],
.textarea[aria-invalid="true"],
.select[aria-invalid="true"] { border-color: var(--accent); }

.form-grid { display: grid; gap: 20px; }
.form-grid .btn { justify-self: start; }

@media (min-width: 760px) {
  .form-grid.two { grid-template-columns: 1fr 1fr; }
  .form-grid .full { grid-column: 1 / -1; }
}

.btn-solid { background: var(--heading); color: var(--bg); }
@media (hover: hover) {
  .btn-solid:hover { background: transparent; color: var(--heading); }
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* ---------- Shop ---------- */

.chips {
  display: flex;
  gap: 8px;
  margin: 0 calc(-1 * var(--gutter));
  padding: 0 var(--gutter) 4px;
  overflow-x: auto;
  list-style: none;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  color: var(--heading);
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.chip-count { margin-left: 8px; font-weight: 400; letter-spacing: 0.04em; color: var(--text); }
.chip[aria-current="page"] { background: var(--heading); border-color: var(--heading); color: var(--bg); }
.chip[aria-current="page"] .chip-count { color: var(--on-dark-muted); }

@media (hover: hover) {
  .chip:hover { border-color: var(--heading); }
}

@media (min-width: 900px) {
  .chips { flex-wrap: wrap; margin: 0; padding: 0; overflow: visible; }
}

.shop-toolbar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 24px 0 40px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.shop-toolbar .search { grid-column: 1 / -1; }
.shop-count { grid-column: 1 / -1; font-size: 13px; }

@media (min-width: 900px) {
  .shop-toolbar { grid-template-columns: 1fr 220px 220px auto; align-items: center; gap: 16px; }
  .shop-toolbar .search { grid-column: auto; }
  .shop-count { grid-column: auto; text-align: right; white-space: nowrap; }
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px 16px;
  list-style: none;
}

@media (min-width: 760px) {
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px 24px; }
}

@media (min-width: 1100px) {
  .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 56px 24px; }
}

.product-grid .product-row { flex-wrap: wrap; }

.tag {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
  padding: 4px 8px;
  background: var(--bg);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--heading);
}

.product-card.is-sold-out .product-img { opacity: 0.5; }

.card-note {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text);
}

.empty-state { padding: 64px 0; text-align: center; }
.empty-state p + p { margin-top: 20px; }
.empty-state h1 { margin-bottom: 16px; font-size: 22px; }

/* ---------- Product page ---------- */

.pdp { display: grid; gap: 32px; padding-bottom: var(--section-y); }
.pdp-media .media { aspect-ratio: 1 / 1; }
.pdp-info h1 { font-size: clamp(20px, 2.4vw, 28px); }
.pdp-price { margin-top: 16px; font-size: 18px; font-weight: 400; color: var(--heading); }
.pdp-stock { margin-top: 4px; font-size: 13px; }
.pdp-soldout { margin-top: 24px; padding: 16px; border: 1px solid var(--line); }
.pdp-soldout a { color: var(--heading); }

@media (min-width: 900px) {
  .pdp { grid-template-columns: 1.1fr 1fr; gap: 72px; align-items: start; }
  .pdp-media { position: sticky; top: calc(var(--header-h) + 24px); }
}

.options { margin: 32px 0 0; padding: 0; border: 0; min-width: 0; }
.option-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.option { position: relative; display: block; }
.option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.option > span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 64px;
  padding: 12px 14px;
  border: 1px solid var(--field-line);
  cursor: pointer;
  transition: border-color 0.2s var(--ease);
}
.option-name { font-size: 14px; font-weight: 400; color: var(--heading); }
.option-price { font-size: 13px; }
.option input:checked + span { border-color: var(--heading); outline: 1px solid var(--heading); outline-offset: -2px; }
.option input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.option input:disabled + span { opacity: 0.5; cursor: not-allowed; }

.buy-row { display: flex; gap: 12px; margin-top: 24px; }
.buy-row .btn { flex: 1; }

.qty { display: inline-flex; align-items: stretch; border: 1px solid var(--field-line); }
.qty button {
  width: 44px;
  padding: 0;
  background: none;
  border: 0;
  font-size: 18px;
  font-weight: 300;
  color: var(--heading);
  cursor: pointer;
}
.qty button:disabled { opacity: 0.35; cursor: not-allowed; }
.qty input {
  width: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-weight: 400;
  text-align: center;
  color: var(--heading);
  -moz-appearance: textfield;
}
.qty input::-webkit-outer-spin-button,
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-sm button { width: 36px; height: 36px; }
.qty-value { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; font-size: 14px; font-weight: 400; color: var(--heading); }

.pdp-section { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }
.pdp-section h2 { margin-bottom: 12px; font-size: 11px; }
.pdp-desc p + p { margin-top: 12px; }
.pdp-facts li { padding: 4px 0; font-size: 14px; }
.pdp-facts a { color: var(--heading); }

.related { border-top: 1px solid var(--line); }

/* ---------- Cart ---------- */

.cart-layout { display: grid; gap: 48px; padding-bottom: var(--section-y); }

@media (min-width: 900px) {
  .cart-layout { grid-template-columns: 1fr 380px; gap: 72px; align-items: start; }
  .cart-summary { position: sticky; top: calc(var(--header-h) + 24px); }
}

.cart-lines { border-top: 1px solid var(--line); }

.cart-line {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 4px 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.cart-line .media { aspect-ratio: 1 / 1; grid-row: span 2; }
.cart-line-name { font-size: 11px; line-height: 1.55; letter-spacing: 0.15em; }
.cart-line-name a { text-decoration: none; }
.cart-line-opt { margin-top: 4px; font-size: 13px; }
.cart-line-controls { display: flex; align-items: center; gap: 16px; margin-top: 12px; }
.cart-line-total { grid-column: 2; }

@media (min-width: 600px) {
  .cart-line { grid-template-columns: 112px 1fr auto; gap: 24px; }
  .cart-line .media { grid-row: auto; }
  .cart-line-total { grid-column: auto; text-align: right; }
}

.link-btn {
  min-height: 36px;
  padding: 0;
  background: none;
  border: 0;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: underline;
  text-underline-offset: 3px;
  color: var(--text);
  cursor: pointer;
}

.cart-continue { margin-top: 24px; }

.cart-summary { padding: 24px; border: 1px solid var(--line); }
.summary-title { margin-bottom: 20px; font-size: 12px; }
.ship-progress { margin-bottom: 20px; font-size: 14px; }
.ship-progress strong { font-weight: 500; color: var(--heading); }
.ship-bar { height: 2px; margin-top: 10px; background: var(--line); }
.ship-bar span { display: block; height: 100%; background: var(--accent); }
.summary-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; }
.summary-row span:last-child { color: var(--heading); font-weight: 400; }
.summary-total { margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 16px; }
.fine { margin-top: 12px; font-size: 12px; }
.cart-summary .btn { width: 100%; margin-top: 20px; }

/* ---------- Recipes ---------- */

.ingredients li { flex-wrap: nowrap; }
.ing-qty { flex: none; width: 64px; font-size: 13px; color: var(--text); }
.ing-name { flex: 1; min-width: 0; color: var(--heading); font-weight: 400; }

.recipe-grid { display: grid; gap: 64px; }

@media (min-width: 900px) {
  .recipe-grid { grid-template-columns: repeat(3, 1fr); gap: 40px; }
}

.recipe-card { padding-top: 24px; border-top: 1px solid var(--heading); scroll-margin-top: calc(var(--header-h) + 24px); }
.recipe-num { font-family: var(--font-head); font-stretch: 125%; font-size: 11px; letter-spacing: 0.2em; color: var(--accent); }
.recipe-card h3 { margin: 8px 0 8px; font-size: 15px; }
.recipe-card .ingredients-title { margin-top: 24px; }
.recipe-method { margin: 16px 0 28px; font-size: 15px; }
.method-title { font-family: var(--font-head); font-stretch: 125%; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: var(--heading); }

.brew-lab.is-page { border-top: 0; }

/* ---------- Prose pages (shipping, FAQs) ---------- */

.prose { max-width: 720px; padding-bottom: var(--section-y); }
.prose h2 { margin: 48px 0 12px; font-size: 13px; }
.prose h2:first-child { margin-top: 0; }
.prose p + p { margin-top: 12px; }
.prose a { color: var(--heading); }

.rate-table { width: 100%; margin-top: 16px; border-collapse: collapse; font-size: 15px; }
.rate-table th,
.rate-table td { padding: 14px 0; border-bottom: 1px solid var(--line); text-align: left; font-weight: 300; }
.rate-table thead th { font-size: 11px; font-weight: 500; letter-spacing: 0.15em; text-transform: uppercase; color: var(--heading); }
.rate-table td:last-child,
.rate-table th:last-child { text-align: right; color: var(--heading); }

.faq { max-width: 760px; padding-bottom: var(--section-y); }
.faq-list { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  position: relative;
  padding: 22px 40px 22px 0;
  list-style: none;
  font-weight: 400;
  color: var(--heading);
  cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 22px;
  font-weight: 300;
}
.faq details[open] summary::after { content: "\2212"; }
.faq .answer { max-width: 62ch; padding: 0 0 24px; }
.faq .answer a { color: var(--heading); }

/* ---------- Split layout (For Cafes form, Contact) ---------- */

.split { display: grid; gap: 40px; }
.split-copy p { margin-top: 16px; max-width: 44ch; }
.split-copy h2 { font-size: clamp(18px, 2.4vw, 26px); }

@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1.4fr; gap: 96px; }
}

.help-links { margin-top: 32px; border-top: 1px solid var(--line); }
.help-links li { border-bottom: 1px solid var(--line); }
.help-links a {
  display: flex;
  justify-content: space-between;
  padding: 16px 0;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--heading);
}
.help-links a::after { content: "\2192"; font-weight: 300; }

/* ---------- Small additions for linked cards and dark page heads ---------- */

.feature-name a { text-decoration: none; }
a.feature-media { display: block; }

@media (hover: hover) {
  .feature-name a:hover { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
}

.brew-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }

.on-dark h1 { color: var(--on-dark); }
.for-cafes h1 { margin-bottom: 24px; font-size: clamp(22px, 3vw, 34px); }
.page-dark { padding-top: calc(var(--section-y) + 16px); }

/* Image frames that are links must be blocks so aspect-ratio applies */
a.media { display: block; }

.ingredients-title { font-family: var(--font-head); font-stretch: 125%; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: var(--heading); }

@media (max-width: 599px) {
  .product-grid .price { font-size: 13px; letter-spacing: 0; }
}

/* ---------- Header search ---------- */

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: none;
  border: 0;
  color: inherit;
  cursor: pointer;
}

.search-panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: calc(100vh - var(--header-h));
  max-height: calc(100dvh - var(--header-h));
  overflow-y: auto;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  color: var(--heading);
}

.search-panel[hidden] { display: none; }

.search-inner {
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 8px var(--gutter) 28px;
}

.search-form {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--heading);
}

.search-form > svg { flex: none; }

.search-input {
  flex: 1;
  min-width: 0;
  height: 56px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  font: inherit;
  font-size: 18px;
  font-weight: 300;
  color: var(--heading);
  -webkit-appearance: none;
  appearance: none;
}
.search-input::placeholder { color: var(--text); opacity: 1; }
.search-input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search-input:focus-visible { outline: none; }
.search-form:focus-within { border-bottom-width: 2px; margin-bottom: -1px; }

.search-close { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-right: -12px; padding: 0; background: none; border: 0; color: var(--heading); cursor: pointer; }

.search-label { margin: 24px 0 12px; font-size: 11px; font-weight: 500; letter-spacing: 0.15em; text-transform: uppercase; }
.search-popular { display: flex; flex-wrap: wrap; gap: 8px; }
.search-empty { margin-top: 24px; }

.search-hits { display: grid; gap: 0; margin-top: 8px; }

@media (min-width: 760px) {
  .search-hits { grid-template-columns: 1fr 1fr; column-gap: 40px; }
}

.hit {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}
.hit-media { display: block; aspect-ratio: 1 / 1; }
.hit-media .product-img { padding: 8%; }
.hit-name { font-size: 14px; font-weight: 400; color: var(--heading); }
.hit-price { font-size: 13px; white-space: nowrap; }

@media (hover: hover) {
  .hit:hover .hit-name { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
}

.search-all { display: inline-block; margin-top: 20px; }

/* Hero photo framing */
.hero-media picture { position: absolute; inset: 0; }

@media (min-width: 600px) {
  .hero-media img { object-position: 50% 30%; } /* keeps the bright glass below the buttons */
}

/* ---------- Best sellers carousel ---------- */

.carousel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}
.carousel-head .eyebrow { margin-bottom: 10px; }

@media (min-width: 900px) {
  .carousel-head { margin-bottom: 48px; }
}

.carousel-nav { display: flex; gap: 8px; flex: none; }

.arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--heading);
  color: var(--heading);
  cursor: pointer;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), opacity 0.25s var(--ease);
}
.arrow:disabled { opacity: 0.25; cursor: default; }

@media (hover: hover) {
  .arrow:not(:disabled):hover { background: var(--heading); color: var(--bg); }
}

.carousel {
  margin: 0 calc(-1 * var(--gutter));
}

.carousel-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 74%;
  gap: 16px;
  padding: 0 var(--gutter) 4px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 var(--gutter);
  scrollbar-width: none;
  list-style: none;
  -webkit-overflow-scrolling: touch;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track:focus-visible { outline-offset: -2px; }
.carousel-track .product-card { scroll-snap-align: start; }

@media (min-width: 600px) {
  .carousel-track { grid-auto-columns: 42%; }
}

@media (min-width: 900px) {
  .carousel { margin: 0; }
  .carousel-track {
    grid-auto-columns: calc((100% - 3 * 24px) / 4);
    gap: 24px;
    padding: 0 0 4px;
    scroll-padding: 0;
  }
}

.card-rank {
  margin-bottom: 6px;
  font-family: var(--font-head);
  font-stretch: 125%;
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--accent);
}

.bestsellers .product-name { font-size: 12px; }
