:root {
  --cookbook-yellow: var(--theme-sunshine);
}

body {
  background-color: var(--cookbook-yellow);
  color: var(--theme-charcoal);
}

.cookbook {
  --cover-w: min(667px, 46.3vw, calc((100vh - 88px) * 667 / 829));
  display: grid;
  grid-template-columns: var(--cover-w) minmax(0, 560px);
  column-gap: clamp(32px, 7.2vw, 104px);
  min-height: 100vh;
  padding: 44px 41px;
  color: var(--theme-charcoal);
}

:where(.cookbook) :is(p, h1, h2, ul) {
  margin: 0;
}

/* carousel: native scroll-snap, buttons are progressive enhancement */
.cookbook-carousel {
  position: relative;
  align-self: start;
  width: var(--cover-w);
  aspect-ratio: 667 / 829;
}
.cookbook-carousel .slides {
  position: relative;
  display: flex;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.cookbook-carousel .slides::-webkit-scrollbar {
  display: none;
}
.cookbook-carousel .slide {
  flex: 0 0 100%;
  margin: 0;
  scroll-snap-align: start;
}
.cookbook-carousel .slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.carousel-controls {
  position: absolute;
  right: 6px;
  bottom: 6px;
  display: flex;
}
.carousel-controls button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--theme-white);
  opacity: 0.7;
  filter: drop-shadow(0 1px 2px rgb(0 0 0 / 0.5));
  cursor: pointer;
  transition: opacity 0.15s;
}
.carousel-controls svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.carousel-controls button:hover,
.carousel-controls button:focus-visible {
  opacity: 1;
}
.carousel-controls button:focus-visible {
  outline: 2px solid var(--theme-white);
  outline-offset: -2px;
}

.cookbook-info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 56px;
}

.cookbook-title h1 {
  font-size: clamp(56px, 7.755vw, 111.678px);
  font-weight: 600;
  line-height: 1.137;
  text-align: left;
}
.cookbook-title .subtitle,
.release-date {
  font-size: clamp(22px, 2.43vw, 35px);
  font-weight: 600;
  line-height: 1.143;
  text-transform: uppercase;
}

.cookbook .label {
  font-size: 15px;
  font-weight: 600;
  line-height: 18px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}
.release-date {
  margin-top: 2px;
}
.release-date .date-short {
  display: none;
}

.blurb {
  margin-top: 56px;
  font-size: 18px;
  line-height: 1.22;
  letter-spacing: 0.72px;
}
.blurb p + p {
  margin-top: 1em;
}

.cookbook-preorder {
  margin-top: 56px;
}
.retailers {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(3, auto);
  grid-template-columns: minmax(max-content, 312px) max-content;
  column-gap: 24px;
  row-gap: 5px;
  margin-top: 5px;
  padding: 0;
  list-style: none;
}
.retailers li {
  display: flex;
}
.retailers a {
  font-size: 27px;
  font-weight: 600;
  line-height: 31px;
  color: var(--theme-charcoal);
  -webkit-text-stroke: 0;
  text-decoration: underline;
  text-decoration-skip-ink: none;
  text-underline-position: from-font;
  text-decoration-thickness: from-font;
}
.retailers a:hover,
.retailers a:focus-visible {
  color: var(--theme-tomato);
  -webkit-text-stroke: 0;
}

@media (max-width: 1100px) {
  .retailers {
    grid-auto-flow: row;
    grid-template-rows: none;
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 800px) {
  .cookbook {
    --cover-w: 100%;
    grid-template-columns: minmax(0, 1fr);
    padding: 27px 26px 30px;
  }
  .cookbook-info {
    justify-content: flex-start;
    gap: 83px;
    margin-top: 22px;
  }
  .cookbook-title h1 {
    font-size: min(18.92vw, 111.678px);
  }
  .cookbook-title .subtitle,
  .release-date {
    font-size: 22.235px;
  }
  .cookbook .label {
    font-size: 13px;
    letter-spacing: 0.52px;
  }
  .release-date {
    margin-top: 0;
  }
  .release-date .date-long {
    display: none;
  }
  .release-date .date-short {
    display: inline;
  }
  .blurb {
    margin-top: 9px;
    font-size: 14px;
    letter-spacing: 0.56px;
  }
  .cookbook-preorder {
    margin-top: 82px;
  }
  .retailers {
    grid-auto-flow: row;
    grid-template-rows: none;
    grid-template-columns: minmax(0, 1fr);
    row-gap: 12px;
    margin-top: 10px;
  }
  .retailers a {
    font-size: 22px;
    line-height: 25px;
  }
}
