/* Fly through three independent depths of hand-painted jungle. */
@property --jungle-hole { syntax: '<percentage>'; inherits: false; initial-value: 0%; }
/* Keep the hero's width unchanged when the intro releases the page scroll lock. */
html { scrollbar-gutter: stable; }
:root.intro-pending { overflow: hidden; }
.intro-pending body { overflow: hidden; }
.intro-pending:not(.intro-revealing) body > .site-header,
.intro-pending:not(.intro-revealing) body > main,
.intro-pending:not(.intro-revealing) body > .storybook-footer { opacity: 0; }
/* The portal reveals a complete invitation; hero details never wait for another entrance. */
.hero-content > * { animation: none; opacity: 1; transform: none; }
.invitation-intro {
  position: fixed; inset: 0; width: 100vw; height: 100dvh;
  max-width: none; max-height: none; margin: 0; padding: 0;
  border: 0; overflow: clip; overflow-anchor: none; isolation: isolate;
  background: transparent; color: #fff4cd; font-family: var(--story-font); outline: none;
}
.invitation-intro:not([open]) { display: none; }
.invitation-intro[open] { display: grid; place-items: center; }
.invitation-intro::backdrop { background: transparent; }
.jungle-portal {
  position: absolute; inset: 0; z-index: -5; overflow: hidden; background: #647941;
  mask-image: radial-gradient(ellipse at 50% 49%, transparent calc(var(--jungle-hole) - 10%), #000 var(--jungle-hole));
}
.jungle-distance { position: absolute; inset: -3%; transform: scale(1.025); transform-origin: 50% 49%; will-change: transform; }
.jungle-distance > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.jungle-sunlight {
  position: absolute; inset: 0; z-index: -3; pointer-events: none;
  background: radial-gradient(ellipse at 50% 49%, #fff6c94a 0, #e9dc6e10 28%, transparent 51%);
  animation: jungle-light-breathe 4s ease-in-out infinite alternate;
}
.jungle-plane { position: absolute; inset: 0; pointer-events: none; transform-origin: 50% 49%; will-change: transform; }
.jungle-plane-middle { z-index: -2; }
.jungle-plane-near { z-index: 3; }
.jungle-leaf { position: absolute; aspect-ratio: 1; }
.jungle-leaf img {
  width: 100%; height: 100%; display: block; object-fit: contain;
  transform-origin: 20% 86%; animation: jungle-leaf-sway 5.5s ease-in-out infinite alternate;
}
.jungle-leaf-ml { width: min(62vw, 910px); left: -34%; bottom: -21%; transform: rotate(12deg); filter: brightness(.68) saturate(.82); }
.jungle-leaf-mr { width: min(64vw, 930px); right: -35%; top: 9%; transform: scaleX(-1) rotate(13deg); filter: brightness(.76) saturate(.87); }
.jungle-leaf-mr img { animation-delay: -2.7s; }
.jungle-leaf-bl { width: min(64vw, 950px); left: -25%; bottom: -48%; transform: rotate(10deg); filter: brightness(.79) saturate(.83); }
.jungle-leaf-br { width: min(65vw, 970px); right: -29%; bottom: -43%; transform: scaleX(-1) rotate(2deg); filter: brightness(.9) saturate(.87); }
.jungle-leaf-tl { width: min(47vw, 710px); left: -15%; top: -52%; transform: rotate(92deg); filter: brightness(.7) saturate(.8); }
.jungle-leaf-tr { width: min(49vw, 740px); right: -19%; top: -49%; transform: rotate(181deg); filter: brightness(.76) saturate(.81); }
.jungle-leaf-br img, .jungle-leaf-tl img { animation-delay: -1.9s; animation-duration: 6.7s; }
.jungle-leaf-tr img { animation-delay: -3.3s; animation-duration: 7s; }
.jungle-welcome { opacity: 0; position: relative; z-index: 6; text-align: center; width: min(610px, 60vw); padding-bottom: 12px; color: #284b29; }
.jungle-eyebrow { max-width: 350px; margin: 0 auto 25px; font-size: 12px; line-height: 1.6; font-weight: 600; letter-spacing: 2px; color: #405b32; text-wrap: balance; }
.jungle-welcome h2 { font-family: var(--serif); font-size: clamp(62px,6.5vw,94px); line-height: 1.08; font-weight: 400; letter-spacing: -.035em; margin: 0; outline: none; }
.jungle-welcome h2 > span { display: block; word-spacing: .06em; }
.jungle-welcome h2 > em { display: block; font-family: var(--hand); font-size: 1.75em; font-weight: 500; letter-spacing: -.025em; line-height: .94; transform: rotate(-4deg); margin: 3px 0 23px; color: #966029; }
.jungle-whisper { font-size: 16px; line-height: 1.5; margin: 24px auto 0; color: #53663e; max-width: 300px; }
.jungle-trail { display: flex; justify-content: center; align-items: center; gap: 13px; margin-top: 24px; height: 16px; }
.jungle-trail i { width: 5px; height: 8px; border-radius: 50%; background: #8b9c52; transform: rotate(-24deg); animation: jungle-footsteps 1.3s ease-in-out infinite; }
.jungle-trail i:nth-child(2) { transform: rotate(24deg); animation-delay: .18s; }
.jungle-trail i:nth-child(3) { animation-delay: .36s; }
.intro-topbar, .intro-bottom-bar { position: absolute; left: 4.5%; right: 4.5%; z-index: 12; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.intro-topbar { top: 24px; }
.jungle-chapter { font-size: 10px; letter-spacing: 2px; color: #fbf4c9; text-shadow: 0 1px 8px #19331d; }
.intro-skip { display: flex; align-items: center; gap: 13px; min-height: 44px; padding: 8px 12px; border: 1px solid #e3e9ba50; border-radius: 25px; background: #193b255e; backdrop-filter: blur(8px); color: #fff7d8; font-size: 12px; }
.intro-skip > span { font-size: 19px; }
.intro-skip:hover { background: #193b2599; }
.intro-skip:focus-visible, .intro-sound:focus-visible { outline: 2px solid #f4d081; outline-offset: 5px; }
.intro-bottom-bar { bottom: 22px; }
.intro-sound { display: inline-flex; gap: 9px; align-items: center; color: #fff0bc; background: #1737225e; border: 1px solid #e3e9ba30; border-radius: 22px; padding: 10px 13px; min-height: 42px; font-size: 11px; backdrop-filter: blur(8px); }
.intro-sound svg { width: 16px; height: 16px; }
.jungle-loading-note { margin: 0; font-family: var(--hand); font-size: 25px; color: #fff2be; text-align: center; text-shadow: 0 1px 8px #173220; }
.jungle-date { color: #f6e7b5; font-size: 11px; letter-spacing: 2.4px; text-shadow: 0 1px 8px #173220; }
.jungle-dust { position: absolute; inset: 0; pointer-events: none; z-index: 2; transform-origin: 50% 49%; }
.intro-firefly { position: absolute; left: var(--left); top: var(--top); width: var(--size); height: var(--size); border-radius: 50%; background: #f8df77; box-shadow: 0 0 13px 4px #eedb783b; animation: jungle-firefly var(--duration) var(--delay) ease-in-out infinite; opacity: 0; }
.jungle-butterfly { position: absolute; width: 35px; height: 28px; z-index: 4; pointer-events: none; }
.jungle-butterfly-one { left: 32%; top: 65%; animation: jungle-butterfly-drift 6s ease-in-out infinite; }
.jungle-butterfly-two { right: 31%; top: 24%; scale: .58; animation: jungle-butterfly-drift 7s -2s ease-in-out infinite reverse; }
.jungle-butterfly i { position: absolute; width: 18px; height: 27px; background: linear-gradient(120deg,#fce99a,#de9c3d 80%); border: 1px solid #ab74255e; border-radius: 75% 20% 65% 25%; transform-origin: 100% 75%; animation: jungle-wing .28s ease-in-out infinite alternate; }
.jungle-butterfly i + i { left: 18px; border-radius: 20% 75% 25% 65%; transform-origin: 0 75%; animation-delay: -.15s; }
.jungle-light-burst { position: absolute; inset: -10%; z-index: 7; pointer-events: none; opacity: 0; background: radial-gradient(ellipse at 50% 49%,#fff8d9, #fff5d582 28%,transparent 68%); mix-blend-mode: screen; }
.intro-ready .jungle-welcome { opacity: 1; animation: jungle-welcome-arrive .9s cubic-bezier(.16,.65,.2,1) both; }
.intro-flying .jungle-welcome { animation: jungle-words-pass .7s cubic-bezier(.3,0,.7,.4) both; }
.intro-flying .jungle-portal { animation: jungle-portal-open 2.55s .42s cubic-bezier(.5,0,.45,1) forwards; }
.intro-flying .jungle-distance { animation: jungle-camera-far 3.25s cubic-bezier(.65,0,.3,1) forwards; }
.intro-flying .jungle-plane-middle { animation: jungle-camera-middle 2.9s .14s cubic-bezier(.58,.01,.35,1) forwards; }
.intro-flying .jungle-plane-near { animation: jungle-camera-near 2.4s cubic-bezier(.55,.02,.3,1) forwards; }
.intro-flying .jungle-dust { animation: jungle-dust-rush 2.1s .15s ease-in forwards; }
.intro-flying .jungle-sunlight { animation: jungle-glow-pass 2.8s forwards; }
.intro-flying .jungle-light-burst { animation: jungle-sun-burst 2.5s .65s ease-in-out forwards; }
.intro-flying .jungle-butterfly-one { animation: jungle-butterfly-pass 1.55s ease-in forwards; }
.intro-flying .jungle-butterfly-two { animation: jungle-butterfly-pass 1.7s .1s ease-in forwards; }
.intro-flying .intro-bottom-bar, .intro-flying .jungle-chapter { transition: opacity .5s 1.6s; opacity: 0; }
.intro-landing .intro-topbar { opacity: 0; transition: opacity .4s; pointer-events: none; }
.footer-invitation-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.intro-replay { display: inline-flex; align-items: center; gap: 8px; color: #889071; background: none; border: 0; font: 13px/1.5 var(--story-font); padding: 8px 0; min-height: 34px; }
.intro-replay > span { font-size: 19px; }
.intro-replay:hover { color: var(--rust); }
@keyframes jungle-leaf-sway { from { transform: rotate(-1.2deg) translateY(0); } to { transform: rotate(1.5deg) translateY(7px); } }
@keyframes jungle-light-breathe { to { opacity: .55; transform: scale(1.13); } }
@keyframes jungle-footsteps { 0%,75%,100% { opacity: .25; } 30% { opacity: 1; } }
@keyframes jungle-firefly { 0%,100% { opacity: 0; transform: translate(0,18px); } 35% { opacity: .8; } 70% { opacity: .25; transform: translate(27px,-35px); } }
@keyframes jungle-butterfly-drift { 0%,100% { transform: translate(-10px,8px) rotate(-19deg); } 40% { transform: translate(20px,-24px) rotate(15deg); } 70% { transform: translate(40px,3px) rotate(-8deg); } }
@keyframes jungle-wing { from { transform: rotateY(20deg); } to { transform: rotateY(78deg); } }
@keyframes jungle-welcome-arrive { from { opacity: 0; transform: translateY(12px) scale(.93); } to { opacity: 1; transform: none; } }
@keyframes jungle-words-pass { 0% { opacity: 1; transform: scale(1); filter: blur(0); } 100% { opacity: 0; transform: scale(1.65) translateY(-16px); filter: blur(8px); } }
@keyframes jungle-portal-open { 0%,12% { --jungle-hole: 0%; opacity: 1; } 80% { opacity: 1; } 100% { --jungle-hole: 100%; opacity: 0; } }
@keyframes jungle-camera-far { 0% { transform: scale(1.025); } 100% { transform: scale(3.4); } }
@keyframes jungle-camera-middle { 0% { transform: scale(1) rotate(0); opacity: 1; } 77% { opacity: 1; } 100% { transform: scale(3.7) rotate(-2deg); opacity: 0; } }
@keyframes jungle-camera-near { 0% { transform: scale(1) rotate(0); filter: blur(0); opacity: 1; } 76% { opacity: 1; } 100% { transform: scale(5.3) rotate(2deg); filter: blur(5px); opacity: 0; } }
@keyframes jungle-dust-rush { to { transform: scale(6); opacity: 0; filter: blur(3px); } }
@keyframes jungle-glow-pass { 0% { opacity: 1; } 45% { opacity: .8; } 100% { opacity: 0; transform: scale(3); } }
@keyframes jungle-sun-burst { 0%,100% { opacity: 0; } 35% { opacity: .8; } 65% { opacity: .35; } }
@keyframes jungle-butterfly-pass { to { transform: translate(-140px,-170px) scale(4) rotate(-30deg); opacity: 0; } }
@media (min-width: 1600px) { .jungle-leaf-bl { left: -21%; bottom: -43%; } .jungle-leaf-br { right: -24%; bottom: -39%; } }
@media (max-width: 760px) {
  .jungle-distance { inset: -2%; }
  .jungle-distance > img { object-position: 50% 48%; }
  .jungle-welcome { width: 86%; max-width: 480px; padding-bottom: 12px; }
  .jungle-eyebrow { max-width: 260px; font-size: 11px; letter-spacing: 1.4px; margin-bottom: 23px; }
  .jungle-welcome h2 { font-size: clamp(54px,14.5vw,74px); }
  .jungle-welcome h2 > em { font-size: 1.85em; margin-top: 5px; margin-bottom: 22px; }
  .jungle-whisper { font-size: 14px; line-height: 1.5; max-width: 215px; margin-top: 23px; }
  .jungle-trail { margin-top: 21px; }
  .jungle-leaf-ml { width: 118vw; left: -102%; bottom: 0; }
  .jungle-leaf-mr { width: 122vw; right: -110%; top: 19%; }
  .jungle-leaf-bl { width: 123vw; left: -73%; bottom: -32%; transform: rotate(7deg); }
  .jungle-leaf-br { width: 133vw; right: -82%; bottom: -36%; transform: scaleX(-1) rotate(1deg); }
  .jungle-leaf-tl { width: min(104vw,640px); left: -51%; top: calc(min(104vw,640px) * -.65); }
  .jungle-leaf-tr { width: min(106vw,660px); right: -59%; top: calc(min(106vw,660px) * -.65); }
  .intro-topbar { top: max(18px,env(safe-area-inset-top)); left: 5%; right: 5%; gap: 12px; }
  .jungle-chapter { font-size: 7px; letter-spacing: 1.2px; max-width: 135px; line-height: 1.7; }
  .intro-skip { font-size: 11px; padding: 7px 11px; min-height: 40px; gap: 9px; }
  .intro-bottom-bar { left: 5%; right: 5%; bottom: max(17px,env(safe-area-inset-bottom)); gap: 12px; }
  .jungle-loading-note { font-size: 20px; max-width: 190px; text-align: right; line-height: 1.15; }
  .intro-sound { font-size: 10px; padding: 9px 11px; flex-shrink: 0; }
  .jungle-date { display: none; }
  .jungle-butterfly-one { left: 20%; top: 67%; scale: .7; }
  .jungle-butterfly-two { right: 20%; top: 26%; scale: .5; }
  .footer-invitation-actions { align-items: center; }
}
@media (max-width: 760px) and (max-height: 680px) {
  .jungle-welcome { padding-bottom: 10px; }
  .jungle-eyebrow { margin-bottom: 20px; }
  .jungle-welcome h2 { font-size: 54px; }
  .jungle-whisper { font-size: 13px; }
  .jungle-leaf-tl { top: calc(min(104vw,640px) * -.71); }
  .jungle-leaf-tr { top: calc(min(106vw,660px) * -.72); }
  .jungle-leaf-bl { bottom: -49%; }
  .jungle-leaf-br { bottom: -55%; }
}
@media (max-height: 500px) and (min-width: 761px) {
  .jungle-welcome { padding: 0; }
  .jungle-eyebrow { font-size: 8px; margin-bottom: 14px; }
  .jungle-welcome h2 { font-size: 59px; }
  .jungle-welcome h2 > em { margin-bottom: 10px; }
  .jungle-whisper { font-size: 12px; margin-top: 17px; }
  .jungle-trail { margin-top: 14px; }
  .jungle-leaf-tl { top: -95%; }
  .jungle-leaf-tr { top: -90%; }
  .jungle-leaf-bl { bottom: -92%; }
  .jungle-leaf-br { bottom: -90%; }
  .jungle-loading-note { font-size: 21px; }
  .intro-bottom-bar { bottom: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .invitation-intro *, .invitation-intro *::before, .invitation-intro *::after { animation: none !important; transition: none !important; }
  .jungle-dust, .jungle-butterfly, .jungle-light-burst { display: none; }
}



/* One deliberate tap starts both the music and the journey. */
.jungle-entry { margin-top: 25px; }
.jungle-enter {
  display: inline-flex; align-items: center; justify-content: center; gap: 24px;
  min-height: 58px; padding: 14px 26px; border: 1px solid #60854a;
  border-radius: 32px; background: #2d502c; color: #fff5cf;
  box-shadow: 0 5px 0 #1f3c2466, 0 9px 24px #243c2620;
  font: 500 18px/1.4 var(--story-font); transition: background .2s, transform .2s, box-shadow .2s;
}
.jungle-enter > svg { width: 22px; height: 22px; }
.jungle-enter:enabled:hover { background: #3d6031; transform: translateY(-3px); box-shadow: 0 7px 0 #1f3c2466, 0 12px 27px #243c2626; }
.jungle-enter:enabled:active { transform: translateY(2px); box-shadow: 0 2px 0 #1f3c2466; }
.jungle-enter:focus-visible { outline: 3px solid #9b642b; outline-offset: 6px; }
.jungle-enter:disabled { cursor: wait; opacity: .65; }
.jungle-music-hint { font: 13px/1.5 var(--story-font); color: #55683f; margin: 12px 0 0; }
.intro-flying .jungle-entry { pointer-events: none; }
@media (max-width: 760px) {
  .jungle-entry { margin-top: 23px; }
  .jungle-enter { font-size: 17px; min-height: 55px; padding: 13px 24px; gap: 20px; }
  .jungle-music-hint { font-size: 12px; margin-top: 11px; }
}
@media (max-height: 680px) {
  .jungle-welcome h2 { font-size: clamp(52px,6.5vw,72px); }
  .jungle-eyebrow { margin-bottom: 18px; }
  .jungle-welcome h2 > em { margin-bottom: 17px; }
  .jungle-whisper { margin-top: 16px; }
  .jungle-entry { margin-top: 19px; }
}
@media (max-height: 500px) {
  .jungle-welcome h2 { font-size: 46px; }
  .jungle-eyebrow { margin-bottom: 11px; }
  .jungle-welcome h2 > em { margin-bottom: 10px; }
  .jungle-whisper { display: none; }
  .jungle-entry { margin-top: 18px; }
  .jungle-enter { min-height: 47px; padding-block: 9px; font-size: 16px; }
  .jungle-music-hint { margin-top: 7px; }
}

