.about-page .menu-hero::before {
  background: url("assets/images/general/hero-watercolor-transparent.webp") center top / max(100%, 1000px) 100% no-repeat;
}

.about-page .hero-subtitle {
  max-width: 40ch;
}

.about-section .ruled-title {
  font-style: italic;
  white-space: normal;
  text-wrap: balance;
}

.about-story,
.about-craft {
  display: grid;
  align-items: center;
  gap: clamp(24px, 3.3vw, 54px);
}

.about-story {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(65px, .25fr);
}

.about-prose {
  max-width: 47ch;
}

.about-prose p + p {
  margin-top: 1.1em;
}

.about-story-divider.leaf-divider {
  margin-block: 12px;
}

.about-story-divider.leaf-divider::before,
.about-story-divider.leaf-divider::after {
  width: 38px;
}

.about-craft {
  grid-template-columns: 1fr 1.15fr;
  max-width: 1030px;
  margin-inline: auto;
}

.about-prose > p > strong {
  font-weight: 600;
}

.about-craft-accent {
  color: #a65c24;
}

.about-craft-break {
  display: none;
}

@media (360px <= width <= 385px) {
  .about-craft-break {
    display: initial;
  }
}

.about-craft-notes {
  display: grid;
  gap: .35em;
  margin-block: 1.1em 1.4em;
  padding: 0;
  list-style: none;
  font-weight: 600;
}

.about-craft-notes li {
  position: relative;
  padding-inline-start: 1.55em;
}

.about-craft-notes li::before {
  position: absolute;
  inset-block-start: .42em;
  inset-inline-start: .25em;
  width: .38em;
  height: .65em;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  color: #a65c24;
  transform: rotate(45deg);
  content: "";
}

.prep-time {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 14px;
  padding: 10px 24px;
  border: 1px solid #8a6a52;
  border-radius: 40px;
  background: #f5dfbd;
  box-shadow: 0 4px 10px rgb(62 42 30 / 16%), 0 1px 2px rgb(62 42 30 / 12%);
  color: var(--ink);
  line-height: 1.35;
}

.prep-time .icon {
  width: 32px;
  height: 32px;
}

.photo-frame {
  padding: clamp(5px, .65vw, 10px);
  border: 0;
  border-radius: 5px;
  background: var(--oat) var(--paper) center / 380px;
  box-shadow: 1px 5px 9px rgb(64 37 20 / 23%);
}

button.photo-frame {
  border: 1px solid var(--button-border);
}

.about-dish {
  transform: rotate(-2deg);
}

.about-dish img {
  width: 100%;
  background: radial-gradient(ellipse, #fff7e9, #ead3b6);
}

.about-gallery .ruled-title {
  margin-bottom: 16px;
}

.gallery-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: clamp(32px, 4vw, 58px);
}

.gallery-tabs .category {
  padding-inline: 1.15em;
  min-height: 44px;
}

.gallery-tabs .category.selected {
  box-shadow: none;
}

.photo-carousel {
  --center-width: 470px;
  --center-height: 310px;
  --side-width: 244px;
  --side-height: 242px;
  display: grid;
  grid-template-columns: auto auto auto;
  align-items: center;
  justify-content: center;
  gap: 20px 12px;
}

.photo-track {
  --frame-gap: 12px;
  position: relative;
  width: calc(var(--center-width) + 2 * (var(--side-width) + var(--frame-gap)));
  height: var(--center-height);
  overflow: clip;
  overflow-clip-margin: 7px;
  touch-action: pan-y pinch-zoom;
  user-select: none;
}

.photo-track .photo-frame {
  position: absolute;
  left: 50%;
  top: 50%;
  padding: 10px;
  border: 1px solid var(--button-border);
}

/* Mirror the carousel's resting positions until its controls initialise. */
.photo-frame[data-initial-frame] {
  width: var(--side-width);
  height: var(--side-height);
  --direction: sign(var(--frame-offset));
  --center-offset: calc((var(--center-width) - var(--side-width)) / 2);
  --frame-x: calc(var(--frame-offset) * (var(--side-width) + var(--frame-gap)) + var(--direction) * var(--center-offset));
  transform: translate(calc(var(--frame-x) - var(--side-width) / 2), calc(var(--side-height) / -2));
}

.photo-frame[data-initial-frame]:first-child {
  width: var(--center-width);
  height: var(--center-height);
  transform: translate(-50%, -50%);
}

.photo-track button {
  cursor: zoom-in;
}

.photo-track img,
.photo-track .empty-frame::after {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 2px;
  object-fit: cover;
}

.photo-track .empty-frame::after {
  content: "";
  background: var(--cream);
}

.photo-track .menu-photo {
  object-fit: contain;
  background: #f4e6d0;
}

.photo-carousel .carousel-arrow:not(:hover) {
  background: var(--cream);
}

@media (1024px <= width <= 1199px) {
  .photo-carousel {
    --center-width: 394px;
    --center-height: 260px;
    --side-width: 204px;
    --side-height: 202px;
  }
}

@media (768px <= width < 1024px) {
  .photo-carousel {
    --center-width: 278px;
    --center-height: 202px;
    --side-width: 142px;
    --side-height: 150px;
    column-gap: 8px;
  }

  .photo-track {
    --frame-gap: 8px;
  }
}

.photo-viewer {
  --photo-viewer-control: 44px;
  --photo-viewer-gutter: max(8px, calc((100% - 1344px) / 2));
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding-inline: var(--photo-viewer-gutter);
  border: 0;
  overflow: hidden;
  touch-action: none;
  background: transparent;
}

.photo-viewer[open] {
  display: grid;
  grid-template-columns: var(--photo-viewer-control) minmax(0, 1fr) var(--photo-viewer-control);
  grid-template-rows: minmax(0, 1fr);
  align-items: center;
}

.photo-viewer::backdrop {
  background: rgb(46 29 20 / 95%);
}

.photo-viewer-image {
  position: absolute;
  inset: calc(16px + max(calc(var(--header-height) + 12px), min(12dvh, 112px))) 0;
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  place-items: center;
  overflow: hidden;
  pointer-events: none;
}

.photo-viewer-image img {
  min-width: 0;
  max-width: calc(100% - 2 * (var(--photo-viewer-control) + var(--photo-viewer-gutter)));
  max-height: 100%;
  object-fit: contain;
  pointer-events: auto;
  user-select: none;
}

.photo-viewer button {
  display: grid;
  width: var(--photo-viewer-control);
  height: var(--photo-viewer-control);
  padding: 0;
  place-items: center;
  border: 0;
  background: transparent;
  color: #fff;
}

.photo-viewer button .icon {
  width: 28px;
  height: 28px;
}

.photo-viewer .photo-viewer-close {
  position: fixed;
  inset-block-start: max(12px, env(safe-area-inset-top));
  inset-inline-end: max(12px, env(safe-area-inset-right));
  z-index: 1;
}

.photo-viewer-close .icon {
  stroke-width: 2;
}

.photo-viewer-previous {
  grid-area: 1 / 1;
  z-index: 1;
}

.photo-viewer-previous .icon {
  transform: rotate(180deg);
}

.photo-viewer-next {
  grid-area: 1 / 3;
  z-index: 1;
}

.photo-viewer-previous .icon,
.photo-viewer-next .icon {
  stroke-width: 3;
}

html:has(.photo-viewer[open]),
body:has(.photo-viewer[open]) {
  overflow: hidden;
  overscroll-behavior: none;
}

@media (width < 768px) {
  .about-story,
  .about-craft {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }

  .about-story .welcome-sketch {
    display: none;
  }

  .about-dish {
    width: min(90%, 420px);
  }

  .gallery-tabs {
    gap: 8px;
  }

  .photo-carousel {
    --center-width: 246px;
    --center-height: 180px;
    --side-width: 160px;
    --side-height: 152px;
    grid-template-columns: 48px 155px 48px;
    gap: 12px 4px;
  }

  .photo-track {
    grid-column: 1 / -1;
    grid-row: 1;
    justify-self: center;
    width: calc(var(--center-width) + 48px);
    --frame-gap: 8px;
    overflow-clip-margin: 0;
    height: calc(var(--center-height) + 20px);
  }

  .photo-track .photo-frame {
    padding: 7px;
  }

  .photo-carousel .carousel-arrow {
    width: 48px;
    height: 48px;
    grid-row: 2;
  }

  .photo-carousel .carousel-arrow .icon {
    width: 24px;
    height: 24px;
  }

  .photo-carousel .next {
    grid-column: 3;
  }

  .photo-dots {
    grid-column: 2;
    grid-row: 2;
  }
}

@media (420px < width < 768px) {
  .photo-carousel {
    --center-width: 332px;
    --center-height: 228px;
  }
}
