/* ======================================================================
   Bullionite Popups: four moments in the site's own language. Paper and
   ink, gold for what matters, the display serif for the line that counts,
   mono for the small words, and the site's own figures: the gold square
   that opens into a composition, the plant printed over stone, the gold
   stop at the end of a title. Every colour, face and curve is the theme's
   (its custom properties), with the same values to fall back on.

     the seed     a card in the corner that grows out of a gold square
     the stay     a dialog over a veil: the composition on stone beside a
                  request for a call
     the note     a margin note that slides in from the edge of the page,
                  a gold rule drawing down its side
     the guide    a night capsule that opens out of a gold dot above the
                  store's dock

   Each one leans toward the pointer: a plate tilts under it, the gold
   shapes drift apart toward it, a light follows it, the button is drawn to
   it. They stay below the site's own cursor (z-index 90).
   ====================================================================== */

.bp, .bp *, .bp *::before, .bp *::after { box-sizing: border-box; }
.bp {
  --bp-ease: var(--ease, cubic-bezier(.16, 1, .3, 1));
  --bp-fade: var(--ease-fade, cubic-bezier(.45, 0, .2, 1));
  --bp-gold: var(--gold, #f8b000);
  --bp-ink: var(--ink, #191818);
  --bp-ink-2: var(--ink-2, #4a4845);
  --bp-muted: var(--muted, #a8a5a0);
  --bp-line: var(--line, #dbd8d3);
  --bp-paper: var(--paper, #ffffff);
  --bp-mist: var(--mist, #f6f5f3);
  --bp-stone: var(--stone, #d5d5d5);
  font-family: var(--sans, "Helvetica Neue", Helvetica, Arial, sans-serif);
  color: var(--bp-ink);
  -webkit-font-smoothing: antialiased;
  text-align: left;
}
/* the resets weigh nothing (:where), so every class below wins over them */
:where(.bp) :where(h2, p, dl, dt, dd) { margin: 0; }
:where(.bp) :where(button) { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:where(.bp) :where(a) { color: inherit; text-decoration: none; }
.bp :focus-visible { outline: 2px solid var(--gold-ink, #a97400); outline-offset: 3px; }
.bp img { display: block; max-width: none; }

/* --------------------------------------------------------------- the parts */
.bp-mono { font-family: var(--mono, ui-monospace, Menlo, Consolas, monospace); font-size: 11px; font-weight: 400; letter-spacing: .04em; text-transform: uppercase; }
.bp-kicker { display: flex; align-items: center; gap: .75em; color: var(--bp-muted); }
.bp-kicker::before { content: ""; flex: none; width: 7px; height: 7px; background: var(--bp-gold); }
.bp-title { font-family: var(--display, "B3 Serif", Georgia, serif); font-weight: 400; line-height: .98; letter-spacing: -.01em; text-wrap: balance; }
.bp-stop { color: var(--bp-gold); }
.bp-line { color: var(--bp-ink-2); line-height: 1.5; text-wrap: pretty; }
.bp-acts { display: flex; flex-wrap: wrap; align-items: center; gap: .9em 1.4em; }

/* the button: ink, the gold rising into it, drawn toward the pointer */
.bp-go {
  --gx: 0px; --gy: 0px;
  position: relative; isolation: isolate; overflow: hidden; flex: none;
  display: inline-flex; align-items: center; justify-content: center; gap: .75em;
  min-height: 46px; padding: 0 1.3em 0 1.5em;
  border-radius: 999px; background: var(--bp-ink); color: var(--bp-paper) !important;
  font-size: 14px; font-weight: 500; letter-spacing: -.005em; white-space: nowrap;
  translate: var(--gx) var(--gy);
  transition: color .5s var(--bp-fade), translate .6s var(--bp-ease);
}
.bp-go::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--bp-gold); transform: translateY(101%); transition: transform .75s var(--bp-ease); }
.bp-go:hover, .bp-go:focus-visible { color: var(--bp-ink) !important; }
.bp-go:hover::before, .bp-go:focus-visible::before { transform: none; }
.bp-go svg { width: 12px; height: 12px; flex: none; transition: translate .6s var(--bp-ease); }
.bp-go:hover svg { translate: 3px 0; }
.bp-go[disabled] { cursor: progress; opacity: .7; }
.bp-go--plain { padding: 0 1.5em; }
.bp-later { min-height: 44px; padding: 0 .2em; font-size: 13px; color: var(--bp-muted) !important; background-image: linear-gradient(currentColor, currentColor); background-repeat: no-repeat; background-position: 0 calc(50% + .8em); background-size: 0 1px; transition: color .4s var(--bp-fade), background-size .6s var(--bp-ease); }
.bp-later:hover, .bp-later:focus-visible { color: var(--bp-ink) !important; background-size: 100% 1px; }
.bp-link { font-size: 14px; background-image: linear-gradient(currentColor, currentColor); background-repeat: no-repeat; background-position: 0 100%; background-size: 100% 1px; padding-bottom: 2px; transition: background-size .6s var(--bp-ease); }
.bp-link:hover { background-size: 0 1px; background-position: 100% 100%; }

/* close: a round button in the corner, a target the size of a thumb */
.bp-x { position: absolute; top: 10px; right: 10px; z-index: 5; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(246, 245, 243, .92); color: var(--bp-ink); transition: background .4s var(--bp-fade), rotate .6s var(--bp-ease); }
.bp-x svg { width: 11px; height: 11px; }
.bp-x:hover { background: var(--bp-gold); rotate: 90deg; }
.bp-close { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: 12px; background: rgba(222, 219, 214, .62); font-family: var(--mono, ui-monospace, Menlo, monospace); font-size: 12px; letter-spacing: .02em; transition: background .45s var(--bp-fade); }
.bp-close svg { width: 9px; height: 9px; }
.bp-close:hover { background: var(--bp-gold); }

/* the gold composition; its pieces drift toward the pointer, two by two */
.bp-comp { display: block; overflow: visible; }
.bp-comp path { fill: var(--bp-gold); transition: translate .9s var(--bp-ease); }
.bp-comp path:nth-child(odd) { translate: calc(var(--lx, 0) * 14px) calc(var(--ly, 0) * 14px); }
.bp-comp path:nth-child(even) { translate: calc(var(--lx, 0) * -10px) calc(var(--ly, 0) * -10px); }

/* a plant printed over stone, as the site's offer panels are */
.bp-plant { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; mix-blend-mode: multiply; opacity: .9; filter: grayscale(1) contrast(1.05); }

/* words arriving, one after another */
@keyframes bp-rise { from { opacity: 0; translate: 0 14px; } }
.bp.is-in [data-rise] { animation: bp-rise .95s var(--bp-ease) both; animation-delay: calc(var(--d, 0) * 1s); }

html.bp-lock { overflow: hidden; }

/* swiped down, on a phone, it follows the finger */
.bp [data-bp-swipe] { transform: translateY(var(--sy, 0px)); }
.bp [data-bp-swipe].is-swiping { transition: none !important; }

/* ============================================================= the seed */
/* A card in the corner. It begins as the site's gold square, holds a beat,
   and opens into the card; the gold falls away from it as it does. */
.bp-seed { position: fixed; right: 24px; bottom: 24px; z-index: 55; width: 372px; max-width: calc(100vw - 32px); }
.bp-seed__in {
  position: relative; overflow: hidden;
  background: var(--bp-paper);
  box-shadow: 0 1px 0 rgba(25, 24, 24, .06), 0 30px 70px -28px rgba(25, 24, 24, .38);
  clip-path: inset(calc(100% - 14px) 0 0 calc(100% - 14px));
  transition: clip-path 1.05s var(--bp-ease) .28s, translate .5s var(--bp-ease);
}
.bp-seed__in::after { content: ""; position: absolute; inset: 0; z-index: 6; background: var(--bp-gold); pointer-events: none; transition: opacity .6s var(--bp-fade) .7s; }
.bp-seed.is-in .bp-seed__in { clip-path: inset(0 0 0 0); }
.bp-seed.is-in .bp-seed__in::after { opacity: 0; }
.bp-seed.is-out .bp-seed__in { clip-path: inset(calc(100% - 14px) 0 0 calc(100% - 14px)); transition: clip-path .6s var(--bp-fade); }
.bp-seed.is-out .bp-seed__in::after { opacity: 1; transition: opacity .25s var(--bp-fade); }

.bp-seed__plate { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bp-stone); }
/* under the pointer, the plant and the gold tilt inside a still frame, the
   gold further, so the plate has depth */
[data-bp-tilt] > .bp-plant { transform: perspective(800px) rotateX(var(--ry, 0deg)) rotateY(var(--rx, 0deg)) scale(1.08); transition: transform .9s var(--bp-ease); }
[data-bp-tilt] > .bp-comp, [data-bp-tilt] > .bp-guide__comp { transform: perspective(800px) rotateX(calc(var(--ry, 0deg) * 1.7)) rotateY(calc(var(--rx, 0deg) * 1.7)); transition: transform .9s var(--bp-ease); }
.bp-seed__comp { position: absolute; left: 50%; top: 50%; width: 46%; translate: -50% -52%; }
.bp-seed__facts { position: absolute; left: 16px; right: 56px; bottom: 12px; display: flex; gap: 1.2em; color: var(--bp-ink); }
.bp-seed__facts span { display: inline-flex; align-items: center; gap: .55em; }
.bp-seed__facts span + span::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--bp-ink); opacity: .5; }
.bp-seed__words { padding: 20px 22px 18px; }
.bp-seed__words > * + * { margin-top: .75rem; }
.bp-seed .bp-title { font-size: 36px; }
.bp-seed .bp-line { font-size: 14px; }
.bp-seed .bp-acts { margin-top: 1.1rem; }
.bp-seed .bp-x { top: 8px; right: 8px; }

/* ============================================================= the stay */
/* Over a veil, a dialog: on the left the composition on stone, opening out
   of its square, a light following the pointer across it; on the right a
   request for a call, and the way back. */
.bp-stay { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; }
.bp-veil { position: absolute; inset: 0; background: rgba(25, 24, 24, .34); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); opacity: 0; transition: opacity .7s var(--bp-fade); }
.bp-stay.is-in .bp-veil { opacity: 1; }
.bp-stay.is-out .bp-veil { opacity: 0; transition-duration: .45s; }
.bp-stay__box {
  position: relative; display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  width: min(920px, 100%); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow: hidden;
  background: var(--bp-paper);
  box-shadow: 0 40px 120px -40px rgba(25, 24, 24, .55);
  clip-path: inset(calc(50% - 9px) calc(50% - 9px) calc(50% - 9px) calc(50% - 9px));
  transition: clip-path 1.1s var(--bp-ease) .2s;
}
.bp-stay__box::after { content: ""; position: absolute; inset: 0; z-index: 6; background: var(--bp-gold); pointer-events: none; transition: opacity .6s var(--bp-fade) .62s; }
.bp-stay.is-in .bp-stay__box { clip-path: inset(0 0 0 0); }
.bp-stay.is-in .bp-stay__box::after { opacity: 0; }
.bp-stay.is-out .bp-stay__box { clip-path: inset(calc(50% - 9px) calc(50% - 9px) calc(50% - 9px) calc(50% - 9px)); transition: clip-path .55s var(--bp-fade); }
.bp-stay.is-out .bp-stay__box::after { opacity: 1; transition: opacity .2s var(--bp-fade); }
.bp-stay__box:focus { outline: none; }

.bp-stay__stage { --px: 50%; --py: 40%; position: relative; overflow: hidden; min-height: 460px; background: var(--bp-stone); }
.bp-stay__stage::before { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; background: radial-gradient(380px circle at var(--px) var(--py), rgba(255, 252, 240, .42), transparent 62%); transition: background .2s linear; }
.bp-stay__stage .bp-plant { opacity: .75; }
.bp-stay__comp { position: absolute; left: 50%; top: 42%; z-index: 1; width: 62%; translate: -50% -50%; }
.bp-stay__facts { position: absolute; left: 24px; right: 24px; bottom: 22px; z-index: 3; display: grid; gap: 0; border-top: 1px solid var(--bp-ink); }
.bp-stay__facts div { display: flex; justify-content: space-between; align-items: baseline; gap: 1em; padding: .62em 0; border-bottom: 1px solid rgba(25, 24, 24, .22); }
.bp-stay__facts dt { color: var(--bp-ink-2); }
.bp-stay__facts dd { font-family: var(--display, Georgia, serif); font-size: 22px; line-height: 1; }

.bp-stay__words { position: relative; display: flex; flex-direction: column; padding: 22px 30px 26px; overflow-y: auto; overscroll-behavior: contain; }
.bp-stay__top { display: flex; justify-content: space-between; align-items: center; gap: 1em; }
.bp-stay__ask { margin-top: clamp(18px, 5vh, 46px); }
.bp-stay .bp-title { font-size: clamp(40px, 4.4vw, 56px); }
.bp-stay .bp-line { margin-top: .8em; font-size: 16px; max-width: 30em; }

.bp-form { display: grid; gap: 16px; margin-top: 26px; }
.bp-field { display: grid; gap: 6px; }
.bp-field span { color: var(--bp-ink-2); }
.bp-field input {
  width: 100%; height: 44px; padding: 0; border: 0; border-bottom: 1px solid var(--bp-ink); border-radius: 0;
  background: transparent; font: inherit; font-size: 17px; color: var(--bp-ink); caret-color: var(--bp-gold);
  transition: border-color .4s var(--bp-fade), box-shadow .4s var(--bp-fade);
}
.bp-field input:focus { outline: none; border-color: var(--bp-gold); box-shadow: 0 1px 0 var(--bp-gold); }
.bp-field input[aria-invalid="true"] { border-color: #b3261e; box-shadow: 0 1px 0 #b3261e; }
.bp-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.bp-form .bp-go { justify-self: start; margin-top: 4px; }
.bp-state { min-height: 1.3em; font-size: 13px; line-height: 1.4; color: var(--bp-ink-2); }
.bp-state:has(+ .bp-fine):not(:empty)::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: .6em; vertical-align: .1em; background: var(--bp-gold); }
.bp-fine { font-size: 12px; line-height: 1.5; color: var(--bp-muted); }
.bp-or { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6em 1.2em; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--bp-line); }

.bp-done { margin-top: clamp(30px, 9vh, 90px); }
.bp-done:focus { outline: none; }
.bp-done > * + * { margin-top: .9rem; }
.bp-done .bp-go { margin-top: 1.6rem; }
/* the seal: the gold square turns into a disc, and a tick is drawn on it */
.bp-seal { position: relative; display: block; width: 46px; height: 46px; background: var(--bp-gold); animation: bp-seal 1.1s var(--bp-ease) both; }
.bp-seal i { position: absolute; left: 14px; top: 13px; width: 18px; height: 10px; border-left: 2px solid var(--bp-ink); border-bottom: 2px solid var(--bp-ink); rotate: -45deg; clip-path: inset(0 100% 0 0); animation: bp-tick .6s var(--bp-ease) .7s forwards; }
@keyframes bp-seal { from { scale: .3; border-radius: 0; rotate: -45deg; } 60% { border-radius: 50%; } to { scale: 1; border-radius: 50%; rotate: 0deg; } }
@keyframes bp-tick { to { clip-path: inset(0 0 0 0); } }

/* ============================================================= the note */
/* A margin note at the edge of the page: it slides in, a gold rule draws
   down its side, a stamp of the plant shows how much has been read. */
.bp-note {
  position: fixed; right: 0; top: 50%; z-index: 55; width: 344px;
  padding: 24px 28px 22px 34px;
  background: var(--bp-paper);
  box-shadow: 0 30px 80px -30px rgba(25, 24, 24, .4), 0 0 0 1px rgba(25, 24, 24, .05);
  translate: 104% -50%;
  transition: translate 1s var(--bp-ease);
}
.bp-note.is-in { translate: 0 -50%; }
.bp-note.is-out { translate: 104% -50%; transition-duration: .6s; }
.bp-note__rule { position: absolute; left: 0; top: 0; bottom: 0; width: 4px; overflow: hidden; }
.bp-note__rule i { display: block; width: 100%; height: 100%; background: var(--bp-gold); transform: scaleY(0); transform-origin: 50% 0; transition: transform 1.2s var(--bp-ease) .45s; }
.bp-note.is-in .bp-note__rule i { transform: none; }
.bp-note__stamp { position: relative; width: 92px; height: 92px; margin-bottom: 16px; overflow: hidden; background: var(--bp-stone); }
.bp-note__count { position: absolute; right: 8px; bottom: 2px; z-index: 2; font-family: var(--display, Georgia, serif); font-size: 46px; line-height: 1; color: var(--bp-ink); }
.bp-note__count::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 2px; background: var(--bp-gold); }
.bp-note[data-first] .bp-note__count { display: none; }
.bp-note > * + * { margin-top: .7rem; }
.bp-note .bp-title { font-size: 30px; }
.bp-note .bp-line { font-size: 14px; }
.bp-note .bp-acts { margin-top: 1.1rem; }

/* ============================================================= the guide */
/* Above the store's dock, a gold dot grows and the night capsule opens out
   of it, sideways, as the dock's own dot moves. */
.bp-guide { position: fixed; left: 50%; bottom: 84px; z-index: 55; width: min(560px, calc(100vw - 32px)); translate: -50% 0; }
.bp-guide__dot { position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--bp-gold); scale: 0; transition: scale .5s var(--bp-ease), opacity .4s var(--bp-fade) .7s; }
.bp-guide.is-in .bp-guide__dot { scale: 1; opacity: 0; }
.bp-guide__in {
  position: relative; display: grid; grid-template-columns: 96px minmax(0, 1fr); grid-template-rows: auto auto; align-items: start; gap: 14px 18px;
  padding: 14px 52px 16px 14px; border-radius: 26px;
  background: var(--bp-ink); color: var(--bp-mist);
  box-shadow: 0 30px 80px -30px rgba(25, 24, 24, .6);
  clip-path: inset(0 calc(50% - 6px) 0 calc(50% - 6px) round 26px);
  transition: clip-path 1s var(--bp-ease) .35s, translate .5s var(--bp-ease);
}
.bp-guide.is-in .bp-guide__in { clip-path: inset(0 0 0 0 round 26px); }
.bp-guide.is-out .bp-guide__in { clip-path: inset(0 calc(50% - 6px) 0 calc(50% - 6px) round 26px); transition: clip-path .55s var(--bp-fade); }
.bp-guide__art { grid-row: 1 / 3; display: grid; place-items: center; align-self: stretch; width: 96px; min-height: 96px; border-radius: 16px; background: #24231f; }
.bp-guide__comp { width: 72px; }
.bp-guide__words { padding-top: 4px; }
.bp-guide .bp-title { font-size: 28px; color: #fff; }
.bp-guide .bp-line { margin-top: .45em; font-size: 13.5px; color: rgba(246, 245, 243, .72); }
.bp-guide .bp-acts { gap: .6em 1.2em; }
.bp-guide .bp-go { background: var(--bp-gold); color: var(--bp-ink) !important; }
.bp-guide .bp-go::before { background: #fff; }
.bp-guide .bp-link { font-size: 13px; white-space: nowrap; color: var(--bp-mist); }
.bp-guide .bp-x { top: 10px; right: 10px; background: rgba(255, 255, 255, .1); color: #fff; }
.bp-guide .bp-x:hover { background: var(--bp-gold); color: var(--bp-ink); }

/* ============================================================= phones */
/* Each moment a sheet along the bottom, never covering the page whole; a
   grip says it can be swiped away, and it can. */
@media (max-width: 719px) {
  .bp-seed, .bp-note, .bp-guide { left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); top: auto; width: auto; max-width: none; translate: none; }
  .bp-seed__in, .bp-note, .bp-guide__in, .bp-stay__box { touch-action: pan-x; }
  .bp-seed__in::before, .bp-note::before, .bp-stay__box::before { content: ""; position: absolute; left: 50%; top: 7px; z-index: 7; width: 36px; height: 4px; margin-left: -18px; border-radius: 4px; background: rgba(25, 24, 24, .18); }
  .bp-seed__plate { display: none; }
  .bp-seed__words { padding: 22px 20px 14px; }
  .bp-seed .bp-kicker { padding-right: 40px; }
  .bp-seed .bp-title { font-size: 30px; }
  .bp-note { padding: 22px 20px 18px; translate: 0 115%; }
  .bp-note.is-in { translate: 0 0; }
  .bp-note.is-out { translate: 0 115%; }
  .bp-note__rule { left: 0; right: 0; top: 0; bottom: auto; width: auto; height: 4px; }
  .bp-note__rule i { transform: scaleX(0); transform-origin: 0 50%; }
  .bp-note__stamp { display: none; }
  .bp-note .bp-kicker, .bp-note .bp-title { padding-right: 46px; }
  .bp-note .bp-title { font-size: 26px; }
  .bp-guide { bottom: calc(70px + env(safe-area-inset-bottom, 0px)); }
  .bp-guide__in { grid-template-columns: 56px minmax(0, 1fr); gap: 12px 14px; padding: 12px 48px 14px 12px; border-radius: 22px; }
  .bp-guide__art { grid-row: auto; width: 56px; min-height: 0; height: 56px; border-radius: 12px; }
  .bp-guide__comp { width: 46px; }
  .bp-guide .bp-acts { grid-column: 1 / -1; }
  .bp-guide .bp-title { font-size: 22px; }
  .bp-stay { place-items: end stretch; padding: 0; }
  .bp-stay__box { grid-template-columns: 1fr; width: 100%; max-height: 88vh; max-height: 88dvh; clip-path: inset(100% 0 0 0); transition: clip-path .9s var(--bp-ease) .1s; }
  .bp-stay.is-out .bp-stay__box { clip-path: inset(100% 0 0 0); }
  .bp-stay__stage { min-height: 0; height: 96px; }
  .bp-stay__stage .bp-plant, .bp-stay__facts { display: none; }
  .bp-stay__comp { width: 92px; top: 50%; }
  .bp-stay__words { padding: 18px 20px calc(20px + env(safe-area-inset-bottom, 0px)); }
  .bp-stay__ask { margin-top: 14px; }
  .bp-stay .bp-title { font-size: 36px; }
  .bp-x { width: 44px; height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .bp-seed__in, .bp-stay__box, .bp-guide__in { clip-path: none !important; transition: opacity .3s linear !important; }
  .bp-seed__in::after, .bp-stay__box::after, .bp-guide__dot { display: none; }
  .bp-seed.is-out .bp-seed__in, .bp-stay.is-out .bp-stay__box, .bp-guide.is-out .bp-guide__in { opacity: 0; }
  .bp-note { transition: opacity .3s linear; }
  .bp.is-in [data-rise], .bp-seal, .bp-seal i { animation: none; }
  .bp-seal i { clip-path: none; }
  .bp-comp path, .bp-go { transition: none; translate: none; }
  [data-bp-tilt] > * { transition: none; transform: none; }
}
