/* pirekua — Reserve page (/reserve/). Loaded after styles.css, which supplies the
   tokens, buttons, fields, dialogs, toggle and footer. Clean and fast: no motion
   here except the confetti on a confirmed reservation and the summary sheet. */

.rpage {
  /* tuning knobs */
  --r-max: 1200px;                         /* page width (gift box and jar cards) */
  --r-read: 720px;                         /* reading width ("What reserving means" and the form) */
  --r-gap: clamp(28px, 4vw, 56px);         /* space between sections */
  --r-radius: clamp(22px, 2.6vw, 30px);    /* panel corners */
  --stepper-size: 48px;                    /* − and + buttons (48px minimum touch target) */
  --basket-size: 60px;                     /* the round basket button */
  --basket-icon: 46px;                     /* basket.png width inside it */
  --basket-under: 8px;                     /* gap under the language toggle */
  --basket-top-min: 12px;                  /* where it settles once the header has scrolled away */
  --sheet-w: 420px;                        /* overlay panel width (640px and up) */
}


/* Section headings are smaller here than on the home page, so the gift box leads */
.reserve .section-title { font-size: clamp(1.75rem, 1.25rem + 2vw, 2.75rem); max-width: none; }

/* ============ HEADER ============ */
.rhead {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: var(--r-max);
  margin: 0 auto;
  padding: 12px var(--gutter);
}
.rhead__home { display: block; flex: 0 0 auto; border-radius: 8px; }
.rhead__home { --rh-logo: clamp(96px, 20vw, 156px); }   /* width of the lockup art */
/* lockup-primary.png (3168 × 1482, Oct 2026) has a 64px transparent margin: scale it by
   33/32 and pull the margin out, so the art keeps the size and place it had */
.rhead__home img { width: calc(var(--rh-logo) * 1.03125); max-width: none; height: auto; margin: calc(var(--rh-logo) * -0.015625); }
.rhead__home .asset-ph { width: var(--rh-logo) !important; aspect-ratio: 1536 / 693 !important; }
/* Very narrow phones: a little smaller, so lockup, link and toggle fit on one row */
@media (max-width: 359.98px) {
  .rhead { gap: 6px; }
  .rhead__home { --rh-logo: 72px; }
  .rhead__back { font-size: 0.8125rem; }
}
.rhead__back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-left: auto;
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
  white-space: nowrap;
}

/* ============ LAYOUT ============ */
/* One full-width column. The top padding leaves room for the basket button
   under the toggle, so at the top of the page it never sits on the gift box. */
.reserve__layout {
  max-width: var(--r-max);
  margin: 0 auto;
  padding: calc(var(--basket-size) + 2px) var(--gutter) var(--r-gap);
}
.reserve__main, .reserve__shop { display: grid; gap: var(--r-gap); min-width: 0; }
/* Reading width for the copy block and the form */
.means, .rform { width: 100%; max-width: var(--r-read); margin-inline: auto; }

/* ============ THE HOLIDAY GIFT BOX ============ */
.gift {
  display: grid;
  gap: clamp(20px, 3vw, 36px);
  padding: clamp(18px, 3vw, 36px);
  border-radius: var(--r-radius);
  background: var(--card);
}
@media (min-width: 768px) {
  .gift { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: center; }
}
.gift__art {
  position: relative;
  display: grid;
  border-radius: calc(var(--r-radius) - 8px);
  background: var(--cream);
  overflow: hidden;
}
.gift__img { width: 100%; height: auto; }
/* "Mockup" label: the gift box art is a 3D mockup, not a photo. Shows only once the art has loaded */
.gift__mockup {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  padding: 3px 10px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--cream);
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.02em;
  pointer-events: none;
}
.gift__art:not(.has-box) .gift__mockup { display: none; }
/* If assets/gift-box.jpg is missing: the labeled placeholder, with the three jars standing in it */
.gift__art .asset-ph {
  grid-area: 1 / 1;
  width: 100% !important;
  align-items: flex-start;
  padding-top: 14px;
  border-radius: inherit;
}
.gift__jars {
  grid-area: 1 / 1;
  align-self: end;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4%;
  padding: 0 10% 7%;
  pointer-events: none;
}
.gift__jars img { width: 28%; height: auto; }
.gift__art.has-box .gift__jars { display: none; }

.gift__body { display: grid; gap: 14px; min-width: 0; }
.gift__eyebrow {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
/* The biggest type on the page */
.gift__name {
  margin: 0;
  font-weight: 800;
  font-size: clamp(2.5rem, 1.55rem + 3.6vw, 4.25rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.gift__desc { margin: 0; font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem); font-weight: 500; line-height: 1.6; }
.gift__inside-title { margin: 4px 0 0; font-size: 1.0625rem; font-weight: 800; }
.gift__inside {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-weight: 600;
  line-height: 1.4;
}
.gift__inside li { position: relative; padding-left: 30px; }
/* checklist tick (a UI mark, not brand art) */
.gift__inside li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.32em;
  width: 7px;
  height: 13px;
  border: solid var(--ink);
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}
.gift__bulk {
  margin: 0;
  padding: 12px 16px;
  border-radius: 16px;
  background: var(--yellow);
  font-weight: 600;
  line-height: 1.5;
}

/* ============ QUANTITY STEPPER (all five products) ============ */
.qty { display: grid; gap: 6px; justify-items: start; }
.qty__label { font-size: 0.95rem; font-weight: 700; }
.qty--gift { margin-top: 4px; }
.qty--gift .qty__label { font-size: 1.0625rem; font-weight: 800; }
.stepper {
  display: inline-flex;
  align-items: center;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--cream);
  color: var(--ink);
}
.stepper__btn {
  display: grid;
  place-items: center;
  width: var(--stepper-size);
  height: var(--stepper-size);
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.stepper__btn:focus-visible { outline-offset: -3px; }
.stepper__btn:disabled { cursor: default; opacity: 0.4; }
.stepper__input {
  width: 4ch;
  min-width: 52px;
  height: var(--stepper-size);
  padding: 0;
  border: 0;
  border-left: 2px solid var(--ink);
  border-right: 2px solid var(--ink);
  border-radius: 0;
  background: var(--card);
  color: var(--ink);
  font: 800 1.125rem/1 var(--sans);
  text-align: center;
  -moz-appearance: textfield;
}
.stepper__input::-webkit-outer-spin-button,
.stepper__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper__input:focus { outline: 3px solid var(--orange); outline-offset: 2px; }
.qty--gift .stepper { --stepper-size: 56px; }
.qty--gift .stepper__input { font-size: 1.375rem; min-width: 64px; }

.price { margin: 0; font-weight: 800; font-size: 1.125rem; line-height: 1.25; white-space: nowrap; }
.price--big { font-size: 1.5rem; }
/* "est." after every price: small, ink, never the focus */
.price__est { margin-left: 0.3em; font-size: 0.8125rem; font-weight: 600; }
.price--big .price__est { font-size: 0.9375rem; }
.gift__name + .price { margin-top: -4px; }   /* the gift box price sits with its name, a size below it */

/* ============ SINGLE JARS ============ */
.jars { display: grid; gap: clamp(14px, 2vw, 22px); }
.jars__grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }

.rcard {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);   /* phones: jar beside the text */
  gap: 14px;
  padding: 12px;
  border-radius: 24px;
  background: var(--yellow);
  color: var(--ink);
}
.rcard--sweet { background: var(--yellow); }
.rcard--smoky { background: var(--orange); }
.rcard--spicy { background: var(--red); color: var(--cream); }
.rcard--oil   { background: var(--ink); color: var(--cream); }
.rcard__window {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 150px;
  padding: 10px 8px 6px;
  border-radius: 16px;
  background: var(--card);
}
.rcard__window img { width: auto; max-width: 100%; height: 134px; object-fit: contain; object-position: 50% 100%; }
@media (max-width: 639.98px) { .rcard__window { align-items: center; } }
.rcard__window .asset-ph { width: 100% !important; align-self: stretch; }
.rcard__body { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; padding: 4px 2px; }
.rcard__name { margin: 0; font-weight: 800; font-size: clamp(1.5rem, 1.25rem + 0.6vw, 1.75rem); line-height: 1.05; letter-spacing: -0.02em; }
.rcard__tag { margin: 0; font-weight: 700; font-size: 0.9375rem; line-height: 1.35; }
.rcard .qty { margin-top: auto; padding-top: 4px; }
.heat--inline { position: static; color: var(--ink); }

@media (min-width: 640px) {
  .jars__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rcard { grid-template-columns: minmax(0, 1fr); }
  .rcard__window { min-height: 200px; }
  .rcard__window img { height: 184px; }
}
/* Four in a row from 1024px */
@media (min-width: 1024px) {
  .jars__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .rcard__window { min-height: 180px; }
  .rcard__window img { height: 164px; }
}

/* ============ WHAT RESERVING MEANS ============ */
.means {
  display: grid;
  gap: 12px;
  padding: clamp(22px, 3.4vw, 40px);
  border-radius: var(--r-radius);
  background: var(--card);
}
.means .section-title { margin-bottom: 4px; }
.means p { max-width: 62ch; margin: 0; font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem); font-weight: 500; line-height: 1.65; }

/* ============ BASKET BUTTON (your reservation) ============ */
/* Pinned top right, under the language toggle (reserve.js sets top/right from the
   toggle and eases it up to --basket-top-min as the header scrolls away). Same
   look as the toggle: Cream Card, 2px Mole Ink border, red offset shadow. */
.basket-btn {
  position: fixed;
  z-index: 55;
  top: calc(76px + env(safe-area-inset-top, 0px));
  right: max(var(--gutter), env(safe-area-inset-right, 0px));
  display: grid;
  place-items: center;
  width: var(--basket-size);
  height: var(--basket-size);
  padding: 0;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--card);
  box-shadow: 3px 4px 0 var(--red);
  color: var(--ink);
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, opacity 160ms ease, visibility 160ms;
}
.basket-btn:hover { transform: translate(-1px, -2px); box-shadow: 4px 6px 0 var(--red); }
.basket-btn:active { transform: translate(2px, 3px); box-shadow: 1px 1px 0 var(--red); }
.basket-btn:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; border-radius: 999px; }
.basket-btn__icon { display: grid; place-items: center; width: var(--basket-icon); }
.basket-btn__icon img { width: 100%; height: auto; }
.basket-btn__icon .asset-ph { width: var(--basket-icon) !important; min-width: 0; min-height: 0; padding: 2px; font-size: 7px; }
/* Item count: Deep Chili Red with a Warm Cream bold number */
.basket-btn__badge {
  position: absolute;
  top: -6px;
  left: -6px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border: 2px solid var(--cream);
  border-radius: 999px;
  background: var(--red);
  color: var(--cream);
  font: 800 0.75rem/18px var(--sans);
  text-align: center;
}
.basket-btn__badge[hidden] { display: none; }
/* Reduced motion: no bump, a static highlight instead */
.basket-btn.is-flash { box-shadow: 3px 4px 0 var(--red), 0 0 0 4px var(--orange); }
/* Desktop only: a small "Your reservation" chip to the left on hover and focus */
.basket-btn__chip {
  position: absolute;
  right: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  padding: 6px 12px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font: 700 0.8125rem/1.2 var(--sans);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 140ms ease, visibility 140ms;
}
@media (hover: hover) and (pointer: fine) and (min-width: 1024px) {
  .basket-btn:hover .basket-btn__chip,
  .basket-btn:focus-visible .basket-btn__chip { opacity: 1; visibility: visible; }
}
/* Stepped out of the way of a form field being typed into (phones) */
.basket-btn.is-ducked { opacity: 0; visibility: hidden; pointer-events: none; }

/* The flying copy of a product ("add to basket"); reserve.js animates it */
.fly {
  position: fixed;
  z-index: 70;
  left: 0;
  top: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
  will-change: transform, opacity;
}
.fly img { display: block; height: 100%; width: auto; }
.fly--cluster img { margin: 0 -4px; }

/* ============ YOUR RESERVATION (overlay) ============ */
.summary__title { margin: 0; font-weight: 800; font-size: 1.5rem; line-height: 1.1; letter-spacing: -0.02em; }
.summary__title:focus { outline: none; }
.summary__lines { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.summary__line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 10px;
  padding: 10px 0;
  border-bottom: 2px solid var(--card);
}
.summary__name { font-weight: 700; line-height: 1.3; }
.summary__amount { font-weight: 800; white-space: nowrap; }
.summary__remove { justify-self: start; min-height: 32px; font-size: 0.875rem; font-weight: 600; }
.summary__empty, .summary__total, .summary__mixing, .summary__price, .summary__nopay { margin: 12px 0 0; line-height: 1.5; }
.summary__empty { font-weight: 600; }
.summary__total { font-weight: 600; font-size: 0.95rem; }
.summary__mixing { margin-top: 4px; font-weight: 600; font-size: 0.95rem; }
.summary__price { font-weight: 800; font-size: 1.125rem; }
.summary__nopay { font-weight: 700; font-size: 0.95rem; }

/* Phones: a bottom sheet that slides up */
.sheet {
  width: 100%;
  max-width: none;
  height: fit-content;   /* hug the content so margin-top:auto seats it on the bottom edge */
  max-height: 85dvh;
  margin: auto 0 0;
  padding: 0;
  overflow: hidden;
  border-radius: 28px 28px 0 0;
}
.sheet::backdrop { background: rgba(58, 20, 6, 0.4); }   /* Mole Ink at 40% */
.sheet[open] { animation: sheet-up 240ms cubic-bezier(.2, .9, .3, 1); }
@keyframes sheet-up { from { transform: translateY(100%); } }
.sheet__panel {
  display: flex;
  flex-direction: column;
  max-height: 85dvh;
  border: 2px solid var(--ink);
  border-bottom: 0;
  border-radius: 28px 28px 0 0;
  background: var(--cream);
  overflow: hidden;
}
.sheet__handle { display: block; width: 44px; height: 5px; margin: 10px auto 0; border-radius: 999px; background: var(--ink); opacity: 0.35; }
.sheet__head {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 64px;
  padding: 10px 64px 10px clamp(18px, 5vw, 28px);
  background: var(--card);
  border-bottom: 2px solid var(--ink);
}
.sheet__head .modal__close { top: 50%; right: 8px; transform: translateY(-50%); }
.sheet__body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 8px clamp(18px, 5vw, 28px) 18px; }
.sheet__foot {
  display: grid;
  gap: 6px;
  justify-items: center;
  padding: 14px clamp(18px, 5vw, 28px) calc(14px + env(safe-area-inset-bottom, 0px));
  border-top: 2px solid var(--card);
  background: var(--cream);
}
.sheet__go[hidden] { display: none; }
.sheet__keep { min-height: 44px; padding: 0 12px; font-size: 1rem; }

/* 640px and up: a panel on the right, full height, sliding in from the right */
@media (min-width: 640px) {
  .sheet {
    width: min(var(--sheet-w), 100vw - 24px);
    height: 100dvh;
    max-height: 100dvh;
    margin: 0 0 0 auto;
    border-radius: 0;
  }
  .sheet[open] { animation: sheet-in 220ms cubic-bezier(.2, .9, .3, 1); }
  @keyframes sheet-in { from { transform: translateX(100%); } }
  .sheet__panel {
    height: 100%;
    max-height: none;
    border: 0;
    border-left: 2px solid var(--ink);
    border-radius: 0;
    box-shadow: -6px 0 0 var(--orange);
  }
  .sheet__handle { display: none; }
}

/* ============ FORM ============ */
.rform { display: grid; gap: 18px; scroll-margin-top: 16px; }
.rform .section-title:focus { outline: none; }
.rform__form { display: grid; gap: 20px; }
.rform__fields { margin: 0; padding: 0; border: 0; min-width: 0; }
.rform__grid { display: grid; gap: 16px; }
@media (min-width: 640px) {
  .rform__grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .field--half { grid-column: span 3; }
  .field--full { grid-column: span 6; }
  .field--third { grid-column: span 2; }
}
.form-alert {
  margin: 0;
  padding: 12px 16px;
  border: 2px solid var(--ink);
  border-left: 8px solid var(--red);
  border-radius: 14px;
  background: var(--card);
  font-weight: 700;
}
.form-alert:focus { outline: none; }
.rform__submit { display: grid; gap: 14px; justify-items: start; max-width: 560px; }
.rform__recap { margin: 0; font-weight: 600; line-height: 1.5; }
.rform__note { margin: 0; font-weight: 700; line-height: 1.45; }
.rform__note:empty { display: none; }
.rform__note::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 8px; border-radius: 999px; background: var(--red); }
.btn[aria-busy="true"] { cursor: progress; opacity: 0.8; }

/* ============ RESERVATION CONFIRMED ============ */
.done { width: min(100% - 32px, 480px); }
.done__body { display: grid; gap: 12px; text-align: center; }
.done__body .modal__title { margin: 6px 0 0; padding: 0; }
.done__text { margin: 0; font-weight: 500; line-height: 1.6; }
.done__recap-title { margin: 6px 0 0; font-size: 1rem; font-weight: 800; }
.done__recap { display: grid; gap: 4px; margin: 0 0 8px; padding: 0; list-style: none; font-weight: 600; }
.done__line { display: flex; justify-content: space-between; gap: 12px; text-align: left; }
.done__amount { font-weight: 800; white-space: nowrap; }
.done__total { margin: 0 0 8px; font-weight: 800; }

/* No motion beyond the confetti and the sheet; reduced motion drops those too
   (styles.css already zeroes animations and transitions). */
@media (prefers-reduced-motion: reduce) {
  .sheet[open] { animation: none; }
  .basket-btn, .basket-btn__chip { transition: none; }
  .basket-btn:hover, .basket-btn:active { transform: none; }
}
