:root {
  --paper: #f1efe9;
  --paper-deep: #ece7df;
  --ink: #171615;
  --ink-muted: #7a746c;
  --border: rgba(23, 22, 21, 0.12);
  --shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.45);
  --rose: oklch(0.86 0.05 15);
  --slate: oklch(0.72 0.04 240);
  --accent: oklch(0.68 0.18 45);
  --font-sans:
    "neue-haas-grotesk-display", "Neue Haas Grotesk Display Pro", "Inter Tight", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-serif: "Times New Roman", "Iowan Old Style", Georgia, serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

a,
button {
  color: inherit;
  font: inherit;
}

button {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.site-shell {
  min-height: 100vh;
}

.top-nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  padding: 1.5rem 2rem;
}

.top-nav a {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.005em;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.top-nav a:nth-child(2) {
  justify-self: center;
}

.top-nav a:last-child {
  justify-self: end;
}

.top-nav a:hover {
  opacity: 0.6;
}

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.hero-wall {
  padding: 1.5rem 2.5rem 1rem;
}

.hero-wall {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 3rem 6rem;
}

.hero-plate {
  margin: 0;
  justify-self: center;
  width: 100%;
  max-width: 140px;
  overflow: hidden;
  opacity: 0;
  animation: heroFadeIn 700ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero-copy {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) repeat(3, minmax(0, 1fr));
  gap: 2.5rem;
  align-items: start;
  padding: 2.5rem 2.5rem 2rem;
}

.hero-title p,
.hero-copy > p {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: -0.005em;
}

.hero-copy > p {
  margin-top: 2.4rem;
}

.hero-title h1 {
  margin: 1.25rem 0 0;
  font-size: 56px;
  line-height: 0.95;
  letter-spacing: -0.035em;
}

.hero-title,
.hero-copy > p {
  opacity: 0;
  animation: heroFadeIn 800ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero-wall .hero-plate:nth-child(1) { animation-delay: 40ms; }
.hero-wall .hero-plate:nth-child(2) { animation-delay: 80ms; }
.hero-wall .hero-plate:nth-child(3) { animation-delay: 120ms; }
.hero-wall .hero-plate:nth-child(4) { animation-delay: 160ms; }
.hero-wall .hero-plate:nth-child(5) { animation-delay: 200ms; }
.hero-wall .hero-plate:nth-child(6) { animation-delay: 240ms; }
.hero-wall .hero-plate:nth-child(7) { animation-delay: 280ms; }
.hero-wall .hero-plate:nth-child(8) { animation-delay: 320ms; }
.hero-wall .hero-plate:nth-child(9) { animation-delay: 360ms; }
.hero-wall .hero-plate:nth-child(10) { animation-delay: 400ms; }
.hero-wall .hero-plate:nth-child(11) { animation-delay: 440ms; }
.hero-wall .hero-plate:nth-child(12) { animation-delay: 480ms; }
.hero-wall .hero-plate:nth-child(13) { animation-delay: 520ms; }
.hero-wall .hero-plate:nth-child(14) { animation-delay: 560ms; }
.hero-wall .hero-plate:nth-child(15) { animation-delay: 600ms; }
.hero-wall .hero-plate:nth-child(16) { animation-delay: 640ms; }
.hero-wall .hero-plate:nth-child(17) { animation-delay: 680ms; }
.hero-wall .hero-plate:nth-child(18) { animation-delay: 720ms; }

.hero-title { animation-delay: 420ms; }
.hero-copy > p:nth-of-type(1) { animation-delay: 520ms; }
.hero-copy > p:nth-of-type(2) { animation-delay: 620ms; }
.hero-copy > p:nth-of-type(3) { animation-delay: 720ms; }

.chapters-section {
  min-height: 100vh;
  padding: 5rem 3rem;
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.chapter-previews {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1.5rem;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto 5rem;
}

.chapter-preview {
  aspect-ratio: 4 / 5;
  max-width: 300px;
  margin: 0 auto;
  opacity: 0;
  transition: opacity 0.3s ease;
  overflow: hidden;
}

.chapter-preview.is-active {
  opacity: 1;
}

.chapter-links {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: 1200px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1.5rem;
}

.chapter-link {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.15rem;
  font-size: clamp(2.5rem, 5vw, 4.75rem);
  line-height: 0.95;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: #d0d0d0;
  transition: color 0.2s ease;
}

.chapter-link span {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.125rem, 2vw, 2.75rem);
}

.chapter-link.is-active {
  color: var(--ink);
}

.showcase {
  display: flex;
  height: 100vh;
  background: #fff;
}

.showcase-half {
  position: relative;
  width: 50%;
  height: 100%;
  overflow: hidden;
}

.showcase-scene {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.5s ease-out;
}

.showcase-scene.is-active {
  opacity: 1;
}

.showcase-bg {
  position: absolute;
  inset: 0;
}

.showcase-fg-wrap {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 26vw;
  max-width: 420px;
  height: 62vh;
  transform: translate(-50%, -50%);
  overflow: hidden;
}

.excerpt {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: end;
  padding: 0 2.5rem 5rem;
  background: var(--paper);
}

.excerpt h2,
.after-sun-copy h2,
.dead-panel-title h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 300;
  font-style: italic;
  line-height: 0.95;
  letter-spacing: -0.02em;
}

.excerpt h2 {
  font-size: clamp(4.5rem, 9vw, 7rem);
}

.excerpt p {
  max-width: 820px;
  font-size: clamp(1.35rem, 2.6vw, 1.625rem);
  line-height: 1.35;
  font-weight: 700;
}

.excerpt em,
.after-sun-text em,
.closing-text em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 300;
}

.portugal-grid {
  background: var(--paper);
  padding: 0 2.5rem 5rem;
}

.portugal-block {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
  margin-bottom: 3.5rem;
}

.portugal-block .museum-card:nth-child(3) {
  grid-column: 2 / span 2;
}

.museum-card {
  position: relative;
  margin: 0;
  overflow: hidden;
  outline: none;
}

.museum-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 10px;
  background: var(--tone);
  transform: translateX(-100%);
  opacity: 0;
  transition: transform 0.5s ease, opacity 0.5s ease;
}

.museum-card figcaption {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 44%;
  aspect-ratio: 1 / 1.15;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--tone);
  transform: translateY(1.25rem);
  opacity: 0;
  transition: transform 0.5s ease, opacity 0.5s ease;
}

.museum-card:hover::before,
.museum-card:focus::before,
.museum-card:hover figcaption,
.museum-card:focus figcaption {
  transform: translateX(0);
  opacity: 1;
}

.museum-card span {
  font-size: 13px;
  font-weight: 700;
}

.museum-card strong {
  font-size: 18px;
  line-height: 1.25;
}

.tone-brown { --tone: #aa7a66; }
.tone-brown-light { --tone: #a87b68; }
.tone-pink { --tone: #f1c3cf; }
.tone-mauve { --tone: #bc8f8f; }
.tone-sand { --tone: #ccb095; }
.tone-blue { --tone: #9db4c4; }
.tone-tan { --tone: #d2bfaa; }
.tone-slate { --tone: #91aeb8; }
.tone-stone { --tone: #998d87; }

.after-sun {
  position: relative;
  height: 500vh;
}

.after-sun-sticky,
.dead-sea-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

.after-sun-copy {
  position: absolute;
  inset: 0;
  z-index: 1;
  padding: 0 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.after-sun-copy > p:first-child,
.closing-copy > p:first-child,
.dead-panel-title p,
.hidden-rail {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.005em;
}

.after-sun-copy h2 {
  margin-top: 1.5rem;
  font-size: clamp(4.75rem, 8vw, 6.8rem);
}

.after-sun-text {
  max-width: 780px;
  margin-top: 3rem;
  font-size: clamp(1.5rem, 2.6vw, 1.9rem);
  line-height: 1.3;
  font-weight: 700;
}

.after-sun-track {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  will-change: transform;
  transform: translate3d(100vw, 0, 0);
}

.strip-plate,
.closing-strip figure {
  flex-shrink: 0;
  margin: 0;
}

.hidden-tides {
  position: relative;
}

.hidden-bg {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

.hidden-bg > img {
  position: absolute;
  inset: 0;
}

.hidden-rail {
  position: absolute;
  right: 0;
  top: 3rem;
  z-index: 2;
  background: oklch(0.93 0.03 25);
  padding: 0.75rem 0.5rem;
  writing-mode: vertical-rl;
}

.hidden-title {
  position: absolute;
  right: 4rem;
  bottom: 4rem;
  z-index: 2;
  color: var(--paper);
  text-align: right;
}

.hidden-title p {
  margin: 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 26px;
}

.hidden-title h2 {
  margin: 0.75rem 0 0;
  font-size: clamp(4rem, 7vw, 5.5rem);
  line-height: 0.95;
  letter-spacing: -0.035em;
}

.hidden-title span {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 300;
}

.hidden-cards {
  position: relative;
  z-index: 3;
  width: 58%;
  margin-top: -100vh;
  padding: 55vh 3rem 20vh;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
}

.hidden-card {
  position: relative;
  aspect-ratio: 3 / 4;
  padding: 1.5rem;
  background: var(--paper);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.hidden-card > p {
  position: relative;
  z-index: 2;
  margin: 0;
  font-size: 13px;
  font-weight: 700;
}

.hidden-card-image {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 52%;
  height: 39%;
  overflow: hidden;
  transition: all 0.2s ease;
}

.hidden-card:hover .hidden-card-image {
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
}

.hidden-caption {
  margin-top: auto;
  max-width: 92%;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 700;
}

.dead-sea {
  position: relative;
  height: 400vh;
}

.dead-sea-rail {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 10;
  width: 34px;
  height: 100%;
  padding-top: 2rem;
  background: var(--accent);
  color: var(--paper);
  writing-mode: vertical-rl;
  font-size: 13px;
  font-weight: 700;
}

.dead-sea-track {
  display: flex;
  width: 400vw;
  height: 100%;
  will-change: transform;
}

.dead-panel {
  position: relative;
  width: 100vw;
  height: 100vh;
  flex-shrink: 0;
  color: var(--ink);
}

.dead-panel--rose { background: var(--rose); }
.dead-panel--slate { background: var(--slate); }

.dead-panel-title {
  position: absolute;
  top: 2.5rem;
  left: 3rem;
  z-index: 2;
}

.dead-panel-title h2 {
  margin-top: 0.75rem;
  font-size: clamp(4rem, 7vw, 5.5rem);
}

.dead-three,
.dead-two {
  display: grid;
  height: 100%;
  padding: 0 3.25rem 0 3rem;
}

.dead-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3rem;
  align-items: center;
}

.dead-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4rem;
  align-items: center;
}

.dead-copy-column {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.dead-copy {
  margin-top: 1.5rem;
  max-width: 480px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
}

.dead-copy p {
  margin: 0 0 1.5rem;
}

.dead-copy p:last-child {
  margin-bottom: 0;
}

.dead-image {
  overflow: hidden;
}

.dead-image.bottom {
  align-self: end;
  margin-bottom: 3rem;
  aspect-ratio: 3 / 4;
  max-width: 360px;
}

.dead-image.landscape {
  aspect-ratio: 4 / 3;
  width: 100%;
  max-width: 520px;
}

.dead-image.center-right {
  justify-self: end;
  aspect-ratio: 3 / 4;
  width: 100%;
  max-width: 300px;
}

.dead-image.tall-center {
  justify-self: center;
  aspect-ratio: 3 / 4;
  width: 100%;
  max-width: 420px;
}

.closing {
  padding: 14vh 0;
}

.closing-copy {
  padding: 0 2rem;
  text-align: center;
}

.closing-text {
  max-width: 1040px;
  margin: 2rem auto 0;
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.25;
  font-weight: 700;
}

.closing-strip {
  display: flex;
  align-items: end;
  gap: 1rem;
  margin-top: 6vh;
  padding: 0 2rem;
  overflow: hidden;
}

.closing-actions {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
  padding: 0 2rem;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.closing-actions a {
  text-decoration: none;
}

.ratio-4x5 { aspect-ratio: 4 / 5; }
.ratio-3x4 { aspect-ratio: 3 / 4; }
.ratio-5x4 { aspect-ratio: 5 / 4; }
.ratio-3x2 { aspect-ratio: 3 / 2; }
.ratio-2x3 { aspect-ratio: 2 / 3; }
.ratio-4x3 { aspect-ratio: 4 / 3; }
.h14 { height: 14vh; }
.h15 { height: 15vh; }
.h17 { height: 17vh; }
.h18 { height: 18vh; }
.h19 { height: 19vh; }
.h40 { height: 40vh; }
.h42 { height: 42vh; }
.h43 { height: 43vh; }
.h45 { height: 45vh; }
.h46 { height: 46vh; }
.h47 { height: 47vh; }
.h49 { height: 49vh; }
.h51 { height: 51vh; }
.h52 { height: 52vh; }
.h54 { height: 54vh; }
.h55 { height: 55vh; }
.h56 { height: 56vh; }

@keyframes heroFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-plate,
  .hero-title,
  .hero-copy > p {
    opacity: 1;
    animation: none;
  }
}

@media (max-width: 1100px) {
  .hero-wall {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
  }

  .hero-copy {
    grid-template-columns: 1fr;
  }

  .chapter-previews,
  .hidden-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .portugal-block,
  .dead-three,
  .dead-two {
    grid-template-columns: 1fr;
  }

  .portugal-block .museum-card:nth-child(3) {
    grid-column: auto;
  }

  .dead-panel {
    overflow-y: auto;
  }

  .dead-panel-title {
    position: static;
    padding: 2rem 2rem 0;
  }

  .dead-three,
  .dead-two {
    height: auto;
    min-height: 100%;
    padding: 2rem 2rem 4rem;
  }

  .dead-image.bottom,
  .dead-image.center-right,
  .dead-image.tall-center {
    max-width: 100%;
    margin-bottom: 0;
    justify-self: stretch;
  }
}

@media (max-width: 760px) {
  .top-nav,
  .hero-wall,
  .hero-copy,
  .chapters-section,
  .portugal-grid,
  .excerpt,
  .closing-copy,
  .closing-strip {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .hero-wall {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
  }

  .chapter-previews {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .showcase {
    flex-direction: column;
    height: auto;
  }

  .showcase-half {
    width: 100%;
    height: 50vh;
  }

  .showcase-fg-wrap {
    width: 42vw;
    height: 44vh;
  }

  .hidden-title {
    right: 1.5rem;
    bottom: 1.5rem;
  }

  .hidden-cards {
    grid-template-columns: 1fr;
    padding: 48vh 1.25rem 12vh;
    gap: 1.25rem;
  }

  .closing-strip {
    gap: 0.65rem;
  }
}
