/* Landing page (index.html): only what its two layouts share.
   The layouts themselves are ports of two separate designs:
     css/desktop.css  — laptops, desktops and tablets  ("My Saint Story Landing", desktop)
     css/mobile.css   — phones, upright or on their side  ("MSS mobile only")
   The split is the media pair on the two <link>s in index.html.
   Both use Instrument Serif for display type and Instrument Sans for text
   (css/fonts-instrument.css), white on a dusk-to-azure sky drawn by
   assets/sky.js, with one gold accent. */

html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
*{box-sizing:border-box}
body{margin:0;background:#252E6A;color:#fff;font-family:'Instrument Sans',system-ui,sans-serif;line-height:1.6;
  -webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
a{color:inherit;text-decoration:none}
a:hover{color:#F6DC9E}
::selection{background:rgba(246,220,158,.4);color:#fff}
input::placeholder{color:rgba(255,255,255,.42)}
[hidden]{display:none!important}
h1,h2,h3,h4{margin:0;font-family:'Instrument Serif',Georgia,serif;font-weight:400;color:#fff}
h1 em,h2 em{font-style:italic;color:#F6DC9E}
p{margin:0}
button{font-family:inherit}

@keyframes mssGlow{0%,100%{opacity:.78;transform:translate(-50%,-50%) scale(.96)}50%{opacity:1;transform:translate(-50%,-50%) scale(1.05)}}
@keyframes mssIn{from{opacity:0;transform:translateY(16px) scale(.985)}to{opacity:1;transform:none}}
@keyframes mssFade{from{opacity:0}to{opacity:1}}
@keyframes mssUp{from{opacity:0;transform:translateY(28px)}to{opacity:1;transform:none}}
@keyframes mssTick{to{stroke-dashoffset:0}}
@keyframes mssShake{10%,90%{transform:translateX(-1px)}20%,80%{transform:translateX(2px)}30%,50%,70%{transform:translateX(-4px)}40%,60%{transform:translateX(4px)}}

/* The page and its sky. The gradient is what shows until the canvas paints. */
.page{position:relative;min-height:100vh;overflow-x:clip;color:#fff;
  background:linear-gradient(180deg,#252E6A 0%,#273678 10%,#294793 28%,#275BAB 50%,#236CBD 75%,#217AC9 100%)}
#sky{position:fixed;top:0;left:0;width:100%;height:100%;z-index:0;pointer-events:none;display:block}
.page>section,.page>footer{position:relative;z-index:1}

/* The gold button, in every size the layouts give it. */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:.6em;font-family:inherit;font-weight:600;letter-spacing:.01em;
  color:#1A2152;background:linear-gradient(180deg,#FAE7B4 0%,#E8C272 100%);border:none;border-radius:999px;cursor:pointer;text-decoration:none}
.btn:hover{color:#1A2152}

/* Small caps label with gold rules either side (the layouts size them). */
.eyebrow{display:inline-flex;align-items:center;font-weight:600;text-transform:uppercase;color:#F6DC9E}
.eyebrow::before,.eyebrow::after{content:"";height:1px;background:rgba(246,220,158,.7)}

.hero-glow{position:absolute;left:50%;top:50%;width:min(840px,150%);aspect-ratio:1/1;border-radius:50%;z-index:0;pointer-events:none;
  transform:translate(-50%,-50%);
  background:radial-gradient(closest-side,rgba(255,233,176,.6),rgba(255,214,140,.3) 40%,rgba(255,205,130,.1) 66%,rgba(255,205,130,0) 100%);
  animation:mssGlow 9s ease-in-out infinite}
.hero-cover img{display:block;width:100%;height:100%;object-fit:cover}
/* The book rises and falls while it changes child (index.html, "Hero"): the
   is-up rise is in css/desktop.css and css/mobile.css, its height in
   css/hero.css. .hero-swap is the copy of the cover and of the photo that
   fades over the original to bring in the next child. */
.hero-book{transition:translate 2s cubic-bezier(.37,0,.63,1)}
.hero-book .hero-swap{opacity:0;pointer-events:none;transition:opacity .45s ease,transform .2s ease}
.hero-book .hero-swap.is-on{opacity:1}
.hero-cover .hero-swap{position:absolute;inset:0}
.hero-cover-shade{position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(90deg,rgba(0,0,0,.24),rgba(0,0,0,0) 8%,rgba(255,255,255,.12) 50%,rgba(0,0,0,0) 92%)}

/* The strip is dragged and swiped by hand (startRail in index.html); vertical
   swipes stay the page's. */
.carousel-track{touch-action:pan-y;-webkit-user-select:none;user-select:none;overscroll-behavior-x:contain}
.carousel-rail{display:flex;width:max-content;will-change:transform;margin:0;padding:0;list-style:none}
.carousel-item{position:relative;display:block;width:100%;border:none;background:none;padding:0;cursor:pointer;color:inherit;font-family:inherit}
.carousel-cover{position:relative;z-index:1;display:block;aspect-ratio:1/1;overflow:hidden;background:#2A3A80;
  outline:2px solid rgba(246,220,158,0);outline-offset:3px;transition:transform .3s cubic-bezier(.2,.7,.2,1),outline-color .3s}
.carousel-item.is-active .carousel-cover{outline-color:rgba(246,220,158,.95);transform:scale(1.05)}
.carousel-cover img{display:block;width:100%;height:100%;object-fit:cover;-webkit-user-drag:none}
.carousel-clip{position:absolute;z-index:4;height:auto;transform:rotate(-8deg);pointer-events:none}
.carousel-photo{position:absolute;z-index:3;border-radius:3px;border:1px solid rgba(255,255,255,.75);transform:rotate(-4deg);overflow:hidden;line-height:0}
.carousel-photo img{display:block;width:100%;height:auto;-webkit-user-drag:none}
.carousel-name{position:relative;z-index:1;display:block;text-align:center;color:#fff;font-weight:400}
.carousel-item.is-active .carousel-name{font-weight:600}

/* The example book's box shows the clip or the reader, never both. */
.ex-stage.is-video #exampleBook,.ex-stage:not(.is-video) #exampleVideo{display:none}
.ex-stage.is-video .ic-play,.ex-stage:not(.is-video) .ic-book{display:none}
#exampleBook{border:none;background:transparent}
/* The switch from the clip to the reader: a gold open book in the clip's
   corner. Its twin — a gold play button on the book's corner — is drawn by
   book-viewer.html in the same style. */
.ex-view-toggle{position:absolute;z-index:3;display:grid;place-items:center;padding:0;border-radius:50%;
  border:1px solid rgba(246,220,158,.6);background:rgba(20,25,67,.55);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);
  color:#F6DC9E;cursor:pointer;box-shadow:0 10px 26px rgba(4,8,36,.35);transition:background-color .2s ease}
.ex-view-toggle svg{display:block}
.ex-view-label{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

.how-shot{aspect-ratio:4/3;overflow:hidden;background:rgba(255,255,255,.06)}
.how-shot.how-shot-gold{background:rgba(246,220,158,.1)}
.how-shot img{display:block;width:100%;height:100%;object-fit:cover;object-position:top center}
.how-num{font-family:'Instrument Serif',Georgia,serif;font-style:italic;line-height:1;color:#F6DC9E}
.need{display:flex;align-items:flex-start;color:#fff}
.need svg{flex:none;color:#F6DC9E}
.need b{font-weight:600}
.price-line{font-family:'Instrument Serif',Georgia,serif;line-height:1.1;color:#fff;display:flex;align-items:baseline}
.price-line .amt{line-height:1;color:#F6DC9E}
/* The price under the hero's order button. */
.hero-price{font-family:'Instrument Serif',Georgia,serif;line-height:1.3;color:#fff}
.hero-price .amt{color:#F6DC9E}
.promise svg{color:#F6DC9E}

/* FAQ: a native <details> with the design's ringed plus, which turns into
   a cross when open. */
.qa summary{display:flex;justify-content:space-between;align-items:center;cursor:pointer;text-align:left;list-style:none;
  font-family:'Instrument Serif',Georgia,serif;line-height:1.25;color:#fff}
.qa summary::-webkit-details-marker{display:none}
.qa .pl{flex:none;position:relative;border-radius:50%;border:1px solid rgba(246,220,158,.55);transition:transform .35s cubic-bezier(.2,.7,.2,1)}
.qa .pl::before,.qa .pl::after{content:"";position:absolute;left:50%;top:50%;background:#F6DC9E}
.qa[open] .pl{transform:rotate(45deg)}

#finalVideo{display:block;width:100%;height:auto}
.foot-bottom a{text-decoration:underline;text-underline-offset:3px}
.foot-addr{font-style:normal}

/* ---------------------------------------------------------------- checkout */
.modal-overlay{position:fixed;inset:0;z-index:200}
.modal{display:flex;flex-direction:column;color-scheme:dark;color:#fff;background:linear-gradient(180deg,#252E6A 0%,#2A4590 100%)}
.modal-close{color:#fff;cursor:pointer;display:grid;place-items:center;padding:0}
.modal-close svg{display:block}
.modal-head h3{line-height:1.08;color:#fff}
.modal-head .sub{line-height:1.55;color:#fff}
/* The checkout's progress: no step count, just a thick gold bar that glows
   (its width comes from render(): fast at first, full only when ordered). */
.modal-bar{flex:1;min-width:0;border-radius:99px;background:rgba(255,255,255,.12);box-shadow:inset 0 1px 2px rgba(3,6,28,.35)}
.modal-bar i{display:block;height:100%;width:0;border-radius:99px;background:linear-gradient(90deg,#FAE7B4,#E8C272);
  box-shadow:0 0 12px rgba(242,210,140,.45);transition:width .6s cubic-bezier(.2,.7,.2,1)}
.modal-body{overflow-y:auto;flex:1 1 auto}

/* Fields: large, with a faint gold outline and glow, so an empty step never looks bare.
   Step 2's sex question is a <fieldset class="fld">, hence the reset. */
.fld{display:block;min-width:0;margin-inline:0;padding:0;border:0}
.fld>span,.fld>legend{display:block;padding:0;font-size:.7rem;font-weight:600;letter-spacing:.14em;text-transform:uppercase;color:rgba(246,220,158,.92);margin-bottom:8px}
.fld>span em{text-transform:none;letter-spacing:0;font-style:normal;font-weight:500}
.fld input,.fld select{width:100%;border:1.5px solid rgba(242,210,140,.55);font-family:inherit;font-weight:500;color:#fff;
  background:rgba(255,255,255,.09);outline:none;transition:border-color .2s,box-shadow .2s;margin:0;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.06),0 0 18px -6px rgba(242,210,140,.22)}
.fld input::placeholder{color:rgba(255,255,255,.4)}
.fld input:focus,.fld select:focus{border-color:#F2D28C;box-shadow:0 0 0 4px rgba(242,210,140,.18),0 0 24px -6px rgba(242,210,140,.4)}
.fld select{appearance:none;-webkit-appearance:none;cursor:pointer;padding-right:44px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 9'%3E%3Cpath d='M1 1.5l6 6 6-6' fill='none' stroke='%23F2D28C' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 16px center;background-size:14px 9px}
.fld select option{color:#fff;background:#273678}
.fld .hint{display:block;font-style:normal;font-weight:500;color:#F6DC9E;margin-top:8px;min-height:1.2em}
.fld .hint:empty{min-height:0;margin-top:0}
.fld-name input,.fld-age input{font-family:'Instrument Serif',Georgia,serif;font-weight:400;letter-spacing:.01em}
/* The name and age fields' box, so the gold tick can sit inside it (not a label text: undo .fld>span). */
.fld>span.fld-box{display:block;position:relative;margin:0;padding:0;font:inherit;letter-spacing:normal;text-transform:none;color:inherit}
.fld-tick{position:absolute;right:18px;top:50%;width:32px;height:32px;margin-top:-16px;opacity:0;transform:scale(.6);pointer-events:none;
  filter:drop-shadow(0 0 6px rgba(242,210,140,.55));transition:opacity .2s ease,transform .35s cubic-bezier(.2,.7,.2,1)}
.fld-tick svg{display:block;width:100%;height:100%}
.fld-tick path{fill:none;stroke:#F2D28C;stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:22;stroke-dashoffset:22}
.fld-tick.on{opacity:1;transform:none}
.fld-tick.on path{animation:mssTick .55s .1s cubic-bezier(.65,0,.35,1) forwards}

/* Step 2: girl or boy, asked only when the name doesn't tell. */
.sex-pills{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.sex-pills label{position:relative;cursor:pointer}
.fld .sex-pills input{position:absolute;opacity:0;width:1px;height:1px;padding:0;margin:0;border:0;pointer-events:none}
.sex-pills span{display:flex;align-items:center;justify-content:center;border:1.5px solid rgba(242,210,140,.55);border-radius:999px;
  background:rgba(255,255,255,.07);font-weight:600;color:#fff;transition:background .2s,border-color .2s,color .2s}
.sex-pills input:checked+span{background:linear-gradient(180deg,#FAE7B4,#E8C272);border-color:#E8C272;color:#1A2152}
.sex-pills input:focus-visible+span{box-shadow:0 0 0 4px rgba(242,210,140,.3)}

/* A gap, pointed at by its field (showProblems() in index.html): never a wall, see `warned`. */
/* input/select in the selector: it must outrank .fld input:focus, since the field with the gap gets the focus. */
.fld input[aria-invalid="true"],.fld select[aria-invalid="true"],.drop[aria-invalid="true"]{border-color:#FF9C86;box-shadow:0 0 0 4px rgba(255,156,134,.16)}
.sex-pills:has([aria-invalid="true"]) span{border-color:#FF9C86}
.consents.is-bad{border-color:rgba(255,156,134,.7)}
.fld-err{display:block;font-style:normal;font-weight:500;font-size:.84rem;line-height:1.45;color:#FFC2B3;margin-top:8px}
.consents .fld-err{margin:-6px 0 14px}
.shake{animation:mssShake .4s cubic-bezier(.36,.07,.19,.97)}
.consents .c-all{font-weight:600;padding-bottom:14px;border-bottom:1px solid rgba(242,210,140,.25)}
.done .done-needs{font-size:.9rem;color:#F6DC9E}

.drop{display:flex;flex-direction:column;align-items:center;justify-content:center;cursor:pointer;border:1.5px dashed rgba(255,255,255,.34);
  text-align:center;background:rgba(255,255,255,.035);transition:background .2s}
.drop.over{background:rgba(255,255,255,.12)}
.drop .ring{border-radius:50%;display:grid;place-items:center;background:linear-gradient(180deg,#FAE7B4,#E8C272);color:#1A2152}
.drop b{font-weight:600}
.drop small{color:rgba(255,255,255,.78)}
.photo-ok{display:flex;align-items:center}
.photo-ok img{border-radius:50%;flex:none;object-fit:cover;border:3px solid #F6DC9E}
.photo-ok>div{flex:1;min-width:0}
.photo-ok b{display:block;font-weight:600}
.photo-ok p{margin:2px 0 0;line-height:1.5;color:rgba(255,255,255,.82)}
.mini{flex:none;border:1px solid rgba(255,255,255,.25);background:rgba(255,255,255,.06);font-family:inherit;font-weight:600;color:#fff;cursor:pointer}

.consents,.adult-slot{background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.12)}
.consents>b,.adult-head b{display:block;font-size:.7rem;font-weight:600;letter-spacing:.14em;text-transform:uppercase;color:rgba(255,255,255,.78)}
.consents label,.offers label{display:flex;gap:12px;align-items:flex-start;cursor:pointer;line-height:1.55;color:#fff}
.consents input,.offers input{accent-color:#E9C474;flex:none}
.consents .legal{line-height:1.5;color:rgba(255,255,255,.8)}
.consents .legal a{text-decoration:underline}
.step-intro{line-height:1.6;color:#fff;margin:0 0 16px}
.step-intro b{font-weight:600}
.adult-head{display:flex;justify-content:space-between;align-items:center}
.adult-add{width:100%;display:flex;align-items:center;justify-content:center;font-family:inherit;font-weight:600;color:#fff;background:transparent;
  border:1px dashed rgba(255,255,255,.34);border-radius:999px;cursor:pointer}
.ship-note{margin:0;color:rgba(255,255,255,.82)}

.pay-total{display:flex;justify-content:space-between;gap:14px;border-radius:14px;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.12)}
.pay-total span{font-size:.88rem;font-weight:500;color:#fff}
.pay-total b{font-family:'Instrument Serif',Georgia,serif;font-weight:400;color:#F6DC9E;flex:none}
.pay-note{line-height:1.55;color:rgba(255,255,255,.82)}

.done{text-align:center;display:flex;flex-direction:column;align-items:center}
.done .tick{width:64px;height:64px;border-radius:50%;display:grid;place-items:center;font-size:26px;color:#1A2152;
  background:linear-gradient(180deg,#FAE7B4,#E8C272);box-shadow:0 0 0 8px rgba(246,220,158,.14)}
.done .no{padding:.45em 1.1em;border-radius:99px;font-weight:600;font-size:.92rem;letter-spacing:.08em;color:#fff;
  background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.2)}
.done .no:empty{display:none}
.done p{line-height:1.65;color:#fff}
.done .done-acct{font-size:.86rem;color:rgba(255,255,255,.82)}
.done .done-acct a{color:#F6DC9E;text-decoration:underline;text-underline-offset:3px}
/* "Return to payment" after an unfinished Stripe payment. */
.done #resumePay{margin-top:16px;font-size:.98rem;padding:.82em 1.7em;box-shadow:inset 0 1px 0 rgba(255,255,255,.7),0 14px 34px -12px rgba(240,190,90,.7)}

.modal-err{border-radius:12px;font-size:.86rem;line-height:1.5;background:rgba(255,120,130,.14);border:1px solid rgba(255,160,170,.4);color:#FFE3E6}
.addr-doubt{border-radius:12px;font-size:.86rem;line-height:1.5;background:rgba(255,255,255,.08);border:1px solid rgba(246,220,158,.45);color:#fff}
.addr-doubt[hidden]{display:none}
.addr-doubt p{margin:0}
.addr-doubt-btns{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.addr-doubt-btns button{font-family:inherit;font-size:.86rem;font-weight:600;color:#fff;background:transparent;border:1px solid rgba(255,255,255,.35);border-radius:999px;padding:.5em 1.1em;cursor:pointer}
.addr-doubt-btns button:hover{background:rgba(255,255,255,.12)}
.addr-doubt-btns button[hidden]{display:none}
#addrUse,#mailUse{color:#1A2152;background:#F6DC9E;border-color:#F6DC9E}
#addrUse:hover{background:#fbe8b8}
.modal-foot{display:flex;align-items:center;flex:none}
.m-back{display:inline-flex;align-items:center;font-family:inherit;font-size:.96rem;font-weight:600;color:#fff;background:transparent;
  border:1px solid rgba(255,255,255,.3);border-radius:999px;cursor:pointer}
.m-next{display:inline-flex;align-items:center;justify-content:center;font-family:inherit;font-size:.98rem;font-weight:600;color:#1A2152;
  background:linear-gradient(180deg,#FAE7B4 0%,#E8C272 100%);border:none;border-radius:999px;cursor:pointer;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.7),0 14px 34px -12px rgba(240,190,90,.7)}
.m-next:disabled{color:rgba(255,255,255,.55);background:rgba(255,255,255,.1);box-shadow:none;cursor:not-allowed;transform:none}

@media (prefers-reduced-motion: reduce){
  html{scroll-behavior:auto}
  .modal-bar i{transition:none}
  .shake{animation:none}
  .fld-tick.on path{animation:none;stroke-dashoffset:0}
  .hero-glow{animation:none}
  .hero-book{transition:none}
}
