/* Background transparency is isolated from all readable foreground content. */
.storefront {
  background: #eee9df;
  isolation: isolate;
}

.floral-backdrop {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background: url('https://images.unsplash.com/photo-1490750967868-88aa4486c946?auto=format&fit=crop&w=2000&q=85')
    center / cover;
  opacity: 0.32;
  filter: saturate(0.7);
}

.storefront::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(115deg, #faf6ed99, #f3eee855, #f4e6e388);
}

.storefront header {
  background: #faf8f0b3;
  backdrop-filter: blur(14px);
  padding-block: 18px;
}

.brand > span {
  font: inherit;
  letter-spacing: -2px;
  margin: 0;
}

.brand small {
  display: block;
  font:
    9px 'DM Sans',
    sans-serif;
  letter-spacing: 3px;
  margin-top: 9px;
}

.storefront main {
  max-width: 1540px;
  margin: auto;
  padding: 25px 5% 0;
}

.album-heading {
  text-align: center;
}
.album-heading > p:last-child {
  font:
    italic 22px 'Playfair Display',
    serif;
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 24px 0;
}

.category-tab {
  padding: 10px 20px;
  background: #fffaf2b3;
  border: 1px solid #6b786333;
  border-radius: 30px;
  font-size: 12px;
  transition:
    background 180ms,
    color 180ms;
}

.category-tab:hover,
.category-tab[aria-current] {
  background: var(--green);
  color: white;
}
.book {
  perspective: 2200px;
  position: relative;
}
.pages {
  display: grid;
}

.storefront .book-page {
  grid-area: 1 / 1;
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 35px;
  min-height: 620px;
  padding: 45px;
  border: 1px solid #fff9ed;
  border-radius: 5px 14px 14px 5px;
  background: linear-gradient(
    90deg,
    #faf7f0e8 0%,
    #faf7f0e8 48%,
    #ded7c9e8 50%,
    #faf7f0ed 52%,
    #faf7f0ed 100%
  );
  box-shadow:
    0 24px 60px #28322526,
    3px 4px 0 #e8e1d5,
    5px 7px 0 #fff8e9,
    7px 10px 0 #d2cabb;
  backface-visibility: hidden;
  overflow-wrap: anywhere;
}

.page-copy,
.collection-copy {
  padding: 12px 28px 12px 5px;
  align-self: center;
}
.book-page h1 {
  font-size: clamp(40px, 4.8vw, 72px);
}
.book-page h2 {
  font-size: clamp(35px, 4vw, 56px);
}
.intro {
  max-width: 440px;
  font-size: 15px;
}
.cover-visual {
  position: relative;
  display: grid;
  align-items: center;
  padding: 14px;
}
.album-photo {
  margin: 0;
  min-width: 0;
}
.album-photo img {
  display: block;
  width: 100%;
  object-fit: cover;
  background: #e6e0d6;
}
.cover-visual .album-photo {
  transform: rotate(3deg);
  padding: 12px 12px 0;
  background: #fffaf2;
  box-shadow: 0 12px 25px #263e3126;
}
.cover-visual img {
  height: 430px;
}
.album-photo figcaption {
  padding: 12px 3px;
  font-size: 11px;
  line-height: 1.5;
}
.pressed-label {
  position: absolute;
  bottom: 24px;
  right: 0;
  padding: 16px 25px;
  background: #e9dcd8;
  font:
    italic 24px 'Playfair Display',
    serif;
  transform: rotate(-6deg);
}
.cover-services {
  margin-top: 28px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.cover-services h3 {
  font-size: 18px;
  margin: 12px 0 3px;
}
.cover-services p {
  font-size: 11px;
  margin: 0;
  line-height: 1.6;
}
.photo-spread {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-content: center;
}
.photo-spread .album-photo {
  padding: 8px 8px 0;
  background: #fffdf8;
  box-shadow: 0 5px 14px #263e3114;
}
.photo-spread .album-photo:nth-child(even) {
  transform: rotate(2deg);
}
.photo-spread .album-photo:nth-child(odd) {
  transform: rotate(-2deg);
}
.photo-spread img {
  height: 210px;
}
.photo-spread .album-photo:only-child {
  grid-column: 1 / -1;
}
.photo-spread .album-photo:only-child img {
  height: 390px;
}
.text-link {
  display: inline-block;
  padding-block: 15px;
  border-bottom: 1px solid #7c8973;
  font-size: 13px;
}
.empty-page {
  grid-column: 1 / -1;
  min-height: 300px;
  display: grid;
  place-items: center;
  padding: 30px;
  border: 1px dashed #a5ae96;
  text-align: center;
}
.contact-page .contact {
  padding: 35px;
}
.opening-hours {
  white-space: pre-line;
}
.book-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 30px 0 5px;
}
.book-controls button {
  border: 1px solid #89967d;
  background: #faf7f0d9;
  color: var(--green);
  padding: 12px 20px;
  border-radius: 25px;
}
.book-controls button:disabled {
  opacity: 0.35;
  cursor: default;
}
.book-controls p {
  text-align: center;
  font-size: 12px;
}
.storefront footer {
  background: #faf7f099;
  margin-top: 20px;
}
.storefront #status {
  text-align: center;
  padding: 0;
}
.admin select {
  width: 100%;
  padding: 12px;
  margin-top: 7px;
  border: 1px solid #b7c0b3;
  background: white;
  color: var(--green);
  font: inherit;
}
.category-editor {
  margin: 20px 0;
  border-top: 1px solid var(--line);
  padding-top: 15px;
}

@media (max-width: 800px) {
  .storefront main {
    padding: 18px 5% 0;
  }
  .storefront .book-page {
    padding: 28px;
    gap: 25px;
  }
  .page-copy,
  .collection-copy {
    padding: 0;
  }
  .photo-spread img {
    height: 160px;
  }
  .cover-visual img {
    height: 350px;
  }
}

@media (max-width: 600px) {
  .album-heading > p:last-child {
    font-size: 18px;
  }
  .category-tabs {
    gap: 6px;
  }
  .category-tab {
    padding: 8px 12px;
    font-size: 11px;
  }
  .storefront .book-page {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 25px;
    background: #faf7f0ed;
  }
  .book-page h1 {
    font-size: 43px;
  }
  .cover-visual {
    padding: 10px;
  }
  .cover-visual img {
    height: 330px;
  }
  .photo-spread {
    gap: 12px;
  }
  .photo-spread img {
    height: 180px;
  }
  .photo-spread .album-photo:only-child img {
    height: 320px;
  }
  .contact-page .contact {
    padding: 0;
  }
  .book-controls {
    gap: 8px;
  }
  .book-controls button {
    padding: 11px 13px;
    font-size: 12px;
    white-space: nowrap;
  }
  .book-controls p {
    font-size: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}

/* The photo count chooses the composition automatically, including on mobile. */
.photo-spread[data-count='1'] {
  grid-template-columns: minmax(0, 1fr);
}
.photo-spread[data-count='1'] .album-photo {
  max-width: 420px;
  width: 100%;
  justify-self: center;
}
.photo-spread[data-count='1'] .album-photo img {
  height: 430px;
}
.photo-spread[data-count='2'] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
}
.photo-spread[data-count='2'] .album-photo img {
  height: 340px;
}
.photo-spread[data-count='2'] .album-photo:nth-child(2) {
  margin-top: 45px;
}
.photo-spread[data-count='3'] {
  grid-template-columns: 1.15fr 1fr;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  height: 490px;
}
.photo-spread[data-count='3'] .album-photo {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.photo-spread[data-count='3'] .album-photo:first-child {
  grid-row: 1 / 3;
}
.photo-spread[data-count='3'] .album-photo img {
  height: 0;
  min-height: 0;
  flex: 1;
}
.photo-spread[data-count='3'] figcaption {
  flex-shrink: 0;
}
.photo-spread[data-count='4'] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.photo-spread[data-count='4'] .album-photo img {
  height: 210px;
}
.photo-spread figcaption {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
@media (max-width: 900px) and (min-width: 601px) {
  .photo-spread[data-count='1'] .album-photo img {
    height: 350px;
  }
  .photo-spread[data-count='2'] .album-photo img {
    height: 260px;
  }
  .photo-spread[data-count='3'] {
    height: 420px;
  }
  .photo-spread[data-count='4'] .album-photo img {
    height: 180px;
  }
}
@media (max-width: 600px) {
  .photo-spread[data-count='1'] .album-photo img {
    height: 330px;
  }
  .photo-spread[data-count='2'] .album-photo img {
    height: 240px;
  }
  .photo-spread[data-count='2'] .album-photo:nth-child(2) {
    margin-top: 25px;
  }
  .photo-spread[data-count='3'] {
    height: 380px;
  }
  .photo-spread[data-count='4'] .album-photo img {
    height: 170px;
  }
}
