/* The chapter index and monthly pages of the Talavera album. */
.album-intro.memories {
  position: relative;
  width: 100%;
  margin: 0;
  padding: clamp(55px, 7vw, 84px) 0 clamp(58px, 7vw, 80px);
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 0, #245ca6, #164b96 62%, #103a78);
  color: var(--cream);
}

.album-intro::before {
  position: absolute;
  inset: 20px;
  content: '';
  border: 1px solid #fffaf02b;
  pointer-events: none;
}

.album-intro::after {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 12px;
  content: '';
  border-top: 2px solid #edc567;
  background: url('assets/talavera-tile.svg') repeat-x center / 30px 30px;
  pointer-events: none;
}

.album-intro-inner {
  position: relative;
  z-index: 1;
}

.album-intro .section-heading {
  display: block;
  margin: 0;
  text-align: center;
}

.album-intro .section-heading::before {
  display: none;
}

.album-intro .section-heading .eyebrow {
  color: #e2edf8;
  font-size: 10px;
  letter-spacing: 2.1px;
}

.album-intro .section-heading h2 {
  margin: 17px 0 0;
  color: var(--cream);
  font-size: clamp(64px, 8vw, 96px);
  line-height: .98;
  font-weight: 400;
  letter-spacing: -.035em;
}

.album-intro .section-heading h2 em {
  color: #f7cc65;
}

.album-intro .section-heading > p {
  max-width: 48ch;
  margin: 22px auto 0;
  padding: 0;
  color: #e4eef8;
  font-size: 13px;
  line-height: 1.8;
}

.album-intro .album-blessing {
  justify-content: center;
  margin: 24px 0 0;
  color: #f7e8c3;
  text-align: center;
}

.album-intro .album-blessing svg {
  color: #f7cc65;
}

#memories-title:focus,
.chapter-title:focus,
.note-title:focus,
#noelle-title:focus {
  outline: none;
}

.album-blessing {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 27px;
  color: #416082;
  font-size: 12px;
  line-height: 1.5;
}

.album-blessing svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  color: var(--coral);
}

.chapter-menu {
  width: min(560px, calc(100vw - 40px));
  max-height: calc(100svh - 48px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid #b8c8d7;
  border-top: 4px solid var(--cobalt);
  border-radius: 5px;
  color: var(--ink);
  background: var(--cream);
  box-shadow: 0 18px 70px #103a7838;
}

.chapter-menu::backdrop {
  background: #122d4c80;
  backdrop-filter: blur(3px);
}

.chapter-menu-panel {
  max-height: calc(100svh - 54px);
  padding: 0 25px 23px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.chapter-menu-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 21px 0 16px;
  border-bottom: 1px solid var(--line);
  background: var(--cream);
}

.chapter-menu-header h2 {
  color: var(--cobalt);
  font: 500 35px/1.05 var(--serif);
  letter-spacing: -.025em;
}

.chapter-menu-close {
  display: grid;
  width: 40px;
  height: 40px;
  flex: none;
  place-items: center;
  padding: 0;
  border: 1px solid #bfccd8;
  border-radius: 50%;
  color: var(--cobalt);
  background: transparent;
  font-size: 25px;
  line-height: 1;
}

.chapter-menu-close:hover {
  background: #eaf0f3;
}

.site-header .chapter-menu-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: var(--cobalt);
  font: inherit;
}

.chapter-menu-trigger svg {
  width: 15px;
  height: 15px;
}

.month-index {
  padding: 8px 0 0;
}

.month-index .eyebrow {
  margin-bottom: 6px;
  color: var(--wine-dark);
}

.month-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.month-link {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 4px;
  min-height: 57px;
  padding: 10px 7px;
  border-bottom: 1px solid #d7dfe3;
  color: var(--cobalt);
  text-align: left;
}

.month-link:hover,
.month-link[aria-current='location'] {
  background: #eaf1f2;
}

.month-link:focus-visible {
  outline-offset: -2px;
}

.month-link-number {
  font: 500 22px/1.05 var(--serif);
}

.month-link-date {
  font-size: 10px;
  line-height: 1.3;
  color: #536a80;
}

.spotlight-link {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 17px;
  padding: 12px 13px;
  border: 1px solid #bbd1e0;
  border-radius: 3px;
  background: #e4f1fa;
  color: #214e76;
}

.spotlight-link:hover {
  background: #d5eaf8;
}

.spotlight-link svg {
  width: 20px;
  height: 20px;
  flex: none;
}

.spotlight-link small,
.spotlight-link strong {
  display: block;
}

.spotlight-link small {
  font-size: 9px;
  letter-spacing: .12em;
}

.spotlight-link strong {
  font: 500 22px/1.12 var(--serif);
}

.spotlight-link-arrow {
  margin-left: auto;
  font-size: 21px;
}

.noelle-spotlight {
  position: relative;
  padding: clamp(55px, 7vw, 100px) 0;
  background: radial-gradient(ellipse at 74% 33%, #f0f9ff, #d9ecfa 80%);
  color: #244b6c;
}

.noelle-spotlight::before,
.noelle-spotlight::after {
  position: absolute;
  inset-inline: 0;
  height: 24px;
  content: '';
  background: url('assets/talavera-tile.svg') repeat-x center / 24px 24px;
  opacity: .68;
}

.noelle-spotlight::before { top: 0; }
.noelle-spotlight::after { bottom: 0; }

.spotlight-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(28px, 7vw, 90px);
}

.spotlight-copy .eyebrow {
  color: #315e85;
}

.spotlight-copy h2 {
  margin: 8px 0 19px;
  color: #214e76;
  font: 500 clamp(52px, 7vw, 93px)/.98 var(--serif);
  letter-spacing: -.035em;
}

.spotlight-copy h2 em {
  color: #315f8a;
}

.spotlight-copy p:not(.eyebrow) {
  max-width: 38ch;
  margin: 0 0 13px;
  font-size: 15px;
  line-height: 1.65;
}

.spotlight-copy p.spotlight-signature {
  font: italic 500 28px/1.2 var(--serif);
}

.spotlight-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #214e76;
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.spotlight-photo {
  margin: 0;
  padding: 10px 10px 0;
  border: 1px solid #a6c5da;
  background: var(--paper);
  box-shadow: 0 8px 22px #214e7617;
}

.spotlight-photo img {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(72svh, 560px);
  object-fit: contain;
  background: #e4f1fa;
}

.spotlight-photo figcaption {
  padding: 11px 5px 13px;
  color: #315e85;
  text-align: center;
  font: italic 500 22px/1.2 var(--serif);
}

@media (max-width: 640px) {
  .spotlight-inner {
    grid-template-columns: 1fr;
  }

  .spotlight-copy h2 {
    margin-bottom: 13px;
  }
}

.month-chapter {
  position: relative;
  padding-top: clamp(43px, 5vw, 68px);
  padding-bottom: clamp(50px, 5vw, 76px);
}

.month-chapter.section-wrap {
  width: min(1440px, calc(100% - 48px));
}

.month-chapter + .month-chapter {
  border-top: 1px solid var(--line);
}

.month-chapter + .month-chapter::before {
  content: '';
  position: absolute;
  top: -12px;
  left: calc(50% - 42px);
  width: 84px;
  height: 24px;
  background: url('assets/talavera-tile.svg') repeat-x center / 24px 24px;
  border-inline: 6px solid var(--cream);
}

.chapter-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: clamp(25px, 4vw, 42px);
}

.chapter-heading .eyebrow {
  color: #006763;
}

.chapter-jump {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  width: fit-content;
  margin: 20px 0 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--cobalt);
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.photo-unavailable {
  padding: 18px;
  color: var(--wine-dark);
  text-align: center;
}

.chapter-title {
  margin: 5px 0 3px;
  color: var(--cobalt);
  font: 500 clamp(40px, 5.6vw, 65px)/.98 var(--serif);
  letter-spacing: -.025em;
}

.chapter-date {
  margin-top: 9px;
  color: #51627a;
  font-size: 12px;
  line-height: 1.4;
}

.chapter-milestone {
  margin-top: 9px;
  color: var(--wine-dark);
  font: italic 500 clamp(21px, 3vw, 28px)/1.2 var(--serif);
}


.chapter-number {
  display: grid;
  width: 70px;
  height: 70px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #acbecf;
  border-radius: 48% 42% 49% 45%;
  color: var(--cobalt);
  background: var(--paper);
  box-shadow: inset 0 0 0 4px var(--paper), inset 0 0 0 5px #d5e0e6;
  font: italic 500 38px/1 var(--serif);
  transform: rotate(8deg);
}

.month-chapter .slideshow {
  grid-template-columns: minmax(0, 1fr) 160px;
  column-gap: 32px;
}

.month-chapter .photo-stage {
  min-width: 0;
  transform: rotate(-1deg);
}

.month-chapter .photo-mat {
  aspect-ratio: 1.6;
  max-height: min(70svh, 680px);
}

.month-chapter .handwritten {
  margin-bottom: clamp(15px, 4vw, 35px);
}

.month-chapter .circle-button {
  width: 44px;
  height: 44px;
}

.month-chapter [data-pause-icon] {
  font: 14px var(--sans);
}

.month-chapter .photo-caption {
  gap: 12px;
}

.month-chapter .photo-caption svg {
  flex-shrink: 0;
}

.month-chapter .placeholder-note {
  color: #54677d;
  font-size: 11px;
}

.month-chapter .memory-footer {
  padding-top: 19px;
  padding-bottom: 15px;
}

.chapter-note.letter-section {
  width: 100%;
  max-width: 1120px;
  grid-template-columns: minmax(0, .75fr) minmax(0, 1.3fr);
  align-items: start;
  gap: clamp(28px, 7vw, 90px);
  margin-top: clamp(33px, 5vw, 62px);
  margin-inline: auto;
  padding: 0;
}

.chapter-note .note-title,
.chapter-note .letter-label h4 {
  margin: 9px 0 0;
  color: var(--cobalt);
  font: 500 clamp(34px, 5vw, 56px)/1.02 var(--serif);
  letter-spacing: -.023em;
}

.chapter-note .drawn-heart {
  font-size: 72px;
  margin-top: 17px;
}

.chapter-note .love-letter {
  padding: clamp(27px, 4.3vw, 44px);
  transform: rotate(.55deg);
}

.chapter-note .love-letter .note-salutation,
.chapter-note .love-letter h5 {
  margin: 10px 0 13px;
  color: var(--cobalt);
  font: italic 500 31px/1.1 var(--serif);
}

.chapter-note .love-letter .signature {
  margin-top: 17px;
}

.chapter-note .love-letter .signature b {
  font-size: 32px;
}

.note-poem .love-letter p,
.love-letter .note-poem {
  white-space: pre-line;
}

.note-scripture .love-letter,
.love-letter.note-scripture {
  text-align: center;
}

.chapter-note blockquote {
  margin: 9px auto 12px;
  max-width: 27ch;
  color: var(--wine-dark);
  font: italic 500 clamp(27px, 3vw, 34px)/1.22 var(--serif);
}

.chapter-note blockquote p {
  margin: 0;
  font: inherit;
}

.chapter-note .scripture-credit {
  display: block;
  margin: 0 auto 17px;
  color: #436084;
  font: 600 12px/1.5 var(--sans);
}

.scripture-credit a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.chapter-note .scripture-cross {
  display: block;
  width: 25px;
  height: 25px;
  margin: 0 auto 10px;
  color: var(--coral);
}

.song-queue {
  margin: 0;
  padding: 7px 12px 7px 32px;
  border-top: 1px solid var(--line);
  color: #455976;
  font-size: 11px;
  line-height: 1.45;
}

.song-queue li {
  padding: 4px;
}

.song-queue li[aria-current='true'] {
  color: var(--cobalt);
  background: #ecf3f3;
  font-weight: 600;
}

.song-progress {
  color: #4b6586;
  font-size: 11px;
}

@media (max-width: 900px) {
  .site-header .monogram,
  .site-header .music-toggle {
    min-height: 44px;
  }

  .site-header nav a:last-child {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  .month-chapter .slideshow {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .month-chapter.section-wrap {
    width: auto;
    margin-inline: max(24px, env(safe-area-inset-left)) max(24px, env(safe-area-inset-right));
  }
}

@media (min-width: 641px) and (max-width: 900px) {
  .month-chapter .slideshow-side {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px 24px;
  }

  .month-chapter .handwritten {
    display: none;
  }

  .month-chapter .slide-count strong {
    font-size: 48px;
  }

  .month-chapter .slideshow-side > p:not(.placeholder-note) {
    min-height: 0;
    margin: 0;
  }

  .month-chapter .slide-controls {
    justify-self: end;
    margin: 0;
  }

  .month-chapter .slide-dots,
  .month-chapter .placeholder-note {
    grid-column: 1 / -1;
    margin-top: 0;
  }
}

@media (max-width: 640px) {
  .site-header {
    height: auto;
    min-height: 64px;
    gap: 8px;
    padding: 8px max(12px, env(safe-area-inset-right)) 8px max(12px, env(safe-area-inset-left));
  }

  .site-header .monogram {
    min-width: 44px;
  }

  .site-header nav a:last-child {
    padding-inline: 4px;
    font-size: .8125rem;
    text-align: center;
  }

  .site-header .music-toggle {
    justify-content: center;
    font-size: .8125rem;
  }

  .site-header .music-toggle svg {
    flex: none;
  }

  .month-chapter.section-wrap {
    margin-inline: max(12px, env(safe-area-inset-left)) max(12px, env(safe-area-inset-right));
  }

  .album-intro.memories {
    padding: 51px 0 54px;
  }

  .album-intro::before {
    inset: 13px;
  }

  .album-intro .section-heading {
    margin: 0;
  }

  .album-intro .section-heading .eyebrow {
    font-size: 8px;
    letter-spacing: 1.35px;
  }

  .album-intro .section-heading h2 {
    margin-top: 18px;
    font-size: clamp(57px, 16vw, 71px);
  }

  .album-intro .section-heading > p {
    max-width: 37ch;
    margin-top: 20px;
    font-size: .9375rem;
  }

  .album-intro .album-blessing {
    gap: 7px;
    margin-top: 20px;
    font-size: 10px;
  }

  .album-blessing {
    margin-bottom: 19px;
    font-size: 11px;
  }

  .chapter-menu {
    width: calc(100vw - 28px);
    max-height: calc(100svh - 28px);
  }

  .chapter-menu-panel {
    max-height: calc(100svh - 34px);
    padding: 0 16px 17px;
  }

  .chapter-menu-header {
    padding: 16px 0 12px;
  }

  .chapter-menu-header h2 {
    font-size: 31px;
  }

  .chapter-menu-close {
    width: 37px;
    height: 37px;
  }

  .month-links {
    column-gap: 12px;
  }

  .month-link {
    min-height: 55px;
    padding: 9px 5px;
  }

  .month-link-number {
    font-size: 21px;
  }

  .spotlight-link small {
    font-size: 8px;
    letter-spacing: .08em;
  }

  .spotlight-link strong {
    font-size: 21px;
  }

  .chapter-heading .eyebrow {
    font-size: 9px;
    letter-spacing: 1.7px;
  }

  .chapter-title {
    font-size: clamp(36px, 10.5vw, 48px);
  }

  .chapter-number {
    width: 51px;
    height: 51px;
    font-size: 28px;
  }

  .chapter-date {
    font-size: 11px;
  }

  .month-chapter .slideshow {
    gap: 14px;
  }

  .month-chapter .photo-mat {
    aspect-ratio: 1.22;
  }

  .month-chapter .slideshow-side {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 10px;
  }

  .month-chapter .slide-controls {
    grid-row: 1;
    gap: 6px;
    margin: 0;
  }

  .month-chapter .slideshow-side > p:not(.placeholder-note) {
    grid-column: 1 / -1;
    grid-row: 2;
    font-size: .875rem;
    text-align: left;
  }

  .month-chapter .slideshow-side > p:empty {
    display: none;
  }

  .month-chapter .slide-dots {
    grid-column: 1 / -1;
    grid-row: 3;
    max-width: none;
    margin: 0;
  }

  .month-chapter .slide-dots button {
    width: 36px;
    min-height: 44px;
  }

  .month-chapter .slide-dots button::after {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }

  .month-chapter .placeholder-note {
    grid-row: 4;
    margin-top: 0;
  }

  .chapter-note.letter-section {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .chapter-note .letter-label {
    padding-right: 54px;
  }

  .chapter-note .drawn-heart {
    top: 11px;
    margin: 0;
    font-size: 51px;
  }

  .chapter-note .love-letter {
    padding: clamp(20px, 6vw, 32px);
    overflow-wrap: anywhere;
  }

  .closing h2 {
    font-size: clamp(46px, 13vw, 60px);
  }

  .closing .text-button,
  footer .monogram {
    min-height: 44px;
  }

  footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  }

  footer > span {
    font-size: .5625rem;
    line-height: 1.5;
  }
}

@media (max-height: 480px) and (orientation: landscape) {
  .reveal {
    padding: max(42px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(42px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  }

  .reveal::before,
  .reveal::after {
    height: 29px;
    background-size: 29px 29px;
  }

  .reveal .reveal-halo {
    inset-block: 36px;
  }

  .reveal h1 {
    font-size: clamp(30px, 9svh, 44px);
  }

  .reveal .reveal-heart {
    width: 20px;
    height: 20px;
    margin-block: 7px;
  }

  .reveal .reveal-love {
    margin-top: 8px;
    font-size: 22px;
  }

  .reveal .light-signature {
    margin-top: 3px;
    font-size: 22px;
  }

  .reveal #intro-sound {
    margin-top: 10px;
  }
}
