/* The gift sits on a red sweep next to a warm paper order sheet. */
.builder {
  --paper: #fff5e3;
  --paper-line: #d7c3a9;
  --berry-ink: #68172c;
  background: radial-gradient(ellipse at 24% 54%, #ae3b51 0%, #94243d 32%, #801a32 58%, #601328 100%);
}
.builder-intro {
  padding-bottom: 0;
  border: 0;
  align-items: center;
}
.builder-intro h2 { margin: 0; }
.builder-intro > p { max-width: 22em; padding-left: 1.15rem; border-left: 1px solid #ebb5a7; }
.builder-grid { gap: clamp(24px, 3.5vw, 65px); grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.preview {
  border-top: 1px solid #ffdbbb66;
  border-bottom: 1px solid #ffdbbb66;
  padding: clamp(8px,1.3vw,20px) 0;
}
.preview-head { position: absolute; inset: .95rem .35rem auto; z-index: 4; }
.preview > .stage { margin: 0; height: clamp(280px, 31vw, 495px); }
.preview-caption {
  font: 400 clamp(1.05rem,1.5vw,1.45rem)/1.2 var(--serif);
  margin: .25rem auto .5rem;
}
.choice-sheet {
  color: #422626;
  background: var(--paper);
  border-radius: 6px;
  min-width: 0;
  padding: clamp(16px,2.1vw,36px);
  box-shadow: 0 15px 40px #37091536;
  scroll-margin-top: 18px;
}
.step-tabs {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  border-bottom: 1px solid var(--paper-line);
}
.step-tabs button {
  position: relative;
  padding: 2px 6px 12px;
  min-height: 41px;
  background: none;
  color: #795951;
  font-size: .94rem;
}
.step-tabs button[aria-selected="true"] { color: var(--berry-ink); font-weight: 700; }
.step-tabs button[aria-selected="true"]::after {
  content: "";
  position: absolute;
  height: 3px;
  background: var(--berry-ink);
  inset: auto 0 -1px;
}
.step-tabs button:hover { color: #6d1831; background: #e8d8c333; }
.choice-pane { margin: clamp(20px,2.2vw,34px) 0; }
.choice-pane h3 {
  color: var(--berry-ink);
  font: 400 clamp(1.9rem, 2.45vw, 2.75rem)/1 var(--serif);
  letter-spacing: -.045em;
  margin-bottom: 1rem;
}
.choice-pane h4 { font: 700 .95rem/1.35 var(--sans); margin: 1.4rem 0 .65rem; }
.choice-pane button { transition: background-color .15s, border-color .15s, color .15s; }
.choice-sheet :focus-visible { outline: 3px solid #ad730f; outline-offset: 2px; }
.choice-sheet #sizes { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .65rem; }
.box-card {
  position: relative;
  text-align: left;
  border-radius: 4px;
  border: 1px solid #d5c0a3;
  background: #f6e8d0;
  padding: clamp(8px,1.15vw,18px);
  color: #49282c;
}
.box-card[aria-pressed="true"] { background: #f5dfc4; border-color: var(--berry-ink); box-shadow: inset 0 0 0 1px var(--berry-ink); }
.box-card:hover { border-color: var(--berry-ink); }
.box-card[aria-pressed="true"]::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 100%;
  right: 7px;
  top: 7px;
  background: var(--berry-ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 8 2.5 2.5 5.2-5.3' fill='none' stroke='%23fff7e6' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain;
}
.box-photo { position: relative; display: block; height: clamp(54px, 5.7vw, 86px); place-items: center; margin-bottom: .6rem; }
.box-photo img { position: absolute; inset: 0; margin: auto; width: 79%; height: 100%; object-fit: contain; filter: drop-shadow(0 3px 2px #4e282933); }
.box-label { display: block; }
.box-label strong { display: block; font: 400 1.4rem/1.1 var(--serif); letter-spacing: -.035em; }
.box-label small { display: block; font-size: .78rem; margin-top: .13rem; }
#formats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 5px; }
.choice-sheet .format-button, .grind-option {
  background: transparent;
  border: 1px solid #c9b49b;
  color: #513335;
  font-size: .9rem;
  padding: .5rem .3rem;
  min-height: 42px;
  border-radius: 30px;
}
.choice-sheet .format-button[aria-pressed="true"], .grind-option[aria-pressed="true"] {
  background: var(--berry-ink);
  border-color: var(--berry-ink);
  color: #fff4e1;
  font-weight: 700;
}
.choice-sheet .format-button:hover, .grind-option:hover { border-color: var(--berry-ink); }
#bag-rows {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: .38rem;
}
.bag-picker { position: relative; min-width: 0; }
.bag-picker:focus-within,
.bag-picker:has(.bag-slot[aria-expanded="true"]) { z-index: 6; }
.bag-slot {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto .65rem;
  align-items: center;
  column-gap: .65rem;
  width: 100%;
  min-height: 3.55rem;
  padding: .38rem .8rem;
  border: 1px solid #cdb397;
  border-radius: 4px;
  background: #fff9ee;
  color: #49282c;
  text-align: left;
}
.bag-picker.is-active > .bag-slot[aria-expanded="false"] { border-color: #a37c69; }
.bag-slot:hover { border-color: #9c6a5a; }
.bag-slot[aria-expanded="true"] { border-color: var(--berry-ink); box-shadow: inset 0 0 0 1px var(--berry-ink); }
.bag-thumb, .coffee-pick-image { width: 1.65rem; height: auto; }
.bag-slot-copy, .coffee-pick-copy { display: grid; gap: .12rem; min-width: 0; }
.bag-slot-label, .bag-slot-grind, .coffee-pick-region {
  color: #6b4943;
  font-size: .75rem;
  line-height: 1.2;
}
.bag-slot-name, .coffee-pick-name {
  font-size: .94rem;
  line-height: 1.18;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.bag-slot-price {
  color: var(--berry-ink);
  font-size: .81rem;
  font-weight: 700;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.bag-slot-chevron {
  width: .47rem;
  height: .47rem;
  justify-self: center;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: translateY(-.1rem) rotate(45deg);
}
.bag-slot[aria-expanded="true"] .bag-slot-chevron { transform: translateY(.1rem) rotate(225deg); }
.bag-menu {
  position: absolute;
  z-index: 1;
  inset: calc(100% + .22rem) 0 auto;
  max-height: min(var(--bag-menu-height, 22rem), 22rem);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scroll-padding: .25rem;
  padding: .25rem;
  border: 1px solid #b5947e;
  border-radius: 5px;
  background: #fffaef;
  box-shadow: 0 7px 18px #3f142a30;
  scrollbar-color: #ac8b76 #f4e8d5;
}
.bag-picker.opens-up > .bag-menu { inset: auto 0 calc(100% + .22rem); }
.bag-menu[hidden] { display: none; }
.coffee-pick {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 1rem;
  align-items: center;
  column-gap: .62rem;
  width: 100%;
  min-height: 3rem;
  padding: .35rem .65rem;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: #49282c;
  text-align: left;
}
.coffee-pick-image { width: 1.35rem; }
.coffee-pick[aria-selected="true"] { background: #f3e5d1; color: var(--berry-ink); }
.coffee-pick[aria-selected="true"]::after {
  content: "";
  width: .4rem;
  height: .72rem;
  justify-self: center;
  border: solid var(--berry-ink);
  border-width: 0 2px 2px 0;
  transform: translateY(-.08rem) rotate(45deg);
}
@media (hover: hover) {
  .coffee-pick:hover { background: #f6e8d8; }
}
.coffee-pick.is-highlighted, .coffee-pick:focus-visible {
  outline: 2px solid var(--berry-ink);
  outline-offset: -2px;
  background: #f7e8d7;
}
.grind-head { display: flex; margin-top: 1.3rem; padding-top: 1rem; border-top: 1px solid var(--paper-line); align-items: center; justify-content: space-between; gap: .5rem; }
.grind-head h4 { margin: 0; }
.switch-link, .note-action { display: flex; align-items: center; gap: .45rem; color: var(--berry-ink); }
.switch-link { font-size: .8rem; padding: 8px 0; background: none; }
.switch-mark { display: inline-block; flex: none; position: relative; width: 28px; height: 16px; border: 1px solid #9c7d70; border-radius: 100px; }
.switch-mark::after { content: ""; position: absolute; left: 3px; top: 2px; width: 10px; height: 10px; border-radius: 50%; background: #967666; }
[aria-pressed="true"] > .switch-mark { background: var(--berry-ink); border-color: var(--berry-ink); }
[aria-pressed="true"] > .switch-mark::after { left: 13px; background: var(--paper); }
#grind-scope { font-size: .77rem; color: #6a4c43; margin: .15rem 0 .55rem; }
#grind, #grind-individual { display: flex; flex-wrap: wrap; gap: .28rem; }
.grind-option { min-height: 37px; padding: .4rem .67rem; font-size: .8rem; }
.pane-copy { color: #674b45; font-size: .96rem; line-height: 1.5; max-width: 30em; margin-bottom: 1.1rem; }
.note-action { width: 100%; text-align: left; background: #f6e6cc; border: 1px solid #c4a78b; border-radius: 4px; padding: 1rem; font-size: .98rem; }
.note-action .switch-mark { margin-left: auto; }
#note-fields { margin-top: 1.1rem; }
#note-fields > label { display: block; color: #5a3134; font-size: .86rem; }
#note-text {
  width: 100%; margin-top: .4rem; display: block; min-height: 7rem; resize: vertical;
  padding: 1rem; background: #fff9ee; color: var(--ink); border: 1px solid #cdb79c; border-radius: 3px;
  font: italic 1.2rem/1.4 var(--serif);
}
#note-count { color: #70574b; }
.order-slip { position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px dashed #b49b83; padding-top: 1.05rem; }
.price-copy > span, .price-copy small { display: block; font-size: .79rem; }
.price-copy strong { font: 400 clamp(1.75rem,2.2vw,2.5rem)/1.15 var(--serif); color: var(--berry-ink); letter-spacing: -.04em; }
.price-copy s { font-size: .85rem; margin-left: .5rem; color: #786351; }
.price-copy small { color: #5f423b; margin-top: .15rem; }
.step-actions { display: flex; align-items: center; flex-direction: column; gap: 3px; }
.next-step, .choice-sheet[data-current-step="message"] #review {
  display: inline-flex; align-items: center; justify-content: center; gap: .7rem;
  background: var(--berry-ink); color: #fff2dd; border-radius: 28px;
  padding: .72rem 1.15rem; min-height: 44px; font-size: .93rem; font-weight: 700; text-decoration: none;
}
.next-step:hover, .choice-sheet[data-current-step="message"] #review:hover { background: #8a263e; }
.next-step span { font-size: 1.1em; }
#review { color: var(--berry-ink); background: transparent; padding: .35rem .5rem; text-decoration: underline; text-underline-offset: .2em; font-size: .8rem; }
.roasting { background: #f8eddb; color: var(--ink); padding: clamp(58px,7vw,110px) 0; }
.roast-grid { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(0,1fr); gap: clamp(44px,7vw,130px); align-items: center; }
.roast-images { position: relative; padding: 0 9% 12% 0; }
.roaster-photo { width: 100%; aspect-ratio: 1.34; height: auto; object-fit: cover; }
.packing-photo { position: absolute; width: 41%; right: 0; bottom: 0; aspect-ratio: 1.55; height: auto; object-fit: cover; border: clamp(4px,.5vw,9px) solid #fbf0de; transform: rotate(3deg); }
.roast-copy h2, .voices h2 { font: 400 clamp(2.6rem,4.35vw,5rem)/.97 var(--serif); letter-spacing: -.055em; color: var(--wine); }
.process-list { list-style: none; padding: 0; margin: clamp(18px,2.5vw,38px) 0 0; counter-reset: roast; }
.process-list li { display: grid; grid-template-columns: 2.25rem 1fr; gap: .45rem; counter-increment: roast; border-top: 1px solid #d4bba0; padding: .85rem 0; }
.process-list li::before { content: "0" counter(roast); color: #916b4d; font: italic 1.35rem/1.2 var(--serif); }
.process-list h3 { font: 400 1.4rem/1.1 var(--serif); margin-bottom: .25rem; }
.process-list p { max-width: 41ch; color: #5f4840; font-size: .94rem; line-height: 1.45; }
.voices { padding: clamp(50px,5vw,82px) 0; color: #fff3e3; background: #5b1628; }
.voices-grid { display: grid; grid-template-columns: 1.05fr 1fr .95fr; align-items: start; gap: clamp(26px,4vw,82px); }
.voices h2 { color: #fff3e3; font-size: clamp(2.3rem,3.8vw,4.5rem); margin-bottom: 1rem; }
.source-link { color: #ffddad; border-bottom: 1px solid #d19b77; padding-bottom: .18rem; font-size: .85rem; }
.reader-quote { border-left: 1px solid #e8b99a66; padding-left: clamp(18px,2.5vw,42px); }
.review-stars { color: #f4c679; letter-spacing: .16em; font: .9rem/1.4 Arial,sans-serif; }
.reader-quote blockquote { margin: .55rem 0 1rem; font: 400 clamp(1.4rem,2.05vw,2.45rem)/1.13 var(--serif); letter-spacing: -.025em; }
.reader-quote figcaption { font-size: .81rem; color: #f4d0b8; }
@media (min-width: 1600px) { .preview > .stage { height: 485px; } }
@media (min-width: 701px) and (max-width: 980px) {
  .builder-grid { grid-template-columns: minmax(0,.88fr) minmax(0,1fr); gap: 18px; }
  .choice-sheet { padding: 15px; }
  .roast-grid { gap: 33px; }
  .step-actions { align-items: start; }
}
@media (max-width: 700px) {
  .builder-intro > p { padding: 0; border: 0; max-width: 28em; }
  .builder-grid { margin-top: 0; }
  .preview { margin: 0; padding: 4px 6px 7px; background: radial-gradient(ellipse at 32% 54%,#a7334c,#781a32); border: 0; border-radius: 6px 6px 0 0; box-shadow: none; }
  .preview-caption { margin: .1rem auto 0; font-size: .93rem; }
  .preview-head { top: .65rem; right: .6rem; left: auto; }
  .choice-sheet { border-radius: 0 0 6px 6px; padding: 15px; scroll-margin-top: calc(clamp(150px,23vh,240px) + 32px); }
  .choice-pane { margin: 19px 0; }
  .box-card { padding: 10px; }
  .choice-pane h4 { margin: 1.05rem 0 .56rem; }
  .grind-head h4 { margin: 0; }
  .bag-slot { column-gap: .5rem; padding-inline: .65rem; }
  .order-slip { gap: 8px; }
  .roast-grid { display: flex; flex-direction: column; gap: 1.65rem; align-items: stretch; }
  .roast-images { max-width: 540px; width: 100%; padding: 0 7% 6% 0; }
  .roaster-photo { aspect-ratio: 1.65; }
  .packing-photo { width: 32%; }
  .process-list p { max-width: 53ch; }
  .voices-grid { grid-template-columns: 1fr; gap: 1.6rem; }
  .voices h2 br { display: none; }
  .reader-quote { padding-left: 17px; }
}
@media (max-width: 355px) {
  .choice-sheet { padding: 12px; }
  .bag-slot { column-gap: .4rem; padding-inline: .5rem; }
  .bag-slot-price { font-size: .76rem; }
  .next-step, .choice-sheet[data-current-step="message"] #review { padding: .6rem .8rem; font-size: .83rem; }
}
@media (max-width: 850px) and (max-height: 550px) { .choice-sheet { scroll-margin-top: .5rem; } }

/* The catalog photographs have a white studio surround. Frame the approved bags
   at their original proportions on the gift-box scene and in its selectors. */
.gift-packshot { display: block; position: relative; overflow: hidden; aspect-ratio: 529 / 827; }
.gift-pouch > .gift-packshot { width: 100%; }
.gift-packshot > img { display: block; width: 100%; height: 100%; object-fit: contain; }
.gift-packshot-framed { clip-path: polygon(11.2% 0.0%, 9.1% 0.8%, 8.1% 2.1%, 7.9% 6.0%, 9.3% 6.3%, 9.6% 6.8%, 7.9% 7.3%, 7.8% 14.5%, 3.6% 49.5%, 0.8% 93.1%, 0.0% 94.4%, 1.7% 94.7%, 0.9% 94.9%, 14.2% 99.9%, 19.7% 99.9%, 96.4% 98.2%, 98.7% 97.8%, 99.2% 97.2%, 97.9% 94.4%, 97.9% 92.9%, 99.6% 71.3%, 99.8% 50.3%, 98.9% 39.7%, 94.3% 7.6%, 92.8% 7.0%, 94.1% 6.4%, 93.8% 2.2%, 92.2% 1.0%, 90.5% 0.5%, 37.2% 0.0%); }
.gift-packshot.gift-packshot-framed > img {
  position: absolute; max-width: none; width: 237.051%; height: 151.632%;
  left: -66.352%; top: -24.667%; object-fit: fill;
}
.no-box-photos .gift-packshot { width: 22px; height: 35px; }
.no-box-photos .gift-packshot + .gift-packshot { margin-left: -2px; }
