/* ============================================================
   BERUNDA — Buy-surface styling, shared by the product pages
   The Collection's quick-view popup was removed; what remains here
   is the type, format toggle, brew step, quantity, Add to Cart,
   toast and brew guide used by the product detail pages.
   ============================================================ */

.col-modal-eyebrow {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.3em;
  /* was clamp(9px, …) — 9px of wide-tracked uppercase Cinzel is below the
     legible floor, and this is the first line a buyer reads. */
  font-size: clamp(10.5px, 0.8vw, 12px);
  color: var(--gold-300);
}
/* format toggle — switches between the cup's two real SKUs */
.col-modal-formats {
  display: inline-flex;
  align-self: flex-start;
  gap: 0;
  margin: clamp(18px, 2.2vh, 24px) 0 0;
  padding: 4px;
  border: 1px solid var(--hair);
  border-radius: 999px;
  background: rgba(20, 2, 5, 0.4);
}
.col-modal-format {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  background: transparent;
  border: 0;
  border-radius: 999px;
  padding: 9px 20px 8px;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 10.5px;
  color: var(--ivory-400);
  white-space: nowrap;
  transition: color 0.3s var(--ease-standard), background 0.3s var(--ease-standard);
}
.col-modal-format:hover { color: var(--gold-200); }
.col-modal-format[aria-checked="true"] {
  color: #2a0206;
  background: linear-gradient(168deg, var(--gold-300), var(--gold-500));
  box-shadow: inset 0 1px 0 rgba(255, 244, 214, 0.5);
}
.col-modal-format:focus-visible { outline: 2px solid var(--gold-300); outline-offset: 2px; }

.col-modal-desc {
  font-family: var(--font-body);
  font-size: clamp(17px, 1.45vw, 21px);
  line-height: 1.58;
  color: var(--ivory-200);
  margin: clamp(20px, 2.6vh, 28px) 0 0;
  text-wrap: pretty;
}

/* Zone separator, not a nudge — the buy column stacks eight blocks, so the
   gaps between decisions have to read as bigger than the gaps inside one. */
.col-modal-section { margin-top: clamp(26px, 3.4vh, 38px); }
.col-modal-sub {
  display: block;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 10.5px;
  color: var(--gold-300);
  margin-bottom: 11px;
}
/* ---- buy row ---- */
.col-modal-buy {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: clamp(14px, 1.6vw, 22px);
  margin-top: clamp(28px, 3.6vh, 40px);
  padding-top: clamp(22px, 2.8vh, 30px);
  border-top: 1px solid var(--hair-soft);
}
.col-modal-price-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(24px, 2.2vw, 32px);
  letter-spacing: 0.04em;
  color: var(--gold-300);
}
.col-qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--hair);
  border-radius: 999px;
  background: rgba(20, 2, 5, 0.4);
  overflow: hidden;
}
.col-qty-btn {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  width: 40px; height: 44px;
  background: transparent;
  border: 0;
  color: var(--gold-300);
  font-family: var(--font-body);
  font-size: 22px;
  line-height: 1;
  transition: color 0.25s var(--ease-standard), background 0.25s var(--ease-standard);
}
.col-qty-btn:hover { color: #2a0206; background: rgba(214, 162, 63, 0.85); }
.col-qty-btn:disabled { opacity: 0.32; cursor: default; }
.col-qty-btn:disabled:hover { color: var(--gold-300); background: transparent; }
.col-qty-btn:focus-visible { outline: 2px solid var(--gold-300); outline-offset: -3px; }
.col-qty-n {
  min-width: 34px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--ivory-100, #f4ecdc);
  font-variant-numeric: tabular-nums;
}

.col-add {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  flex: 1 1 auto;
  min-width: 180px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 32px;
  border: 1px solid var(--gold-400);
  border-radius: 999px;
  background: linear-gradient(168deg, var(--gold-300), var(--gold-500));
  color: #2a0206;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 244, 214, 0.6);
  transition: transform 0.3s var(--ease-entrance), box-shadow 0.35s var(--ease-standard), background 0.35s var(--ease-standard);
}
.col-add:hover {
  transform: translateY(-1px);
  background: linear-gradient(168deg, var(--gold-200), var(--gold-400));
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.46), 0 0 26px rgba(214, 162, 63, 0.32), inset 0 1px 0 rgba(255, 244, 214, 0.7);
}
.col-add:active { transform: translateY(0) scale(0.99); }
.col-add:focus-visible { outline: 2px solid var(--gold-200); outline-offset: 3px; }
.col-add.is-added {
  background: rgba(20, 2, 5, 0.4);
  color: var(--gold-300);
  border-color: var(--gold-500);
}

/* ---- toast confirmation ---- */
.col-toast {
  position: fixed;
  left: 50%;
  bottom: clamp(20px, 5vh, 40px);
  transform: translate(-50%, 24px);
  z-index: 95;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 13px 22px;
  background: linear-gradient(168deg, rgba(58, 8, 14, 0.96), rgba(28, 4, 8, 0.98));
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid var(--hair);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 11px;
  color: var(--gold-300);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.4s var(--ease-standard), transform 0.5s var(--ease-entrance), visibility 0.4s var(--ease-standard);
}
.col-toast.is-shown { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.col-toast-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold-400); box-shadow: 0 0 10px rgba(214, 162, 63, 0.6); }

/* ---- responsive ---- */
@media (max-width: 440px) {
  .col-modal-buy { flex-direction: column; align-items: stretch; }
  .col-qty { align-self: center; }
}

@media (prefers-reduced-motion: reduce) {
  .col-toast, .col-add, .col-modal-format { transition: none !important; }
}

/* ============================================================
   THE BREW SQUARES (v3.1) — original 2-column popup.
   Three small squares in the right column, each running its own
   line-art machine animation. Hovering the row drops all three
   parchment panels together (no stagger). Panels are ABSOLUTE so
   opening them never resizes the figure (no image re-crop / zoom),
   and they unfold as a fused extension straight off the square's
   base. Click a square to lock it (required); none by default.
   ============================================================ */
.col-brewstep { margin-top: clamp(26px, 3.4vh, 38px); }
.col-brewstep-req {
  display: inline-block; font-style: normal; color: #2a0206;
  background: linear-gradient(168deg, var(--gold-300), var(--gold-500));
  /* was 8px — the smallest type on the site, on the one word that tells a
     buyer why Add to Cart is refusing them. */
  padding: 3px 8px 2px; border-radius: 4px; letter-spacing: 0.14em; font-size: 10px;
  margin-bottom: 5px;
}
.col-brewrow {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(8px, 1vw, 14px); margin-top: 6px; align-items: start;
}
.col-brewrow.is-nudge { animation: col-add-nudge 0.5s var(--ease-standard); }
/* This keyframe was never defined anywhere in the kit, so the brew row stayed
   still when a gated Add was pressed while its hint shook. Same gesture as
   .pp-hint.is-urgent — the two halves of the gate react as one. */
@keyframes col-add-nudge {
  0%, 100% { transform: none; }
  25% { transform: translateX(-3px); }
  60% { transform: translateX(3px); }
}
.col-brewtile { display: flex; flex-direction: column; align-items: center; min-width: 0; }

/* square + its fused drop share a positioning context */
.col-brewtile-sqwrap { position: relative; width: clamp(72px, 8vw, 92px); perspective: 850px; }

.col-brewtile-sq {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  width: 100%; aspect-ratio: 1 / 1;
  display: grid; place-items: center; padding: 0;
  position: relative; z-index: 2;
  background:
    radial-gradient(120% 120% at 50% 0%, rgba(214, 162, 63, 0.09), transparent 62%),
    linear-gradient(168deg, rgba(86, 10, 18, 0.58), rgba(28, 4, 8, 0.86));
  border: 1px solid var(--hair); border-radius: 14px;
  color: var(--gold-300);
  box-shadow: inset 0 1px 0 rgba(239, 217, 166, 0.08);
  transition: border-color 0.35s var(--ease-standard), color 0.35s var(--ease-standard),
              box-shadow 0.35s var(--ease-standard), border-radius 0.35s var(--ease-standard),
              border-bottom-color 0.35s var(--ease-standard);
}
.col-brewtile-sq:hover, .col-brewtile-sq:focus-visible {
  border-color: var(--gold-400); color: var(--gold-200);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(239, 217, 166, 0.12);
}
.col-brewtile-anim { width: 74%; height: 74%; display: block; }
.col-brewtile-anim svg { width: 100%; height: 100%; display: block; overflow: visible; }

.col-brewtile-name {
  margin-top: 9px;
  font-family: var(--font-display); text-transform: uppercase;
  letter-spacing: 0.14em; font-size: 9px; color: var(--ivory-400);
  text-align: center; white-space: nowrap; transition: color 0.3s var(--ease-standard);
}
.col-brewtile:hover .col-brewtile-name,
.col-brewtile.is-selected .col-brewtile-name { color: var(--gold-300); }

/* mini machine animation — always live */
.col-brewtile-anim .cm-frame { opacity: 0.9; }
.col-brewtile-anim .cm-stream, .col-brewtile-anim .cm-drip { opacity: 1; }
.col-brewtile-anim .cm-steam path { opacity: 0; transform-box: fill-box; transform-origin: center bottom; animation: cm-steam 2.8s var(--ease-standard) infinite; }
.col-brewtile-anim .cm-steam .s2 { animation-delay: 1.1s; }
.col-brewtile-anim .cm-stream line { stroke-dasharray: 3 6; animation: cm-flow 0.6s linear infinite; }
.col-brewtile-anim .cm-plunger { transform-box: fill-box; transform-origin: center top; animation: cm-press 3.2s var(--ease-standard) infinite; }
.col-brewtile-anim .cm-drip { transform-box: fill-box; transform-origin: center bottom; animation: cm-dripfall 2.4s var(--ease-standard) infinite; }

@keyframes cm-steam { 0% { opacity: 0; transform: translateY(5px) scaleY(0.85); } 30% { opacity: 0.55; } 100% { opacity: 0; transform: translateY(-10px) scaleY(1.15); } }
@keyframes cm-flow { to { stroke-dashoffset: -18; } }
@keyframes cm-press { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(7px); } }
@keyframes cm-dripfall { 0% { opacity: 0; transform: translateY(0); } 18% { opacity: 1; } 100% { opacity: 0; transform: translateY(9px); } }

/* selected tile */
.col-brewtile.is-selected .col-brewtile-sq {
  border-color: var(--gold-400); color: #2a0206;
  background: linear-gradient(168deg, var(--gold-300), var(--gold-500));
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 244, 214, 0.5);
}

/* ---- add to cart ---- */
.col-add-wrap { flex: 1 1 auto; min-width: 200px; display: flex; flex-direction: column; gap: 9px; }
.col-add-wrap .col-add { width: 100%; min-width: 0; flex: none; }
.col-add.is-locked { background: rgba(20, 2, 5, 0.5); color: var(--ivory-500); border-color: var(--hair); box-shadow: none; cursor: not-allowed; }
.col-add.is-locked:hover { transform: none; box-shadow: none; background: rgba(20, 2, 5, 0.5); }


@media (max-width: 520px) {
  .col-brewtile-sq { width: 56px; height: 56px; }
}

@media (prefers-reduced-motion: reduce) {
  .col-brewtile-anim .cm-steam path, .col-brewtile-anim .cm-stream line, .col-brewtile-anim .cm-plunger, .col-brewtile-anim .cm-drip { animation: none !important; }
  .col-brewrow.is-nudge { animation: none !important; }
}

/* ============================================================
   THE BREW GUIDE — a bespoke ritual popup, smaller than the
   product modal. Triptych of rituals parted by beaded ornaments,
   each with its live line-art device. Layout is flex, so the
   guide is generated from BREWS and scales to any count without
   changing its look or feel.
   ============================================================ */

/* — the trigger beside the step label — */
.col-brewstep-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 11px; }
.col-brewstep-sub { margin-bottom: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.col-brewguide-btn {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px 6px; border: 1px solid var(--hair);
  border-radius: 999px; background: rgba(214, 162, 63, 0.05);
  color: var(--gold-300);
  font-family: var(--font-display); text-transform: uppercase;
  letter-spacing: 0.18em; font-size: 10.5px; white-space: nowrap;
  transition: color 0.35s var(--ease-standard), border-color 0.35s var(--ease-standard),
              background 0.35s var(--ease-standard), box-shadow 0.35s var(--ease-standard);
}
.col-brewguide-ico { width: 14px; height: 14px; display: block; color: var(--gold-400); transition: color 0.35s var(--ease-standard); }
.col-brewguide-btn:hover, .col-brewguide-btn:focus-visible {
  color: var(--gold-200); border-color: var(--gold-400);
  background: rgba(214, 162, 63, 0.12);
  box-shadow: 0 0 22px rgba(214, 162, 63, 0.18);
}
.col-brewguide-btn:hover .col-brewguide-ico, .col-brewguide-btn:focus-visible .col-brewguide-ico { color: var(--gold-200); }
/* the hover treatment is a colour shift, which alone is not a focus indicator —
   keyboard focus gets the same ring the other buy controls use */
.col-brewguide-btn:focus-visible { outline: 2px solid var(--gold-300); outline-offset: 2px; }

/* — overlay above the product modal — */
.col-bg {
  position: fixed; inset: 0; z-index: 110;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(16px, 4vh, 44px) clamp(14px, 4vw, 40px);
}
.col-bg[hidden] { display: none; }
.col-bg-scrim {
  position: absolute; inset: 0;
  background: radial-gradient(75% 75% at 50% 38%, rgba(14, 1, 3, 0.72), rgba(5, 0, 1, 0.9));
  -webkit-backdrop-filter: blur(12px) saturate(1.05); backdrop-filter: blur(12px) saturate(1.05);
  opacity: 0; transition: opacity 0.5s var(--ease-standard);
}
.col-bg.is-open .col-bg-scrim { opacity: 1; }

.col-bg-dialog {
  position: relative;
  width: min(820px, 100%);
  max-height: calc(100vh - clamp(32px, 8vh, 88px));
  overflow-y: auto; overflow-x: hidden;
  padding: clamp(30px, 4vh, 52px) clamp(22px, 3.4vw, 50px) clamp(26px, 3.4vh, 44px);
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(214, 162, 63, 0.1), transparent 60%),
    linear-gradient(168deg, rgba(74, 8, 16, 0.97), rgba(30, 4, 8, 0.99));
  border: 1px solid var(--hair);
  box-shadow: 0 50px 120px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(239, 217, 166, 0.12);
  opacity: 0; transform: translateY(14px) scale(0.985);
  transition: opacity 0.5s var(--ease-standard), transform 0.6s var(--ease-entrance);
}
.col-bg.is-open .col-bg-dialog { opacity: 1; transform: none; }

.col-bg-x {
  position: absolute; top: 15px; right: 15px; z-index: 4;
  width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--hair); border-radius: 50%;
  background: rgba(20, 2, 5, 0.5); color: var(--ivory-300); cursor: pointer;
  transition: color 0.3s var(--ease-standard), border-color 0.3s var(--ease-standard);
}
.col-bg-x:hover { color: var(--gold-300); border-color: var(--gold-400); }
.col-bg-x:focus-visible { outline: 2px solid var(--gold-300); outline-offset: 2px; }

.col-bg-head { text-align: center; position: relative; }
.col-bg-eyebrow {
  display: block; font-family: var(--font-display); text-transform: uppercase;
  letter-spacing: 0.34em; font-size: clamp(9px, 0.74vw, 11px); color: var(--gold-300);
}
.col-bg-title {
  font-family: var(--font-display); font-weight: 700; color: var(--ivory-100, #f4ecdc);
  font-size: clamp(27px, 3vw, 40px); letter-spacing: 0.02em; line-height: 1.04; margin: 11px 0 0;
}

/* — triptych (flex; a hairline parts each ritual; scalable to N) — */
.col-bg-grid { display: flex; align-items: stretch; justify-content: center; margin-top: clamp(26px, 3.4vh, 38px); }
.col-bg-ritual + .col-bg-ritual { border-left: 1px solid rgba(198, 135, 27, 0.1); }

.col-bg-ritual {
  flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: clamp(6px, 1vw, 14px) clamp(8px, 1.4vw, 20px);
}
@media (prefers-reduced-motion: no-preference) {
  .col-bg.is-open .col-bg-ritual { animation: col-bg-rise 0.6s var(--ease-entrance) both; }
}
@keyframes col-bg-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.col-bg-num { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.32em; font-size: 9.5px; color: var(--gold-300); }
.col-bg-dev {
  width: clamp(86px, 9vw, 118px); aspect-ratio: 4 / 5; margin: clamp(12px, 1.6vh, 18px) 0;
  color: var(--gold-300); transition: color 0.4s var(--ease-standard), filter 0.4s var(--ease-standard);
}
.col-bg-dev svg { width: 100%; height: 100%; display: block; overflow: visible; }
.col-bg-name { font-family: var(--font-display); font-weight: 700; color: var(--ivory-100, #f4ecdc); font-size: clamp(19px, 1.7vw, 25px); letter-spacing: 0.01em; line-height: 1.05; margin: 0; }

.col-bg-specs { width: 100%; margin: clamp(16px, 2.2vh, 22px) 0 0; display: flex; flex-direction: column; }
.col-bg-spec { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 8px 2px; border-bottom: 1px solid rgba(198, 135, 27, 0.12); }
.col-bg-spec:last-child { border-bottom: 0; }
.col-bg-spec dt { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.2em; font-size: 8.5px; color: var(--ivory-400); }
.col-bg-spec dd { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: clamp(15px, 1.3vw, 18px); color: var(--ivory-100, #f4ecdc); letter-spacing: 0.01em; white-space: nowrap; }

/* guide-only mode (opened from the hero) — reference reading, no method to lock */
.col-bg.is-guide-only .col-bg-select { display: none; }

.col-bg-select {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  margin-top: clamp(16px, 2.2vh, 22px); width: 100%;
  padding: 11px 16px; border: 1px solid var(--gold-400); border-radius: 999px;
  background: transparent; color: var(--gold-200);
  font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.2em; font-size: 10px; font-weight: 700;
  transition: background 0.35s var(--ease-standard), color 0.35s var(--ease-standard),
              box-shadow 0.35s var(--ease-standard), transform 0.3s var(--ease-entrance), border-color 0.35s var(--ease-standard);
}
.col-bg-ritual:hover .col-bg-dev { color: var(--gold-200); filter: drop-shadow(0 0 14px rgba(214, 162, 63, 0.4)); }
.col-bg-select:hover, .col-bg-select:focus-visible {
  background: linear-gradient(168deg, var(--gold-300), var(--gold-500)); color: #2a0206;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 244, 214, 0.6); transform: translateY(-1px);
}
.col-bg-ritual.is-active .col-bg-select { background: linear-gradient(168deg, var(--gold-300), var(--gold-500)); color: #2a0206; border-color: var(--gold-400); box-shadow: inset 0 1px 0 rgba(255, 244, 214, 0.5); }

/* live devices — same animation language as the squares, larger */
.col-bg-dev .cm-frame { opacity: 0.95; }
.col-bg-dev .cm-stream, .col-bg-dev .cm-drip { opacity: 1; }
.col-bg-dev .cm-steam path { opacity: 0; transform-box: fill-box; transform-origin: center bottom; animation: cm-steam 2.8s var(--ease-standard) infinite; }
.col-bg-dev .cm-steam .s2 { animation-delay: 1.1s; }
.col-bg-dev .cm-stream line { stroke-dasharray: 3 6; animation: cm-flow 0.6s linear infinite; }
.col-bg-dev .cm-plunger { transform-box: fill-box; transform-origin: center top; animation: cm-press 3.2s var(--ease-standard) infinite; }
.col-bg-dev .cm-drip { transform-box: fill-box; transform-origin: center bottom; animation: cm-dripfall 2.4s var(--ease-standard) infinite; }

@media (max-width: 720px) {
  .col-bg-grid { flex-direction: column; }
  .col-bg-ritual { padding: clamp(14px, 3vh, 22px) 6px; }
  .col-bg-ritual + .col-bg-ritual { border-left: 0; border-top: 1px solid rgba(198, 135, 27, 0.1); }
  .col-bg-specs { max-width: 340px; margin-left: auto; margin-right: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .col-bg-scrim, .col-bg-dialog { transition: opacity 0.3s ease !important; }
  .col-bg-dialog { transform: none !important; }
  .col-bg.is-open .col-bg-ritual { animation: none !important; }
  .col-bg-dev .cm-steam path, .col-bg-dev .cm-stream line, .col-bg-dev .cm-plunger, .col-bg-dev .cm-drip { animation: none !important; }
}
