/* ==========================================================================
   The Dessert Bar (js/pages/desserts.js): the menu card and one dessert.
   A printed menu card laid on the notebook; each dessert page ends in a
   food-style label with Yashi's "allergen declaration" and the rest.
   ========================================================================== */

/* ------------------------------------------------------------- the menu */
.db-page { padding: clamp(30px, 6vw, 70px) 0 clamp(70px, 10vw, 130px); }
.db-menu {
  position: relative; z-index: 1; width: min(1040px, calc(100% - 24px)); margin: 0 auto;
  background: #FFFEFA; border: 2px solid var(--ink); box-shadow: 6px 6px 0 var(--ink);
  padding: clamp(34px, 6vw, 68px) clamp(18px, 5.4vw, 70px) clamp(30px, 5vw, 56px);
}
.db-menu::before { content: ""; position: absolute; inset: 7px; border: 1px solid var(--ink); opacity: .5; pointer-events: none; }   /* the inner rule a printed menu has */
.db-menu::after { content: ""; position: absolute; top: -13px; left: 50%; width: 112px; height: 26px; transform: translateX(-50%) rotate(-2.5deg); background: rgba(245, 225, 74, .62); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); pointer-events: none; }

.db-mast { display: grid; justify-items: center; text-align: center; }
.db-kick { margin: 0; font-size: 12px; font-weight: 700; font-variation-settings: "wdth" 80; letter-spacing: .34em; text-transform: uppercase; color: var(--margin); padding-left: .34em; }
.db-title { margin: 12px 0 14px; font-weight: 900; font-variation-settings: "wdth" 118; font-size: clamp(54px, 12.4vw, 150px); line-height: .84; letter-spacing: -.045em; color: var(--ink); }
.db-sub { margin: 0; max-width: 34ch; font-style: italic; font-size: clamp(16.5px, 1.9vw, 19.5px); line-height: 1.45; color: var(--ink-2); text-wrap: balance; }
.db-orn { display: flex; align-items: center; gap: 14px; width: min(300px, 72%); margin-top: 22px; color: var(--klein); }
.db-orn i { flex: 1; height: 1.5px; background: currentColor; opacity: .45; }
.db-orn .logo { width: 24px; height: 24px; flex: none; }

.db-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: clamp(24px, 4vw, 38px) 0 0; }
.db-chips .chip { background: transparent; }
.db-chips .chip[aria-pressed="true"] { background: var(--ink); }
.db-chips .chip .x { font-family: var(--f-mono); font-size: 11px; font-weight: 500; opacity: .55; margin-left: 2px; }

/* sections: a rule, the label, a rule */
.db-sec { margin-top: clamp(34px, 5vw, 58px); }
.db-sec-h { display: flex; align-items: center; gap: 14px; margin-bottom: clamp(12px, 2vw, 22px); }
.db-sec-h::before, .db-sec-h::after { content: ""; flex: 1; border-top: 1.5px solid var(--ink); }
.db-sec-h h2 { margin: 0; font-weight: 800; font-variation-settings: "wdth" 118; font-size: clamp(19px, 2.5vw, 27px); line-height: 1; letter-spacing: .16em; text-transform: uppercase; padding-left: .16em; }

.db-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px clamp(30px, 5vw, 56px); }
@media (min-width: 860px) { .db-items { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.db-item { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; align-items: start; margin: 0 -8px; padding: 10px 8px; text-decoration: none; color: var(--ink); border-radius: 2px; transition: background .25s; }
@media (min-width: 900px) { .db-item { grid-template-columns: 132px minmax(0, 1fr); gap: 20px; } }
.db-item:hover { background: color-mix(in srgb, var(--hi) 22%, transparent); }
.db-ph { display: block; position: relative; aspect-ratio: 4 / 5; overflow: hidden; border: 1.5px solid var(--ink); background: var(--paper-2); }
.db-ph img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.22); transition: transform .7s var(--ease); }   /* closer to the saucer */
.db-item:hover .db-ph img, .db-tile:hover .db-ph img { transform: scale(1.34); }
.db-tx { display: grid; gap: 7px; padding-top: 3px; min-width: 0; }
.db-line { display: flex; align-items: baseline; align-items: last baseline; gap: 8px; }   /* a wrapped name keeps its price on its last line */
.db-nm { font-weight: 800; font-variation-settings: "wdth" 104; font-size: clamp(17px, 1.7vw, 20px); line-height: 1.15; letter-spacing: -.01em; }
.db-item:hover .db-nm { color: var(--klein); }
.db-dots { flex: 1 1 16px; min-width: 16px; border-bottom: 2px dotted var(--ink-3); transform: translateY(-4px); }
.db-pr { flex: none; font-family: var(--f-mono); font-size: 14px; letter-spacing: -.01em; white-space: nowrap; }
@media (max-width: 359px) {   /* the smallest phones: no room for a leader, the price goes under the name */
  .db-line { flex-wrap: wrap; row-gap: 3px; }
  .db-dots { display: none; }
  .db-pr { flex-basis: 100%; }
}
.db-ds { font-style: italic; font-size: 15px; line-height: 1.42; color: var(--ink-2); }
.db-only { font-family: var(--f-hand); font-size: 15.5px; line-height: 1.2; color: var(--margin); }
.db-item.out .db-ph img, .db-tile.out .db-ph img { filter: grayscale(1) contrast(.9); opacity: .7; }
.db-item.out .db-pr, .db-tile.out .mono { color: var(--margin); }

.db-empty { margin-top: 34px; text-align: center; color: var(--ink-2); }
.db-empty .hand { font-size: 27px; margin: 0 0 6px; }
.db-empty p { margin: 0; }

.db-foot { display: grid; justify-items: center; gap: 12px; margin-top: clamp(38px, 6vw, 64px); padding-top: 28px; border-top: 1.5px solid var(--ink); text-align: center; }
.db-q { margin: 0; font-family: var(--f-hand); font-size: 23px; line-height: 1.2; color: var(--klein); }
.db-foot .btn svg, .db-info .btn svg { width: 20px; height: 20px; flex: none; }
.db-mains { margin: 10px 0 0; }
.db-mains a { font-size: 12px; font-weight: 700; font-variation-settings: "wdth" 82; letter-spacing: .13em; text-transform: uppercase; color: var(--ink-2); text-decoration: none; }
.db-mains a:hover { color: var(--klein); text-decoration: underline; text-underline-offset: 4px; }

/* ----------------------------------------------------------- one dessert */
.db-pdp .info .db-name { font-size: clamp(42px, 6.6vw, 80px); text-transform: none; letter-spacing: -.035em; margin: 8px 0 12px; }
.db-vary { margin: 6px 0 0; font-size: 13.5px; color: var(--ink-2); }
.db-desc { margin: 16px 0 0; max-width: 44ch; font-size: clamp(17px, 1.9vw, 19.5px); line-height: 1.5; color: var(--ink-2); }
.db-why-h { margin-top: 24px; }
.db-why { margin-top: 8px; }
.db-fits { margin: 22px 0 4px; padding: 12px 14px 13px; border: 2px solid var(--margin); background: color-mix(in srgb, var(--margin) 6%, #fff); box-shadow: 4px 4px 0 var(--margin); }
.db-fits-h { margin: 0 0 5px; font-size: 13px; font-weight: 800; font-variation-settings: "wdth" 96; letter-spacing: .1em; text-transform: uppercase; color: var(--margin); }
.db-fits p:last-child { margin: 0; font-size: 14.5px; line-height: 1.45; color: var(--ink); }
.db-sold { display: inline-block; margin-left: 14px; padding: 4px 9px 3px; border: 2px solid var(--margin); border-radius: 3px; font-family: var(--f-mono); font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--margin); vertical-align: 4px; transform: rotate(-2deg); }   /* stamped on the price */
.db-info .buybar { margin-top: 20px; }
@media (min-width: 980px) {
  .db-pdp .info { position: static; }
  .db-pdp .gallery { position: sticky; top: calc(var(--hdr) + 20px); }
  /* while it sticks, the whole gallery (thumbnails too) stays on screen: a short laptop
     screen gets a slightly wider crop of the saucer instead of a photo cut off at the bottom */
  .db-pdp .gallery .slide { justify-self: stretch; max-height: max(380px, calc(100vh - var(--hdr) - 44px)); }
  .db-pdp .gallery.many .slide { max-height: max(340px, calc(100vh - var(--hdr) - 136px)); }
}
/* look closer: charms are small on their saucers. Click or tap where you want to look. */
.db-gallery .slide { overflow: hidden; }
.db-gallery .slide img { transition: transform .45s var(--ease); }
.db-gallery .slide img.db-zoomed { transform: scale(2.3); cursor: zoom-out; }
.db-gallery .zoom[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
@media (prefers-reduced-motion: reduce) { .db-ph img, .db-gallery .slide img { transition: none; } }   /* the close-up just appears */

/* the label: "Dessert facts", ruled like the back of a packet */
.db-label { margin-top: 36px; max-width: 460px; padding: 12px 14px 6px; background: #fff; border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); color: var(--ink); }
.db-label-h { margin: 0; font-weight: 900; font-variation-settings: "wdth" 64; font-size: clamp(38px, 5vw, 46px); line-height: .9; letter-spacing: -.012em; }
.db-label-sub { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 6px 0 0; padding-bottom: 7px; border-bottom: 10px solid var(--ink); font-size: 13.5px; font-weight: 600; }
.db-label-sub .mono { font-size: 12px; font-weight: 400; color: var(--ink-3); }
.db-grp { margin: 0; }
.db-grp + .db-grp { border-top: 5px solid var(--ink); }
.db-fact { padding: 7px 0 8px; border-top: 1px solid var(--ink); }
.db-grp .db-fact:first-child { border-top: 0; }
.db-fact dt { font-size: 14px; font-weight: 800; font-variation-settings: "wdth" 92; }
.db-fact dd { margin: 2px 0 0; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.db-fact.short { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; }
.db-fact.short dd { margin: 0; text-align: right; font-weight: 600; color: var(--ink); }
.db-fact[data-k="allergens"] dd { font-weight: 600; color: var(--ink); }

/* more from the same section */
.sec.db-more { padding: clamp(36px, 6vw, 70px) 0 clamp(70px, 9vw, 110px); }
.db-more .rail { scroll-padding-inline: var(--pad); }   /* snap to the padding, not the screen edge */
.db-more .display.s { margin: 10px 0 8px; }
.db-more .wrap:last-child { margin-top: 10px; }
.db-tile { display: grid; gap: 8px; text-decoration: none; color: var(--ink); }
.db-tile .db-ph img { transform: scale(1.16); }
.db-tl { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.db-tl b { font-weight: 800; font-variation-settings: "wdth" 104; font-size: 15.5px; line-height: 1.15; }
.db-tile:hover .db-tl b { color: var(--klein); }
.db-tl .mono { font-size: 13px; white-space: nowrap; }
.db-back { padding-block: 0 90px; }
.db-missing { padding-block: 60px 120px; }
.db-missing h1 { margin: 12px 0; }
.db-missing .hand { font-size: 24px; margin: 0; }
.db-missing .row { margin-top: 24px; }
