/* The 7-minute Journey v3: a film you tap through. Real photographs, one line at a time. */
.journey-page { background: #0b0a08; color: var(--on-dark); min-height: 100vh; }

.j-stage { position: fixed; inset: 0; overflow: hidden; background: #0b0a08; }
.j-bg { position: absolute; inset: 0; opacity: 0; transition: opacity 1.6s ease; }
.j-bg.on { opacity: 1; }
/* Each photograph develops like a print: it arrives grey and dark, then comes up into colour while the
   camera drifts slowly in. It stays dim enough behind the words for white text to read. */
.j-bg img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.12); transition: transform 14s ease-out, filter 2.8s ease; filter: grayscale(.9) brightness(.36); }
.j-bg.on img { transform: scale(1); filter: grayscale(0) brightness(.78) saturate(.95); }
/* Part cards show the photograph almost as taken */
.j-stage[data-kind="chapter"] .j-bg.on img, .j-stage[data-kind="intro"] .j-bg.on img { filter: grayscale(0) brightness(.95) saturate(1); }
/* Light breaking out of the tomb: the new photograph opens from a point of light */
.j-bg.iris { z-index: 1; opacity: 1; clip-path: circle(0% at 50% 46%); transition: clip-path 3.2s cubic-bezier(.55, 0, .15, 1); }
.j-bg.iris.open { clip-path: circle(150% at 50% 46%); }
/* Two shades that cross-fade (gradients cannot): an even veil behind centred words, and a floor of shadow
   under the title of a part card. */
.j-scrim { position: absolute; inset: 0; z-index: 1; }
.j-scrim::before, .j-scrim::after { content: ""; position: absolute; inset: 0; transition: opacity 1.4s ease; }
.j-scrim::before { background: radial-gradient(ellipse 90% 80% at 50% 50%, rgba(8, 7, 5, .62) 0%, rgba(8, 7, 5, .76) 100%); }
.j-stage[data-bg="black"] .j-scrim::before { background: radial-gradient(ellipse 90% 80% at 50% 50%, rgba(4, 3, 2, .7) 0%, rgba(4, 3, 2, .88) 100%); }
.j-scrim::after { opacity: 0; background: linear-gradient(180deg, rgba(8, 7, 5, .5) 0%, rgba(8, 7, 5, .08) 26%, rgba(8, 7, 5, .2) 48%, rgba(8, 7, 5, .82) 78%, rgba(8, 7, 5, .95) 100%); }
.j-stage[data-kind="chapter"] .j-scrim::before, .j-stage[data-kind="intro"] .j-scrim::before { opacity: 0; }
.j-stage[data-kind="chapter"] .j-scrim::after, .j-stage[data-kind="intro"] .j-scrim::after { opacity: 1; }
/* A warm presence for the prayer's close */
.j-glow { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(ellipse 70% 50% at 50% 42%, rgba(255, 208, 40, .2) 0%, rgba(255, 208, 40, .07) 45%, rgba(255, 208, 40, 0) 72%); opacity: 0; transform: scale(.8); transition: opacity 3.5s ease, transform 7s ease; }
.j-stage[data-fx="bloom"] .j-glow { opacity: 1; transform: scale(1); }

/* Story bars across the top, one per moment */
/* Four bars across the top, one per part, each filling as the part goes on */
.j-bars { position: fixed; top: 12px; left: 14px; right: 14px; display: flex; gap: 6px; z-index: 6; }
.j-bars i { flex: 1; height: 3px; border-radius: 2px; background: rgba(251, 247, 239, .26); position: relative; overflow: hidden; }
.j-bars b { position: absolute; inset: 0; background: var(--sun); transform: scaleX(0); transform-origin: left; transition: transform .7s cubic-bezier(.2, .7, .2, 1); }

.j-top { position: fixed; top: 22px; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: 8px 16px; z-index: 5; }
.j-brand { font: 800 20px/1 var(--display); font-stretch: 72%; text-transform: uppercase; color: var(--on-dark); text-decoration: none; display: inline-flex; align-items: flex-start; gap: 3px; }
.j-brand { position: relative; }
.j-brand::before { content: ""; position: absolute; inset: -12px -8px; }
.j-brand .brand-mark { width: 8px; height: 11px; margin-top: -3px; }
.j-top-right { display: flex; gap: 8px; }
.j-icon { width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: rgba(10, 8, 6, .4); color: var(--on-dark); border: 1px solid rgba(251, 247, 239, .28); cursor: pointer; text-decoration: none; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: background .15s ease, color .15s ease, border-color .15s ease; }
.j-icon:hover { background: var(--sun); color: var(--ink); border-color: var(--sun); }
.j-icon svg { width: 19px; height: 19px; }

.j-scenes { position: absolute; inset: 0; z-index: 2; }
.j-scene { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; text-align: center; padding: 100px 24px 120px; opacity: 0; visibility: hidden; transition: opacity .9s ease, visibility 0s linear .9s; overflow-y: auto; }
.j-scene.is-active { opacity: 1; visibility: visible; transition: opacity .9s ease, visibility 0s; }
.j-scene .j-lines { width: 100%; max-width: 920px; margin: auto 0; }
.j-line { font: 700 clamp(30px, 5vw, 58px)/1.1 var(--ui); font-stretch: 84%; letter-spacing: -.02em; margin: 0 0 .26em; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .65), 0 2px 30px rgba(0, 0, 0, .9); opacity: 0; transform: translateY(16px); filter: blur(6px); transition: opacity 1s ease, transform 1s ease, filter 1s ease; text-wrap: balance; }
.j-line.on { opacity: 1; transform: none; filter: none; }
/* Lines are split into words that rise into place one after another */
.j-line.split { opacity: 1; transform: none; filter: none; transition: none; }
.j-line .w { display: inline-block; opacity: 0; transform: translateY(.42em); transition: opacity .8s ease, transform 1s cubic-bezier(.2, .7, .2, 1); transition-delay: calc(var(--i, 0) * 48ms + var(--d, 0ms)); }
.j-line.on .w { opacity: 1; transform: none; }
.j-dense .j-line { font-size: clamp(25px, 4vw, 46px); }
/* The line that matters most on a screen: highlighted, like a marked verse */
.j-line.big { --d: 380ms; display: block; width: fit-content; max-width: 100%; margin: .32em auto .3em; padding: .08em .2em .04em; background: linear-gradient(var(--sun), var(--sun)) no-repeat 0 0 / 0% 100%; transition: background-size .8s cubic-bezier(.65, 0, .25, 1); color: var(--ink); text-shadow: none; font: 800 clamp(44px, 8.6vw, 112px)/.9 var(--display); font-stretch: 66%; text-transform: uppercase; letter-spacing: -.01em; }
.j-dense .j-line.big { font-size: clamp(38px, 7vw, 88px); }
.j-line.big.on { background-size: 100% 100%; }

/* Title cards: the opening and the start of each part. Photograph clear, title low on the left. */
.j-scene[data-kind="chapter"], .j-scene[data-kind="intro"] { align-items: flex-start; text-align: left; padding: 100px clamp(22px, 6vw, 80px) clamp(96px, 15vh, 150px); }
.j-scene[data-kind="chapter"] .j-lines, .j-scene[data-kind="intro"] .j-lines { margin: auto 0 0; max-width: 1000px; }
.j-reveal { opacity: 0; transform: translateY(14px); transition: opacity .9s ease, transform 1.1s cubic-bezier(.2, .7, .2, 1); }
.j-reveal.on { opacity: 1; transform: none; }
.j-part { font: 800 13px/1 var(--ui); letter-spacing: .18em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 12px; margin: 0 0 22px; color: var(--on-dark); text-shadow: 0 1px 12px rgba(10, 8, 6, .9); }
.j-part b { background: var(--sun); color: var(--ink); padding: 6px 9px; border-radius: 6px; text-shadow: none; }
.j-ch-title { font: 800 clamp(64px, min(13vw, 19vh), 190px)/.84 var(--display); font-stretch: 66%; text-transform: uppercase; letter-spacing: -.01em; margin: 0 0 24px; color: var(--on-dark); text-shadow: 0 2px 4px rgba(10, 8, 6, .35), 0 6px 46px rgba(10, 8, 6, .7); }
.j-ch-title .hl { display: table; margin-top: .07em; padding: .05em .12em 0; line-height: .9; color: var(--ink); text-shadow: none; background: linear-gradient(var(--sun), var(--sun)) no-repeat 0 0 / 0% 100%; transition: background-size .9s cubic-bezier(.65, 0, .25, 1) .35s; }
.j-ch-title.on .hl { background-size: 100% 100%; }
.j-scene[data-kind="intro"] .j-ch-title { font-size: clamp(64px, min(11vw, 15vh), 160px); }
.j-time { font: 400 italic clamp(20px, 2vw, 25px)/1.4 var(--read); margin: 0; color: rgba(251, 247, 239, .94); text-shadow: 0 1px 14px rgba(10, 8, 6, .9); }
.j-parts { list-style: none; padding: 0; margin: 0 0 20px; display: flex; flex-wrap: wrap; gap: 8px 22px; font: 700 15.5px/1.3 var(--ui); color: var(--on-dark); text-shadow: 0 1px 12px rgba(10, 8, 6, .9); }
.j-parts b { color: var(--sun); margin-right: 8px; }
.j-actions.j-start { align-items: flex-start; margin-top: 30px; }
.j-start .btn-quiet { padding-left: 4px; }
.j-caption { font: 500 italic 20px/1.4 var(--read); color: var(--sun); opacity: 0; transition: opacity 1s ease; margin: 0 0 26px; }
.j-caption.on { opacity: 1; }
.j-ref { font: 800 12.5px/1 var(--ui); letter-spacing: .18em; text-transform: uppercase; color: var(--muted-on-dark); margin-top: 28px; opacity: 0; transition: opacity 1s ease; }
.j-ref.on { opacity: 1; }

.j-hint { position: fixed; bottom: 30px; left: 0; right: 0; text-align: center; font: 700 12px/1 var(--ui); letter-spacing: .2em; text-transform: uppercase; color: var(--muted-on-dark); opacity: 0; transition: opacity .8s ease; pointer-events: none; z-index: 4; }
.j-hint.on { opacity: 1; animation: jpulse 2.6s ease-in-out infinite; }
@keyframes jpulse { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }
.j-nav { position: fixed; bottom: 16px; right: 16px; display: flex; gap: 8px; z-index: 5; }
.j-nav .j-icon { width: 42px; height: 42px; }

/* .j-lines centres itself with auto margins, so a scene taller than the screen starts at the top and scrolls,
   instead of being cut off above (which justify-content: center does). */
/* Gates and interactive scenes */
.j-headline { font: 800 clamp(64px, 13vw, 190px)/.84 var(--display); font-stretch: 66%; text-transform: uppercase; margin: 0 0 40px; color: var(--on-dark); min-height: .84em; text-shadow: 0 4px 40px rgba(0, 0, 0, .6); }
.j-actions { display: flex; flex-direction: column; gap: 12px; align-items: center; opacity: 0; transition: opacity .8s ease; }
.j-actions.on { opacity: 1; }
.j-actions .btn { min-width: 270px; }
.j-actions .btn-quiet { background: none; border: 0; color: var(--muted-on-dark); font: 600 15px var(--ui); cursor: pointer; text-decoration: underline; text-underline-offset: 5px; padding: 12px; }
.j-actions .btn-quiet:hover { color: #fff; }

.j-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; max-width: 1000px; width: 100%; margin: 0 auto; text-align: left; opacity: 0; transition: opacity .8s ease; }
.j-cards.on { opacity: 1; }
.j-card { background: rgba(10, 8, 6, .55); border: 1px solid rgba(251, 247, 239, .2); border-radius: 18px; padding: 24px; display: flex; flex-direction: column; gap: 10px; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.j-card h3 { font: 800 34px/.95 var(--display); font-stretch: 68%; text-transform: uppercase; margin: 0; color: var(--sun); }
.j-card p { margin: 0; color: var(--on-dark); font: 400 17px/1.45 var(--read); flex: 1; }
.j-card a { display: inline-block; padding: 14px 0; margin: -8px 0 -14px; color: var(--on-dark); font: 700 14px/1 var(--ui); letter-spacing: .06em; text-transform: uppercase; text-decoration: none; }
.j-card a:hover { color: var(--sun); }

.j-form { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 440px; margin: 0 auto; }
.j-form input[type="email"] { min-height: 58px; border-radius: 999px; border: 1.5px solid rgba(251, 247, 239, .5); background: rgba(10, 8, 6, .45); color: #fff; font: 500 17px var(--ui); text-align: center; padding: 14px 22px; }
.j-form input::placeholder { color: rgba(251, 247, 239, .55); }
.j-form input:focus { outline: none; border-color: var(--sun); }
.j-small { font: 400 italic 17px/1.5 var(--read); color: var(--muted-on-dark); margin-top: 16px; }
.j-status { font-size: 15px; color: var(--sun); min-height: 1.4em; }
.j-share { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; max-width: 620px; margin: 0 auto; }
.j-share .btn { min-width: 0; }

/* Grace exit (a still page) */
.grace .j-line { opacity: 1; transform: none; filter: none; }
.grace .j-bg { opacity: 1; }
.grace .j-bg img { transform: none; }

/* No-JS reading mode */
.no-js .j-stage { position: static; }
.no-js .j-scene { position: static; opacity: 1; visibility: visible; min-height: 70vh; }
.no-js .j-line, .no-js .j-caption, .no-js .j-actions, .no-js .j-ref, .no-js .j-cards, .no-js .j-reveal { opacity: 1; transform: none; filter: none; }
.no-js .j-line.big, .no-js .j-ch-title .hl { background-size: 100% 100%; }
.no-js .j-top, .no-js .j-hint, .no-js .j-nav, .no-js .j-bars { display: none; }

@media (max-width: 640px) {
  .j-scene { padding: 96px 20px 112px; }
  .j-line { font-size: clamp(28px, 8vw, 38px); }
  .j-dense .j-line { font-size: clamp(24px, 6.6vw, 31px); }
  .j-line.big { font-size: clamp(42px, 13vw, 62px); }
  .j-actions .btn { min-width: 0; width: 100%; max-width: 340px; }
  .j-bars { gap: 5px; left: 10px; right: 10px; }
  .j-ch-title { font-size: clamp(64px, 21vw, 112px); }
  .j-scene[data-kind="intro"] .j-ch-title { font-size: clamp(64px, 20vw, 100px); }
  .j-scene[data-kind="chapter"], .j-scene[data-kind="intro"] { padding: 96px 22px 104px; }
  .j-parts { flex-direction: column; gap: 6px; }
  .j-start .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .j-line, .j-line .w, .j-reveal { transform: none; filter: none; }
  .j-bg.iris { transition: none; clip-path: none; }
  .j-hint.on { animation: none; }
  .j-bg img { transition: none; transform: none; }
}
