/* ============================================================
   FIT: a locked, full-screen app shell. Nothing scrolls, nothing zooms.
   Every scene's content is auto-scaled (journey.js · fitScene) to fit.
   ============================================================ */
html,body{height:100%;overflow:hidden;overscroll-behavior:none;touch-action:manipulation;-webkit-text-size-adjust:100%;text-size-adjust:100%}
body.journey{position:fixed;inset:0;display:flex;flex-direction:column;height:100vh;height:100dvh;padding:0!important;margin:0}
.journey header{flex:none;position:relative;height:clamp(48px,8.5dvh,78px);padding:0 max(16px,4vw)}
.journey main{flex:1 1 auto;min-height:0;position:relative;overflow:hidden;isolation:isolate}
.journey main>section,.journey main>footer{position:absolute!important;inset:0!important;min-height:0!important;height:auto!important;max-height:none!important;margin:0;padding:clamp(12px,3dvh,40px) max(16px,4vw)!important;display:flex!important;flex-direction:column;align-items:center;justify-content:center;overflow:hidden}
.journey main>[hidden]{display:none!important}
.fit{flex:none;position:relative;z-index:2;width:100%;max-width:720px;display:flex;flex-direction:column;align-items:center;text-align:center;transform-origin:50% 50%;will-change:transform}
.fit>*{max-width:100%}
.journey .fit-head>p:not(.eyebrow){color:#bdb6a7}
.fit-head,.fit-body{width:100%;display:flex;flex-direction:column;align-items:center}
.journey footer .fit>p{color:#c4b99f;max-width:400px;line-height:1.7}
.journey .hero .fit{max-width:none}
.journey .hero-copy{margin:0!important;padding:0 8px!important}

/* compact, in-flow bottom bar */
.journey .simple-nav{position:relative;flex:none;min-height:0;padding:8px max(16px,4vw) calc(10px + env(safe-area-inset-bottom));inset:auto}
.simple-nav .journey-topline{height:24px}
.simple-nav .action-hint{margin:3px auto 7px;min-height:0;font-size:11.5px;line-height:1.45}
.simple-nav .primary-action{min-height:48px}
.petals{z-index:1}

/* tighter, fluid type for the scene copy */
.journey main h2{font-size:clamp(26px,min(8.6vw,6.4dvh),58px);line-height:1.18}
.journey .hero h1{font-size:clamp(32px,min(10vw,7.2dvh),86px)}
.journey .fit-head>p:not(.eyebrow){font-size:clamp(13px,1.9dvh,16px);line-height:1.6;margin:10px 0 0}
.journey .letter-section .envelope-scene{margin:clamp(10px,3dvh,40px) auto 6px!important}
.journey .small-note{margin-top:8px}
.journey .wish-section .cake-button{margin:clamp(6px,2dvh,24px) auto 8px!important}
.journey footer h2{font-size:clamp(34px,min(11vw,7.5dvh),64px)!important}
.journey footer .eyebrow{margin-top:clamp(14px,3dvh,40px)}
.journey .footer-heart{margin-bottom:clamp(8px,2dvh,25px);font-size:clamp(30px,5dvh,48px)}

/* the opened letter takes the whole stage */
.letter-section.letter-open .fit-head,.letter-section.letter-open .fit-body>:not(.letter-paper){display:none!important}
.journey .letter-paper{margin:0 auto!important;padding:clamp(18px,3dvh,40px) clamp(18px,5vw,44px)!important;max-width:520px}
.journey .letter-paper h2{font-size:clamp(24px,4dvh,38px)!important;margin:8px 0 10px!important}
.journey .letter-paper p{font-size:clamp(13.5px,2.05dvh,17px)!important;line-height:1.62!important;margin:0 0 .7em}
.journey .letter-paper .signature{font-size:clamp(17px,2.8dvh,24px)!important;margin-top:.6em!important;line-height:1.35}

/* wishes: sky sized by screen height so the whole scene fits */
.simple-journey .wishes .wish-sky,.wishes .wish-sky{aspect-ratio:auto;height:clamp(150px,29dvh,250px);width:min(380px,100%);max-width:none;margin-top:2px}
.journey .wishes .reasons-heading h2{font-size:clamp(24px,min(8vw,5.4dvh),50px)}
.wishes .wish-sub{margin-top:6px!important}
.wishes .wish-pips{margin-top:10px}
.wish-card{margin-top:clamp(12px,2.4dvh,24px)!important;width:min(440px,100%)}
.wish-card-inner{min-height:clamp(128px,21dvh,176px)!important;padding:clamp(14px,2.4dvh,22px) 16px!important}
.wish-front .wish-seal{width:clamp(40px,7dvh,58px);height:clamp(40px,7dvh,58px);margin:0 auto clamp(6px,1.4dvh,12px);font-size:clamp(18px,3dvh,24px)}
.wishes .wish-card h3{font-size:clamp(18px,3dvh,23px);margin:clamp(6px,1.2dvh,12px) 0 6px}
.wishes .wish-card p{font-size:clamp(13px,1.95dvh,15px);line-height:1.6}
.wish-next{margin-top:clamp(8px,1.6dvh,14px);min-height:38px}
.wishes .wish-sky{transition:height .6s cubic-bezier(.2,.7,.2,1)}
.wishes:has(.wish-back:not([hidden])) .wish-sky{height:clamp(130px,23dvh,230px)}
.wishes:has(.wish-back:not([hidden])) .wish-sub{display:none}
@media (max-height:780px){
 .wishes .wish-next{display:none}
 .wishes .wish-back:after{content:'Tap for the next wish  →';display:block;margin-top:8px;font-size:10px;letter-spacing:2px;text-transform:uppercase;color:#d5b16b;animation:wish-nudge 1.4s ease-in-out infinite}
 .wishes .wish-sky.complete~.wish-card .wish-back:after{content:none}
}

/* landscape: titles left, the moment right */
@media (orientation:landscape) and (max-height:600px){
 .journey .fit{flex-direction:row;align-items:center;justify-content:center;gap:clamp(16px,4vw,48px);max-width:1100px}
 .journey .fit-head{flex:0 1 40%;min-width:0}
 .journey main .fit-head h2,.journey .wishes .reasons-heading h2{font-size:clamp(22px,min(4.4vw,10dvh),46px)}
 .journey .fit-head>p:not(.eyebrow){font-size:clamp(12px,3.6dvh,15px)}
 .journey .fit-body{flex:0 1 54%;min-width:0}
 .journey .letter-open .fit-body{flex-basis:100%}
 .journey .letter-paper{max-width:none!important;column-count:2;column-gap:32px}
 .journey .letter-paper .eyebrow,.journey .letter-paper h2{column-span:all}
 .journey .letter-paper p{break-inside:avoid}
 .wishes .reasons-heading>.eyebrow{display:flex}
 .simple-journey .wishes .wish-sky,.wishes .wish-sky,.wishes:has(.wish-back:not([hidden])) .wish-sky{height:clamp(120px,34dvh,220px)}
 .wishes .wish-pips{margin-top:12px}
}

/* very short screens */
@media (max-height:620px){
 .wishes .reasons-heading>.eyebrow{display:none}
 .simple-journey .wishes .wish-sky,.wishes .wish-sky{height:clamp(130px,26dvh,200px)}
 .simple-nav .action-hint{display:none}
 .simple-nav .journey-topline{margin-bottom:6px}
}

/* landscape phones: single-row bar */
@media (orientation:landscape) and (max-height:500px){
 .journey header{height:44px}
 .journey .simple-nav{display:grid;grid-template-columns:1fr minmax(200px,320px);align-items:center;gap:6px 16px;padding-top:6px;padding-bottom:calc(6px + env(safe-area-inset-bottom))}
 .simple-nav .journey-topline{grid-column:1;max-width:none;margin:0}
 .simple-nav .action-hint{display:none}
 .simple-nav .primary-action{grid-column:2;grid-row:1;min-height:42px}
 .dedication{display:none}
}

/* ============================================================
   GATSBY LAYER: deco sunburst, drawn corners, champagne, shutter
   ============================================================ */
.deco-layer{position:absolute;inset:0;pointer-events:none;z-index:0;overflow:hidden}
.sunburst{position:absolute;left:50%;top:46%;width:170vmax;height:170vmax;margin:-85vmax 0 0 -85vmax;background:repeating-conic-gradient(from 0deg,#d5b16b12 0 3deg,transparent 3deg 10deg);-webkit-mask:radial-gradient(circle,#000 0,#0008 18%,transparent 42%);mask:radial-gradient(circle,#000 0,#0008 18%,transparent 42%);animation:deco-spin 160s linear infinite;opacity:0;transition:opacity 1.4s}
.scene-active .sunburst{opacity:1}
.deco-corner{position:absolute;width:clamp(44px,12vw,84px);height:clamp(44px,12vw,84px);color:#d5b16b}
.deco-corner path,.deco-corner circle{fill:none;stroke:currentColor;stroke-width:1;vector-effect:non-scaling-stroke}
.deco-corner path{stroke-dasharray:1;stroke-dashoffset:1}
.deco-corner circle{fill:currentColor;stroke:none;opacity:0}
.deco-corner.tl{left:10px;top:10px}
.deco-corner.tr{right:10px;top:10px;transform:scaleX(-1)}
.deco-corner.bl{left:10px;bottom:10px;transform:scaleY(-1)}
.deco-corner.br{right:10px;bottom:10px;transform:scale(-1)}
.scene-active .deco-corner path{animation:deco-draw 1.6s cubic-bezier(.6,0,.2,1) .15s forwards}
.scene-active .deco-corner path:nth-child(2){animation-delay:.35s;opacity:.55}
.scene-active .deco-corner path:nth-child(3){animation-delay:.55s;opacity:.8}
.scene-active .deco-corner circle{animation:deco-fade .6s ease 1.3s forwards}
.deco-rule{position:absolute;left:50%;width:0;height:1px;background:linear-gradient(90deg,transparent,#d5b16b80,transparent);transform:translateX(-50%)}
.deco-rule.top{top:10px}.deco-rule.bottom{bottom:10px}
.scene-active .deco-rule{animation:deco-rule 1.4s cubic-bezier(.6,0,.2,1) .4s forwards}
.bubbles i{position:absolute;bottom:-12px;left:var(--x);width:var(--s);height:var(--s);border-radius:50%;border:1px solid #f5dfa455;background:radial-gradient(circle at 35% 30%,#fff6dc55,transparent 60%);animation:deco-rise var(--d) linear var(--delay) infinite}

/* eyebrow deco rules */
.journey .fit-head>.eyebrow,.journey .reasons-heading>.eyebrow,.journey .hero .eyebrow{display:flex;align-items:center;justify-content:center;gap:12px;text-align:center}
.journey .fit-head>.eyebrow:before,.journey .fit-head>.eyebrow:after,.journey .reasons-heading>.eyebrow:before,.journey .reasons-heading>.eyebrow:after,.journey .hero .eyebrow:before,.journey .hero .eyebrow:after{content:'';flex:none;width:0;height:1px;background:linear-gradient(90deg,transparent,#d5b16b);transition:width 1s cubic-bezier(.6,0,.2,1) .5s}
.journey .fit-head>.eyebrow:after,.journey .reasons-heading>.eyebrow:after,.journey .hero .eyebrow:after{transform:scaleX(-1)}
.scene-active .fit-head>.eyebrow:before,.scene-active .fit-head>.eyebrow:after,.scene-active .reasons-heading>.eyebrow:before,.scene-active .reasons-heading>.eyebrow:after,.scene-active.hero .eyebrow:before,.scene-active.hero .eyebrow:after{width:clamp(14px,6vw,34px)}

/* titles arrive like a marquee lighting up */
.scene-active .fit h1,.scene-active .fit-head>h2,.scene-active .reasons-heading h2{animation:deco-title 1.2s cubic-bezier(.2,.7,.2,1) both}
.scene-active .fit-head>p,.scene-active .reasons-heading>p,.scene-active .wish-pips{animation:deco-up .9s ease .35s both}

/* scene change: a gold shutter sweeps the stage */
.journey main:after{content:'';position:absolute;left:0;right:0;top:50%;height:1px;z-index:20;pointer-events:none;background:linear-gradient(90deg,transparent,#f5dfa4 30%,#fff3cf 50%,#f5dfa4 70%,transparent);box-shadow:0 0 18px #f5d48f;opacity:0;transform:scaleX(0)}
.journey main.shutter:after{animation:deco-shutter .8s cubic-bezier(.6,0,.2,1)}
.journey main.shutter>.scene-active{animation:deco-open .8s cubic-bezier(.6,0,.2,1) both!important}

/* buttons: a champagne sheen */
.journey .button{position:relative;overflow:hidden;isolation:isolate}
.journey .button:after{content:'';position:absolute;top:-20%;bottom:-20%;left:-60%;width:40%;background:linear-gradient(100deg,transparent,#fff8e0cc,transparent);transform:skewX(-20deg);animation:deco-sheen 4.2s ease-in-out 1.5s infinite;pointer-events:none;z-index:-1}
.journey .button:active{transform:translateY(1px) scale(.985)}

/* wish card: stepped deco top */
.wish-card-inner{clip-path:polygon(14px 0,calc(100% - 14px) 0,100% 14px,100% calc(100% - 14px),calc(100% - 14px) 100%,14px 100%,0 calc(100% - 14px),0 14px)}
.wish-card:before{content:'';position:absolute;left:50%;top:-9px;width:18px;height:18px;margin-left:-9px;transform:rotate(45deg);background:#121315;border:1px solid #d5b16b88;z-index:3}

@keyframes deco-spin{to{transform:rotate(360deg)}}
@keyframes deco-draw{to{stroke-dashoffset:0}}
@keyframes deco-fade{to{opacity:.9}}
@keyframes deco-rule{to{width:min(56%,420px)}}
@keyframes deco-rise{0%{transform:translateY(0) translateX(0);opacity:0}10%{opacity:.9}50%{transform:translateY(-50dvh) translateX(8px)}100%{transform:translateY(-105dvh) translateX(-6px);opacity:0}}
@keyframes deco-title{0%{opacity:0;transform:scale(1.12);filter:blur(10px)}60%{opacity:1;filter:blur(0)}100%{opacity:1;transform:none;filter:none}}
@keyframes deco-up{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
@keyframes deco-shutter{0%{opacity:0;transform:scaleX(0)}35%{opacity:1;transform:scaleX(1)}100%{opacity:0;transform:scaleX(1) scaleY(30)}}
@keyframes deco-open{0%{clip-path:inset(50% 0 50% 0);opacity:.4}100%{clip-path:inset(0 0 0 0);opacity:1}}
@keyframes deco-sheen{0%,65%{left:-60%}100%{left:130%}}


