html {
  color: #0e3a5b;
  background: #beccc6;
  transition: background-color 400ms;
  --highlight: white;
  --midlight: #1b979e;
}

.page-1 footer {
  --midlight: #c96f51;
  color: #ccc5be;
}

body {
  font-family: "Familjen Grotesk", sans-serif;
  font-optical-sizing: auto;
  font-weight: 600;
  font-style: normal;
  margin: 0;
  position: relative;
  font-synthesis: none;
  letter-spacing: -0.03em;
  font-weight: 600;
  font-size: 1.25rem;
}

body::after {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: 100lvh;
  background: url(../img/shadow.jpg);
  background-size: cover;
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: 1;
}

h1,
button {
  font: inherit;
}

.container {
  max-width: 75rem;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

.grid {
  display: grid;
  grid-template-rows:
    0 min-content min-content minmax(10rem, 1fr)
    min-content 0;
  grid-template-columns: 1fr minmax(0, 75rem) 1fr;
  gap: 2.5rem;
  position: relative;
  z-index: 0;
}

.grid h1,
.grid p {
  grid-column: 2 / 3;
  margin: 0;
}

.grid h1 {
  text-transform: uppercase;
  grid-row: 2 / 3;
  padding-block-start: 2rem;
  letter-spacing: 0;
}

.grid p {
  max-width: 25rem;
  margin: 0;
  grid-row: 3 / 4;
}

.gallery {
  grid-row: 1 / 7;
  grid-column: 1 / 4;
  position: relative;
  z-index: -1;
}

.grid nav {
  display: flex;
  gap: 0.625rem;
  grid-column: 2 / 3;
  grid-row: 5 / 6;
  position: relative;
  margin-inline-end: auto;
}

.grid button {
  width: 2.375rem;
  height: 2.375rem;
  padding: 0;
  border: 2px solid;
  color: inherit;
  background-color: transparent;
  border-radius: 1px;
  transition: background 300ms, border 300ms;
  line-height: 1;
  touch-action: manipulation;
}

.grid button:hover {
  background: #0e3a5b40;
}

.grid button:disabled {
  opacity: 0.7;
  background: #0e3a5b40;
  border-color: transparent;
  pointer-events: none;
}

.grid button svg {
  width: 1.5rem;
  fill: currentColor;
}

.scroller {
  display: flex;
  overflow: auto;
  height: 100%;
  scroll-snap-type: x mandatory;
}

figure {
  margin: 0;
  padding: 20.5rem 4rem 7.5rem;
  flex: 1 0 100%;
  scroll-snap-align: start;
  box-sizing: border-box;
  position: sticky;
  /* left: -4.125rem; */
}

figure .container {
  padding: 0 0 0 4rem;
  position: relative;
  border-inline-start: 2px solid #0121;
  transition: border-inline-start-color 300ms;
}

figure.active .container {
  border-inline-start-color: currentColor;
  transition-delay: 400ms;
}

figcaption {
  color: var(--highlight);
  position: relative;
  margin-block-start: 1rem;
  bottom: -0.25rem;
}

figcaption strong {
  color: #0e3a5b;
}

figure img {
  max-width: 105%;
  margin: -2.5%;
  aspect-ratio: 2;
  object-fit: contain;
  object-position: left;
}

a {
  text-decoration: none;
  color: var(--midlight);
  transition: color 900ms;
}

em {
  letter-spacing: -0.015em;
}

footer {
  color: #beccc6;
  background: #0e3a5b;
  padding: 4rem 2rem;
}

footer p {
  margin-block: 0 1rem;
  max-width: 40rem;
}

@media (max-width: 88rem) and (min-width: 30rem) {
  figure {
    padding-block-start: 17.5rem;
  }
}

@media (max-width: 88rem) {
  .grid {
    gap: 1rem 2rem;
  }

  .grid h1 {
    padding-block-start: 1rem;
  }

  .grid nav {
    padding-block-end: 1rem;
  }

  figure {
    padding-inline: 2rem;
    padding-block-end: 6.5rem;
    left: -2.125rem;
  }

  figure .container {
    padding-inline-start: 2rem;
  }
}
