* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 40px 20px;
  background: #eeeade;
  color: #37382f;
  font-family: Georgia, serif;
  text-align: center;
}

h1 {
  margin-bottom: 8px;
  font-size: 42px;
  font-weight: normal;
}

figure {
  max-width: 900px;
  margin: 40px auto;
  padding: 20px;
  background: #faf7f0;
  box-shadow: 0 12px 30px #37382f26;
}

img {
  display: block;
  width: 100%;
  height: auto;
}

figcaption {
  margin-top: 16px;
  font-style: italic;
}

a {
  color: inherit;
}
.brand-header {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: 260px;
  padding: 40px 16px;
  text-align: center;
}

.brand-background {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.16;
  z-index: -1;
  pointer-events: none;
}

.brand-text h1 {
  margin: 0;
  color: #29271f;
  font-family: Georgia, serif;
  font-size: clamp(36px, 8vw, 64px);
  font-weight: normal;
  letter-spacing: 0.04em;
}

.brand-text p {
  margin: 14px 0 0;
  color: #514a3e;
  font-size: 16px;
}

@media (max-width: 600px) {
  .brand-header {
    min-height: 210px;
    padding: 30px 12px;
  }
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

.main-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 28px;
  margin: 12px 0 54px;
}

.main-nav a {
  padding: 8px 0;
  color: #686252;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.main-nav a:hover {
  color: #29271f;
  border-bottom-color: #8b8069;
}

a:focus-visible {
  outline: 2px solid #8b8069;
  outline-offset: 5px;
}

.section-label {
  color: #77705f;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.photo-book {
  position: relative;
  max-width: 1000px;
  margin: 30px auto 70px;
  padding: 22px 28px;
  background: #faf7f0;
  border-radius: 6px 8px 8px 6px;

  box-shadow:
    0 2px 0 #c8c1b2,
    0 5px 0 #eee8dc,
    0 7px 0 #c8c1b2,
    0 10px 0 #e8e1d4,
    0 24px 38px #37382f26;
}

.book-heading,
.book-caption {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: #79705f;
  font-size: 13px;
}

.book-heading {
  margin-bottom: 18px;
}

.book-image img {
  width: 100%;
  aspect-ratio: 2 / 1;
  object-fit: cover;
}

.book-caption {
  margin-top: 18px;
}

/* A narrow shaded strip creates the book's center fold. */
.photo-book::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 44px;
  transform: translateX(-50%);

  background: linear-gradient(
    to right,
    transparent,
    #30261718 40%,
    #30261730 49%,
    #ffffff30 51%,
    #30261712 65%,
    transparent
  );

  pointer-events: none;
}

.about-section {
  max-width: 650px;
  margin: 0 auto 60px;
  padding-top: 36px;
  border-top: 1px solid #cec6b5;
}

.about-section h2 {
  margin: 18px 0;
  font-size: 36px;
  font-weight: normal;
}

.about-section p:last-child {
  color: #686252;
  font-size: 18px;
  line-height: 1.7;
}

footer {
  padding: 24px 0;
}

@media (max-width: 600px) {
  .photo-book {
    padding: 16px;
  }

  .book-heading span:last-child {
    display: none;
  }

  .book-image img {
    aspect-ratio: 4 / 5;
  }

  /* On phones, the book becomes one page. */
  .photo-book::after {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}



.book-image {
  display: block;
  cursor: pointer;
}

.book-controls {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: -35px 0 60px;
}

.book-controls button {
  padding: 12px 18px;
  background: transparent;
  color: #37382f;
  border: 1px solid #c8c1b2;
  border-radius: 4px;
  font: inherit;
  cursor: pointer;
}

.book-controls button:hover {
  background: #e2dac9;
}

button:focus-visible,
select:focus-visible {
  outline: 2px solid #8b8069;
  outline-offset: 4px;
}

.inner-header {
  max-width: 1100px;
  margin: 0 auto 50px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.inner-header a {
  text-decoration: none;
}

.brand-home {
  font-size: 28px;
}

.inner-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.gallery-page {
  max-width: 1100px;
  margin: 0 auto 60px;
}

.album-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
  margin-top: 40px;
}

.album-card {
  display: block;
  text-align: left;
  text-decoration: none;
}

.album-card img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 3px;
}

.album-card h2 {
  margin: 16px 0 0;
  font-size: 24px;
  font-weight: normal;
}

.album-card:hover h2 {
  text-decoration: underline;
  text-underline-offset: 5px;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 24px;
  margin-top: 40px;
}

.photo-grid img {
  width: 100%;
  height: auto;
}

@media (max-width: 600px) {
  .album-grid,
  .photo-grid {
    grid-template-columns: 1fr;
  }

  .book-caption {
    flex-wrap: wrap;
  }
}

.photo-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.photo-button img {
  display: block;
  width: 100%;
  height: auto;
}

.photo-viewer {
  position: fixed;
  inset: 0;
  width: min(1100px, 94vw);
  max-height: 92vh;
  margin: auto;
  padding: 54px 16px 16px;
  border: 0;
  border-radius: 6px;
  background: #faf7f0;
  overflow: auto;
}

.photo-viewer::backdrop {
  background: rgb(20 18 14 / 85%);
}

#viewer-image {
  width: 100%;
  height: auto;
  max-height: 75vh;
  object-fit: contain;
}

.close-viewer {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: #e8e1d4;
  color: #37382f;
  font-size: 22px;
  cursor: pointer;
}

.close-viewer:hover {
  background: #d8cdb9;
}