/* DT-1043: Healing by God's Design promo page (custom-bible-study.hbs).
   Loaded only by that template, so screen.css stays untouched. The palette and type are the book's own
   (workspace/hbgd/book/theme.typ): Fraunces, EB Garamond and Karla; clay, olive and linen, with
   That Paleo Chick's Deep as the dark. The page keeps its palette in dark mode: it is the book's look,
   not the site chrome's. */

.hbgd {
    --hb-ink: #241F1B;
    --hb-deep: #041E27;
    --hb-olive: #4F5B34;
    --hb-clay: #7A4A2E;
    --hb-paper: #FBF9F4;
    --hb-wash: #F1EDE3;
    --hb-rule: #DCD5C6;
    --hb-muted: #6E675C;
    --hb-gold: #F1DDB7;
    --hb-clay-l: #E9B48C;
    --hb-display: "Fraunces", Georgia, serif;
    --hb-serif: "EB Garamond", Georgia, serif;
    --hb-sans: "Karla", system-ui, sans-serif;
    --hb-pad: clamp(20px, 5vw, 64px);
    background: var(--hb-paper);
    color: var(--hb-ink);
    font-family: var(--hb-serif);
    font-size: clamp(18px, 1.2vw, 20px);
    line-height: 1.6;
    overflow-x: clip;
}
.hbgd h1, .hbgd h2, .hbgd h3 { font-family: var(--hb-display); color: inherit; letter-spacing: -.01em; }
.hbgd em { font-style: italic; }

.hbgd-wrap { max-width: 1240px; margin: 0 auto; padding: 0 var(--hb-pad); }
.hbgd-wrap--narrow { max-width: 820px; }

.hbgd-eyebrow {
    font: 700 12px/1 var(--hb-sans); letter-spacing: .26em; text-transform: uppercase;
    color: var(--hb-olive); margin: 0 0 18px;
}
.hbgd-eyebrow--light { color: var(--hb-gold); }
.hbgd-h2 { font-size: clamp(34px, 4.6vw, 60px); font-weight: 500; line-height: 1.05; margin: 0 0 18px; }
.hbgd-h2 em { color: var(--hb-clay); font-weight: 400; }
.hbgd-h2--light, .hbgd-h2--light em { color: var(--hb-paper); }
.hbgd-h2--light em { color: var(--hb-clay-l); }
.hbgd-lede { font-size: 1.12em; color: var(--hb-muted); max-width: 46ch; margin: 0; }
.hbgd-lede--light { color: #E6DFD2; margin: 0 auto 28px; }
.hbgd-head { margin-bottom: clamp(36px, 5vw, 64px); }

/* ---------------------------------------------------------------- hero */
.hbgd-hero {
    position: relative; isolation: isolate;
    min-height: min(100svh, 980px);
    display: grid; place-items: center; text-align: center;
    padding: clamp(110px, 16vh, 160px) var(--hb-pad) clamp(90px, 12vh, 130px);
    color: var(--hb-paper);
}
.hbgd-hero-art, .hbgd-hero-art img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hbgd-hero-art { z-index: -2; overflow: hidden; }
.hbgd-hero-art img { object-fit: cover; object-position: 50% 60%; animation: hbgd-drift 24s ease-out both; }
/* Darkened so the words carry, not so the photograph disappears (the book's own rule). */
.hbgd-hero::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background:
        radial-gradient(70% 60% at 50% 45%, rgba(4, 30, 39, .30), rgba(4, 30, 39, .62) 70%),
        linear-gradient(to bottom, rgba(4, 30, 39, .55), rgba(4, 30, 39, .15) 35%, rgba(4, 30, 39, .75));
}
@keyframes hbgd-drift { from { transform: scale(1.12); } to { transform: scale(1.0); } }

.hbgd-hero-inner { max-width: 900px; }
.hbgd-soon {
    display: inline-flex; align-items: center; gap: 10px; margin: 0 0 28px;
    padding: 9px 18px; border: 1px solid rgba(241, 221, 183, .55); border-radius: 999px;
    font: 700 12px/1 var(--hb-sans); letter-spacing: .26em; text-transform: uppercase; color: var(--hb-gold);
    background: rgba(4, 30, 39, .35); backdrop-filter: blur(6px);
    animation: hbgd-rise .9s .1s cubic-bezier(.16, 1, .3, 1) both;
}
.hbgd-soon-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--hb-gold); box-shadow: 0 0 0 0 rgba(241, 221, 183, .7); animation: hbgd-pulse 2.4s infinite; }
@keyframes hbgd-pulse { 70% { box-shadow: 0 0 0 10px rgba(241, 221, 183, 0); } 100% { box-shadow: 0 0 0 0 rgba(241, 221, 183, 0); } }

.hbgd-title { margin: 0; line-height: .9; font-weight: 400; }
.hbgd-title-a {
    display: block; font-family: var(--hb-display); font-style: italic; font-weight: 400;
    font-size: clamp(76px, 15vw, 196px); letter-spacing: -.03em; color: var(--hb-paper);
    text-shadow: 0 6px 40px rgba(4, 30, 39, .45);
    animation: hbgd-rise 1.1s .2s cubic-bezier(.16, 1, .3, 1) both;
}
.hbgd-title-b {
    display: block; margin-top: clamp(10px, 1.6vw, 20px);
    font: 700 clamp(15px, 2vw, 26px)/1.2 var(--hb-sans); letter-spacing: .42em; text-transform: uppercase;
    padding-left: .42em; /* letter-spacing trails the last letter; this re-centres the line */
    color: var(--hb-gold);
    animation: hbgd-rise 1.1s .35s cubic-bezier(.16, 1, .3, 1) both;
}
.hbgd-sub {
    margin: clamp(22px, 3vw, 34px) auto 6px; font-style: italic; font-size: clamp(20px, 2.1vw, 27px); color: #F4EEE3;
    animation: hbgd-rise 1.1s .5s cubic-bezier(.16, 1, .3, 1) both;
}
.hbgd-by {
    margin: 0 0 clamp(28px, 4vw, 44px); font: 500 14px/1 var(--hb-sans); letter-spacing: .2em; text-transform: uppercase; color: #DCD3C3;
    animation: hbgd-rise 1.1s .6s cubic-bezier(.16, 1, .3, 1) both;
}
.hbgd-hero .hbgd-form, .hbgd-hero .hbgd-member-note { animation: hbgd-rise 1.1s .75s cubic-bezier(.16, 1, .3, 1) both; }
@keyframes hbgd-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.hbgd-scroll {
    position: absolute; left: 50%; bottom: 26px; translate: -50% 0;
    width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%;
    color: var(--hb-gold); border: 1px solid rgba(241, 221, 183, .45);
    animation: hbgd-bob 2.6s ease-in-out infinite;
}
.hbgd-scroll .icon { width: 18px; height: 18px; }
@keyframes hbgd-bob { 50% { transform: translateY(6px); } }

/* ---------------------------------------------------------------- waitlist form */
.hbgd-form {
    display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
    max-width: 620px; margin: 0 auto; padding: 8px; border-radius: 999px;
    background: rgba(251, 249, 244, .14); border: 1px solid rgba(251, 249, 244, .28); backdrop-filter: blur(10px);
}
.hbgd-form input[type="text"], .hbgd-form input[type="email"] {
    flex: 1 1 150px; min-width: 0; height: 52px; padding: 0 20px; border: 0; border-radius: 999px;
    background: var(--hb-paper); color: var(--hb-ink); font: 400 17px var(--hb-serif);
}
.hbgd-form input[type="text"] { flex-basis: 120px; max-width: 170px; }
.hbgd-form input::placeholder { color: #8C8478; }
.hbgd-form input:focus-visible { outline: 2px solid var(--hb-gold); outline-offset: 2px; }
.hbgd-btn {
    height: 52px; padding: 0 26px; border: 0; border-radius: 999px; cursor: pointer;
    background: var(--hb-clay); color: #fff; font: 700 14px/1 var(--hb-sans); letter-spacing: .12em; text-transform: uppercase;
    transition: background .3s, transform .3s;
}
.hbgd-btn:hover { background: #8C5737; transform: translateY(-1px); }
.hbgd-form.loading .hbgd-btn { opacity: .7; pointer-events: none; }
.hbgd-form-msg { display: none; flex-basis: 100%; margin: 6px 0 2px; font: 500 15px/1.4 var(--hb-sans); color: var(--hb-gold); }
.hbgd-form.success input, .hbgd-form.success .hbgd-btn { display: none; }
.hbgd-form.success .hbgd-form-msg--success, .hbgd-form.error .hbgd-form-msg--error { display: block; }
.hbgd-form.success { border-radius: 22px; padding: 14px 22px; }
.hbgd-member-note { max-width: 520px; margin: 0 auto; font-style: italic; color: var(--hb-gold); }
.hbgd-member-note a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 560px) {
    .hbgd-form { border-radius: 22px; padding: 10px; }
    .hbgd-form input[type="text"], .hbgd-form input[type="email"], .hbgd-btn { flex: 1 1 100%; max-width: none; }
}

/* ---------------------------------------------------------------- invitation */
.hbgd-invite { padding: clamp(80px, 12vw, 150px) 0; text-align: center; background: var(--hb-paper); }
.hbgd-bigquote { margin: 0 0 clamp(40px, 6vw, 64px); }
.hbgd-bigquote p {
    margin: 0; font-family: var(--hb-display); font-weight: 400; font-style: italic;
    font-size: clamp(30px, 4.2vw, 54px); line-height: 1.18; color: var(--hb-ink);
}
.hbgd-bigquote footer, .hbgd-verse footer {
    margin-top: 22px; font: 700 12px/1 var(--hb-sans); letter-spacing: .26em; text-transform: uppercase; color: var(--hb-olive);
}
.hbgd-signals { display: grid; gap: 6px; padding-top: clamp(30px, 4vw, 44px); border-top: 1px solid var(--hb-rule); }
.hbgd-signals p { margin: 0; font-size: clamp(19px, 1.8vw, 23px); color: var(--hb-muted); }
.hbgd-signals em { color: var(--hb-clay); }

/* ---------------------------------------------------------------- at a glance */
.hbgd-glance { background: var(--hb-deep); color: var(--hb-paper); padding: clamp(40px, 6vw, 64px) 0; }
.hbgd-stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.hbgd-stats li { display: grid; gap: 8px; }
.hbgd-stats strong { font: 400 italic clamp(48px, 6vw, 84px)/1 var(--hb-display); color: var(--hb-gold); }
.hbgd-stats span { font: 700 12px/1.3 var(--hb-sans); letter-spacing: .22em; text-transform: uppercase; color: #CFD8D6; }
@media (max-width: 700px) { .hbgd-stats { grid-template-columns: repeat(2, 1fr); row-gap: 34px; } }

/* ---------------------------------------------------------------- the weeks */
.hbgd-weeks { padding: clamp(80px, 11vw, 140px) 0; background: var(--hb-wash); }
.hbgd-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2vw, 26px); }
@media (max-width: 1100px) { .hbgd-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .hbgd-grid { grid-template-columns: 1fr; } .hbgd-week { aspect-ratio: 4 / 3; } }
.hbgd-week {
    position: relative; overflow: hidden; border-radius: 18px; aspect-ratio: 4 / 5;
    background: var(--hb-deep); color: var(--hb-paper); isolation: isolate;
}
.hbgd-week img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 1.2s cubic-bezier(.16, 1, .3, 1); }
.hbgd-week::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(to bottom, rgba(4, 30, 39, .05) 25%, rgba(4, 30, 39, .55) 55%, rgba(4, 30, 39, .92));
    transition: background .6s;
}
.hbgd-week-body { position: absolute; inset: auto 0 0; padding: clamp(20px, 2.4vw, 28px); }
.hbgd-week-n { display: block; margin-bottom: 10px; font: 700 12px/1 var(--hb-sans); letter-spacing: .24em; text-transform: uppercase; color: var(--hb-gold); }
.hbgd-week h3 { margin: 0; font-size: clamp(23px, 2vw, 28px); font-weight: 500; line-height: 1.12; }
.hbgd-week-theme {
    margin: 0; font-size: 17px; line-height: 1.5; color: #EDE6DA;
    max-height: 0; opacity: 0; overflow: hidden;
    transition: max-height .6s cubic-bezier(.16, 1, .3, 1), opacity .5s, margin .6s;
}
.hbgd-week-ref { margin: 12px 0 0; font-style: italic; font-size: 17px; color: var(--hb-clay-l); }
@media (hover: hover) {
    .hbgd-week:hover img { transform: scale(1.06); }
    .hbgd-week:hover::before { background: linear-gradient(to bottom, rgba(4, 30, 39, .25), rgba(4, 30, 39, .7) 45%, rgba(4, 30, 39, .95)); }
    .hbgd-week:hover .hbgd-week-theme { max-height: 9em; opacity: 1; margin-top: 12px; }
}
/* No hover on a phone: the theme is always there. */
@media (hover: none) { .hbgd-week-theme { max-height: none; opacity: 1; margin-top: 12px; } }

/* ---------------------------------------------------------------- inside every week */
.hbgd-inside { padding: clamp(80px, 11vw, 140px) 0; background: var(--hb-paper); }
.hbgd-inside-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(30px, 5vw, 80px); align-items: start; }
.hbgd-inside-grid .hbgd-head { position: sticky; top: 110px; }
.hbgd-parts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 1px solid var(--hb-rule); }
.hbgd-parts li { padding: 26px 22px 26px 0; border-bottom: 1px solid var(--hb-rule); }
.hbgd-parts li:nth-child(odd) { padding-right: 30px; border-right: 1px solid var(--hb-rule); }
.hbgd-parts li:nth-child(even) { padding-left: 30px; }
.hbgd-part-n { display: block; margin-bottom: 8px; font: italic 400 22px/1 var(--hb-display); color: var(--hb-clay); }
.hbgd-parts h3 { margin: 0 0 6px; font-size: 24px; font-weight: 500; }
.hbgd-parts p { margin: 0; color: var(--hb-muted); font-size: 18px; line-height: 1.45; }
.hbgd-flow { grid-column: 2; list-style: none; margin: 10px 0 0; padding: 26px 30px; border-radius: 18px; background: var(--hb-wash); display: grid; gap: 14px; counter-reset: none; }
.hbgd-flow li { display: grid; grid-template-columns: 92px 1fr; gap: 14px; align-items: baseline; font-size: 18px; }
.hbgd-flow span { font: 700 12px/1.4 var(--hb-sans); letter-spacing: .2em; text-transform: uppercase; color: var(--hb-olive); }
@media (max-width: 900px) {
    .hbgd-inside-grid { grid-template-columns: 1fr; }
    .hbgd-inside-grid .hbgd-head { position: static; }
    .hbgd-flow { grid-column: 1; }
}
@media (max-width: 560px) {
    .hbgd-parts { grid-template-columns: 1fr; }
    .hbgd-parts li:nth-child(odd), .hbgd-parts li:nth-child(even) { padding: 22px 0; border-right: 0; }
}

/* ---------------------------------------------------------------- the table */
.hbgd-table { position: relative; isolation: isolate; padding: clamp(90px, 13vw, 170px) 0; overflow: hidden; }
.hbgd-table-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hbgd-table::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(4, 30, 39, .82), rgba(4, 30, 39, .35)); }
.hbgd-table-card { max-width: 560px; color: var(--hb-paper); }
.hbgd-table-card .hbgd-h2 { color: var(--hb-paper); }
.hbgd-table-card .hbgd-h2 em { color: var(--hb-clay-l); }
.hbgd-table-list { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 4px; }
.hbgd-table-list li { position: relative; padding: 12px 0 12px 34px; border-bottom: 1px solid rgba(241, 221, 183, .22); font-size: 20px; }
.hbgd-table-list li::before { content: ""; position: absolute; left: 4px; top: 50%; width: 14px; height: 1px; background: var(--hb-gold); }

/* ---------------------------------------------------------------- author */
.hbgd-author { padding: clamp(80px, 11vw, 140px) 0; background: var(--hb-wash); }
.hbgd-author-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(30px, 6vw, 90px); align-items: center; }
.hbgd-author-photo { width: 100%; max-width: 420px; aspect-ratio: 1; object-fit: cover; border-radius: 50%; justify-self: center; box-shadow: 0 0 0 10px var(--hb-paper), 0 0 0 11px var(--hb-rule); }
.hbgd-author-quote { font-style: italic; font-size: 1.2em; color: var(--hb-clay); }
.hbgd-author p:not(.hbgd-eyebrow) { max-width: 60ch; margin: 0 0 1em; }
@media (max-width: 800px) {
    .hbgd-author-grid { grid-template-columns: 1fr; text-align: center; }
    .hbgd-author-photo { max-width: 260px; }
    .hbgd-author p { margin-left: auto; margin-right: auto; }
}

/* ---------------------------------------------------------------- close */
.hbgd-close { padding: clamp(90px, 12vw, 150px) 0; text-align: center; background: var(--hb-deep); color: var(--hb-paper); }
.hbgd-verse { margin: 0 0 clamp(44px, 6vw, 70px); }
.hbgd-verse p { margin: 0; font: italic 400 clamp(26px, 3.4vw, 42px)/1.25 var(--hb-display); color: var(--hb-gold); }
.hbgd-verse footer { color: #A9B7B4; }

.hbgd-extra { padding: 60px 0; background: var(--hb-paper); }
/* The site footer sits 80px below every page; under this page's dark close that reads as a white band. */
body:has(.hbgd) .site-footer { margin-top: 0; }

/* ---------------------------------------------------------------- motion */
@media (prefers-reduced-motion: reduce) {
    .hbgd *, .hbgd *::before { animation: none !important; transition: none !important; }
}

/* ---------------------------------------------------------------- DT-1045: the feature band (partials/hbgd-feature.hbs)
   Lives outside .hbgd (on the Faith hub), so it names its colours and fonts directly. */
.hbgd-feature {
    --hb-deep: #041E27; --hb-gold: #F1DDB7; --hb-paper: #FBF9F4; --hb-clay-l: #E9B48C;
    --hb-display: "Fraunces", Georgia, serif; --hb-serif: "EB Garamond", Georgia, serif; --hb-sans: "Karla", system-ui, sans-serif;
    position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center;
    min-height: clamp(420px, 46vw, 560px); border-radius: 28px; padding: clamp(32px, 6vw, 80px);
    color: var(--hb-paper); text-decoration: none; background: var(--hb-deep);
}
.hbgd-feature-art, .hbgd-feature-art img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hbgd-feature-art { z-index: -2; }
.hbgd-feature-art img { object-fit: cover; object-position: 50% 60%; transition: transform 1.4s cubic-bezier(.16, 1, .3, 1); }
.hbgd-feature::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(90deg, rgba(4, 30, 39, .88) 0%, rgba(4, 30, 39, .62) 45%, rgba(4, 30, 39, .15) 100%);
}
.hbgd-feature:hover .hbgd-feature-art img { transform: scale(1.04); }
.hbgd-feature-copy { display: flex; flex-direction: column; align-items: flex-start; max-width: 560px; }
.hbgd-feature .hbgd-soon { animation: none; margin-bottom: 22px; }
.hbgd-feature-kicker { font: 700 12px/1.3 var(--hb-sans); letter-spacing: .24em; text-transform: uppercase; color: var(--hb-gold); margin-bottom: 14px; }
.hbgd-feature-title { display: block; line-height: .9; }
.hbgd-feature .hbgd-title-a { font-size: clamp(64px, 9vw, 120px); animation: none; text-shadow: 0 6px 30px rgba(4, 30, 39, .4); }
.hbgd-feature .hbgd-title-b { font-size: clamp(13px, 1.5vw, 19px); padding-left: 0; animation: none; }
.hbgd-feature-sub { margin: 22px 0 26px; font: 400 clamp(18px, 1.6vw, 21px)/1.5 var(--hb-serif); color: #ECE5D8; }
.hbgd-feature-go {
    display: inline-flex; align-items: center; gap: 10px; padding: 14px 24px; border-radius: 999px;
    background: #7A4A2E; color: #fff; font: 700 13px/1 var(--hb-sans); letter-spacing: .12em; text-transform: uppercase;
    transition: background .3s, gap .3s;
}
.hbgd-feature-go .icon { width: 16px; height: 16px; }
.hbgd-feature:hover .hbgd-feature-go { background: #8C5737; gap: 14px; }
.hbgd-feature:focus-visible { outline: 3px solid var(--hb-gold); outline-offset: 4px; }
@media (max-width: 700px) {
    .hbgd-feature { align-items: flex-end; min-height: 560px; border-radius: 22px; }
    .hbgd-feature::before { background: linear-gradient(to bottom, rgba(4, 30, 39, .2) 0%, rgba(4, 30, 39, .7) 40%, rgba(4, 30, 39, .95) 100%); }
}
@media (prefers-reduced-motion: reduce) { .hbgd-feature-art img, .hbgd-feature-go { transition: none; } }
