.journeys-page {
  --cerulean: var(--mf-blue, #064b73);
  --header-green: #2a6149;
  --peach: var(--mf-peach, #e8cbb9);
  --title-butter: var(--mf-gold, #e7bf72);
  --sage: var(--mf-sage, #c5c09c);
  --canvas: var(--mf-warm-ivory, #f8eee3);
  --panel-gutter: clamp(18px, 4vw, 70px);
  --panel-gap: clamp(24px, 4.4vw, 60px);
  color: #332e29;
  background: var(--canvas);
}
.journeys-page .site-header { color: var(--header-green); background: var(--mf-peach, #e8cbb9); }
.journeys-page .brand,
.journeys-page .site-header.is-scrolled .brand { background: var(--cerulean); }
.journeys-page .brand { animation: journey-arrival 450ms ease-in-out 100ms both; }
.journeys-page .primary-nav,
.journeys-page .menu-toggle { animation: journey-arrival 450ms ease-in-out 100ms both; }
.journeys-page .brand:focus-visible,
.journeys-page .site-header:focus-within .primary-nav,
.journeys-page .menu-toggle:focus-visible { animation: none; opacity: 1; }
.journeys-page .nav-link[aria-current="page"]::after { transform: scaleX(1); }
.journeys-page a:focus-visible { outline: 2px solid var(--forest); outline-offset: 7px; }

.journeys-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--forest);
  pointer-events: none;
  animation: journeys-opening 450ms ease-in-out both;
}
@keyframes journeys-opening {
  from { opacity: 1; visibility: visible; }
  to { opacity: 0; visibility: hidden; }
}

.journeys-page main { padding: clamp(112px, 10vw, 154px) 0 var(--panel-gap); background: var(--canvas); }
.journeys-heading {
  width: min(1500px, calc(100% - var(--panel-gutter) - var(--panel-gutter)));
  margin: 0 auto;
  padding: clamp(64px, 7vw, 110px) 24px clamp(40px, 4.5vw, 64px);
  background-color: var(--terra);
  text-align: center;
  animation: journeys-heading-background 400ms ease-in-out 100ms both;
}
@keyframes journeys-heading-background {
  from { background-color: var(--canvas); }
  to { background-color: var(--terra); }
}
.journeys-heading h1 { margin: 0; color: var(--title-butter); font-size: clamp(3.5rem, 6vw, 6.25rem); line-height: 1.05; animation: journey-arrival 650ms ease-in-out 200ms both; }
/* The artwork itself has transparent pixels behind its Castellar letterforms. */
.journeys-heading p {
  margin: clamp(24px, 3vw, 42px) 0 0;
  color: var(--mf-gold, #e7bf72);
  font-family: var(--display);
  font-size: clamp(1.85rem, 2.8vw, 2.6rem);
  font-optical-sizing: auto;
  font-weight: 300;
  letter-spacing: .045em;
  line-height: 1.15;
  text-wrap: balance;
  animation: journey-arrival 650ms ease-in-out 350ms both;
}

.journeys-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 3.4vw, 54px);
  width: min(1500px, calc(100% - var(--panel-gutter) - var(--panel-gutter)));
  margin: 0 auto;
  padding: clamp(34px, 4vw, 60px) clamp(24px, 4vw, 65px) clamp(64px, 7vw, 105px);
  background-color: var(--sage);
  animation: journeys-gallery-background 400ms ease-in-out 400ms both;
}
@keyframes journeys-gallery-background {
  from { background-color: var(--canvas); }
  to { background-color: var(--sage); }
}
.journeys-grid:focus-within { animation: none; background-color: var(--sage); }
.journey-card { display: flex; flex-direction: column; min-width: 0; animation: journey-arrival 750ms ease-in-out var(--arrival-delay, 550ms) both; }
.journey-card:nth-child(2) { --arrival-delay: 700ms; }
.journey-card:nth-child(3) { --arrival-delay: 850ms; }
@keyframes journey-arrival { from { opacity: 0; } to { opacity: 1; } }
.journey-card:focus-within { animation: none; opacity: 1; }
.journey-card__photo { position: relative; display: block; overflow: hidden; aspect-ratio: 4 / 5; background: #e8ddcd; }
.journey-card__photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ecru);
  opacity: 0;
  pointer-events: none;
  transition: opacity 1100ms ease-in-out;
}
.journey-card__photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.8s ease; }
.journey-card__photo:hover img, .journey-card__photo:focus-visible img { transform: scale(1.035); }
.journeys-grid:has(.journey-card :focus-visible) .journey-card:not(:focus-within) .journey-card__photo::after { opacity: .5; }
@media (hover: hover) and (pointer: fine) {
  .journeys-grid:has(.journey-card:hover) .journey-card .journey-card__photo::after { opacity: .5; }
  .journeys-grid:has(.journey-card:hover) .journey-card:hover .journey-card__photo::after { opacity: 0; }
}
.journey-card__copy { display: flex; flex: 1; flex-direction: column; align-items: center; text-align: center; padding-top: 28px; }
.journey-card h2 { margin: 0; color: var(--forest); font-family: var(--display); font-size: clamp(2.6rem, 3.6vw, 3.65rem); font-weight: 300; letter-spacing: .04em; line-height: 1.1; }
.journey-card__tagline { max-width: 100%; margin: 18px auto 26px; font-size: 1rem; letter-spacing: .025em; line-height: 1.7; }
.journey-card__tagline > span { display: block; }
.journey-card__link { display: inline-flex; align-items: center; gap: 13px; min-height: 56px; margin-top: auto; padding: 16px 22px; border: 1px solid var(--cerulean); color: var(--cerulean); font-size: clamp(.9rem, 1.05vw, 1.05rem); letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; transition: background-color 300ms ease, color 300ms ease; }
.journey-card__link > span[aria-hidden] { font-size: 1.15rem; line-height: 1; letter-spacing: 0; transition: transform 300ms ease; }
.journey-card__link:hover { background: var(--cerulean); color: var(--canvas); }
.journey-card__link:hover > span[aria-hidden] { transform: translateX(4px); }

.journeys-page .site-footer { display: flex; min-height: clamp(230px, 31vw, 420px); flex-direction: column; align-items: center; justify-content: center; padding: 50px 24px; background: var(--mf-journeys-footer, #b85e43); color: var(--mf-gold, #e7bf72); }
.journeys-page .footer-mark { display: block; width: clamp(170px, 19vw, 245px); aspect-ratio: 1; background: var(--mf-sage, #c5c09c); -webkit-mask: url("../assets/mf-mark.png") center / contain no-repeat; mask: url("../assets/mf-mark.png") center / contain no-repeat; }
.journeys-page .social-icons { display: flex; gap: 27px; align-items: center; justify-content: center; margin: 0; padding: 0; list-style: none; }
.journeys-page .social-icon { display: grid; width: 38px; height: 38px; place-items: center; color: var(--mf-gold, #e7bf72); }
.journeys-page .social-icon svg { width: 24px; height: 24px; }
.journeys-page.has-reveal .footer-reveal { opacity: 0; transform: translateY(28px); transition: opacity 700ms ease, transform 700ms cubic-bezier(.2,.7,.2,1); }
.journeys-page.has-reveal .footer-reveal.is-visible { opacity: 1; transform: translateY(0); }
.journeys-page.has-reveal .social-icons.footer-reveal { transition-delay: 120ms; }

@media (max-width: 1100px) {
  .journeys-page .mobile-nav,
  .journeys-page .site-header.is-scrolled .mobile-nav { background: var(--mf-peach, #e8cbb9); }
  .journeys-page .mobile-nav .nav-link,
  .journeys-page .site-header.is-scrolled .mobile-nav .nav-link { color: var(--header-green); }
}
@media (max-width: 1100px) {
  .journeys-heading { padding-top: 70px; padding-bottom: 44px; }
  .journeys-heading .page-title__letters { font-size: min(1em, calc((100vw - var(--panel-gutter) - var(--panel-gutter) - 48px) / 6.58)); }
  .journeys-grid { grid-template-columns: 1fr; gap: 76px; }
  .journey-card { width: min(100%, 640px); margin-inline: auto; }
  .journey-card__photo { aspect-ratio: 5 / 4; }
  .journey-card__copy { padding-top: 25px; }
  .journey-card h2 { font-size: 3rem; }
  .journey-card__tagline { margin-top: 16px; margin-bottom: 18px; }
  .journeys-page .site-footer { min-height: 260px; }
}
@media (max-width: 400px) {
  .journey-card__link { gap: 8px; padding-inline: 15px; font-size: .8rem; letter-spacing: .1em; }
}
@media (prefers-reduced-motion: reduce) {
  .journeys-page::before { display: none; animation: none; }
  .journeys-heading { animation: none; }
  .journeys-grid { animation: none; }
  .journeys-page .brand,
  .journeys-heading h1,
  .journeys-heading p,
  .journeys-page .primary-nav,
  .journeys-page .menu-toggle,
  .journey-card { animation: none; opacity: 1; transform: none; }
  .journey-card__photo::after { transition: none; }
  .journey-card__photo:hover img, .journey-card__photo:focus-visible img { transform: none; }
  .journeys-page.has-reveal .footer-reveal { opacity: 1; transform: none; transition: none; }
}
