:root {
  --ivory: #f7f4ef;
  --parchment: #efe9e0;
  --gold: #b8954f;
  --gold-deep: #8f7040;
  --ink: #2c2824;
  --mist: #c9dae6;
  --skywash: #e8f0f6;
  --panel: rgba(255, 252, 248, 0.94);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  font-family: "Outfit", system-ui, sans-serif;
  color: var(--ink);
  background: #1a1816;
}

.journey-shell {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  color: var(--ivory);
}

/* ---------- Stage ---------- */

.journey-stage {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.stage-hallway,
.stage-ocean {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stage-hallway {
  filter: saturate(0.92) contrast(1.02);
  animation: breathe 18s ease-in-out infinite alternate;
}

.stage-ocean {
  /* Sit the doorframe/ocean clip in the far arch composition */
  clip-path: inset(18% 28% 22% 34%);
  opacity: 0.92;
  mix-blend-mode: normal;
  transform: scale(1.02);
}

.stage-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(20, 18, 16, 0.72) 0%, rgba(20, 18, 16, 0.28) 38%, rgba(20, 18, 16, 0.1) 55%, rgba(247, 244, 239, 0.5) 78%, rgba(247, 244, 239, 0.82) 100%),
    linear-gradient(180deg, rgba(20, 18, 16, 0.45) 0%, transparent 18%, transparent 62%, rgba(20, 18, 16, 0.7) 100%);
  pointer-events: none;
}

@keyframes breathe {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.03);
  }
}

/* ---------- Nav ---------- */

.journey-nav {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.35rem clamp(1.25rem, 4vw, 3rem);
}

.brand {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ivory);
  text-decoration: none;
  white-space: nowrap;
}

.nav-links {
  display: none;
  gap: clamp(0.85rem, 1.6vw, 1.6rem);
  align-items: center;
}

.nav-links a {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(247, 244, 239, 0.78);
  text-decoration: none;
  padding-bottom: 0.2rem;
  border-bottom: 1px solid transparent;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--ivory);
  border-color: var(--gold);
}

@media (min-width: 960px) {
  .nav-links {
    display: flex;
  }
}

/* ---------- Intro ---------- */

.journey-intro {
  position: relative;
  z-index: 4;
  width: min(30rem, calc(100% - 2rem));
  margin: clamp(1rem, 6vh, 4rem) 0 0 clamp(1.25rem, 5vw, 4.5rem);
  animation: rise-in 1.1s var(--ease) both;
}

.eyebrow {
  margin: 0 0 0.65rem;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
}

.journey-intro h1 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: 0.01em;
  color: var(--ivory);
  max-width: 12ch;
}

.lede {
  margin: 1.1rem 0 1.6rem;
  max-width: 34ch;
  font-size: 0.98rem;
  font-weight: 300;
  line-height: 1.65;
  color: rgba(247, 244, 239, 0.86);
}

.btn-gold {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.85rem 1.35rem;
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--ivory);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}

.btn-gold:hover,
.btn-gold:focus-visible {
  background: var(--gold);
  color: var(--ink);
  outline: none;
}

.play-icon {
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 5px 0 5px 8px;
  border-color: transparent transparent transparent currentColor;
}

.scroll-hint {
  display: none;
  margin: 2.75rem 0 0;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(247, 244, 239, 0.55);
  animation: pulse-soft 2.8s ease-in-out infinite;
}

.scroll-hint span {
  display: block;
  margin-top: 0.45rem;
  letter-spacing: 0;
  text-align: center;
  width: fit-content;
}

@media (min-width: 1100px) {
  .scroll-hint {
    display: block;
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse-soft {
  0%,
  100% {
    opacity: 0.45;
  }
  50% {
    opacity: 0.9;
  }
}

/* ---------- Panel ---------- */

.journey-panel {
  position: absolute;
  z-index: 5;
  top: 4.8rem;
  right: clamp(0.75rem, 2vw, 1.5rem);
  bottom: 7.5rem;
  width: min(24.5rem, calc(100% - 1.5rem));
  padding: 1.35rem 1.35rem 1.2rem;
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 24px 60px rgba(20, 18, 16, 0.28);
  overflow: auto;
  backdrop-filter: blur(10px);
  animation: panel-in 0.9s var(--ease) 0.15s both;
}

.journey-panel.is-changing {
  animation: panel-swap 0.45s var(--ease);
}

.panel-meta {
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.journey-panel h2 {
  margin: 0.45rem 0 0.2rem;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.9rem, 3vw, 2.35rem);
  font-weight: 500;
  line-height: 1.1;
}

.chapter-kicker {
  margin: 0 0 1rem;
  font-size: 0.92rem;
  font-weight: 300;
  color: rgba(44, 40, 36, 0.72);
}

.chapter-figure {
  margin: 0 0 1rem;
  overflow: hidden;
}

.chapter-figure img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}

.journey-panel:hover .chapter-figure img {
  transform: scale(1.03);
}

.chapter-body p {
  margin: 0 0 0.9rem;
  font-size: 0.9rem;
  line-height: 1.6;
  color: rgba(44, 40, 36, 0.88);
}

.chapter-body blockquote {
  margin: 0 0 1.15rem;
  padding-left: 0.9rem;
  border-left: 1px solid var(--gold);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.15rem;
  font-style: italic;
  line-height: 1.45;
  color: var(--ink);
}

.btn-listen {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(184, 149, 79, 0.45);
  background: linear-gradient(180deg, #fffdf9, #f4eee4);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}

.btn-listen:hover,
.btn-listen:focus-visible {
  border-color: var(--gold);
  outline: none;
}

.btn-listen .duration {
  margin-left: auto;
  letter-spacing: 0.08em;
  color: rgba(44, 40, 36, 0.55);
}

.journal {
  margin-top: 1.15rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(44, 40, 36, 0.1);
}

.journal p {
  margin: 0 0 0.55rem;
  font-size: 0.88rem;
  line-height: 1.5;
  color: rgba(44, 40, 36, 0.78);
}

.journal-link {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-deep);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.journal-link:hover,
.journal-link:focus-visible {
  border-color: var(--gold-deep);
  outline: none;
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateX(22px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes panel-swap {
  0% {
    opacity: 0.55;
    transform: translateY(8px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- Rail ---------- */

.journey-rail {
  position: absolute;
  z-index: 6;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.4rem;
  padding: 0.85rem clamp(0.5rem, 2vw, 1.5rem) 1rem;
  background: linear-gradient(180deg, transparent, rgba(16, 14, 12, 0.82) 35%);
}

.rail-arrow {
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid rgba(247, 244, 239, 0.28);
  background: rgba(20, 18, 16, 0.45);
  color: var(--ivory);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}

.rail-arrow:hover,
.rail-arrow:focus-visible {
  border-color: var(--gold);
  background: rgba(20, 18, 16, 0.7);
  outline: none;
}

.rail-track {
  display: flex;
  gap: 0.65rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 0.25rem 0.15rem;
}

.rail-track::-webkit-scrollbar {
  display: none;
}

.chapter-card {
  flex: 0 0 auto;
  width: min(11.5rem, 42vw);
  scroll-snap-align: start;
  border: 1px solid rgba(247, 244, 239, 0.18);
  background: rgba(247, 244, 239, 0.08);
  color: var(--ivory);
  text-align: left;
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease), background 0.3s var(--ease);
}

.chapter-card:hover,
.chapter-card:focus-visible {
  border-color: rgba(184, 149, 79, 0.7);
  transform: translateY(-2px);
  outline: none;
}

.chapter-card.is-active {
  border-color: var(--gold);
  background: rgba(247, 244, 239, 0.14);
  box-shadow: 0 0 0 1px rgba(184, 149, 79, 0.25);
}

.chapter-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  filter: grayscale(0.35);
  transition: filter 0.35s var(--ease);
}

.chapter-card.is-active img,
.chapter-card:hover img {
  filter: grayscale(0);
}

.chapter-card .card-copy {
  padding: 0.55rem 0.65rem 0.7rem;
}

.chapter-card .num {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  color: var(--gold);
}

.chapter-card .name {
  display: block;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1rem;
  line-height: 1.15;
  margin-bottom: 0.2rem;
}

.chapter-card .blurb {
  display: block;
  font-size: 0.68rem;
  line-height: 1.35;
  color: rgba(247, 244, 239, 0.68);
}

/* ---------- Intro modal ---------- */

.intro-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  background: rgba(12, 10, 9, 0.88);
  padding: 1.5rem;
}

.intro-modal[hidden] {
  display: none;
}

.intro-modal video {
  width: min(960px, 100%);
  max-height: 80vh;
  background: #000;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.intro-close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  border: 0;
  background: transparent;
  color: var(--ivory);
  font-size: 2rem;
  cursor: pointer;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .journey-shell {
    overflow: auto;
  }

  .journey-intro {
    width: auto;
    margin: 1rem 1rem 0;
    padding-bottom: 1rem;
  }

  .journey-panel {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    width: auto;
    margin: 1rem;
    max-height: none;
  }

  .stage-ocean {
    clip-path: inset(12% 8% 38% 8%);
    opacity: 0.55;
  }

  .journey-rail {
    position: sticky;
    bottom: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .stage-hallway {
    transform: none;
  }
}
