/* ============ LOGO MARK (raster shape, recolored via CSS mask) ============ */
.logo-mark {
  display: inline-block;
  width: 48px;
  aspect-ratio: 668 / 672;
  background-color: currentColor;
  -webkit-mask-image: url("/assets/img/mark.svg");
  mask-image: url("/assets/img/mark.svg");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

/* ============ BUTTON ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: 400 13px/1 var(--font-body);
  letter-spacing: 0.10em;
  text-transform: uppercase;
  padding: 14px 28px;
  border: 1px solid currentColor;
  border-radius: var(--radius-sm);
  background: transparent;
  transition: background 200ms ease, color 200ms ease;
  min-height: 44px;
  /* <button> centres text by UA default but <a> inherits `start`; set it
     explicitly so anchor and button variants render identically when a label
     wraps onto more than one line */
  text-align: center;
}
.btn--ink { color: var(--ink); }
.btn--clay { color: var(--clay); }
.btn--rose { color: var(--rose); }
.btn--slate { color: var(--slate); }

.btn--ink:hover, .btn--ink:focus-visible { background: var(--ink); color: var(--white); }
.btn--clay:hover, .btn--clay:focus-visible { background: var(--clay); color: var(--white); }
.btn--slate:hover, .btn--slate:focus-visible { background: var(--slate); color: var(--white); }
.btn--rose:hover, .btn--rose:focus-visible { background: var(--rose); color: var(--ink); }

/* ============ INPUT ============ */
.input {
  border: 0;
  border-bottom: 1px solid var(--rule);
  background: transparent;
  padding: 8px 0;
  font: 400 15px var(--font-body);
  color: var(--ink);
  width: 100%;
  border-radius: 0;
}
.input::placeholder { color: var(--ink-mute); }
.input:focus { border-bottom-color: var(--rose); outline: none; }
.input:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }

/* ============ PRODUCT CARD ============ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 280px));
  justify-content: center;
  gap: 48px;
}
@media (max-width: 640px) {
  .product-grid {
    grid-template-columns: minmax(0, 320px);
    gap: 32px;
  }
}

.product-card {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.product-card__frame {
  width: 100%;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--rule);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: hidden;
}
.product-card__frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 400ms ease-out;
}
.product-card:hover .product-card__frame img,
.product-card:focus-within .product-card__frame img {
  transform: scale(1.03);
}

.product-card__btn {
  margin-top: 16px;
  width: 100%;
  flex-direction: column;
  gap: 2px;
  padding-block: 16px;
  line-height: 1.4;
  /* absorb the card's leftover height so both labels in a row share one box
     height — a two-line and a three-line name then sit on the same baseline
     grid, each vertically centred in its own frame */
  flex-grow: 1;
}
.product-card__btn-line { display: block; }

/* ============ EMPTY STATE ============ */
.empty-state {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-block: 64px;
}
.empty-state__message { margin-top: 32px; }
.empty-state__helper {
  margin-top: 20px;
  max-width: 420px;
  color: var(--ink-mute);
}
.empty-state__mark {
  margin-top: 48px;
  width: 64px;
  height: 64px;
  border: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: center;
}
.empty-state__mark .logo-mark { width: 32px; }

/* ============ INGREDIENT BAND (signature marquee) ============ */
.band {
  position: relative;
  overflow: hidden;
  background: var(--band-ground);
  height: 96px;
  display: flex;
  align-items: center;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}
@media (min-width: 768px) {
  .band { height: 140px; }
}

.band__track {
  display: flex;
  align-items: center;
  gap: 36px;
  padding-right: 36px;
  width: max-content;
  animation: band-scroll 60s linear infinite;
  will-change: transform;
}
@media (min-width: 768px) {
  .band__track { gap: 56px; padding-right: 56px; }
}

.band:hover .band__track { animation-play-state: paused; }

.band__item {
  height: 56px;
  width: auto;
  flex-shrink: 0;
  user-select: none;
  -webkit-user-drag: none;
}
@media (min-width: 768px) {
  .band__item { height: 88px; }
}

/* The 14-item set is rendered 3×, so the track travels exactly one set's
   width (1/3) per cycle. Three sets keep the loop gapless on displays up to
   ~4200px wide; two sets would break on a 2560px monitor. */
@keyframes band-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-33.3333%); }
}

@media (prefers-reduced-motion: reduce) {
  .band__track {
    animation: none;
    justify-content: center;
    width: 100%;
  }
  /* show set A only; the duplicates would otherwise sit off-screen */
  .band__item:nth-child(n+15) { display: none; }
}

/* ============ MISC ============ */
.text-link {
  position: relative;
  display: inline-block;
  font: 400 13px/1 var(--font-body);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-bottom: 8px;
}
.text-link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--rose);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease-out;
}
.text-link:hover::after,
.text-link:focus-visible::after { transform: scaleX(1); }

/* ============ PRODUCT MODAL ============ */
.product-card__frame-btn {
  all: unset;
  display: flex;
  width: 100%;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--rule);
  background: var(--white);
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: hidden;
  cursor: pointer;
  box-sizing: border-box;
}
.product-card__frame-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 400ms ease-out;
}
.product-card__frame-btn:hover img,
.product-card:hover .product-card__frame-btn img {
  transform: scale(1.03);
}

.product-modal {
  border: 0;
  border-radius: var(--radius-sm);
  padding: 0;
  max-width: 560px;
  width: min(90vw, 560px);
  background: var(--white);
  color: var(--ink);
}
.product-modal::backdrop { background: rgba(34, 20, 15, 0.55); }
.product-modal__inner {
  position: relative;
  padding: 48px 32px;
  text-align: center;
}
.product-modal__close {
  position: absolute;
  top: 8px;
  right: 8px;
}
.product-modal__media {
  width: 100%;
  max-width: 260px;
  aspect-ratio: 4 / 5;
  margin: 0 auto 24px;
  border: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}
.product-modal__media img { width: 100%; height: 100%; object-fit: contain; }
.product-modal__caption { margin-top: 16px; }

.section-head {
  text-align: center;
  margin-bottom: 32px;
}
@media (min-width: 768px) {
  .section-head { margin-bottom: 48px; }
}
