/* Lunea: the way in. A painted landscape at the top of the screen like a postcard, running into the colour of its own ground,
   where the steps are written in white. Everything is scoped to .jr */
.jr { --white: #fdfaf2; --white-soft: rgba(253, 250, 242, .8); --white-faint: rgba(253, 250, 242, .45); --jink: #2b392f;
  position: absolute; inset: 0; overflow: hidden; color: var(--white); font-family: var(--font-text); background: #172217; color-scheme: dark; z-index: 1; container-type: inline-size; }
.jr [hidden] { display: none !important; }
.jr-world { position: absolute; inset: 0; overflow: hidden; background: #172217; }
.jr-ground { position: absolute; left: 0; right: 0; bottom: 0; background-color: var(--base, #2a3d24); transition: background-color 2.4s ease; }
.jr-ground::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8, 12, 8, 0) 0%, rgba(8, 12, 8, .42) 100%); }
/* the boat film melts into the first landscape: it fades and leans in from its base while the landscape rises behind it */
.jr-film { position: absolute; top: 0; left: 0; width: 100%; height: auto; display: block; transform-origin: 50% 100%; transition: opacity 1.8s ease, transform 2.6s cubic-bezier(.3, .7, .2, 1); }
.jr-film.is-away { opacity: 0; transform: scale(1.06); }
.jr-scn { opacity: 0; }
.jr-scn.is-here { opacity: 1; }
.jr-fade { position: absolute; left: 0; right: 0; background-color: var(--base, #2a3d24); transition: background-color 2.4s ease; -webkit-mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,.5) 55%, #000 100%); mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,.5) 55%, #000 100%); pointer-events: none; }
.jr-veil { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(24,18,16,.28) 0%, rgba(24,18,16,0) 16%); }
.jr-grain { position: absolute; inset: -80px; background-size: 200px 200px; mix-blend-mode: overlay; opacity: .35; pointer-events: none; animation: jr-grain .8s steps(6) infinite; }
@keyframes jr-grain { 0% { transform: translate(0, 0); } 17% { transform: translate(-28px, 16px); } 33% { transform: translate(20px, -30px); } 50% { transform: translate(-36px, -10px); } 67% { transform: translate(30px, 26px); } 83% { transform: translate(-12px, 36px); } 100% { transform: translate(0, 0); } }

.jr-ui { position: relative; height: 100%; display: flex; flex-direction: column; padding: calc(16px + env(safe-area-inset-top, 0px)) max(20px, env(safe-area-inset-right, 0px)) calc(20px + env(safe-area-inset-bottom, 0px)) max(20px, env(safe-area-inset-left, 0px)); box-sizing: border-box; }
.jr-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; }
.jr-mark { width: 74px; height: auto; opacity: .95; flex: none; }
.jr-topr { display: flex; align-items: center; gap: 8px; min-width: 0; }
.jr-pill { all: unset; box-sizing: border-box; cursor: pointer; position: relative; display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border-radius: 999px; font: 400 17px/1 var(--font-data); letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; color: var(--white); background: rgba(253, 250, 242, .1); border: 1px solid rgba(253, 250, 242, .3); transition: opacity .5s ease; }
.jr-pill:focus-visible, .jr-pill:focus-within, .jr-btn:focus-visible, .jr-link:focus-visible, .jr-back:focus-visible, .jr-signin:focus-visible, .jr-seg button:focus-visible { outline: 2px solid var(--white); outline-offset: 3px; }
.jr-lang select { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 16px; }
.jr-lang.is-gone, .jr-signin[aria-hidden="true"], .jr-me[aria-hidden="true"] { opacity: 0; pointer-events: none; }
.jr-me { width: 38px; padding: 0; justify-content: center; transition: opacity .5s ease; }
.jr-bars { display: inline-flex; gap: 2px; align-items: flex-end; height: 12px; }
.jr-bars i { width: 2px; background: var(--white); border-radius: 1px; height: 4px; }
.jr-sound.is-on .jr-bars i { animation: jr-bar 1.1s ease-in-out infinite; }
.jr-sound.is-on .jr-bars i:nth-child(2) { animation-delay: -.35s; } .jr-sound.is-on .jr-bars i:nth-child(3) { animation-delay: -.7s; }
@keyframes jr-bar { 0%, 100% { height: 3px; } 50% { height: 12px; } }
.jr-signin { all: unset; cursor: pointer; font: 400 17px/1 var(--font-data); letter-spacing: .14em; text-transform: uppercase; color: var(--white); padding: 8px 4px; border-bottom: 1px solid rgba(253, 250, 242, .35); transition: opacity .5s ease; }

/* the words sit under the picture, centred in what is left; the gap above them is a row that gives way when the screen is
   short (Safari with its bars out, a small phone), so the button never runs into the dots below */
.jr-stage { flex: 1; display: grid; place-items: center; align-content: center; min-height: 0; grid-template-rows: minmax(0, max(0px, calc(var(--film-h, 50vh) * .71 - 44px))) var(--scene-h, auto); transition: grid-template-rows 1.2s cubic-bezier(.3, .7, .2, 1); }
.jr-stage > .jr-scene { grid-row: 2; grid-column: 1; }
.jr[data-at="save"] .jr-stage, .jr[data-at="link"] .jr-stage, .jr[data-at="signin"] .jr-stage { grid-template-rows: 0 var(--scene-h, auto); }
.jr.is-typing .jr-stage { grid-template-rows: minmax(0, max(0px, calc(var(--film-h, 50vh) * .42 - 60px))) var(--scene-h, auto); transition-duration: .6s; }
.jr-scene { grid-area: 1 / 1; width: 100%; max-width: 30rem; display: flex; flex-direction: column; gap: 16px; text-align: center; align-items: center; opacity: 0; transform: translateY(10px); filter: blur(4px); pointer-events: none; transition: opacity .32s ease, transform .32s ease, filter .32s ease; }
/* one form at a time: the old one leaves quickly, the new one comes in only once it has gone, so the words never overlap */
.jr-scene.is-on { opacity: 1; transform: none; filter: none; pointer-events: auto; transition: opacity .7s ease .38s, transform .9s cubic-bezier(.2, .7, .2, 1) .38s, filter .7s ease .38s; }
/* the steps keep some air between the picture and the words */
.jr-scene[data-scene="name"], .jr-scene[data-scene="date"], .jr-scene[data-scene="time"], .jr-scene[data-scene="place"] { margin-top: 70px; }
.jr-scene[data-scene="reveal"] { gap: 12px; }
.jr-scene[data-scene="reveal"]:not(.is-on) { max-height: 0; overflow: visible; }
.jr-eyebrow { font: 400 17px/1 var(--font-data); letter-spacing: .28em; text-transform: uppercase; color: var(--white-soft); }
.jr-h1, .jr-h2 { font-family: var(--font-display); font-weight: 600; margin: 0; text-wrap: balance; letter-spacing: -.01em; color: var(--white); text-shadow: 0 2px 22px rgba(30, 20, 15, .3); }
.jr-h1 { font-size: clamp(2.05rem, 8.4vw, 3rem); line-height: 1.02; }
.jr-h2 { font-size: clamp(1.9rem, 7.6vw, 2.6rem); line-height: 1.06; }
.jr-skyof { font-size: clamp(1.8rem, 7.6vw, 2.5rem); }
.jr-lede { margin: 0; max-width: 20rem; font-size: .95rem; line-height: 1.5; color: var(--white-soft); text-wrap: pretty; }
.jr-lede.small { font-size: .96rem; max-width: 22rem; }

.jr-btn { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 22px; border-radius: 999px; font: 400 18px/1 var(--font-data); letter-spacing: .14em; text-transform: uppercase; color: var(--jink); background: var(--white); box-shadow: 0 14px 40px -16px rgba(30, 20, 15, .6); transition: transform .3s ease, opacity .3s ease; text-align: center; white-space: nowrap; }
.jr-btn:hover { transform: translateY(-1px); }
.jr-btn:active { transform: scale(.98); }
.jr-btn[disabled] { opacity: .38; cursor: default; transform: none; }
.jr-btn.is-busy { opacity: .6; cursor: progress; }
.jr-btn.ghost { background: rgba(253, 250, 242, .1); color: var(--white); border: 1px solid rgba(253, 250, 242, .45); box-shadow: none; font-size: 18px; letter-spacing: .1em; }
.jr-actions { display: flex; flex-direction: column; align-items: stretch; gap: 10px; width: 100%; max-width: 21rem; }
.jr-actions .jr-btn { width: 100%; }
.jr-link { all: unset; cursor: pointer; align-self: center; font: 400 16px/1 var(--font-data); letter-spacing: .14em; text-transform: uppercase; color: var(--white-soft); padding: 8px 4px; border-bottom: 1px solid rgba(253, 250, 242, .3); }
.jr-link.small { font-size: 16px; padding: 4px 2px; }
.jr-nav { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; max-width: 21rem; }
.jr-nav .jr-btn { flex: 1; min-width: 0; }
.jr-back { all: unset; box-sizing: border-box; cursor: pointer; width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; background: rgba(253, 250, 242, .1); border: 1px solid rgba(253, 250, 242, .4); color: var(--white); flex: none; }
.jr-back svg { width: 20px; height: 20px; }
.jr-back[disabled] { opacity: .3; cursor: default; }

/* the answers are typed like on an old computer screen */
.jr-field { width: 100%; display: flex; justify-content: center; }
.jr-field input { width: 100%; max-width: 17.5rem; box-sizing: border-box; background: rgba(253, 250, 242, .08); border: 1px solid rgba(253, 250, 242, .45); border-radius: 16px; color: var(--white); text-align: center; font: 400 clamp(1.7rem, 6.4vw, 2.1rem)/1.1 var(--font-data); letter-spacing: .08em; padding: 12px 14px; min-height: 58px; outline: none; caret-color: var(--white); color-scheme: dark; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); -webkit-appearance: none; appearance: none; }
.jr-field input::placeholder { color: var(--white-faint); }
.jr-field input:focus { border-color: var(--white); background: rgba(253, 250, 242, .14); }
.jr-field input::-webkit-date-and-time-value { text-align: center; }
.jr-hint { font: 400 17px/1.25 var(--font-data); letter-spacing: .12em; text-transform: uppercase; color: var(--white-soft); max-width: 22rem; min-height: 1.25em; }
.jr-hint.faint { color: var(--white-faint); font-size: 16px; }
.jr-hint.is-found { color: var(--white); }
.jr-err { margin: 0; font-size: .95rem; line-height: 1.4; color: #ffd1c2; max-width: 22rem; }
.jr-meta { font: 400 18px/1.35 var(--font-data); letter-spacing: .14em; text-transform: uppercase; color: var(--white-soft); }
.jr-meta + .jr-meta { margin-top: -6px; }
.jr-seg { display: flex; gap: 8px; justify-content: center; }
.jr-seg button { all: unset; box-sizing: border-box; cursor: pointer; height: 38px; padding: 0 16px; border-radius: 999px; font: 400 18px/1 var(--font-data); letter-spacing: .12em; text-transform: uppercase; color: var(--white-soft); border: 1px solid rgba(253, 250, 242, .35); transition: background .3s ease, color .3s ease; }
.jr-seg button[aria-checked="true"] { background: var(--white); color: var(--jink); border-color: var(--white); }

.jr-dots { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 26px; margin-top: 22px; }
.jr-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(253, 250, 242, .3); transition: background .6s ease, transform .6s ease; }
.jr-dots i.is-on { background: var(--white); transform: scale(1.25); }
.jr[data-at="intro"] .jr-dots { visibility: hidden; }
.jr-legal { position: absolute; left: 0; right: 0; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 16px; padding: 0 16px; opacity: 0; visibility: hidden; transition: opacity .5s ease, visibility 0s linear .5s; }
.jr[data-at="intro"] .jr-legal { opacity: 1; visibility: visible; transition: opacity .8s ease .3s; }
.jr-legal a { font: 400 10px/1 var(--font-data); letter-spacing: .12em; text-transform: uppercase; color: rgba(253, 250, 242, .5); text-decoration: none; padding: 6px 0; }
.jr-legal a:hover { color: rgba(253, 250, 242, .85); }

/* your sky is drawn high in the night, where nothing is behind it */
.jr-wheel { position: absolute; left: 50%; top: max(72px, calc(var(--film-h, 50vh) * 0.21)); width: min(74vw, 340px, calc(var(--film-h, 50vh) * 0.56)); height: auto; aspect-ratio: 1; transform: translateX(-50%); opacity: 0; transition: opacity 1.2s ease .5s; pointer-events: none; }
.jr-wheel.is-on { opacity: 1; }

/* the sample of the book: spreads, like a real book in your hands */
.jr-sample { position: absolute; inset: 0; z-index: 30; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; background: rgba(23, 34, 23, .95); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); padding: 20px 12px 24px; box-sizing: border-box; }
.jr-close { position: absolute; top: calc(16px + env(safe-area-inset-top, 0px)); right: 16px; }
.jr-book { --pw: 170px; position: relative; width: calc(var(--pw) * 2); height: calc(var(--pw) * 210 / 148); perspective: 2600px; transition: transform .9s cubic-bezier(.3, .7, .2, 1); touch-action: pan-y; cursor: pointer; flex: none; }
.jr-book.is-closed { transform: translateX(-25%); }
.jr-book.is-end { transform: translateX(25%); }
.jr-book::after { content: ''; position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: rgba(0,0,0,.12); pointer-events: none; }
.jr-book.is-closed::after, .jr-book.is-end::after { opacity: 0; }
.jr-book::before { content: ''; position: absolute; top: 4%; bottom: -2%; left: 2%; right: 2%; border-radius: 8px; box-shadow: 0 30px 60px -16px rgba(0,0,0,.7); transition: left .9s cubic-bezier(.3, .7, .2, 1), right .9s cubic-bezier(.3, .7, .2, 1); pointer-events: none; }
.jr-book.is-closed::before { left: 52%; }
.jr-book.is-end::before { right: 52%; }
.jr-leaf { position: absolute; top: 0; left: 50%; width: 50%; height: 100%; transform-origin: left center; transform-style: preserve-3d; transition: transform .9s cubic-bezier(.3, .7, .2, 1); }
.jr-leaf.is-flipped { transform: rotateY(-180deg); }
.jr-leaf > i { position: absolute; inset: 0; background-color: #f4eee3; background-size: cover; background-position: center; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.jr-leaf > .f { border-radius: 0 5px 5px 0; box-shadow: inset 12px 0 14px -12px rgba(0,0,0,.3); }
.jr-leaf > .b { transform: rotateY(180deg); border-radius: 5px 0 0 5px; box-shadow: inset -12px 0 14px -12px rgba(0,0,0,.3); }
.jr-pager { display: flex; align-items: center; gap: 18px; }
.jr-pcount { font: 400 18px/1 var(--font-data); letter-spacing: .14em; color: var(--white-soft); min-width: 6.5em; text-align: center; }
.jr-sample p { margin: 0; max-width: 24rem; text-align: center; color: var(--white-soft); font-size: .96rem; line-height: 1.5; }
@media (orientation: landscape) and (max-height: 540px) { .jr-sample { gap: 10px; padding-top: 10px; padding-bottom: 10px; } .jr-sample p { display: none; } }

@media (max-height: 700px) { .jr-scene { gap: 12px; } .jr-h1 { font-size: clamp(1.9rem, 8.4vw, 2.6rem); } .jr-btn { min-height: 50px; } .jr-back { width: 50px; height: 50px; } .jr-scene[data-scene="name"], .jr-scene[data-scene="date"], .jr-scene[data-scene="time"], .jr-scene[data-scene="place"] { margin-top: 40px; } .jr-lede { font-size: .95rem; } }
@media (max-width: 370px) { .jr-sound [data-soundlabel] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } .jr-pill { padding: 0 11px; } .jr-btn.ghost { font-size: 16px; letter-spacing: .06em; } .jr-mark { width: 66px; } }
@media (prefers-reduced-motion: reduce) {
  .jr-grain { animation: none; }
  .jr-film { transition: opacity 1.2s ease; } .jr-film.is-away { transform: none; }
  .jr-scene { transition: opacity .3s ease; transform: none; filter: none; }
  .jr-sound.is-on .jr-bars i { animation: none; height: 8px; }
}

/* on a computer: the same picture, out of focus, fills the window behind the phone shape */
.jr-backdrop { position: fixed; top: -60px; left: -60px; width: calc(100% + 120px); height: calc(100% + 120px); z-index: -1; filter: blur(34px) saturate(1.1) brightness(.82); pointer-events: none; }

/* sizes follow the width of Lunea itself (a phone, or the phone shape on a computer), not the window */
@supports (width: 1cqi) {
  .jr-h1 { font-size: clamp(1.95rem, 8.4cqi, 3rem); }
  .jr-h2 { font-size: clamp(1.8rem, 7.6cqi, 2.6rem); }
  .jr-skyof { font-size: clamp(1.7rem, 7.6cqi, 2.5rem); }
  .jr-field input { font-size: clamp(1.6rem, 6.4cqi, 2.1rem); }
  .jr-wheel { width: min(74cqi, 340px, calc(var(--film-h, 50vh) * 0.56)); }
}

/* the QR in a printed book, read with the camera */
.jr-scan { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; }
.jr-scan svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.qrscan { position: fixed; inset: 0; z-index: 200; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 24px; background: #121a2c; color: #fdfaf2; text-align: center; }
.qrscan-view { position: relative; width: min(82vw, 360px); aspect-ratio: 1; border-radius: 28px; overflow: hidden; background: #000; }
.qrscan-view video { width: 100%; height: 100%; object-fit: cover; display: block; }
.qrscan-frame { position: absolute; inset: 18%; border: 2px solid rgba(253, 250, 242, .85); border-radius: 18px; box-shadow: 0 0 0 999px rgba(18, 26, 44, .35); }
.qrscan-t { margin: 0; max-width: 30ch; font: 400 16px/1.45 var(--font-body, system-ui); color: rgba(253, 250, 242, .85); }
.qrscan-x { all: unset; cursor: pointer; padding: 14px 28px; border-radius: 999px; border: 1px solid rgba(253, 250, 242, .4); font: 400 16px/1 var(--font-data); letter-spacing: .14em; text-transform: uppercase; }
.qrscan-x:focus-visible { outline: 2px solid #fdfaf2; outline-offset: 3px; }
/* the first screen sits a little lower on the green */
.jr-scene[data-scene="intro"] { padding-top: 30px; }
/* if the typewriter font has not arrived yet, a long button wraps inside itself instead of spilling out */
.jr-btn { text-align: center; white-space: normal; overflow-wrap: anywhere; }
/* the second button carries the longest words in some languages: a touch less spacing keeps it on one line */
.jr-btn.ghost { letter-spacing: .07em; padding: 0 14px; }

/* a title can carry its own line break (English: the birth chart together on the second line) */
.jr-h1 { white-space: pre-line; }

/* leaving for the app: the words fade and lift away before the night closes into the Cielo card */
.jr.jr-leaving .jr-ui { opacity: 0; transform: translateY(-8px); filter: blur(3px); pointer-events: none; transition: opacity .45s ease, transform .5s cubic-bezier(.4, 0, .2, 1), filter .45s ease; }
@media (prefers-reduced-motion: reduce) { .jr.jr-leaving .jr-ui { transform: none; filter: none; transition: opacity .35s ease; } }
