/* Pine Bros — full bleed hero, shop grid and cart drawer.
   Same token system as site.css. */

/* ================= full bleed hero =================
   The hero box is locked to the image's own 16:9 shape rather than given a
   min-height. That is the whole trick: with a matching ratio, `cover` has
   nothing to crop, so the empty left half of the photograph stays empty and the
   headline never lands on the packs. Earlier attempts used min-height, which
   forces a crop and kept pulling the product back under the text. */
.hero {
  position: relative;
  width: 100%;
  /* locked to the hero image's own 2.222:1 shape, so `cover` never crops */
  aspect-ratio: 2.222 / 1;
  min-height: 560px;
  max-height: 90svh;
  background: var(--bg);
  overflow: hidden;
  isolation: isolate;
}
.hero__bg { position: absolute; inset: 0; z-index: 0; }
.hero__bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  /* if max-height ever forces a crop, take it off the empty left side */
  object-position: 100% 50%;
}

/* Flat scrim, not decoration: it holds text contrast over photography. */
.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(255,255,255,.96) 0%,
    rgba(255,255,255,.9) 22%,
    rgba(255,255,255,.55) 34%,
    rgba(255,255,255,.1) 44%,
    rgba(255,255,255,0) 54%
  );
}

.hero__grid {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--sp-300);
  /* clears the fixed island nav, which otherwise sits on the headline */
  padding-block-start: var(--sp-900);
}
.hero__copy { max-width: min(36vw, 470px); }

/* B5: the one place a gradient is allowed, and only on the text itself.
   Light theme runs #000000 to #666666. */
.hero__title {
  font-family: var(--serif);
  font-size: var(--text-5xl);
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0;
  background: linear-gradient(90deg, #000000 0%, #666666 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
/* The hero band is a fixed ratio, so its height scales with viewport width.
   The headline steps up only where the band is tall enough to hold it. */
@media (min-width: 1500px) { .hero__title { font-size: var(--text-6xl); } }
@media (min-width: 1900px) { .hero__title { font-size: var(--text-7xl); } }

.hero__sub {
  margin-top: var(--sp-200);
  max-width: 440px;
  font-size: var(--text-base);
  line-height: var(--lh-base);
  color: var(--fg-muted);
}

/* Below 900 the empty left half is too narrow to hold a headline, so the hero
   stacks: photograph on top, copy beneath it on paper. */
@media (max-width: 900px) {
  .hero {
    aspect-ratio: auto;
    min-height: 0;
    max-height: none;
    display: block;
  }
  .hero__bg { position: relative; inset: auto; aspect-ratio: 5 / 4; }
  .hero__bg img { object-position: 62% 50%; }
  .hero__scrim { background: linear-gradient(0deg, var(--bg) 0%, rgba(255,255,255,0) 26%); }
  .hero__grid {
    position: static;
    display: block;
    padding-block: var(--sp-400) var(--sp-700);
  }
  .hero__copy { max-width: 100%; }
  .hero__title { font-size: var(--text-4xl); line-height: var(--lh-4xl); }
  .hero__sub { max-width: 100%; }
}

@media (min-width: 901px) and (max-width: 1100px) {
  .hero__grid {
    align-items: flex-start;
    padding-block-start: calc(var(--sp-900) + var(--sp-400));
  }
  .hero__copy { max-width: 430px; }
}

/* ================= nav cart ================= */
.cartbtn {
  position: relative;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.cartbtn:hover { background: var(--surface-2); border-color: var(--fg-muted); }
.cartbtn:active { transform: scale(0.98); }
.cartbtn__n {
  position: absolute; top: -2px; right: -2px;
  min-width: 20px; height: 20px;
  padding: 0 5px;
  display: grid; place-items: center;
  border-radius: var(--r-full);
  background: var(--pine-red);
  color: var(--fg);
  font-size: var(--text-xs); line-height: var(--lh-xs); font-weight: 700;
  border: 2px solid var(--bg);
  font-variant-numeric: tabular-nums;
}

/* ================= shop ================= */
.shop__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--sp-300); }

.pgrid {
  display: grid;
  /* Six tracks so five cards read as 3 over 2 with the pair centred. A plain
     three column grid leaves a hole in the second row. */
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--sp-300);
  margin-top: var(--sp-600);
}
.card-p { grid-column: span 2; }
.card-p:nth-child(4) { grid-column: 2 / span 2; }
.card-p:nth-child(5) { grid-column: 4 / span 2; }

.card-p {
  display: flex;
  flex-direction: column;
  border-radius: var(--r-xl);
  border: 1px solid rgba(232, 222, 209, .72);
  background: var(--bg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.card-p:hover { border-color: rgba(202, 15, 44, .34); transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.card-p__media {
  position: relative;
  /* the flavour showcases are square, which is also the ecommerce norm */
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--warm);
  border-bottom: 1px solid var(--line);
}
.card-p__scene {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.01);
  transition: transform 900ms var(--ease);
}
.card-p:hover .card-p__scene { transform: scale(1.04); }
.card-p__tag {
  position: absolute; top: var(--sp-200); left: var(--sp-200);
  padding: var(--sp-25) var(--sp-75);
  border-radius: var(--r-full);
  background: var(--pine-red);
  color: #ffffff;
  font-size: var(--text-xs); line-height: var(--lh-xs); font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
}

.card-p__body { display: flex; flex-direction: column; gap: var(--sp-100); padding: var(--sp-300); flex: 1; }
.card-p__name { font-size: var(--text-xl); line-height: var(--lh-xl); font-weight: 600; }
.card-p__meta { font-size: var(--text-xs); line-height: var(--lh-xs); color: var(--fg-muted); letter-spacing: 0.06em; text-transform: uppercase; }
.card-p__blurb { font-size: var(--text-sm); line-height: var(--lh-sm); color: var(--fg-muted); }

.pack-select {
  display: block;
  margin-top: var(--sp-100);
}
.pack-select__label {
  display: block;
  margin-bottom: var(--sp-50);
  color: var(--fg-muted);
  font-size: 11px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.pack-select__control { position: relative; display: block; }
.pack-select select {
  /* the native control is stripped so the chevron and metrics match the rest
     of the page rather than the operating system */
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-height: 48px;
  padding: var(--sp-75) var(--sp-500) var(--sp-75) var(--sp-200);
  border-radius: var(--r-xl);
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  font-size: var(--text-sm);
  line-height: var(--lh-sm);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.pack-select select:hover { border-color: var(--fg-muted); }
.pack-select select:focus-visible {
  outline: none;
  border-color: var(--pine-red-hi);
  box-shadow: 0 0 0 3px rgba(202, 15, 44, .16);
}
.pack-select__chev {
  position: absolute;
  right: var(--sp-200);
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--fg-muted);
  transition: color var(--dur) var(--ease);
}
.pack-select select:hover + .pack-select__chev,
.pack-select select:focus-visible + .pack-select__chev { color: var(--pine-red-hi); }

.card-p__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-100); margin-top: auto; padding-top: var(--sp-200); }
.card-p__price { font-size: var(--text-xl); line-height: var(--lh-xl); font-weight: 700; font-variant-numeric: tabular-nums; }
.card-p__each { display: block; font-size: var(--text-xs); line-height: var(--lh-xs); font-weight: 400; color: var(--fg-muted); }
.card-p__amz {
  font-size: var(--text-xs); line-height: var(--lh-xs);
  color: var(--fg-muted); text-decoration: none;
  display: inline-flex; align-items: center; gap: var(--sp-50);
  min-height: 44px;
  transition: color var(--dur) var(--ease);
}
.card-p__amz:hover { color: var(--fg); }

/* the 24 count case */
.case {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--sp-500);
  margin-top: var(--sp-300);
  padding: var(--sp-500);
  border-radius: var(--r-xl);
  border: 1px solid var(--line);
  background: var(--warm);
  box-shadow: var(--shadow-md);
}
.case__h { font-size: var(--text-2xl); line-height: var(--lh-2xl); font-weight: 600; }
.case__d { margin-top: var(--sp-75); color: var(--fg-muted); font-size: var(--text-base); line-height: var(--lh-base); max-width: var(--measure); }
.case__list { margin-top: var(--sp-300); display: flex; flex-wrap: wrap; gap: var(--sp-200) var(--sp-400); }
.case__list li { display: flex; align-items: center; gap: var(--sp-75); font-size: var(--text-sm); line-height: var(--lh-sm); color: var(--fg-muted); }
.case__list svg { color: var(--honey); }
.case__buy { text-align: right; }
.case__price { font-size: var(--text-4xl); line-height: var(--lh-4xl); font-weight: 700; font-variant-numeric: tabular-nums; }
.case__each { font-size: var(--text-sm); line-height: var(--lh-sm); color: var(--fg-muted); margin-bottom: var(--sp-200); }

/* ================= cart drawer ================= */
.cart { position: fixed; inset: 0; z-index: 120; }
.cart__scrim {
  position: absolute; inset: 0;
  background: rgba(25, 23, 19, 0.44);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
}
.cart[data-open="true"] .cart__scrim { opacity: 1; }
.cart__panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(440px, 100%);
  display: flex; flex-direction: column;
  background: var(--bg);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  transform: translateX(100%);
  transition: transform var(--dur) var(--ease);
}
.cart[data-open="true"] .cart__panel { transform: translateX(0); }
.cart__top { display: flex; align-items: center; justify-content: space-between; padding: var(--sp-300); border-bottom: 1px solid var(--line); }
.cart__h { font-size: var(--text-lg); line-height: var(--lh-lg); font-weight: 600; }
.cart__x {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: var(--r-full);
  background: transparent; color: var(--fg); cursor: pointer;
  transition: background-color var(--dur) var(--ease);
}
.cart__x:hover { background: var(--surface-2); }

.cart__lines { flex: 1; overflow-y: auto; padding: var(--sp-100) var(--sp-300); }
.cline {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: var(--sp-200);
  align-items: start;
  padding: var(--sp-200) 0;
  border-bottom: 1px solid var(--line);
}
.cline__img { width: 56px; height: 56px; object-fit: cover; border-radius: var(--r-lg); background: var(--surface); }
.cline__n { font-size: var(--text-sm); line-height: var(--lh-sm); font-weight: 600; }
.cline__m { font-size: var(--text-xs); line-height: var(--lh-xs); color: var(--fg-muted); }
.cline__right { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: var(--sp-50); }
.cline__p { font-size: var(--text-sm); line-height: var(--lh-sm); font-weight: 600; font-variant-numeric: tabular-nums; }
.cline__x {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border: 0; background: transparent; color: var(--fg-muted);
  cursor: pointer; border-radius: var(--r-lg);
  transition: color var(--dur) var(--ease);
}
.cline__x:hover { color: var(--pine-red-hi); }

.qty {
  display: inline-flex; align-items: center; gap: var(--sp-50);
  margin-top: var(--sp-75);
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  padding: 2px;
}
.qty__b {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border: 0; border-radius: var(--r-full);
  background: transparent; color: var(--fg);
  font-size: var(--text-base); line-height: var(--lh-base); cursor: pointer;
  transition: background-color var(--dur) var(--ease);
}
.qty__b:hover { background: var(--surface-3); }
.qty__n { min-width: 20px; text-align: center; font-size: var(--text-sm); font-variant-numeric: tabular-nums; }

.cart__empty { padding: var(--sp-800) var(--sp-400); text-align: center; color: var(--fg-muted); }
.cart__empty .i { margin: 0 auto var(--sp-200); display: block; }
.cart__empty .btn { margin-top: var(--sp-300); }

.cart__foot { padding: var(--sp-300); border-top: 1px solid var(--line); background: var(--surface-2); }
.cart__row { display: flex; justify-content: space-between; font-size: var(--text-base); line-height: var(--lh-base); font-weight: 600; font-variant-numeric: tabular-nums; }
.cart__row--sub { margin-top: var(--sp-50); font-size: var(--text-xs); line-height: var(--lh-xs); font-weight: 400; color: var(--fg-muted); }
.cart__go { width: 100%; margin-top: var(--sp-300); }
.cart__note { margin-top: var(--sp-100); font-size: var(--text-xs); line-height: var(--lh-xs); color: var(--fg-muted); }

/* ================= responsive ================= */
@media (max-width: 1024px) {
  .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-p, .card-p:nth-child(4), .card-p:nth-child(5) { grid-column: auto; }
  .hero__title { font-size: var(--text-6xl); }
}
@media (max-width: 860px) {
  .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case { grid-template-columns: minmax(0, 1fr); gap: var(--sp-300); padding: var(--sp-400) var(--sp-300); }
  .case__buy { text-align: left; }
  .hero { min-height: auto; padding-top: var(--sp-900); }
  .hero__title { font-size: var(--text-4xl); line-height: var(--lh-4xl); }
  .hero__scroll { display: none; }
}

@media (max-width: 620px) {
  .pgrid { grid-template-columns: minmax(0, 1fr); }
  .card-p, .card-p:nth-child(4), .card-p:nth-child(5) { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__scroll svg { animation: none; }
}

/* hero actions */
.btn--lg { font-size: var(--text-lg); line-height: var(--lh-lg); min-height: 56px; padding-inline: var(--sp-400); }
.hero__actions { margin-top: var(--sp-400); display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-300); }
.hero__alt {
  display: inline-flex; align-items: center; gap: var(--sp-75);
  min-height: 44px;
  font-size: var(--text-sm); line-height: var(--lh-sm); font-weight: 500;
  color: var(--fg-muted); text-decoration: none;
  transition: color var(--dur) var(--ease);
}
.hero__alt:hover { color: var(--fg); }
.hero__trust {
  margin-top: var(--sp-300);
  font-size: var(--text-xs); line-height: var(--lh-xs);
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--fg-muted);
}


/* ================= voice care split ================= */
.voice {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--sp-600);
  align-items: center;
}
.voice__media {
  margin: 0;
  border-radius: var(--r-3xl);
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 4 / 3;
  box-shadow: var(--shadow-md);
}
.voice__media img { width: 100%; height: 100%; object-fit: cover; }
.voice__copy .quote { max-width: none; }

/* ================= finder banner ================= */
.finder__banner {
  position: relative;
  margin: 0 0 var(--sp-600);
  border-radius: var(--r-3xl);
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 21 / 7;
  box-shadow: var(--shadow-md);
}
.finder__banner img { width: 100%; height: 100%; object-fit: cover; }
.finder__bannercap {
  position: absolute;
  left: var(--sp-300);
  bottom: var(--sp-300);
  /* outer 24px, gap 24px -> own step */
  padding: var(--sp-75) var(--sp-200);
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, 0.92);
  color: var(--fg);
  font-size: var(--text-sm);
  line-height: var(--lh-sm);
  font-weight: 600;
  max-width: calc(100% - var(--sp-600));
}

@media (max-width: 860px) {
  .voice { grid-template-columns: minmax(0, 1fr); gap: var(--sp-400); }
  .finder__banner { aspect-ratio: 16 / 9; }
  .finder__bannercap { font-size: var(--text-xs); line-height: var(--lh-xs); left: var(--sp-200); bottom: var(--sp-200); }
}

/* the nav CTA wrapped to two lines on narrow screens */
.nav__pill .btn { white-space: nowrap; }
@media (max-width: 520px) {
  .nav__pill { gap: var(--sp-100); padding-left: var(--sp-200); }
  .nav__brand { font-size: var(--text-sm); }
}

.nav__ctaShort { display: none; }
@media (max-width: 520px) {
  .nav__ctaLong { display: none; }
  .nav__ctaShort { display: inline; }
}

/* ================= story ================= */
.story__media {
  position: relative;
  margin: var(--sp-600) 0 0;
  border-radius: var(--r-3xl);
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 16 / 9;
  box-shadow: var(--shadow-md);
}
.story__media img { width: 100%; height: 100%; object-fit: cover; }
.story__cap {
  position: absolute;
  left: var(--sp-300);
  bottom: var(--sp-300);
  padding: var(--sp-75) var(--sp-200);
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, 0.92);
  color: var(--fg);
  font-size: var(--text-sm);
  line-height: var(--lh-sm);
  font-weight: 600;
  max-width: calc(100% - var(--sp-600));
}
@media (max-width: 860px) {
  .story__cap { font-size: var(--text-xs); line-height: var(--lh-xs); left: var(--sp-200); bottom: var(--sp-200); }
}


/* ================= brand wordmark ================= */
.nav__logo {
  display: block;
  height: 22px;
  width: auto;
}
.foot__brand { display: inline-block; }
.foot__logo {
  display: block;
  height: 30px;
  width: auto;
}
@media (max-width: 520px) {
  .nav__logo { height: 18px; }
}
