/* =========================================================
   Questionnaire for version H (start-h.html), on top of start-g.css:
   one progress bar for 7 questions, answer cards, the $37 offer box.
   ========================================================= */

/* one bar instead of four chapters */
.q-progress__bar { position: relative; height: 3px; border-radius: 3px; background: rgba(34, 31, 29, .12); overflow: hidden; }
.q-progress__bar span { position: absolute; inset: 0; background: var(--ink); transform-origin: left; transform: scaleX(var(--fill, 0)); transition: transform .4s ease; }
.q-progress__label { text-transform: none; letter-spacing: 0; font: 600 15px/1.3 var(--sans); color: var(--rose); }

.q-field__hint { font-weight: 400; color: var(--muted); }

/* answer cards: full sentences, so they read left-aligned in roomy rows */
.q-cards .q-choice { min-height: 60px; padding: 16px 20px; font-weight: 500; line-height: 1.4; }

/* typing boxes */
.q-text--large { min-height: 220px; }
.q-text--medium { min-height: 130px; }

/* checkout: one offer box */
.q-offer { margin-top: 28px; padding: 22px 20px; border: 1.5px solid var(--ink); border-radius: 16px; background: #fff; text-align: left; }
.q-offer__name { font: 700 13px/1.35 var(--sans); letter-spacing: .12em; text-transform: uppercase; }
.q-offer__list { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.q-offer__list li { position: relative; padding-left: 28px; font-size: 15px; line-height: 1.45; color: var(--body); }
.q-offer__list li::before { content: ""; position: absolute; left: 2px; top: .4em; width: 12px; height: 7px; border-left: 2px solid var(--rose); border-bottom: 2px solid var(--rose); transform: rotate(-45deg); }
.q-offer__price { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); font: 400 48px/1 var(--serif); font-variant-numeric: lining-nums; text-align: right; }

@media (prefers-reduced-motion: reduce) { .q-progress__bar span { transition: none; } }

/* the questions are full sentences: a size smaller than G's short ones */
.q-screen:not(.q-pay):not(.q-thanks) .q-title { font-size: clamp(25px, 6.6vw, 34px); line-height: 1.15; }

/* ---------- Checkout: her cover (the new front page), which opens to the first-prayers page ---------- */
.q-book2 { position: relative; width: min(58vw, 230px); aspect-ratio: 148 / 210; margin: 30px auto 0; perspective: 1200px; }
.q-book2__page { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; text-align: center; background: #faf9f6; border-radius: 3px 6px 6px 3px;
  box-shadow: inset 0 0 0 1px rgba(38, 35, 32, .55), inset 0 0 0 6px #faf9f6, inset 0 0 0 7px rgba(38, 35, 32, .22), 0 22px 30px -18px rgba(34, 31, 29, .5); }
.q-book2__cover { padding: 14% 10% 9%; transform-origin: left center; backface-visibility: hidden; animation: q-book-open 1.4s cubic-bezier(.6, .05, .3, 1) 1.2s forwards; }
.q-book2__ttl { font: 400 clamp(17px, 5vw, 20px)/1.1 var(--serif); letter-spacing: -.01em; }
.q-book2__k { margin-top: 10px; font: 600 7px/1 var(--sans); letter-spacing: .3em; text-transform: uppercase; color: #6e675f; }
.q-book2__name { margin: auto 0; font: 400 clamp(48px, 15vw, 64px)/1 var(--serif); letter-spacing: -.02em; overflow-wrap: anywhere; }
.q-book2__by { font: 600 7px/1 var(--sans); letter-spacing: .28em; text-transform: uppercase; color: #9a948d; }
.q-book2__inside { justify-content: center; gap: 12px; padding: 0 12%; }
.q-book2__bf { --bf: 30px; width: var(--bf); height: var(--bf); background: url("../butterfly/butterfly-sprite.png") calc(var(--bf) * -2) calc(var(--bf) * -4) / calc(var(--bf) * 6) calc(var(--bf) * 5) no-repeat; }
.q-book2__big { font: 400 clamp(20px, 6vw, 24px)/1.1 var(--serif); letter-spacing: -.01em; color: var(--ink); text-wrap: balance; }
.q-book2__small { font: 400 11.5px/1.5 var(--sans); color: var(--body); }
@keyframes q-book-open { to { transform: rotateY(-108deg); box-shadow: none; } }
@media (prefers-reduced-motion: reduce) { .q-book2__cover { animation: none; display: none; } }

/* the offer list matches the landing page */
.q-offer__name { text-transform: none; letter-spacing: 0; font: 400 26px/1.1 var(--serif); text-align: center; }
.q-offer__list li b { font-weight: 700; color: var(--ink); }
.q-book2__ttl { font-size: clamp(15px, 4.3vw, 18px); white-space: nowrap; }
.q-offer__name { text-wrap: balance; }

/* ---------- Round 3: the book opens after 1.5s and can be turned back; word counter ---------- */
.q-book2 { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.q-book2:focus-visible { outline: 2px solid var(--ink); outline-offset: 6px; }
.q-book2__cover { animation: none; transition: transform 1.1s cubic-bezier(.6, .05, .3, 1), box-shadow 1.1s ease; }
.q-book2.is-open .q-book2__cover { transform: rotateY(-108deg); box-shadow: none; }
.q-book2__inside { gap: 14px; }
.q-book2__big { font-size: clamp(21px, 6.2vw, 26px); }
.q-book2__dots { display: flex; justify-content: center; gap: 8px; margin-top: 18px; }
.q-book2__dots span { width: 7px; height: 7px; border-radius: 50%; background: rgba(34, 31, 29, .2); transition: background .3s ease; }
.q-book2__dots span.is-on { background: var(--ink); }
.q-offer__list li { font-size: 15px; }
.q-words { margin-top: 8px; font-size: 14px; color: var(--muted); }
.q-words.is-done { color: var(--rose); }
@media (prefers-reduced-motion: reduce) { .q-book2__cover { display: flex; transition: none; } .q-book2.is-open .q-book2__cover { visibility: hidden; } }

/* ---------- Round 4: bold uppercase lead-ins like the landing page; "unstructured" note ---------- */
.q-offer__list { gap: 0; margin-top: 18px; border-top: 1px solid var(--line); }
.q-offer__list li { padding: 14px 0 14px 28px; border-bottom: 1px solid var(--line); line-height: 1.55; }
.q-offer__list li::before { top: 1.35em; }
.q-offer__list li b { font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: .88em; color: var(--ink); }
.q-offer__price { border-top: 0; }
.q-help.q-loose { margin-top: 6px; color: var(--muted); }
.q-words[hidden] { display: none; }

/* ---------- Round 5: the 2 AM limit, shown only near 500 characters ---------- */
.q-limit { margin-top: 8px; font-size: 13px; line-height: 1.45; color: var(--muted); animation: q-in .3s ease-out both; }
.q-limit[hidden] { display: none; }
.q-limit.is-full { color: var(--rose); font-size: 14px; }

/* keep every button clear of Netlify's "Powered by Netlify" badge (bottom right, 64px tall) */
.q-app { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
.q-text::placeholder { color: #a39d96; font-style: italic; }

/* ---------- Question 6: up to 5 people, then an optional note ---------- */
.q-people { display: grid; gap: 10px; }
.q-person[hidden] { display: none; }
.q-input::placeholder { color: #a39d96; font-style: italic; }
.q-add { margin-top: 12px; min-height: 44px; padding: 0; border: 0; background: none; color: var(--ink); font: 600 15px/1 var(--sans); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.q-add[hidden] { display: none; }
.q-people__note { margin-top: 22px; }
.q-text--small { min-height: 96px; }
.q-offer__price { display: flex; align-items: baseline; justify-content: flex-end; gap: 10px; }
.q-offer__price span { font: 600 14px/1 var(--sans); color: var(--muted); }
.q-nw { white-space: nowrap; }
