/* Submission celebration: the Holy Bible opens to James 1:5 and light rises from the Word */
/* ---------- Shared overlay ---------- */
.cel { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; overflow: hidden;
  background: radial-gradient(circle at 50% 34%, rgba(255, 228, 170, 0.14) 0, transparent 55%), #070605; animation: cel-fade .5s ease both; }
.cel[hidden] { display: none; }
.cel-inner { position: relative; text-align: center; max-width: 620px; width: 100%; }
.cel h2 { font-family: var(--script); font-weight: 400; font-size: clamp(2.8rem, 10vw, 4.4rem); line-height: 1.05; margin: 10px 0 6px;
  color: var(--gold-bright); text-shadow: 0 0 28px rgba(255, 215, 130, 0.55); opacity: 0; animation: cel-up .9s cubic-bezier(.2,.8,.2,1) forwards; }
.cel .sub { font-family: var(--serif); font-style: italic; color: #e9dcc0; margin: 0 0 18px; opacity: 0; animation: cel-up .9s cubic-bezier(.2,.8,.2,1) forwards; }
.cel .sub cite { font-style: normal; font-family: var(--sans); font-size: 0.75rem; letter-spacing: .08em; color: var(--gold); margin-left: 6px; }
.cel .verse { opacity: 0; animation: cel-up .9s cubic-bezier(.2,.8,.2,1) forwards; }
.cel .verse p { font-family: var(--serif); font-size: clamp(1.05rem, 3.3vw, 1.3rem); color: var(--ink); line-height: 1.5; margin: 8px auto 26px; max-width: 520px; }
.cel .actions { display: flex; gap: 16px; justify-content: center; align-items: center; opacity: 0; animation: cel-up .9s cubic-bezier(.2,.8,.2,1) forwards; }
.cel .link { font: inherit; color: var(--muted); background: none; border: none; text-decoration: underline; cursor: pointer; }
.cel .motes span { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #fff3d1; box-shadow: 0 0 8px 2px rgba(255, 220, 140, .8); opacity: 0; }

/* ---------- Option 3: Holy Bible ---------- */
.book-wrap { position: relative; height: 290px; display: grid; place-items: end center; perspective: 1100px; }
.halo { position: absolute; bottom: 60px; left: 50%; width: 460px; height: 240px; transform: translateX(-50%); opacity: 0;
  background: radial-gradient(ellipse, rgba(255, 220, 150, .42), transparent 65%); }
.bible-on .halo { animation: cel-fade 1.4s 2.6s ease forwards; }
.beam { position: absolute; bottom: 120px; left: 61%; width: 190px; height: 300px; transform: translateX(-50%) scaleY(0); transform-origin: bottom;
  background: linear-gradient(0deg, rgba(255, 238, 195, .95), rgba(255, 220, 150, .35) 45%, transparent);
  clip-path: polygon(40% 100%, 60% 100%, 100% 0, 0 0); filter: blur(5px); }
.bible-on .beam { animation: cel-beam 1.8s 3s cubic-bezier(.2,.8,.2,1) forwards, cel-breathe 3s 4.8s ease-in-out infinite alternate; }

.bible { position: relative; width: 400px; height: 200px; margin-bottom: 26px; transform-style: preserve-3d; transform: rotateX(34deg) translateX(-25%); }
.bible-on .bible { animation: cel-center 1.3s .3s cubic-bezier(.5,0,.2,1) forwards; }
/* Leather back cover + gilded page block */
.bible .back { position: absolute; inset: -9px -11px -9px -11px; border-radius: 7px;
  background: linear-gradient(90deg, #120e0b, #221a14 48%, #0b0806 50%, #221a14 52%, #120e0b); box-shadow: 0 34px 60px rgba(0,0,0,.7); opacity: 0; }
.bible .back.right { left: 50%; opacity: 1; }
.bible-on .bible .back { animation: cel-show .01s .95s forwards; }
.gilt { position: absolute; top: 3px; bottom: -5px; width: 50%; background: linear-gradient(180deg, #f6dc94, #b8862f 60%, #8a5f1c); border-radius: 3px; }
.gilt.l { left: -3px; opacity: 0; } .gilt.r { right: -3px; }
.bible-on .gilt.l { animation: cel-show .01s .95s forwards; }

.leaf { position: absolute; top: 0; bottom: 0; width: 50%; overflow: hidden; padding: 12px 14px 10px;
  font-family: var(--serif); font-size: 8.4px; line-height: 1.5; color: #2b2118; text-align: justify; hyphens: auto;
  background: linear-gradient(90deg, #f1e6cc, #fbf4e2); }
.leaf.l { left: 0; border-radius: 3px 0 0 3px; box-shadow: inset -16px 0 18px -12px rgba(90, 60, 20, .5); opacity: 0; }
.leaf.r { right: 0; border-radius: 0 3px 3px 0; box-shadow: inset 16px 0 18px -12px rgba(90, 60, 20, .5); }
.bible-on .leaf.l { animation: cel-show .01s .95s forwards; }
.rh { display: flex; justify-content: space-between; font-family: var(--display); font-size: 6.5px; letter-spacing: .12em; color: #7a6040;
  border-bottom: .5px solid rgba(120, 90, 50, .5); padding-bottom: 3px; margin-bottom: 6px; }
.book-title { text-align: center; font-family: var(--display); font-size: 7.6px; letter-spacing: .1em; margin: 0 0 6px; color: #3a2a18; }
.leaf p { margin: 0; }
.chap { float: left; font-family: var(--display); font-size: 28px; line-height: .9; margin: 1px 4px 0 0; color: #8b1a1a; }
.leaf sup { font-size: 5.6px; color: #8b1a1a; font-weight: 600; margin-right: 1px; }
.v5 { border-radius: 2px; transition: none; }
.bible-on .v5 { animation: cel-verse 1.2s 2.7s ease forwards; }
.center-col { position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: rgba(60, 40, 15, .25); }

/* Front cover: closed at start, swings open around the spine */
.front { position: absolute; top: -9px; bottom: -9px; right: -11px; width: calc(50% + 11px); transform-origin: left center; transform-style: preserve-3d;
  border-radius: 0 7px 7px 0; background: radial-gradient(ellipse at 40% 35%, #2c231c, #120d0a 75%);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.6), inset 6px 0 10px rgba(0,0,0,.6); backface-visibility: hidden; display: grid; place-items: center; }
.front::before { content: ""; position: absolute; inset: 9px; border: 1px solid rgba(214, 172, 95, .7); border-radius: 3px; }
.front .emblem { text-align: center; color: #d9b36a; text-shadow: 0 0 6px rgba(217, 179, 106, .35); }
.front .cross { display: block; width: 26px; height: 40px; margin: 0 auto 8px; position: relative; }
.front .cross::before, .front .cross::after { content: ""; position: absolute; background: linear-gradient(180deg, #f4d891, #b98a36); border-radius: 1px; }
.front .cross::before { left: 11px; top: 0; width: 4px; height: 40px; }
.front .cross::after { left: 2px; top: 10px; width: 22px; height: 4px; }
.front .t { font-family: var(--display); font-size: 12px; letter-spacing: .32em; line-height: 1.5; }
.bible-on .front { animation: cel-openCover 1.3s .3s cubic-bezier(.5,0,.2,1) forwards; }

.flip { position: absolute; top: 0; bottom: 0; right: 0; width: 50%; transform-origin: left center; border-radius: 0 3px 3px 0; opacity: 0;
  background:
    repeating-linear-gradient(180deg, transparent 0 8px, rgba(110, 80, 40, .16) 8px 9px) 14px 26px / calc(100% - 28px) calc(100% - 38px) no-repeat,
    linear-gradient(90deg, #f3e8cf, #fff9ea); }
.bible-on .flip { animation: cel-flip .9s cubic-bezier(.45,0,.25,1) forwards; }
.bible-on .f1 { animation-delay: 1.6s; } .bible-on .f2 { animation-delay: 1.85s; } .bible-on .f3 { animation-delay: 2.1s; }
.ribbon { position: absolute; left: calc(75% - 2px); top: 100%; width: 5px; height: 52px; background: linear-gradient(90deg, #6e1010, #a32020, #6e1010); transform: rotateX(-34deg); transform-origin: top; clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 88%, 0 100%); }
.bible-on .cel .motes span { animation: cel-rise linear infinite; }
.bible-on h2 { animation-delay: 3.1s; } .bible-on .sub { animation-delay: 3.4s; } .bible-on .verse { animation-delay: 3.7s; } .bible-on .actions { animation-delay: 4s; }
@keyframes cel-center { to { transform: rotateX(34deg) translateX(0); } }
@keyframes cel-openCover { to { transform: rotateY(-180deg); } }
@keyframes cel-show { to { opacity: 1; } }
@keyframes cel-verse { to { background: rgba(255, 205, 100, .55); box-shadow: 0 0 6px 2px rgba(255, 205, 100, .55); } }
@media (max-width: 520px) { .book-wrap { height: 240px; } .bible { zoom: .74; } }

@keyframes cel-fade { to { opacity: 1; } }
@keyframes cel-up { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes cel-beam { to { transform: translateX(-50%) scaleY(1); } }
@keyframes cel-breathe { from { opacity: .7; } to { opacity: 1; } }
@keyframes cel-flip { 0% { opacity: 1; transform: rotateY(0); } 99% { opacity: 1; } 100% { opacity: 0; transform: rotateY(-178deg); } }
@keyframes cel-rise { 0% { opacity: 0; transform: translate(0, 0) scale(.6); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx), -300px) scale(1.1); } }
.cel.closing { animation: cel-out .4s ease both; }
@keyframes cel-out { to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .cel *, .cel *::after { animation-duration: .01s !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; }
  .cel .motes { display: none; }
}
