/* ═══════════════════════════════════════════════════════════════════════
   The Journey Into the Holy of Holies

   Built entirely on the Broadsheet design system's own tokens (--color-bg,
   --color-text, --color-accent, --color-accent-2, --font-heading) and its
   existing motion engine ([data-scrub], [data-reveal], [data-ink-ground] —
   see embassy-motion.js). No new colours, no new animation engine — this
   file is composition and choreography on top of what already exists.

   The whole journey lives in ink (--color-text as background) until the
   Holy of Holies, which is the one deliberate inversion: the page turns to
   paper-light (--color-bg) for the climax and stays there through the final
   invitation. That inversion IS the "dramatic environment change" — no new
   colour required to earn it.
   ═══════════════════════════════════════════════════════════════════════ */

.journey-main {
  background: var(--color-text);
  color: var(--color-bg);
}

.journey-station {
  position: relative;
  overflow: hidden;
}

.journey-eyebrow {
  display: block;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.72;
}

.journey-num {
  display: block;
  font-family: var(--font-heading);
  font-size: clamp(13px, 1.6vw, 17px);
  letter-spacing: 0.32em;
  opacity: 0.5;
  margin-bottom: clamp(10px, 1.6vw, 16px);
}

.journey-verse {
  font-family: var(--font-heading);
  font-style: italic;
  letter-spacing: -0.005em;
}

.journey-verse-ref {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.68;
}

/* — the scroll cue on the opening screen: draws the eye, then quietly recedes — */
.journey-cue { animation: journey-cue-fade 1.6s ease 4.5s both; }
@keyframes journey-cue-fade { from { opacity: 1; } to { opacity: 0.32; } }

/* — the sound toggle — */
.journey-sound-toggle {
  position: fixed;
  z-index: 500;
  right: clamp(16px, 3vw, 32px);
  bottom: clamp(16px, 3vw, 32px);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-text);
  color: var(--color-bg);
  border: 1px solid color-mix(in srgb, var(--color-bg) 25%, transparent);
  cursor: pointer;
  opacity: 0.72;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.journey-sound-toggle:hover { opacity: 1; transform: scale(1.06); }
.journey-sound-toggle[hidden] { display: none; }
.journey-sound-bars { display: flex; align-items: flex-end; gap: 3px; height: 16px; }
.journey-sound-bars span { width: 2px; background: currentColor; height: 6px; opacity: 0.55; transition: opacity 0.3s ease; }
.journey-sound-toggle.is-playing .journey-sound-bars span { opacity: 1; animation: journey-bar 1.1s ease-in-out infinite; }
.journey-sound-toggle.is-playing .journey-sound-bars span:nth-child(1) { animation-delay: 0s; }
.journey-sound-toggle.is-playing .journey-sound-bars span:nth-child(2) { animation-delay: 0.18s; }
.journey-sound-toggle.is-playing .journey-sound-bars span:nth-child(3) { animation-delay: 0.36s; }
@keyframes journey-bar { 0%, 100% { height: 6px; } 50% { height: 16px; } }

/* — Outer Court: a camera settling into focus as you arrive — */
[data-reveal] .journey-focus-pull { opacity: 0; filter: blur(16px); transform: scale(1.06); }
[data-reveal].is-in .journey-focus-pull {
  opacity: 1; filter: blur(0); transform: scale(1);
  transition: opacity 1.2s cubic-bezier(.16,.84,.24,1), filter 1.2s cubic-bezier(.16,.84,.24,1), transform 1.4s cubic-bezier(.16,.84,.24,1);
}
.journey-horizon {
  display: block; height: 1px; width: 0;
  background: color-mix(in srgb, var(--color-bg) 55%, transparent);
  transition: width 1.1s cubic-bezier(.16,.84,.24,1) 0.55s;
}
[data-reveal].is-in .journey-horizon { width: clamp(80px, 14vw, 180px); }

/* — Altar: something laid down, settling under its own weight; an ember catching — */
[data-reveal] .journey-settle { opacity: 0; transform: translateY(-38px); }
[data-reveal].is-in .journey-settle { animation: journey-settle 1.15s cubic-bezier(.22,1,.36,1) both; }
@keyframes journey-settle {
  0%   { opacity: 0; transform: translateY(-38px); }
  60%  { opacity: 1; transform: translateY(6px); }
  100% { opacity: 1; transform: translateY(0); }
}
.journey-ember-line {
  display: block; height: 1px; width: 0; margin: clamp(24px, 3vw, 34px) auto 0;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--color-accent-2) 65%, var(--color-bg)), transparent);
  transition: width 1s cubic-bezier(.16,.84,.24,1) 0.6s;
  animation: journey-ember-flicker 2.6s ease-in-out infinite;
}
[data-reveal].is-in .journey-ember-line { width: clamp(70px, 10vw, 140px); }
@keyframes journey-ember-flicker { 0%, 100% { opacity: 0.65; } 50% { opacity: 1; } }

/* — Laver: rising through the surface, ripples, a faint reflection — */
[data-reveal] .journey-surface { opacity: 0; filter: blur(9px); transform: translateY(24px); }
[data-reveal].is-in .journey-surface {
  opacity: 1; filter: blur(0); transform: translateY(0);
  transition: opacity 1.25s cubic-bezier(.16,.84,.24,1), filter 1.25s cubic-bezier(.16,.84,.24,1), transform 1.25s cubic-bezier(.16,.84,.24,1);
}
.journey-reflection {
  display: block; transform: scaleY(-1); transform-origin: top center;
  opacity: 0; filter: blur(2px);
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0.55), transparent 75%);
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.55), transparent 75%);
}
[data-reveal].is-in .journey-reflection { opacity: 0.16; transition: opacity 1.4s ease 0.3s; }
.journey-ripples { position: absolute; left: 50%; top: 50%; width: 1px; height: 1px; pointer-events: none; }
.journey-ripple {
  position: absolute; left: 50%; top: 50%; width: 60px; height: 60px; margin: -30px 0 0 -30px;
  border: 1px solid color-mix(in srgb, var(--color-accent) 45%, transparent);
  border-radius: 50%; opacity: 0; transform: scale(0.3);
}
[data-reveal].is-in .journey-ripple { animation: journey-ripple 3.4s ease-out infinite; }
[data-reveal].is-in .journey-ripple:nth-child(2) { animation-delay: 1.1s; }
[data-reveal].is-in .journey-ripple:nth-child(3) { animation-delay: 2.2s; }
@keyframes journey-ripple {
  0%   { opacity: 0.55; transform: scale(0.3); }
  100% { opacity: 0; transform: scale(3.6); }
}

/* — the laver: water, without a photograph of water — */
.journey-laver-bg {
  position: absolute;
  inset: -10%;
  background:
    radial-gradient(60% 50% at 30% 20%, color-mix(in srgb, var(--color-accent) 32%, transparent) 0%, transparent 60%),
    radial-gradient(50% 60% at 75% 70%, color-mix(in srgb, var(--color-accent) 22%, transparent) 0%, transparent 65%),
    var(--color-text);
  filter: blur(0px);
  animation: journey-water 14s ease-in-out infinite alternate;
}
@keyframes journey-water {
  0% { transform: translate3d(0, 0, 0) scale(1.05); }
  100% { transform: translate3d(-1.5%, 1.5%, 0) scale(1.12); }
}
.journey-laver-line {
  position: absolute; left: 0; right: 0; height: 1px;
  background: color-mix(in srgb, var(--color-bg) 22%, transparent);
}

/* — the lampstand: light as the storytelling device, pinned scrub scene — */
.journey-lamp-wrap { position: relative; height: 220vh; background: var(--color-text); }
.journey-lamp-stage { position: sticky; top: 0; height: 100svh; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.journey-lamp-glow {
  position: absolute; inset: 0;
  background: radial-gradient(40% 48% at 50% 56%, color-mix(in srgb, var(--color-accent) 55%, transparent) 0%, transparent 70%);
  opacity: var(--q, 0);
}
.journey-lamp-ray {
  position: absolute; left: 50%; top: 46%; width: 1px; height: 62vh;
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--color-bg) 55%, transparent) 40%, transparent);
  opacity: calc(var(--q, 0) * 0.75);
  transform-origin: top center;
}
.journey-lamp-text { position: relative; z-index: 2; text-align: center; opacity: calc(0.2 + var(--q, 0) * 0.8); }

/* — the veil: two panels parting on held scroll progress (--q) — */
.journey-veil-wrap { position: relative; height: 260vh; background: var(--color-text); }
.journey-veil-stage { position: sticky; top: 0; height: 100svh; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.journey-veil-light {
  position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(55% 55% at 50% 50%, color-mix(in srgb, var(--color-accent-2) 30%, white 8%) 0%, color-mix(in srgb, var(--color-accent) 20%, transparent) 45%, transparent 78%);
  opacity: calc(var(--q, 0) * 1.15);
}
.journey-veil-panel {
  position: absolute; top: 0; bottom: 0; width: 52%; z-index: 1;
  background: linear-gradient(180deg, color-mix(in srgb, var(--color-text) 96%, black) 0%, color-mix(in srgb, var(--color-accent-2) 10%, var(--color-text)) 50%, color-mix(in srgb, var(--color-text) 96%, black) 100%);
  will-change: transform;
}
.journey-veil-panel::after {
  content: ""; position: absolute; inset: 0; opacity: 0.4; mix-blend-mode: overlay;
  background-image: repeating-linear-gradient(90deg, color-mix(in srgb, var(--color-bg) 12%, transparent) 0 2px, transparent 2px 16px);
}
.journey-veil-panel-l { left: 0; transform: translateX(calc(var(--q, 0) * -101%)); box-shadow: 30px 0 70px rgba(0, 0, 0, 0.55); }
.journey-veil-panel-r { right: 0; transform: translateX(calc(var(--q, 0) * 101%)); box-shadow: -30px 0 70px rgba(0, 0, 0, 0.55); }
.journey-veil-text {
  position: relative; z-index: 2; text-align: center; color: var(--color-bg);
  opacity: calc(1 - var(--q, 0) * 1.8);
  transform: translateY(calc(var(--q, 0) * -26px));
}

/* — the Holy of Holies: the one palette inversion in the whole journey — */
.journey-holy-of-holies {
  background: var(--color-bg);
  color: var(--color-text);
}
.journey-holy-of-holies .journey-eyebrow,
.journey-holy-of-holies .journey-verse-ref { color: color-mix(in srgb, var(--color-text) 65%, transparent); }

/* — final invitation buttons row — */
.journey-steps { display: grid; gap: clamp(18px, 3vw, 32px); grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.journey-step {
  display: block; padding: clamp(20px, 2.6vw, 28px) 0; text-decoration: none; color: inherit;
  border-top: 1px solid color-mix(in srgb, var(--color-text) 18%, transparent);
  transition: opacity 0.35s ease;
}
.journey-step-label {
  font-family: var(--font-heading); font-size: clamp(20px, 2.2vw, 27px); letter-spacing: -0.01em;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.journey-step-label::after { content: "→"; transition: transform 0.3s cubic-bezier(.16,.84,.24,1); }
.journey-step:hover .journey-step-label::after { transform: translateX(6px); }
.journey-step-note { display: block; margin-top: 8px; font-size: 13px; opacity: 0.65; max-width: 32ch; }

@media (max-width: 780px) {
  .journey-veil-wrap { height: 170vh; }
  .journey-lamp-wrap { height: 160vh; }
  .journey-lamp-ray { height: 40vh; }
}

@media (prefers-reduced-motion: reduce) {
  .journey-laver-bg { animation: none !important; }
  .journey-step-label::after { transition: none !important; }
  .journey-cue { animation: none !important; opacity: 0.6; }
  .journey-sound-bars span { animation: none !important; }
  .journey-focus-pull, .journey-settle, .journey-surface {
    opacity: 1 !important; filter: none !important; transform: none !important;
    animation: none !important; transition: none !important;
  }
  .journey-horizon, .journey-ember-line { width: 100px !important; transition: none !important; animation: none !important; }
  .journey-ripple { animation: none !important; opacity: 0 !important; }
  .journey-reflection { transition: none !important; }
}
