/* A Few of My Favorite Things: a gift guide. Short masthead, then straight to the things, each laid out differently. */
.page-wishlist .top { background: var(--porcelain); }
.masthead { display: grid; gap: .5rem 2rem; padding: 1rem var(--gutter) 1.1rem; background: var(--butter); }
.masthead h1 { font-size: clamp(2.3rem, 5vw, 5rem); line-height: 1.04; }
.masthead p { max-width: 38rem; }
@media (min-width: 900px) { .masthead { grid-template-columns: auto minmax(0, 1fr); align-items: end; } .masthead h1 { white-space: nowrap; } .masthead p { font-size: .9375rem; } }

.contents { display: flex; gap: 0 2rem; padding: 0 var(--gutter); overflow-x: auto; background: var(--chocolate); color: var(--porcelain); scrollbar-width: thin; scrollbar-color: var(--caramel) transparent; }
.contents a { flex: none; max-width: 16rem; padding: .85rem 0; overflow: hidden; font-weight: 600; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.contents a:hover { color: var(--butter); text-decoration: underline; }
.contents a:focus-visible { outline-color: var(--butter); outline-offset: -3px; box-shadow: none; }
#wish-status { padding: 2rem var(--gutter); }

.guide { display: grid; grid-template-columns: minmax(0, 1fr); }
.gift { position: relative; display: grid; gap: 1.25rem; align-content: start; padding: clamp(1.5rem, 4vw, 4rem) var(--gutter); overflow-wrap: anywhere; scroll-margin-top: 3.5rem; }
.gift-photo { display: grid; place-items: center; min-width: 0; }
/* Product photos keep their own shape. They're never stretched or cropped. */
.gift-photo img { width: auto; height: auto; max-width: 100%; max-height: min(34rem, 70svh); object-fit: contain; }
.gift-text { display: grid; gap: .85rem; align-content: center; justify-items: start; min-width: 0; }
.gift h2 { font: 800 clamp(1.75rem, 3.2vw, 3rem)/.98 var(--loud); font-stretch: 94%; letter-spacing: 0; }
.gift p { max-width: 34rem; white-space: pre-line; }
.gift .price { font: 800 1.75rem/1 var(--loud); font-stretch: 94%; letter-spacing: 0; }
.gift .said { font: 400 clamp(1.5rem, 2.3vw, 2.125rem)/1.12 var(--display); letter-spacing: 0; }
.gift .state { padding: .15rem .6rem; border: 2px solid currentColor; font-size: .9375rem; font-weight: 700; }
.gift.is-claimed .state { border-style: dashed; }
.gift.is-claimed .gift-photo img { opacity: .6; }

/* Cover story */
.gift:nth-child(1) { background: var(--butter); }
.gift:nth-child(1) h2 { font-size: clamp(2.75rem, 7vw, 7rem); line-height: .84; letter-spacing: 0; font-stretch: 94%; }
.gift:nth-child(1) .price { font-size: clamp(2.25rem, 4vw, 3.75rem); }
/* Pull quote */
.gift:nth-child(6n + 4) { background: var(--chocolate); color: var(--porcelain); }
.gift:nth-child(6n + 4) :focus-visible { outline-color: var(--butter); box-shadow: none; }
.gift:nth-child(6n + 4) .said { font-size: clamp(2rem, 4.4vw, 4.25rem); color: var(--butter); }
.gift:nth-child(6n + 4) .btn { border-color: var(--butter); background: var(--butter); color: var(--chocolate); }
.gift:nth-child(6n + 4) .btn::before { background: var(--porcelain); }
.gift:nth-child(6n + 3) .gift-photo, .gift:nth-child(6n + 7) .gift-photo { padding: 1.5rem; background: var(--oat); }
.gift:nth-child(6n + 6) { background: var(--oat); }

@media (min-width: 800px) {
  .guide { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .gift:nth-child(1), .gift:nth-child(6n + 4) { grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: clamp(2rem, 5vw, 6rem); padding-block: clamp(1.5rem, 3vw, 3rem); }
  .gift:nth-child(1).no-photo, .gift:nth-child(6n + 4).no-photo { grid-template-columns: minmax(0, 1fr); }
  .gift:nth-child(1) .gift-photo img { max-height: min(34rem, calc(100svh - 17rem)); }
  .gift:nth-child(6n + 4) .gift-photo { order: 2; }
  .gift:nth-child(6n + 2) { grid-column: 1 / span 5; padding-top: 6rem; }
  .gift:nth-child(6n + 3) { grid-column: 6 / span 7; padding-left: 0; }
  .gift:nth-child(6n + 3) .gift-text { grid-template-columns: minmax(0, 1fr) auto; }
  .gift:nth-child(6n + 3) .gift-text > * { grid-column: 1; }
  .gift:nth-child(6n + 3) .gift-text > .price { grid-area: 1 / 2; align-self: start; }
  .gift:nth-child(6n + 5) { grid-column: 1 / span 7; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); align-items: center; }
  .gift:nth-child(6n + 5).no-photo { grid-template-columns: minmax(0, 1fr); }
  .gift:nth-child(6n + 6) { grid-column: 8 / span 5; }
  .gift:nth-child(6n + 7) { grid-column: 1 / -1; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: center; gap: 3rem; }
  .gift:nth-child(6n + 7).no-photo { grid-template-columns: minmax(0, 1fr); }
  /* A last item with nothing beside it takes the whole row. */
  .gift:nth-child(6n + 2):last-child, .gift:nth-child(6n + 5):last-child { grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; padding-top: 4rem; }
}

/* Before the list is ready */
.soon { display: grid; background: var(--butter); }
.soon img { width: 100%; height: min(60svh, 30rem); object-fit: cover; object-position: 50% 12%; }
.soon div { display: grid; gap: 1rem; align-content: center; justify-items: start; padding: clamp(1.5rem, 5vw, 5rem) var(--gutter); }
.soon h2 { --face: var(--butter); font-size: clamp(2.75rem, 6.6vw, 6.5rem); line-height: 1.02; rotate: -2deg; }
.amazon { background: var(--oat); }
.soon p { max-width: 28rem; font-size: 1.1875rem; }
@media (min-width: 800px) { .soon { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } .soon img { order: 2; height: calc(100svh - 12rem); min-height: 28rem; } }
