/* Elsewhere — multi-page layout refinements (same theme tokens) */

.page-main {
  padding-top: var(--nav-h);
  min-height: 60vh;
}

/* Inner pages: keep navy nav (home uses white-on-hero until scroll) */
body:not(:has(.hero)) .nav:not(.scrolled) .nav__link,
body:not(:has(.hero)) .nav:not(.scrolled) .nav__cta,
body:not(:has(.hero)) .nav:not(.scrolled) .nav__logo-text {
  color: var(--text);
  text-shadow: none;
}

body:not(:has(.hero)) .nav:not(.scrolled) .nav__logo.has-image-logo .nav__logo-img,
body:not(:has(.hero)) .nav.scrolled .nav__logo.has-image-logo .nav__logo-img {
  filter: brightness(0) saturate(100%);
}

body.theme-blue:not(:has(.hero)) .nav.scrolled .nav__logo.has-image-logo .nav__logo-img {
  filter: brightness(0) invert(1);
}

.nav__link.is-active {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 0.35em;
}

/* Listing pages: content must be visible without homepage scroll animations */
.page-listing .reveal,
.page-listing .workshop.reveal {
  opacity: 1;
  transform: none;
}

.page-listing .journal-card {
  opacity: 1;
  --tile-opacity: 1;
}

.page-listing .workshop.is-listing-visible .workshop__teaser {
  opacity: 0.72;
  max-height: none;
  overflow: visible;
  transform: none;
}

.page-listing .workshop.is-listing-visible .workshop__expand {
  opacity: 1;
  transform: none;
}

.workshop__link-wrap {
  display: contents;
  color: inherit;
  text-decoration: none;
}

/* Listing pages */
.page-hero {
  padding: clamp(2.5rem, 6vw, 5rem) clamp(1.5rem, 5vw, 4rem) clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line);
}

.page-hero__index {
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  opacity: 0.7;
}

.page-hero__title {
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 0.95;
  max-width: 14ch;
}

.page-hero__lede {
  margin-top: 1.25rem;
  max-width: 42rem;
  font-size: 0.95rem;
  line-height: 1.7;
  color: color-mix(in srgb, var(--text) 72%, transparent);
}

.listing-grid {
  padding: clamp(2rem, 5vw, 4rem) clamp(1.5rem, 5vw, 4rem) clamp(4rem, 8vw, 6rem);
}

.listing-grid--journeys {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.listing-journey {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.25rem;
  align-items: center;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  transition: opacity 0.35s var(--ease);
}

.listing-journey:hover { opacity: 0.72; }

.listing-journey__index {
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  opacity: 0.55;
}

.listing-journey__name {
  display: block;
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: 500;
  letter-spacing: -0.02em;
}

.listing-journey__meta {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.8rem;
  opacity: 0.65;
}

.listing-journey__locale {
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.7;
  text-align: right;
}

.listing-journey--muted { opacity: 0.55; }
.listing-journey--muted:hover { opacity: 0.75; }

.listing-journey--open .listing-journey__name {
  color: var(--text);
}

.listing-journey__dispatch {
  display: inline-flex;
  margin-top: 0.55rem;
  margin-bottom: 0.15rem;
}

/* Standalone journey page — panel as document */
body.page-journey {
  overflow: auto;
}

.journey-doc {
  background: var(--bg);
}

.journey-doc .panel__close,
.journey-doc .workshop-page__close {
  display: none !important;
}

.journey-doc__back,
.detail-back {
  position: fixed;
  top: calc(var(--nav-h) + 0.75rem);
  left: clamp(1rem, 3vw, 2rem);
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--ui);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(12px);
  color: var(--text);
  text-decoration: none;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: border-color 0.4s var(--ease);
}

.journey-doc__back:hover,
.detail-back:hover {
  border-color: var(--text);
}

/* Make panel flow in document (not fixed overlay) */
.journey-doc.panel {
  position: relative;
  inset: auto;
  transform: none;
  overflow: visible;
  z-index: 1;
  min-height: auto;
}

.journey-doc .panel__hero {
  margin-top: 0;
}

.journey-doc .panel__content {
  padding-bottom: clamp(4rem, 8vw, 7rem);
}

/* Workshop as real page */
.workshop-doc.workshop-page {
  position: relative;
  inset: auto;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
  overflow: visible;
  z-index: 1;
  display: block;
}

.workshop-doc.workshop-page.open,
.workshop-doc {
  /* always visible */
}

.workshop-doc .workshop-page__hero {
  min-height: 70vh;
}

.workshop-doc .workshop-page__content {
  padding-bottom: clamp(4rem, 8vw, 7rem);
}

.workshop-doc .workshop-page__back {
  display: inline-flex;
}

/* Journal detail */
.journal-doc {
  padding: clamp(2rem, 5vw, 4rem) clamp(1.5rem, 5vw, 4rem) clamp(4rem, 8vw, 6rem);
  max-width: 920px;
  margin: 0 auto;
}

.journal-doc__index {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.65;
  margin-bottom: 1rem;
}

.journal-doc__title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 2rem;
}

.journal-doc__cover {
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  margin-bottom: 2rem;
  background: var(--ui);
}

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

.journal-doc__gallery {
  display: grid;
  gap: 1rem;
  margin: 2rem 0;
}

.journal-doc__gallery img {
  width: 100%;
  height: auto;
  display: block;
}

.journal-doc__body {
  font-size: 1rem;
  line-height: 1.85;
  color: color-mix(in srgb, var(--text) 78%, transparent);
}

.journal-doc__body p + p { margin-top: 1.25rem; }

/* About page */
.about-page {
  padding: clamp(2.5rem, 6vw, 5rem) clamp(1.5rem, 5vw, 4rem) clamp(4rem, 8vw, 7rem);
  max-width: 1100px;
}

/* Contact popup (pages) */
.contact-popup {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.contact-popup.is-open { display: flex; }

.contact-popup__backdrop {
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--text) 35%, transparent);
  backdrop-filter: blur(8px);
}

.contact-popup__sheet {
  position: relative;
  width: min(420px, 100%);
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--ui);
  padding: clamp(1.75rem, 4vw, 2.5rem);
}

.contact-popup__close {
  position: absolute;
  top: 0.75rem;
  right: 0.9rem;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.contact-popup__label {
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.6;
  margin-bottom: 0.75rem;
}

.contact-popup__title {
  font-size: 1.75rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

.contact-popup__email,
.contact-popup__phone {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.contact-popup__email a,
.contact-popup__phone a {
  color: inherit;
}

.contact-popup__social {
  display: flex;
  gap: 1.25rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.contact-popup__social a {
  color: inherit;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
}

.editorial-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 13000;
  max-width: min(480px, calc(100vw - 2rem));
  padding: 1rem 1.25rem;
  background: var(--text);
  color: var(--bg);
  font-size: 0.85rem;
  line-height: 1.5;
  text-align: center;
}

.editorial-toast[hidden] { display: none !important; }

@media (max-width: 720px) {
  .listing-journey {
    grid-template-columns: auto 1fr;
  }
  .listing-journey__locale {
    grid-column: 2;
    text-align: left;
    margin-top: -0.5rem;
  }
  .journey-doc__back,
  .detail-back {
    top: auto;
    bottom: 1.25rem;
    left: 1rem;
  }
}
