/* Ruth's Magica Bakery — one page menu
   Colours, artwork and wording are taken straight from the printed menu. */

:root {
  --bg:   #cfe2ff;  /* periwinkle paper   */
  --ink:  #eb007f;  /* bakery pink        */
  --rule: #cf3013;  /* section divider    */

  --measure: 62rem; /* menu card width    */
  --pad:     clamp(1.25rem, 4vw, 3rem);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  padding: 0 clamp(0.75rem, 3vw, 2rem) clamp(2rem, 6vw, 4rem);
  background: var(--bg);
  color: var(--ink);
  font-family: "Outfit", "Century Gothic", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  font-size: clamp(1rem, 0.9rem + 0.4vw, 1.2rem);
  line-height: 1.4;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

p { margin: 0; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- hero ---------- */

.hero {
  display: flex;
  justify-content: center;
  padding: clamp(2rem, 7vw, 5rem) 0 clamp(1.5rem, 5vw, 3.5rem);
}

.hero__logo { width: min(24rem, 66vw); }

/* ---------- menu card ---------- */

.card {
  max-width: var(--measure);
  margin: 0 auto;
  padding: clamp(0.5rem, 2vw, 1.5rem) var(--pad) var(--pad);

  /* the scalloped frame, lifted from the printed menu */
  /* 85 = scallop + the inner rule inside it; a border width near that keeps
     the wave at its drawn scale, so one tile spans the card without a seam */
  border: clamp(25px, 6.4vw, 76px) solid transparent;
  border-image: url("assets/scallop-frame.svg") 85 round;
}

.wordmark { margin: 0; }

.wordmark img {
  width: min(34rem, 74%);
  margin: 0 auto;
}

.tagline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem clamp(1rem, 4vw, 3rem);
  flex-wrap: wrap;
  margin-top: clamp(1rem, 3vw, 2rem);
}

.tagline__script { height: clamp(1.1rem, 3.2vw, 2.8rem); width: auto; }

.rule {
  height: 0;
  margin: clamp(0.7rem, 1.6vw, 1rem) 0 clamp(1rem, 2.6vw, 1.6rem);
  border: 0;
  border-top: 3px solid var(--rule);
}

/* ---------- courses ---------- */

.course + .rule { margin-top: clamp(1.2rem, 3vw, 2rem); }

.course__title {
  margin: 0 0 clamp(0.6rem, 1.6vw, 1rem);
  font-size: clamp(1.15rem, 0.95rem + 1.1vw, 1.75rem);
  font-weight: 700;
  letter-spacing: 0.005em;
  text-transform: uppercase;
}

.course__title--right { text-align: right; }

.course__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: clamp(1rem, 3vw, 2.5rem);
}

.course--art-first .course__body { grid-template-columns: auto minmax(0, 1fr); }

.course__items {
  display: grid;
  gap: clamp(0.9rem, 2.4vw, 1.5rem);
  padding-inline-start: clamp(0.25rem, 1.5vw, 1.5rem);
}

.course--art-first .course__items { padding-inline: 0 clamp(0.25rem, 1.5vw, 1rem); }

.course__art { width: clamp(6.5rem, 15vw, 11rem); }

.course__art--tall { width: clamp(6rem, 13vw, 10rem); align-self: center; }

.item__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem clamp(1rem, 3vw, 2.5rem);
  font-weight: 700;
  font-size: clamp(1.05rem, 0.9rem + 0.85vw, 1.5rem);
}

.item__price { white-space: nowrap; }

.item__desc {
  margin-top: 0.15em;
  max-width: 46ch;
  font-weight: 400;
  font-size: clamp(1rem, 0.9rem + 0.5vw, 1.25rem);
  line-height: 1.35;
}

/* ---------- payment ---------- */

.payment {
  max-width: 52rem;
  margin: clamp(3rem, 9vw, 6rem) auto 0;
  text-align: center;
}

.wordmark--payment img { width: min(44rem, 96%); }

.payment__orders {
  margin-top: clamp(0.5rem, 1.5vw, 1rem);
  font-size: clamp(1.05rem, 0.9rem + 0.9vw, 1.5rem);
  line-height: 1.35;
}

.payment__orders a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  border-radius: 4px;
  transition: background-color 120ms ease, color 120ms ease;
}

.payment__orders a:hover,
.payment__orders a:focus-visible {
  background: var(--ink);
  color: var(--bg);
  text-decoration-color: transparent;
}

.pay-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(1.5rem, 5vw, 3.5rem);
  margin-top: clamp(2rem, 5vw, 3.5rem);
}

.pay { margin: 0; }

.pay__link {
  display: block;
  border-radius: 14px;
  transition: transform 140ms ease, filter 140ms ease;
}

.pay__link:hover,
.pay__link:focus-visible { transform: translateY(-3px); filter: brightness(1.04); }

.pay__link:focus-visible { outline: 3px solid var(--ink); outline-offset: 6px; }

.pay__code { width: min(17rem, 68vw); }

.pay__code--venmo { width: min(18.5rem, 74vw); }

.thanks img {
  width: min(46rem, 100%);
  margin: clamp(2.5rem, 7vw, 4.5rem) auto 0;
}

/* ---------- footer ---------- */

.footer {
  margin-top: clamp(2.5rem, 7vw, 4rem);
  text-align: center;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  opacity: 0.75;
}

/* ---------- narrow screens ---------- */

@media (max-width: 44em) {
  .tagline {
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
  }

  .tagline__script { height: clamp(1.5rem, 5.2vw, 2.4rem); }

  .course__title,
  .course__title--right { text-align: center; }

  .course__body,
  .course--art-first .course__body { grid-template-columns: minmax(0, 1fr); }

  .course__art,
  .course__art--tall {
    order: 2;
    width: clamp(6rem, 26vw, 9rem);
    margin: 0.5rem auto 0;
  }

  .course--art-first .course__items { order: 1; padding-inline: clamp(0.25rem, 1.5vw, 1.5rem); }

  .item__desc { max-width: none; }
}

@media (max-width: 22em) {
  .item__head { flex-direction: column; gap: 0.1rem; }
  .item__price { align-self: flex-start; }
}

/* ---------- print ---------- */

@media print {
  body { background: #fff; padding: 0; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .hero { padding: 0.5rem 0 1rem; page-break-after: always; }
  .payment { page-break-before: always; }
}
