/* Pie lightbox.
 *
 * Uses the same custom properties as the landing page, so it follows the
 * light/dark toggle on its own and there is no second palette to maintain.
 * Everything is prefixed .dz- so nothing here can collide with the page. */

/* ---------- the clickable pie name in the menu ---------- */

.dz-pie-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 2px dotted var(--red);
  padding-bottom: .04em;
}
.dz-pie-link:hover { border-bottom-style: solid; }
.dz-pie-link:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }

/* ---------- backdrop ---------- */

.dz-modal[hidden] { display: none; }

.dz-modal {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(12, 8, 4, .74);
  animation: dz-fade .16s ease-out;
}

@keyframes dz-fade { from { opacity: 0 } to { opacity: 1 } }
@keyframes dz-rise { from { opacity: 0; transform: translateY(12px) } to { opacity: 1; transform: none } }
@keyframes dz-sheet { from { transform: translateY(100%) } to { transform: none } }

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

.dz-card {
  position: relative;
  width: min(58rem, 100%);
  max-height: calc(100vh - 3rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--sheet);
  color: var(--sheet-ink);
  border: 3px solid var(--ink);
  box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, .5);
  animation: dz-rise .2s ease-out;
}

[data-theme="dark"] .dz-card { border-color: var(--ink-softer); }

.dz-close {
  position: absolute;
  top: .55rem;
  right: .55rem;
  width: 2.4rem;
  height: 2.4rem;
  display: grid;
  place-items: center;
  font: inherit;
  font-size: 1.25rem;
  line-height: 1;
  background: none;
  border: 2px solid currentColor;
  color: var(--sheet-ink);
  cursor: pointer;
  opacity: .55;
}
.dz-close:hover { opacity: 1; }

.dz-body {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: 1.75rem;
  padding: 2rem 2rem 1.5rem;
  align-items: start;
}

.dz-art { width: 100%; height: auto; display: block; }

.dz-kicker {
  margin: 0 0 .5rem;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-softer);
}

.dz-name {
  font-family: 'Bevan', Georgia, serif;
  font-weight: 400;
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  line-height: 1.05;
  margin: 0 0 .45rem;
}

.dz-strip {
  margin: 0 0 1rem;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--red);
}

.dz-rule { width: 2.75rem; height: 3px; margin: 0 0 1.1rem; background: currentColor; border: 0; opacity: .8; }

.dz-blurb { margin: 0 0 1rem; font-size: 1.02rem; line-height: 1.6; }

.dz-ingredients { margin: 0; font-size: .93rem; line-height: 1.65; color: var(--ink-softer); }

.dz-order {
  display: inline-block;
  margin: 1.4rem 0 0;
  font-family: 'Bevan', Georgia, serif;
  font-size: 1.15rem;
  line-height: 1.2;
  text-decoration: none;
  border-bottom: 4px solid var(--red);
  padding-bottom: .1rem;
}
.dz-order:hover { border-bottom-color: currentColor; }

/* ---------- checker footer, same motif as the page ---------- */

.dz-checker {
  height: 22px;
  background-image:
    linear-gradient(45deg, var(--red) 25%, transparent 25%, transparent 75%, var(--red) 75%),
    linear-gradient(45deg, var(--red) 25%, transparent 25%, transparent 75%, var(--red) 75%);
  background-color: var(--sheet);
  background-size: 22px 22px;
  background-position: 0 0, 11px 11px;
  box-shadow: inset 0 1px 0 rgba(0, 0, 0, .18), inset 0 -1px 0 rgba(0, 0, 0, .18);
}

.dz-band {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .35rem 1.6rem;
  margin: 0;
  padding: .85rem 1.25rem 1rem;
  background: var(--ink);
  color: var(--kraft);
  font-family: 'Bevan', Georgia, serif;
  font-size: .82rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}

[data-theme="dark"] .dz-band { background: #0e0b08; color: var(--ink-soft); }

.dz-tagline {
  margin: 0;
  padding: 0 1.25rem 1.1rem;
  text-align: center;
  font-family: 'Bevan', Georgia, serif;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--ink-softer);
}

/* ---------- phone: bottom sheet ---------- */

@media (max-width: 46rem) {
  .dz-modal { padding: 0; align-items: flex-end; }
  .dz-card {
    width: 100%;
    max-height: 92vh;
    border-width: 3px 0 0;
    animation: dz-sheet .22s ease-out;
  }
  .dz-body { grid-template-columns: 1fr; gap: 1.1rem; padding: 1.5rem 1.25rem 1.1rem; }
  .dz-art { max-width: 15rem; margin: 0 auto; }
}

@media (prefers-reduced-motion: reduce) {
  .dz-modal, .dz-card { animation: none; }
}

body.dz-locked { overflow: hidden; }
