/* The invite shell (index.html only; Party HQ never loads this). Loaded last, so it refines the
 * shared styles.css for families: the first screen, section rhythm, the RSVP sequence, the sticky
 * RSVP button and the motion layer (invite-motion.js).
 *
 * Motion rules: transform and opacity only, nothing blocks reading, and every resting state is the
 * finished look. Under prefers-reduced-motion the global rule in styles.css stops all of it, and
 * invite-motion.js never adds the reveal class, so the page is simply static and complete. */

:root{
  --sec-gap:56px;
  --glass:linear-gradient(160deg,#ffffff17,#ffffff08);
  --out-expo:cubic-bezier(.16,1,.3,1);
}

/* ---------------------------- the parallax night sky ---------------------------- */
/* Three layers behind the twinkling canvas: a soft aurora, fine far stars and a few big near ones.
   invite-motion.js drifts them slower than the page (each layer by a whole tile, so it never runs out). */
.sky{position:fixed;inset:0;z-index:0;overflow:hidden;pointer-events:none}
.sky i{position:absolute;left:0;right:0;top:0;will-change:transform}
.sky-glow{height:calc(100lvh + 300px);
  background:radial-gradient(55% 32% at 85% 14%,#c8b4ff26,transparent 70%),radial-gradient(60% 30% at 8% 46%,#ffaecf1c,transparent 72%),
    radial-gradient(80% 36% at 60% 96%,#ffe3941a,transparent 70%)}
.sky-far{height:calc(100lvh + 320px);opacity:.75;background-size:320px 320px;background-image:
  radial-gradient(1.1px 1.1px at 24px 40px,#fff 50%,transparent 100%),radial-gradient(1px 1px at 130px 92px,#fff 50%,transparent 100%),
  radial-gradient(1.2px 1.2px at 260px 30px,#ffe394 50%,transparent 100%),radial-gradient(1px 1px at 200px 180px,#fff 50%,transparent 100%),
  radial-gradient(1.1px 1.1px at 60px 250px,#c8b4ff 50%,transparent 100%),radial-gradient(1px 1px at 300px 270px,#fff 50%,transparent 100%),
  radial-gradient(1px 1px at 160px 300px,#a9d8ff 50%,transparent 100%)}
.sky-near{height:calc(100lvh + 560px);background-size:560px 560px;background-image:
  radial-gradient(3px 3px at 90px 120px,#fffbe8 30%,#fffbe800 100%),radial-gradient(2.5px 2.5px at 420px 60px,#ffaecf 30%,#ffaecf00 100%),
  radial-gradient(3px 3px at 300px 380px,#c8b4ff 30%,#c8b4ff00 100%),radial-gradient(2.5px 2.5px at 40px 470px,#9ff0d0 30%,#9ff0d000 100%),
  radial-gradient(3.5px 3.5px at 510px 300px,#fffbe8 30%,#fffbe800 100%)}

/* ------------------------------------ the first screen ------------------------------------ */
.hero .title{font-size:clamp(38px,min(10.8vw,8.6vh),66px);line-height:1.02;margin-top:6px}
.hero .eyebrow{margin-top:4px}
/* The "10" and one line about the night, side by side: Mollie turning ten, front and center but compact. */
.intro{display:flex;align-items:center;gap:16px;max-width:440px;margin:16px auto 0;text-align:left}
.intro .ten{flex:none;width:88px;height:88px;margin:0 0 10px;box-shadow:inset -6px -9px 0 #f57fb1,0 12px 30px #ff9cc655}
.intro .ten span{font-size:46px;text-shadow:0 3px 0 #e5609b}
.intro .ten small{bottom:-10px;font-size:10.5px;padding:3px 9px;letter-spacing:.08em}
.intro .lede{margin:0;max-width:none;font-size:16px;line-height:1.45}
@media (max-width:350px){.intro{gap:12px}.intro .ten{width:74px;height:74px}.intro .ten span{font-size:38px}.intro .lede{font-size:15px}}

/* When / sleepover / where: one glassy card, a drawn icon per row, label over value. */
#glance{max-width:440px;margin:18px auto 0;padding:4px 16px;gap:0;display:grid;text-align:left;border-radius:24px;
  background:linear-gradient(160deg,#3b2d7ae0,#251b52e8);border:1px solid var(--pillow-edge);box-shadow:inset 0 1px 0 #ffffff24,0 18px 40px #0b081c66}
#glance li{display:grid;grid-template-columns:38px minmax(0,1fr);gap:12px;align-items:start;padding:12px 0;border-top:1px solid #ffffff12;line-height:1.3}
#glance li:first-child{border-top:0}
#glance .gi{grid-row:auto;width:38px;height:38px;margin:0;border-radius:14px}
#glance .gi .ic{width:20px;height:20px;vertical-align:0}
#glance .gt{display:grid;gap:2px;min-width:0;font-size:inherit}
#glance .gt .k{line-height:1.2}
#glance .gt .v{font-weight:800;font-size:17px;color:var(--ink)}
#glance .gt .v small{display:block;margin-top:1px;font-weight:700;font-size:14px;color:var(--muted)}
#glance .gt .links{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}
#glance .links .btn{font-size:14px;padding:6px 14px;min-height:40px}
#glance .links .ic{width:16px;height:16px}
@media (max-width:600px),(pointer:coarse){#glance .links .btn{min-height:44px}}

/* One big, obvious RSVP button (the calendar links sit quietly under it). */
.herocta{margin-top:18px;gap:10px}
.btn.cta{width:min(100%,440px);min-height:60px;font-size:21px;font-weight:700;padding:16px 28px;color:#3a1430;
  background:linear-gradient(180deg,#ffc6dd,#ff9cc6);box-shadow:inset 0 -5px 0 #0000002a,inset 0 0 0 1px #ffffff40,0 14px 32px #ff9cc650,0 0 0 5px #ffaecf1f}
.btn.cta{position:relative;overflow:hidden;isolation:isolate}
.btn.cta::after{content:"";position:absolute;z-index:-1;inset:0;pointer-events:none;background:linear-gradient(105deg,transparent 35%,#ffffffa0 50%,transparent 65%) -150% 0/60% 100% no-repeat;animation:cta-sheen 5.5s var(--ease-out) 2.2s infinite}
@keyframes cta-sheen{0%,62%{background-position:-150% 0}86%,100%{background-position:250% 0}}
.calrow{font-size:14px}
.calrow > span{display:inline-flex;align-items:center;gap:6px}
.hero .coming{margin-top:16px}
.hero .squad{margin-top:30px}

/* The hero plays in once the opening has finished (invite-motion.js adds .hero-play). */
.hero.hero-play .hi{animation:rise-in .8s var(--out-expo) both;animation-delay:calc(.25s + var(--i,0) * 90ms)}
@keyframes rise-in{from{opacity:0;transform:translate3d(0,22px,0)}}
/* The string lights at the top swing with the scroll (--sway, in degrees, from invite-motion.js). */
#lights .bulb{transform-origin:50% -14px;rotate:calc(var(--sway,0) * 1deg)}
#lights .bulb:nth-child(3n+1){rotate:calc(var(--sway,0) * 1.25deg)}
#lights .bulb:nth-child(3n+2){rotate:calc(var(--sway,0) * .8deg)}

/* ------------------------------------- page rhythm ------------------------------------- */
#invite > section{margin-top:var(--sec-gap)}
#invite > section.countdown{margin-top:34px}
section,#rsvp{scroll-margin-top:16px}
body.has-host-banner :is(section,#rsvp){scroll-margin-top:150px}
.pillow{padding:24px 22px}
@media (max-width:520px){.pillow{padding:22px 16px}}
.sec-head{margin-bottom:18px}
.sec-head p{font-size:15px}

/* The countdown: one slim strip, not a whole card. */
.countdown{text-align:center}
.countdown h2{font-size:20px;color:var(--butter);margin-bottom:12px}
.countdown .count{max-width:440px;margin:0 auto;gap:8px}
.countdown .cbox{padding:10px 4px 8px;border-radius:18px;background:#ffffff0d;box-shadow:inset 0 0 0 1px #ffffff14}
.countdown .cbox b{font-size:clamp(24px,7vw,34px)}
.countdown .cbox span{font-size:11px}

/* Contacts: a person icon in the kicker, the number big. */
#contacts .fact .v{font-size:20px}

/* "Just for fun": a quiet divider, then the games and the wish wall. */
.extras{margin-top:72px}
.extras-k{display:flex;align-items:center;gap:14px;font-family:var(--display);font-weight:600;font-size:13px;letter-spacing:.16em;text-transform:uppercase;color:var(--butter)}
.extras-k::before,.extras-k::after{content:"";flex:1;height:1px;background:linear-gradient(90deg,transparent,#ffe39466)}
.extras-k::after{background:linear-gradient(90deg,#ffe39466,transparent)}
.extras > section{margin-top:22px}
.extras > section + section{margin-top:var(--sec-gap)}

/* --------------------------------- scroll reveals --------------------------------- */
/* Only with .rv-on (motion allowed and IntersectionObserver present). A section waits just below,
   faded, and glides up as it enters; its rows follow in a quick stagger. */
.rv-on .rv{transition:opacity .7s var(--ease-out),transform .9s var(--out-expo)}
.rv-on .rv:not(.in){opacity:0;transform:translate3d(0,34px,0)}
.rv-on .rv .rv-i{transition:opacity .55s var(--ease-out),transform .7s var(--out-expo);transition-delay:calc(.14s + var(--i,0) * 55ms)}
.rv-on .rv:not(.in) .rv-i{opacity:0;transform:translate3d(0,16px,0)}
/* ...and each heading's string of tent lights flickers on as its section arrives. */
.rv-on .rv:not(.in) .sec-head > h2::before,.rv-on .rv:not(.in) .sec-head > h2::after{opacity:.12;animation:none}
.rv-on .rv.in .sec-head > h2::before{animation:sh-on .9s ease-out .2s both,sh-tw 2.8s ease-in-out 1.1s infinite}
.rv-on .rv.in .sec-head > h2::after{animation:sh-on .9s ease-out .45s both,sh-tw 2.8s ease-in-out 2.75s infinite}
@keyframes sh-on{0%{opacity:.12}25%{opacity:1}38%{opacity:.25}55%{opacity:1}68%{opacity:.5}100%{opacity:1}}

/* ------------------------------------ the RSVP card ------------------------------------ */
/* Choices: a squeeze under the finger, a springy pop when picked, a soft glow while picked. */
.choice > span{transition:transform .25s var(--spring),background-color .2s,border-color .2s,color .2s,box-shadow .3s}
.choice:active > span{transform:scale(.96)}
.choice input:checked + span{animation:pick .45s var(--spring);box-shadow:0 0 0 4px #c8b4ff26,0 8px 22px #c8b4ff33}
@keyframes pick{0%{transform:scale(.92)}55%{transform:scale(1.07)}100%{transform:scale(1.04)}}
/* The two big answers get a little badge in the corner once picked: a check for yes, a heart for no. */
.choices.big .choice > span{position:relative}
.choices.big .choice > span::after{content:"";position:absolute;top:-8px;right:-6px;width:26px;height:26px;border:2px solid #2c2160;border-radius:50%;opacity:0;transform:scale(.3);transition:opacity .2s,transform .35s var(--spring);
  background:#0d3a2c url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239ff0d0' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.6 4 4L18 8'/%3E%3C/svg%3E") center/16px no-repeat}
.choices.big .choice.no > span::after{background:#3a1430 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffaecf'%3E%3Cpath d='M12 20.2s-7.6-4.5-7.6-10.3A4.3 4.3 0 0 1 12 7.3a4.3 4.3 0 0 1 7.6 2.6c0 5.8-7.6 10.3-7.6 10.3z'/%3E%3C/svg%3E") center/14px no-repeat}
.choices.big .choice input:checked + span::after{opacity:1;transform:none}
.choices.big .choice input:checked + span{box-shadow:0 0 0 4px #9ff0d026,0 10px 26px #9ff0d033}
.choices.big .choice.no input:checked + span{box-shadow:0 0 0 4px #ffaecf26,0 10px 26px #ffaecf33}
/* After "Yes", the next questions slide in one after another. */
.yesonly:not([hidden]) > *{animation:rise-in .5s var(--out-expo) both}
.yesonly > :nth-child(2){animation-delay:.05s} .yesonly > :nth-child(3){animation-delay:.1s} .yesonly > :nth-child(4){animation-delay:.15s}
.yesonly > :nth-child(5){animation-delay:.2s} .yesonly > :nth-child(6){animation-delay:.25s} .yesonly > :nth-child(n+7){animation-delay:.3s}

/* The send sequence: the button squeezes into a round mint check, the done panel opens, and the
   Tent Pass prints out of its slot like a movie ticket. */
#rsvpBtn{clip-path:inset(0 0 round 999px);transition:transform .15s,clip-path .45s cubic-bezier(.6,0,.2,1),background-color .3s,color .3s}
#rsvpBtn.sent{opacity:1;clip-path:inset(0 calc(50% - 31px) round 999px);background:var(--mint);color:#0d3a2c;animation:none;box-shadow:none}
#rsvpBtn.sent::after{display:none}
#rsvpBtn .ic{width:30px;height:30px;stroke-width:3}
#rsvpBtn.sent .ic path{stroke-dasharray:26;animation:draw .4s ease-out .25s both}
#rsvpBtn.sent .ic{animation:sent-pop .5s var(--spring) .2s both}
@keyframes sent-pop{from{transform:scale(.4)}}

#rsvpDone:not([hidden]) #doneTitle{animation:rise-in .5s var(--out-expo) .1s both}
#passWrap{position:relative;width:100%;display:grid;justify-items:center;padding-top:14px}
#passWrap:empty{display:none}
/* The slot the ticket comes out of: shown only while it prints. */
#passWrap::before{content:"";position:absolute;z-index:3;left:50%;top:0;width:min(100%,384px);height:12px;transform:translateX(-50%);border-radius:999px;
  background:linear-gradient(#08061a,#2a2058);box-shadow:inset 0 3px 5px #000c,0 1px 0 #ffffff26;opacity:0;transition:opacity .5s .2s}
#passWrap.printing{overflow:hidden}
#passWrap.printing::before{opacity:1;transition:none}
#passWrap.printing > .pass{animation:print 1.2s cubic-bezier(.3,.6,.3,1) both}
@keyframes print{0%{transform:translate3d(0,-104%,0)}28%{transform:translate3d(0,-66%,0)}33%{transform:translate3d(0,-64%,0)}62%{transform:translate3d(0,-26%,0)}67%{transform:translate3d(0,-24%,0)}92%{transform:translate3d(0,1.5%,0)}100%{transform:none}}
#passWrap.printing ~ #doneNote,#passWrap.printing ~ #saveNum,#passWrap.printing ~ .btnrow{animation:rise-in .5s var(--out-expo) 1.05s both}

/* ------------------------------ the sticky RSVP button ------------------------------ */
/* Bottom right, under the thumb; the Games chip keeps the bottom left. */
.rsvp-bar{position:fixed;z-index:41;right:max(14px,env(safe-area-inset-right,0px));bottom:max(14px,env(safe-area-inset-bottom,0px));
  display:inline-flex;align-items:center;gap:8px;max-width:calc(100% - 150px);min-height:52px;padding:10px 20px 10px 22px;border-radius:999px;
  background:linear-gradient(180deg,#ffc6dd,#ff9cc6);color:#3a1430;text-decoration:none;font-family:var(--display);font-weight:700;font-size:17px;
  box-shadow:0 12px 28px #0009,inset 0 -4px 0 #0000001f,inset 0 0 0 1px #ffffff40;
  transform:translate3d(0,calc(100% + 30px),0);visibility:hidden;transition:transform .3s ease-in,visibility 0s .3s}
.rsvp-bar.on{transform:none;visibility:visible;transition:transform .55s var(--spring),visibility 0s}
.rsvp-bar:active{scale:.96}
.rsvp-bar .rb-t{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rsvp-bar .ic{flex:none;width:18px;height:18px}
@media (max-width:359px){.rsvp-bar{font-size:16px;padding-inline:16px;max-width:calc(100% - 136px)}}
body.rsvpbar-on .toast{bottom:calc(80px + env(safe-area-inset-bottom,0px))}

/* ------------------------------------ landscape phones ------------------------------------ */
@media (orientation:landscape) and (max-height:500px){
  .hero .title{font-size:clamp(34px,7vw,52px)}
  .intro,#glance,.herocta .btn.cta,.countdown .count{max-width:560px}
}
#doneNote,#saveNum{text-wrap:pretty}
/* Once answered: no "please answer by" line over the thank-you, and the "can't come" heart is drawn whole. */
#rsvp:has(#rsvpDone:not([hidden])) #rsvpBy{display:none}
.done-badge.no .ic path{stroke-dasharray:none}
