@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,500;1,400;1,500&family=Mulish:wght@400;500;600&display=swap');

:root {
  --night: #120D0A;
  --umber: #1E1612;
  --walnut: #2A1F19;
  --candle: #E4B868;
  --flame: #F2D49A;
  --parchment: #F4EBDC;
  --parchment-edge: #E6D8C0;
  --ink: #2B211B;
  --ink-soft: #5A4A3E;
  --fg: #F4EBDC;
  --fg-soft: #C8B9A6;
  --stone: #A89886;
  --rule: rgba(228, 184, 104, .22);
  --rule-ink: #D8C7AB;
  --focus: #F2D49A;

  --serif: "EB Garamond", Garamond, "Times New Roman", serif;
  --sans: "Mulish", "Segoe UI", system-ui, sans-serif;

  --measure: 64ch;
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--night); color: var(--fg);
  font-family: var(--sans); font-size: 1.0625rem; line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--candle); color: var(--night); }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .22em; text-decoration-color: rgba(228, 184, 104, .6); }
a:hover { text-decoration-color: var(--candle); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; line-height: 1.1; margin: 0; text-wrap: balance; }
p { margin: 0 0 1em; text-wrap: pretty; }
html { scrollbar-color: var(--walnut) var(--night); }
.skip { position: absolute; left: 16px; top: -60px; background: var(--candle); color: var(--night); padding: 10px 16px; z-index: 50; }
.skip:focus { top: 16px; }

.caps { font-family: var(--sans); font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; font-weight: 600; }
.soft { color: var(--fg-soft); }

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 54px; padding: 0 28px; border-radius: 2px;
  font: 600 .78rem/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; text-decoration: none;
  cursor: pointer; border: 1px solid var(--candle);
  transition: background-color .3s var(--ease), color .3s var(--ease), box-shadow .3s var(--ease), transform .2s var(--ease);
}
.btn svg { width: 14px; height: 14px; flex: none; transition: transform .3s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn:active { transform: translateY(1px); }
.btn-gold { background: var(--candle); color: var(--night); }
.btn-gold:hover { background: var(--flame); box-shadow: 0 10px 34px -12px rgba(228, 184, 104, .65); }
.btn-line { background: rgba(18, 13, 10, .35); color: var(--flame); }
.btn-line:hover { background: rgba(228, 184, 104, .1); }
.btn[disabled], .btn[aria-busy="true"] { opacity: .6; cursor: progress; }
.btn-wide { width: 100%; }

/* ---------- header / footer ---------- */
.site-head {
  position: absolute; inset: 0 0 auto 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px clamp(16px, 4vw, 56px);
}
.site-head.solid { position: static; border-bottom: 1px solid var(--rule); background: var(--umber); }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--flame); }
.brand svg { width: 34px; height: 34px; }
.brand span { font-family: var(--serif); font-size: 1.3rem; letter-spacing: .02em; color: var(--fg); }
.head-links { display: flex; gap: clamp(16px, 3vw, 32px); align-items: center; }
.head-links a { font-size: .74rem; letter-spacing: .18em; text-transform: uppercase; text-decoration: none; padding: 12px 0; font-weight: 600; }
.head-links a:hover { color: var(--flame); }

.site-foot { border-top: 1px solid var(--rule); background: var(--umber); padding: 48px clamp(16px, 6vw, 96px) 64px; font-size: .9rem; color: var(--fg-soft); }
.foot-grid { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 24px; list-style: none; padding: 0; margin: 0; }
.foot-links a { display: inline-block; padding: 6px 0; }
.foot-note { max-width: 72ch; margin-top: 24px; font-size: .84rem; }

/* ---------- hero: the candlelit table ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; isolation: isolate; overflow: hidden; }
.hero-photo { display: block; position: absolute; inset: 0; z-index: -2; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(18, 13, 10, .94) 0%, rgba(18, 13, 10, .82) 34%, rgba(18, 13, 10, .15) 64%, rgba(18, 13, 10, 0) 100%),
              linear-gradient(0deg, rgba(18, 13, 10, .9) 0%, rgba(18, 13, 10, 0) 26%);
}
.hero::after {
  /* the candle breathing: a slow warm pulse over the flame */
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  left: 64.5%; top: 12%; width: 22vw; height: 22vw; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(242, 212, 154, .22), rgba(242, 212, 154, 0));
  animation: breathe 5.5s ease-in-out infinite;
}
@keyframes breathe { 0%, 100% { opacity: .55; transform: scale(.96); } 50% { opacity: 1; transform: scale(1.04); } }
@media (prefers-reduced-motion: reduce) { .hero::after { animation: none; } }
.hero-copy { width: 100%; padding: 128px clamp(16px, 6vw, 96px) 96px; }
.hero-copy > * { max-width: 620px; }
.display { font-size: clamp(2.8rem, 6.6vw, 5.4rem); line-height: 1.02; letter-spacing: -0.02em; color: var(--fg); }
.display span { display: block; }
.display em { font-style: italic; color: var(--flame); }
.lede { font-size: clamp(1.1rem, 1.6vw, 1.28rem); color: var(--fg-soft); max-width: 36ch; margin: 26px 0 34px; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; }
.fine { font-size: .86rem; color: var(--stone); margin-top: 18px; }
.hero-verse { margin: 40px 0 0; padding-top: 22px; border-top: 1px solid var(--rule); max-width: 34ch; }
.hero-verse p { font-family: var(--serif); font-style: italic; font-size: 1.35rem; line-height: 1.45; color: var(--fg); margin: 0 0 8px; }
.hero-verse cite { font-style: normal; color: var(--candle); }

/* ---------- sections ---------- */
.band { padding: 104px clamp(16px, 6vw, 96px); }
.band-umber { background: var(--umber); }
.wrap { max-width: 1160px; margin: 0 auto; }
.narrow { max-width: 740px; margin: 0 auto; }
.h2 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); margin-bottom: 26px; }
.h3 { font-size: 1.6rem; margin-bottom: 8px; }
.cross-mark { display: block; width: 44px; height: 44px; color: var(--candle); margin-bottom: 28px; }
.cross-mark svg { width: 100%; height: 100%; }
.center { text-align: center; }
.center .cross-mark { margin-left: auto; margin-right: auto; }

.spiral-lines { list-style: none; padding: 0; margin: 36px 0 0; }
.spiral-lines li { font-family: var(--serif); font-style: italic; font-size: clamp(1.3rem, 2.6vw, 1.85rem); padding: 14px 0; border-bottom: 1px solid var(--rule); color: var(--fg-soft); }
.spiral-turn { font-size: clamp(1.15rem, 2vw, 1.35rem); margin-top: 40px; max-width: 46ch; }
.spiral-turn strong { color: var(--flame); font-weight: 500; }

.pray { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 52px; border-top: 1px solid var(--rule); }
.pray-step { padding: 30px 26px 8px 0; }
.pray-step + .pray-step { padding-left: 26px; border-left: 1px solid var(--rule); }
.pray-letter { font-family: var(--serif); font-size: clamp(4rem, 8vw, 6.6rem); line-height: .9; color: var(--candle); }
.pray-step .h3 { margin-top: 14px; }
.pray-step p { color: var(--fg-soft); font-size: 1rem; }

/* sample day: a parchment page in candlelight */
.sample { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.sample-aside { position: sticky; top: 32px; }
.cover-img { width: 100%; max-width: 340px; box-shadow: 0 34px 70px -30px rgba(0, 0, 0, .9), 0 0 0 1px rgba(228, 184, 104, .15); }
.page {
  background: var(--parchment); color: var(--ink);
  padding: clamp(28px, 5vw, 64px);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .85), 0 0 90px -30px rgba(228, 184, 104, .35);
}
.page .caps { color: #8A5A1C; }
.page .h2 { color: var(--ink); margin: 10px 0 26px; }
.page a { text-decoration-color: #8A5A1C; }
.verse { margin: 0 0 30px; padding: 0 0 26px; border-bottom: 1px solid var(--rule-ink); }
.verse p { font-family: var(--serif); font-style: italic; font-size: clamp(1.35rem, 2.3vw, 1.7rem); line-height: 1.45; margin: 0 0 10px; }
.verse cite { font-style: normal; }
.prose p { max-width: var(--measure); }
.page .prose p { color: var(--ink); }
.prayer { font-family: var(--serif); font-size: 1.3rem; line-height: 1.6; }
.divider { display: block; width: 28px; height: 28px; margin: 34px auto; color: #8A5A1C; }
.breath { margin-top: 34px; padding: 24px 28px; background: var(--walnut); color: var(--fg); text-align: center; }
.breath .caps { color: var(--candle); }
.breath p { font-family: var(--serif); font-style: italic; font-size: 1.45rem; margin: 6px 0 0; }

.contents { columns: 2; column-gap: 56px; margin-top: 36px; padding: 0; list-style: none; }
.contents li { break-inside: avoid; display: grid; grid-template-columns: 2.4em 1fr auto; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.contents .n { font-variant-numeric: tabular-nums; color: var(--candle); font-size: .86rem; font-weight: 600; }
.contents .t { font-family: var(--serif); font-size: 1.2rem; }
.contents .ref { font-family: var(--serif); font-style: italic; color: var(--stone); white-space: nowrap; }

.offer { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.offer-cover { display: flex; gap: 28px; align-items: center; }
.offer-cover img { width: 150px; flex: none; aspect-ratio: 2 / 3; box-shadow: 0 24px 50px -24px rgba(0, 0, 0, .9); }
.price { font-family: var(--serif); font-size: clamp(4rem, 8vw, 5.6rem); line-height: 1; color: var(--flame); margin: 18px 0 0; }
.price small { font-family: var(--sans); font-size: .9rem; color: var(--stone); margin-left: 10px; letter-spacing: .02em; }
.includes { list-style: none; padding: 0; margin: 0 0 30px; }
.includes li { display: grid; grid-template-columns: 22px 1fr; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--rule); }
.includes svg { width: 18px; height: 18px; margin-top: 5px; color: var(--candle); }
.promise { display: flex; gap: 14px; align-items: flex-start; margin-top: 22px; color: var(--fg-soft); font-size: .95rem; }
.promise svg { width: 22px; height: 22px; flex: none; margin-top: 2px; color: var(--candle); }

.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { list-style: none; cursor: pointer; padding: 22px 40px 22px 0; position: relative; font-family: var(--serif); font-size: 1.4rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 11px; height: 11px; margin-top: -8px;
  border-right: 1px solid var(--candle); border-bottom: 1px solid var(--candle); transform: rotate(45deg);
  transition: transform .35s var(--ease);
}
.faq details[open] summary::after { transform: rotate(225deg); margin-top: -2px; }
.faq details p { color: var(--fg-soft); max-width: var(--measure); padding-bottom: 10px; }

.close { position: relative; isolation: isolate; text-align: center; padding: 150px clamp(16px, 6vw, 96px); overflow: hidden; }
.close > img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.close::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse at center, rgba(18, 13, 10, .35), rgba(18, 13, 10, .88) 70%); }
.close blockquote { margin: 0 auto 40px; max-width: 20ch; }
.close blockquote p { font-family: var(--serif); font-style: italic; font-size: clamp(2.2rem, 4.8vw, 3.8rem); line-height: 1.15; color: var(--fg); margin-bottom: 14px; }
.close cite { color: var(--candle); font-style: normal; }

/* ---------- app pages ---------- */
.app { min-height: 100svh; display: flex; flex-direction: column; }
.app main { flex: 1; }
.app-main { padding: clamp(40px, 7vw, 96px) clamp(16px, 6vw, 96px); }
.panel { background: var(--umber); border: 1px solid var(--rule); padding: clamp(24px, 4vw, 48px); }
.field { display: flex; flex-direction: column; gap: 8px; margin: 24px 0; }
.field label { font-weight: 600; }
.field input {
  min-height: 52px; padding: 0 16px; border: 1px solid rgba(228, 184, 104, .4); border-radius: 2px;
  background: var(--umber); color: var(--fg); font: inherit; caret-color: var(--candle);
}
.field input:focus { outline: 2px solid var(--focus); outline-offset: 1px; }
.field .hint { font-size: .88rem; color: var(--fg-soft); }
.notice { padding: 16px 20px; border: 1px solid var(--rule); background: var(--umber); margin: 20px 0; }
.notice.error { border-color: #C0726A; background: #2A1512; }

.library { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(24px, 5vw, 72px); align-items: start; }
.downloads { list-style: none; padding: 0; margin: 0; }
.downloads li a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--rule); text-decoration: none; min-height: 48px; }
.downloads li a:hover span { color: var(--flame); }
.downloads svg { width: 18px; height: 18px; flex: none; color: var(--candle); }
.meter { height: 3px; background: var(--walnut); margin: 16px 0 28px; }
.meter i { display: block; height: 100%; background: var(--candle); transition: width .8s var(--ease); }
.weeks { display: grid; gap: 40px; }
.week-list { list-style: none; padding: 0; margin: 12px 0 0; }
.week-list a { display: grid; grid-template-columns: 3.4em 1fr 22px; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--rule); text-decoration: none; min-height: 52px; }
.week-list a:hover .t { color: var(--flame); }
.week-list .n { font-variant-numeric: tabular-nums; color: var(--candle); font-size: .88rem; font-weight: 600; }
.week-list .t { font-family: var(--serif); font-size: 1.25rem; }
.week-list .s { display: block; font-size: .9rem; color: var(--fg-soft); }
.dot { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--stone); }
.dot.done { background: var(--candle); border-color: var(--candle); }

.lesson { max-width: 780px; margin: 0 auto; }
.lesson-head { margin-bottom: 28px; }
.lesson-head .caps { color: var(--candle); }
.lesson .page .prose h2 { font-size: 1.8rem; margin: 40px 0 12px; color: var(--ink); }
.audio { margin: 0 0 28px; }
.audio audio { width: 100%; }
.practice { counter-reset: step; list-style: none; padding: 0; margin: 14px 0 0; }
.practice li { counter-increment: step; display: grid; grid-template-columns: 2em 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--rule-ink); }
.practice li::before { content: counter(step); color: #8A5A1C; font-weight: 600; font-variant-numeric: tabular-nums; }
.complete { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 36px; }
.lesson-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 44px; flex-wrap: wrap; }
.lesson-nav a { min-height: 44px; display: inline-flex; align-items: center; }

.legal { max-width: 760px; margin: 0 auto; }
.legal h2 { font-size: 1.7rem; margin: 40px 0 12px; }

.upsell { border: 1px solid var(--candle); padding: clamp(24px, 4vw, 44px); margin-top: 40px; background: var(--umber); }
.upsell .price { font-size: 3.6rem; }
.strike { text-decoration: line-through; color: var(--stone); font-size: 1.2rem; margin-left: 12px; }

/* ---------- reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .pray { grid-template-columns: 1fr 1fr; }
  .pray-step:nth-child(3) { border-left: 0; padding-left: 0; }
  .pray-step:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .sample, .offer, .library { grid-template-columns: 1fr; }
  .sample-aside { position: static; }
  .contents { columns: 1; }
}
@media (max-width: 700px) {
  .hero { display: block; min-height: 0; }
  .hero-photo { position: relative; height: 58svh; min-height: 340px; }
  .hero-photo img { object-position: 78% 50%; }
  .hero::before { background: linear-gradient(0deg, var(--night) 0%, rgba(18, 13, 10, .9) 30%, rgba(18, 13, 10, 0) 55%); }
  .hero::after { left: 52%; top: 8%; width: 60vw; height: 60vw; }
  .hero-copy { margin-top: -120px; padding: 0 16px 64px; position: relative; }
  .actions .btn { width: 100%; }
  .band { padding-top: 72px; padding-bottom: 72px; }
  .pray { grid-template-columns: 1fr; }
  .pray-step, .pray-step + .pray-step { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); }
  .pray-step:first-child { border-top: 0; }
  .contents li { grid-template-columns: 2.2em 1fr; }
  .contents .ref { grid-column: 2; }
  .head-links a.hide-sm { display: none; }
  .offer-cover img { width: 110px; }
}

.page .h3, .page h2, .page h3 { color: var(--ink); }
.page .soft { color: var(--ink-soft); }

.close .cross-mark { margin-left: auto; margin-right: auto; }

/* Jesus paintings beside the copy */
.with-figure { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 5vw, 80px); align-items: center; }
.with-figure.figure-right { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.figure-jesus { margin: 0; }
.figure-jesus img { width: 100%; max-width: 480px; margin: 0 auto; }
.figure-copy .cross-mark { margin-top: 0; }
@media (max-width: 900px) {
  .with-figure, .with-figure.figure-right { grid-template-columns: 1fr; }
  .figure-jesus img { max-width: 300px; }
  .figure-right .figure-jesus { order: -1; }
}

.close blockquote { max-width: 780px; }
.figure-jesus img { -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 72%, transparent 100%); mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 72%, transparent 100%); }

/* rotating verses */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.hero-verse.is-long p { font-size: 1.15rem; }
.close-verse { margin: 0 auto 40px; max-width: 780px; }
.close-verse p { font-family: var(--serif); font-style: italic; font-size: clamp(2.1rem, 4.6vw, 3.6rem); line-height: 1.18; color: var(--fg); margin: 0 0 14px; text-wrap: balance; }
.close-verse.is-long p { font-size: clamp(1.7rem, 3.4vw, 2.6rem); }
.close-verse cite { color: var(--candle); font-style: normal; }
