/* Mega Life Chapel — the bookstore.
   ADDITIVE ONLY. This file consumes site.css's tokens (--ink, --gold, --serif …) and
   never redefines them, so no existing page can regress if this file is dropped.

   Blur budget: `.glass` is the ONLY rule in this file that sets backdrop-filter.
   Count blurred layers per page by counting `.glass` elements in one viewport.
   Target ≤4 including site.css's fixed `.nav`. Panels that appear in repeatable
   grids use `.glass-lite` (identical look, no blur) so the count can never grow
   with the data. */

:root{
  /* The one colour this file adds: the ember burning in the cover's canyon.
     Scoped to the store; nothing in site.css refers to it. */
  --ember:#e8712f;
  --glass-line:rgba(255,255,255,.12);
  --glass-top:rgba(240,210,122,.35);
}

/* ───────────────────────── aurora field ─────────────────────────
   Three soft radial fields behind the glass. Radial-gradient falloff instead of
   filter:blur() — same look, far cheaper on the mid-range Android this
   congregation actually browses on. */
.aurora{position:absolute;inset:-15% -10%;z-index:0;pointer-events:none;overflow:hidden}
.aurora i{position:absolute;display:block;border-radius:50%}
.aurora i:nth-child(1){          /* royal gold, behind the book */
  width:46vw;height:46vw;min-width:340px;min-height:340px;top:-6%;left:2%;
  background:radial-gradient(circle,rgba(212,175,55,.30),rgba(212,175,55,.07) 48%,transparent 70%)}
.aurora i:nth-child(2){          /* the site's purple, deep right */
  width:52vw;height:52vw;min-width:380px;min-height:380px;top:18%;right:-6%;
  background:radial-gradient(circle,rgba(74,44,143,.55),rgba(74,44,143,.14) 46%,transparent 70%)}
.aurora i:nth-child(3){          /* the cover's ember, low and small */
  width:34vw;height:34vw;min-width:260px;min-height:260px;bottom:-12%;left:22%;
  background:radial-gradient(circle,rgba(232,113,47,.26),rgba(232,113,47,.06) 46%,transparent 70%)}

/* ───────────────────────── the glass primitive ───────────────────────── */
.glass,.glass-lite{
  position:relative;border-radius:var(--r);
  background:linear-gradient(150deg,rgba(255,255,255,.09),rgba(255,255,255,.03));
  border:1px solid var(--glass-line);
  box-shadow:inset 0 1px 0 var(--glass-top),0 30px 80px -30px rgba(0,0,0,.7)}
.glass{-webkit-backdrop-filter:blur(22px) saturate(140%);backdrop-filter:blur(22px) saturate(140%)}
/* Repeatable panels: the glass look without the cost. The gradient, the 1px rim and
   the gold top-edge do the work; the aurora behind supplies the colour. */
.glass-lite{background:linear-gradient(150deg,rgba(255,255,255,.075),rgba(20,17,46,.55))}

/* No backdrop-filter (older Android WebView, Firefox with the flag off): every panel
   becomes solidly translucent. Nothing in the layout depends on the blur. */
@supports not (backdrop-filter:blur(1px)){
  .glass{background:linear-gradient(150deg,rgba(38,32,84,.94),rgba(14,12,40,.94))}
  .glass-lite{background:linear-gradient(150deg,rgba(32,27,72,.94),rgba(14,12,40,.94))}
}

/* Visually-hidden labels — every input keeps a real <label> even when the design
   only shows a placeholder. */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;
  clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0}
.form-msg:empty{display:none}

/* site.css's .btn-ghost sets only a border and a colour — fine on the <a> elements
   it was written for, but a <button> would keep the UA's opaque buttonface. */
.btn-ghost{background:transparent}

/* ───────────────────────── page shells ───────────────────────── */
.store-hero{position:relative;overflow:hidden;
  padding:clamp(112px,13vw,146px) 0 clamp(52px,7vw,84px);
  background:radial-gradient(125% 95% at 50% -25%,var(--ink-3),var(--ink) 60%)}
.store-band{position:relative;overflow:hidden}
.store-hero-grid{position:relative;z-index:2;display:grid;
  grid-template-columns:minmax(0,.92fr) minmax(0,1.08fr);
  gap:clamp(2rem,6vw,5rem);align-items:center}
.store-copy{min-width:0}
.store-copy h1{font-size:clamp(2.1rem,4.7vw,3.5rem);margin-bottom:.2em}
.store-sub{font-family:var(--serif);font-style:italic;font-size:clamp(1.02rem,1.7vw,1.2rem);
  line-height:1.4;color:#d9d4ef;margin:0 0 .95rem;max-width:34ch}
.store-author{display:flex;align-items:center;gap:.7rem;margin:0 0 1.35rem;
  font-size:.86rem;letter-spacing:.14em;text-transform:uppercase;color:var(--gold-soft)}
.store-author::before{content:"";width:34px;height:1px;background:var(--gold);flex:0 0 auto}

/* ───────────────────────── homepage launch band ─────────────────────────
   The store hero's grid rhythm, restyled as a mid-page band on the church
   homepage. Reuses the aurora + book3d + countdown primitives below.
   `.launch-copy` is the ONE backdrop-filter this band adds (site.css's `.nav`
   is the other), so worst case here is 2 blurred layers — well under the
   4-layer cap. */
.launch-band{position:relative;overflow:hidden;
  background:radial-gradient(125% 95% at 50% -20%,var(--ink-3),var(--ink) 65%)}
.launch-grid{position:relative;z-index:2;display:grid;
  grid-template-columns:minmax(0,.82fr) minmax(0,1.18fr);
  gap:clamp(2rem,6vw,5rem);align-items:center}
.launch-copy{min-width:0;padding:clamp(1.6rem,3.6vw,2.5rem)}
.launch-copy .eyebrow{margin-bottom:.5rem}
.launch-copy h2{font-size:clamp(1.9rem,4.2vw,2.9rem);margin:0 0 .5em}
.launch-copy .lead{margin:0 0 1.3rem;max-width:46ch;color:#d8d4ea}
.launch-copy .countdown{margin:0 0 1.4rem}

/* ───────────────────────── the book as an object ───────────────────────── */
.book3d-stage{position:relative;z-index:2;display:flex;justify-content:center;
  perspective:1500px;perspective-origin:60% 45%;
  --bw:clamp(190px,23vw,300px);--thick:calc(var(--bw) * .085)}
.book3d-float{transform-style:preserve-3d}
.book3d{position:relative;width:var(--bw);aspect-ratio:.676;transform-style:preserve-3d;
  transform:rotateY(var(--ry,20deg)) rotateX(var(--rx,3deg))}
.book3d>*{position:absolute;top:0}
.b-front{left:0;width:100%;height:100%;overflow:hidden;
  transform:translateZ(calc(var(--thick) / 2));
  border-radius:2px 9px 9px 2px;background:linear-gradient(160deg,var(--ink-3),#08071a);
  box-shadow:0 42px 70px -34px rgba(0,0,0,.95)}
.b-front img{width:100%;height:100%;object-fit:cover;display:block}
.b-front::after{content:"";position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(102deg,rgba(255,255,255,.20),rgba(255,255,255,.03) 34%,transparent 55%)}
.b-fallback{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;
  padding:1.4rem;text-align:center;font-family:var(--serif);font-size:1.1rem;
  color:var(--gold-2);line-height:1.2}
.b-back{left:0;width:100%;height:100%;border-radius:2px 9px 9px 2px;
  transform:translateZ(calc(var(--thick) / -2));background:linear-gradient(160deg,#141135,#0a0920)}
/* Left face = the printed spine. Centred on x=0, then laid into that plane. */
.b-spine{left:calc(var(--thick) / -2);width:var(--thick);height:100%;transform:rotateY(-90deg);
  background:linear-gradient(90deg,#050512,#151239 45%,#0a0922);
  border-radius:2px 0 0 2px;display:flex;align-items:center;justify-content:center;
  box-shadow:inset -1px 0 0 rgba(0,0,0,.6),inset 1px 0 0 rgba(240,210,122,.12)}
.b-spine span{writing-mode:vertical-rl;font-size:calc(var(--bw) * .026);font-weight:600;
  letter-spacing:.14em;text-transform:uppercase;color:rgba(240,210,122,.62);
  white-space:nowrap;overflow:hidden;max-height:86%}
/* Right face = the page block. */
.b-edge{right:calc(var(--thick) / -2);width:var(--thick);height:100%;transform:rotateY(90deg);
  border-radius:0 2px 2px 0;background:
    linear-gradient(90deg,rgba(0,0,0,.35),transparent 30%,rgba(0,0,0,.25)),
    repeating-linear-gradient(90deg,#efe9da 0,#efe9da 1px,#c3bba4 1px,#c3bba4 2.5px)}
/* The book's own light, pooled on the surface it stands on. */
.book-pool{position:absolute;z-index:1;left:50%;bottom:-6%;width:112%;height:26%;
  transform:translateX(-50%);pointer-events:none;
  background:radial-gradient(ellipse at 50% 50%,rgba(232,113,47,.34),rgba(212,175,55,.13) 42%,transparent 72%)}

/* ───────────────────────── countdown ─────────────────────────
   ONE blurred shell holding four unblurred tiles: four tiles on screen, one
   backdrop-filter on the GPU. */
.countdown{display:grid;grid-template-columns:repeat(4,1fr);gap:.4rem;
  padding:.7rem;margin:0 0 1.35rem;max-width:400px}
.cd-tile{text-align:center;padding:.65rem .2rem .55rem;border-radius:12px;
  background:linear-gradient(160deg,rgba(255,255,255,.07),rgba(255,255,255,.015));
  border:1px solid rgba(255,255,255,.08)}
.cd-tile b{display:block;font-family:var(--serif);font-weight:600;line-height:1;
  font-size:clamp(1.45rem,4.2vw,2.05rem);color:var(--gold-2);
  font-variant-numeric:tabular-nums;font-variation-settings:'opsz' 120}
.cd-tile span{display:block;margin-top:.5rem;font-size:.58rem;letter-spacing:.2em;
  text-transform:uppercase;color:var(--muted)}
.countdown.is-out{grid-template-columns:1fr;text-align:center;
  font-family:var(--serif);font-size:1.3rem;color:var(--gold-2);padding:1.1rem}

/* ───────────────────────── buy panel ───────────────────────── */
.buy-panel{padding:clamp(1.3rem,2.6vw,1.7rem);max-width:470px}
.buy-panel .eyebrow{margin-bottom:.7rem}
.cur-toggle{display:inline-flex;gap:.2rem;padding:.24rem;border-radius:100px;
  background:rgba(6,5,20,.42);border:1px solid rgba(255,255,255,.09)}
.cur{border:0;background:none;color:#bdb9d6;font-family:var(--sans);font-size:.76rem;
  font-weight:500;letter-spacing:.08em;padding:.55em 1.15em;border-radius:100px;cursor:pointer;
  transition:.22s}
.cur:hover{color:var(--gold-2)}
.cur.is-on{background:linear-gradient(120deg,var(--gold),var(--gold-2));color:#1a1405}
.cur:focus-visible{outline:2px solid var(--gold-2);outline-offset:2px}
.price{display:flex;align-items:baseline;flex-wrap:wrap;gap:.2rem .7rem;margin:1rem 0 0}
.price b{font-family:var(--serif);font-weight:600;line-height:1;color:var(--ivory);
  font-size:clamp(2rem,5vw,2.7rem);font-variant-numeric:tabular-nums}
.price em{font-style:normal;font-size:.82rem;color:var(--muted)}
.sfields{display:grid;gap:.65rem;margin:1.05rem 0 .9rem}
.srow{display:grid;grid-template-columns:1fr 1fr;gap:.7rem}
.sfield{width:100%;padding:.88em 1.05em;background:rgba(6,5,20,.42);
  border:1px solid rgba(255,255,255,.12);border-radius:12px;color:var(--ivory);
  font-family:var(--sans);font-weight:300;font-size:.95rem}
.sfield::placeholder{color:#8b87ac}
.sfield:focus{outline:none;border-color:var(--gold);box-shadow:0 0 0 3px rgba(212,175,55,.2)}
.buy-cta{width:100%;justify-content:center;font-size:1rem;padding:1.02em 1.6em}
.buy-cta[disabled]{opacity:.62;cursor:progress}
/* These CTAs sit on .btn (site.css), which sets no focus style of its own, so they
   fall back to the native ring. Match the rest of the page's gold/navy focus
   treatment (same shape as .cur:focus-visible above). Never remove the default
   without this replacement. */
.buy-cta:focus-visible,.notify-cta:focus-visible,.lib-cta:focus-visible,
.cat-card .btn:focus-visible{
  outline:2px solid var(--gold-2);outline-offset:3px;
  box-shadow:0 0 0 5px rgba(212,175,55,.22)}
.trust{display:grid;gap:.4rem;margin:1rem 0 0;padding:0;list-style:none;
  font-size:.79rem;line-height:1.5;color:var(--muted)}
.trust li{display:grid;grid-template-columns:14px 1fr;gap:.55rem;align-items:start}
.trust li::before{content:"✦";color:var(--gold-soft);font-size:.72rem;line-height:1.7}
.flash.is-error{background:rgba(224,106,90,.12);border-color:#e06a5a;color:#ffd9d2}

/* ───────────────────────── description + specification ───────────────────────── */
.store-lede{display:grid;grid-template-columns:minmax(0,190px) minmax(0,1fr);
  gap:clamp(1.2rem,5vw,4rem);align-items:start;position:relative;z-index:2}
.store-lede .divider{margin-top:.9rem}
.store-body{max-width:66ch}
.store-body p{margin:0 0 1.15em;font-size:1.06rem;color:#d8d4ea}
.store-actions{display:flex;gap:.8rem;flex-wrap:wrap;margin-top:1.8rem}
.spec{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:0 2rem;
  margin:3rem 0 0;border-top:1px solid var(--line);position:relative;z-index:2}
.spec>div{padding:1.05rem 0 .95rem;border-bottom:1px solid var(--line)}
.spec dt{font-size:.62rem;letter-spacing:.22em;text-transform:uppercase;color:var(--gold)}
.spec dd{margin:.38rem 0 0;font-size:1rem;color:#e6e2f4}

/* ───────────────────────── about the author ───────────────────────── */
.author-panel.no-photo{grid-template-columns:1fr}
.author-panel{position:relative;z-index:2;max-width:980px;margin-inline:auto;display:grid;
  grid-template-columns:minmax(0,250px) minmax(0,1fr);gap:clamp(1.5rem,4vw,3rem);
  align-items:center;padding:clamp(1.4rem,3.4vw,2.4rem)}
.author-photo{position:relative;border-radius:14px;overflow:hidden;aspect-ratio:3/4;
  background:var(--ink-3)}
.author-photo img{width:100%;height:100%;object-fit:cover;object-position:center 16%}
.author-photo::after{content:"";position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(197deg,transparent 42%,rgba(11,10,31,.62));
  box-shadow:inset 0 0 0 1px rgba(240,210,122,.3)}
.author-panel h2{font-size:clamp(1.7rem,3.4vw,2.4rem);margin-bottom:.25em}
.author-panel .role{font-size:.68rem;letter-spacing:.24em;text-transform:uppercase;
  color:var(--gold);display:block;margin-bottom:.9rem}
.author-panel p{color:#d8d4ea;margin:0 0 1em;max-width:56ch}
.author-links{display:flex;gap:1.4rem;flex-wrap:wrap;margin-top:1.3rem}
.author-links a{font-size:.88rem;color:var(--gold-2);border-bottom:1px solid rgba(212,175,55,.35);
  padding-bottom:2px;transition:.2s}
.author-links a:hover{border-color:var(--gold-2)}

/* ───────────────────────── print edition ───────────────────────── */
.print-panel{position:relative;z-index:2;max-width:980px;margin-inline:auto;display:grid;
  grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr);gap:clamp(1.6rem,4vw,3rem);
  align-items:center;padding:clamp(1.4rem,3.4vw,2.4rem)}
.print-shot{border-radius:14px;overflow:hidden;border:1px solid rgba(255,255,255,.09)}
.print-shot img{width:100%;height:auto;display:block}
.print-panel h2{font-size:clamp(1.6rem,3.2vw,2.2rem)}
.print-panel .note{margin:.2rem 0 0}

/* ───────────────────────── catalog ───────────────────────── */
.cat-grid{position:relative;z-index:2;display:grid;justify-content:center;
  grid-template-columns:repeat(auto-fit,minmax(240px,296px));gap:1.6rem;margin-top:3.2rem}
.cat-card{display:flex;flex-direction:column;align-items:center;text-align:center;
  padding:2.4rem 1.5rem 1.8rem;transition:transform .3s cubic-bezier(.2,.7,.2,1),border-color .3s}
.cat-card:hover{transform:translateY(-5px);border-color:rgba(240,210,122,.4)}
.cat-card .book3d-stage{--bw:clamp(120px,32vw,150px);margin-bottom:1.6rem}
.cat-card h2{font-size:1.32rem;margin:0 0 .3em}
.cat-card .blurb{font-size:.92rem;color:var(--muted);margin:0 0 1.4rem;max-width:34ch}
.cat-card .btn{margin-top:auto}
.cat-status{font-size:.62rem;letter-spacing:.2em;text-transform:uppercase;color:var(--gold);
  margin-bottom:.8rem;display:block}
.cat-empty{position:relative;z-index:2;max-width:520px;margin:3rem auto 0;padding:2.4rem;
  text-align:center}

/* ───────────────────────── slim pages (thanks / library / denied) ───────────────────────── */
.slim{position:relative;overflow:hidden;padding:clamp(120px,15vw,172px) 0 clamp(70px,10vw,120px);
  background:radial-gradient(125% 95% at 50% -25%,var(--ink-3),var(--ink) 60%)}
.slim-panel{position:relative;z-index:2;max-width:620px;margin:0 auto;
  padding:clamp(1.7rem,4.5vw,2.8rem);text-align:center}
.slim-panel h1{font-size:clamp(1.9rem,4.6vw,2.9rem);margin-bottom:.3em}
.slim-panel p{color:#d8d4ea;margin:0 0 1.1em}
.slim-panel .sfields{text-align:left;max-width:400px;margin-inline:auto}
.slim-panel .btn{justify-content:center}
.ref-chip{display:inline-flex;align-items:center;gap:.55rem;margin:.2rem 0 1.4rem;
  padding:.6em 1.1em;border-radius:100px;border:1px solid var(--line);
  background:rgba(212,175,55,.07);font-size:.86rem;letter-spacing:.04em;color:var(--gold-2);
  font-variant-numeric:tabular-nums;word-break:break-all}
.ref-chip small{font-size:.6rem;letter-spacing:.2em;text-transform:uppercase;color:var(--gold-soft)}
.status-line{display:inline-flex;align-items:center;gap:.6rem;margin:0 0 1.2rem;
  font-size:.84rem;letter-spacing:.05em;color:var(--muted)}
.status-dot{width:8px;height:8px;border-radius:50%;background:var(--gold);flex:0 0 auto}
.status-line.is-paid{color:var(--gold-2)}
.status-line.is-paid .status-dot{background:#5fd08a}

/* ───────────────────────── responsive ───────────────────────── */
@media(max-width:960px){
  .store-hero-grid{grid-template-columns:1fr;gap:2.6rem;justify-items:center;text-align:center}
  .store-copy{max-width:560px}
  .launch-grid{grid-template-columns:1fr;gap:2.4rem;justify-items:center;text-align:center}
  .launch-copy{max-width:560px}
  .launch-copy .lead,.launch-copy .countdown{margin-inline:auto}
  .store-sub{max-width:none;margin-inline:auto}
  .store-author{justify-content:center}
  /* The hero copy centres on a phone, but the purchase form stays left-aligned —
     a form reads badly when its labels, price and reassurances are centred. */
  .countdown,.buy-panel{margin-inline:auto}
  .buy-panel{text-align:left}
  .author-panel,.print-panel,.store-lede{grid-template-columns:1fr}
  .author-photo{max-width:230px;margin-inline:auto}
  .print-shot{order:-1}
}
@media(max-width:560px){
  .store-hero,.slim{padding-top:112px}
  .book3d-stage{--bw:min(210px,58vw)}
  .srow{grid-template-columns:1fr}
  .spec{grid-template-columns:1fr 1fr;gap:0 1.2rem}
  .cat-grid{grid-template-columns:minmax(0,1fr)}
  .cd-tile span{font-size:.54rem;letter-spacing:.14em}
}

/* ───────────────────────── motion ─────────────────────────
   Every animated declaration lives here and nowhere else, so a visitor who asks
   for less motion gets a completely still page. */
@media(prefers-reduced-motion:no-preference){
  .aurora i{animation:drift 34s ease-in-out infinite alternate}
  .aurora i:nth-child(2){animation-duration:46s;animation-delay:-8s}
  .aurora i:nth-child(3){animation-duration:39s;animation-delay:-16s}
  .book3d-float{animation:bookfloat 8s ease-in-out infinite}
  .book3d{transition:transform .45s cubic-bezier(.2,.7,.2,1)}
  .book3d-stage.is-live .book3d{transition:transform .12s linear}
  .book-pool{animation:pool 8s ease-in-out infinite}
  .cat-card .book3d-float{animation-duration:11s}
}
@keyframes drift{
  from{transform:translate(0,0)}
  to{transform:translate(6%,4%)}
}
@keyframes bookfloat{
  0%,100%{transform:translateY(0)}
  50%{transform:translateY(-13px)}
}
@keyframes pool{
  0%,100%{transform:translateX(-50%) scale(1);opacity:.9}
  50%{transform:translateX(-50%) scale(.92);opacity:.62}
}
