@font-face {
  font-family: Book;
  src: url('assets/book.woff') format('woff');
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: Study;
  src: url('assets/study.woff') format('woff');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: Study;
  src: url('assets/study-bold.woff') format('woff');
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  --paper: #f8f4ed;
  --ivory: #fdf9f4;
  --linen: #f0eae2;
  --wine: #6b2737;
  --deep: #471c28;
  --ink: #30251f;
  --muted: #736457;
  --line: #ded4c8;
  --rose: #f1e3e5;
  --gold: #edc991;
  --chapel: #24151b;
  --paper-edge: #cdbba6;
  --brass: #997248;
  --candle: #ffdca6;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-soft: cubic-bezier(.45, 0, .15, 1);
  --header: 76px;
  --section-space: clamp(72px, 9vw, 136px);
  --section-gap: clamp(24px, 4vw, 56px);
  --folio-padding: clamp(24px, 4.4vw, 60px);
  --serif: Book, Georgia, 'Songti SC', 'Noto Serif CJK SC', serif;
  --sans: Study, system-ui, -apple-system, 'PingFang SC', sans-serif;
}


@view-transition {
  navigation: auto;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--wine);
  color: var(--ivory);
}

a {
  color: inherit;
  text-underline-offset: .22em;
}

:focus-visible {
  outline: 2px solid var(--wine);
  outline-offset: 4px;
  border-radius: 2px;
}

img, svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

p, h1, h2, h3, figure, dl, dd, blockquote {
  margin: 0;
}

[hidden] {
  display: none !important;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  display: inline-block;
  flex: none;
  width: 1em;
  height: 1em;
}

.icon.cross {
  width: .75em;
  height: 1em;
}

.icon.down {
  transform: rotate(90deg);
}

.screen-reader {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.wrap {
  width: min(1180px, calc(100% - 80px));
  margin-inline: auto;
}

.skip {
  position: absolute;
  z-index: 30;
  inset: 8px auto auto 8px;
  padding: 8px 16px;
  background: var(--ivory);
  transform: translateY(-200%);
}

.skip:focus {
  transform: none;
}

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: var(--header);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 29px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.brand img {
  border-radius: 9px;
}

nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.2vw, 30px);
  font-size: .93rem;
}

.site-header nav a:not(.button) {
  position: relative;
  padding-block: 6px;
  text-decoration: none;
}

.site-header nav a:not(.button)::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 420ms var(--ease);
}

.site-header nav a:not(.button):hover::after,
.site-header nav a[aria-current]::after {
  transform: scaleX(1);
}

.site-header[data-header] {
  position: absolute;
  z-index: 20;
  inset: 0 0 auto;
  border-bottom-color: transparent;
  color: var(--ivory);
  transition: transform 520ms var(--ease), background-color 320ms ease,
    color 320ms ease, border-color 320ms ease, backdrop-filter 320ms ease;
}

.js .site-header[data-header] {
  position: fixed;
}

.site-header[data-header].scrolled {
  background: #f8f4eddb;
  border-bottom-color: #ded4c8b3;
  color: var(--ink);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  backdrop-filter: blur(16px) saturate(1.3);
}

.site-header[data-header].tucked {
  transform: translateY(-101%);
}

.reading-progress {
  position: absolute;
  inset: auto 0 -1px;
  height: 2px;
  background: linear-gradient(90deg, var(--wine), var(--brass));
  transform: scaleX(0);
  transform-origin: left;
  opacity: 0;
  transition: opacity 300ms ease;
}

.scrolled .reading-progress {
  opacity: 1;
}

/* ---------- Buttons & small type ---------- */

.button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 50px;
  padding: 11px 24px;
  border-radius: 999px;
  background: var(--wine);
  color: var(--ivory);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  isolation: isolate;
  transition: transform 260ms var(--ease), background-color 260ms ease,
    color 260ms ease, box-shadow 260ms ease;
}

.button::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(105deg, transparent 30%, #ffffff42 50%, transparent 70%);
  transform: translateX(-110%);
  transition: transform 700ms var(--ease);
}

.button .icon {
  transition: transform 320ms var(--ease);
}

.button.compact {
  min-height: 40px;
  padding: 7px 17px;
  gap: 8px;
}

.button.gilt {
  background: linear-gradient(180deg, #f3d9ae, #e4be85);
  color: #3c2128;
  box-shadow: 0 1px 0 #fff3 inset, 0 10px 30px -12px #edc991a6;
}

.button.inverse {
  background: transparent;
  color: var(--ivory);
  box-shadow: 0 0 0 1px #edc99173 inset;
}

.site-header[data-header]:not(.scrolled) .button {
  background: #fdf9f41f;
  box-shadow: 0 0 0 1px #edc9917a inset;
  color: var(--ivory);
}

.button:active {
  transform: scale(.97);
}

@media (hover: hover) {
  .button:hover {
    background-color: var(--deep);
    transform: translateY(-1px);
  }
  .button:hover::before {
    transform: translateX(110%);
  }
  .button:hover .icon {
    transform: translateX(3px);
  }
  .button.gilt:hover {
    box-shadow: 0 1px 0 #fff3 inset, 0 16px 36px -12px #edc991d9;
  }
  .button.inverse:hover {
    background: #fdf9f414;
  }
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  color: var(--wine);
  font-weight: 700;
  text-decoration: none;
}

.text-link .icon {
  transition: transform 320ms var(--ease);
}

@media (hover: hover) {
  .text-link:hover .icon.down {
    transform: rotate(90deg) translateX(4px);
  }
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--wine);
  font-size: .77rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.eyebrow .numeral {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font: 600 1.02rem/1 var(--serif);
  letter-spacing: 0;
  opacity: .9;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.03em;
  text-wrap: balance;
}

h2 {
  font-size: clamp(42px, 5vw, 70px);
  margin-block: 18px;
}


.section-deck {
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  max-width: 46ch;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  isolation: isolate;
  overflow: clip; /* hidden would capture view() timelines */
  display: grid;
  align-items: center;
  min-height: clamp(660px, 100svh, 940px);
  padding-top: var(--header);
  background: var(--chapel);
  color: var(--ivory);
}

.hero-scene, .hero-scene > div {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-scene {
  z-index: -1;
}

.hero-painting {
  inset: -4% -1% -4% -7% !important;
  background: url('assets/hero-nave.webp') 100% 42% / cover no-repeat;
  translate: calc(var(--px, 0) * -10px) calc(var(--py, 0) * -6px);
  transition: translate 900ms var(--ease);
  animation: painting-arrival 2.6s var(--ease) both;
}

.hero-rays {
  background:
    radial-gradient(ellipse 34% 46% at 80% 40%, #ffdca647, transparent 70%),
    radial-gradient(ellipse 16% 30% at 93% 30%, #fff0cf40, transparent 70%);
  mix-blend-mode: screen;
  animation: rays-breathe 9s ease-in-out infinite alternate;
}

.hero-shade {
  background:
    linear-gradient(90deg, #24151b 0%, #24151bd9 26%, #24151b59 48%, transparent 66%),
    linear-gradient(180deg, #24151bb3 0%, transparent 20%, transparent 74%, #24151b 100%);
}

.hero-glow {
  background: radial-gradient(420px circle at var(--mx, 70%) var(--my, 35%), #ffd9a01f, transparent 70%);
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity 600ms ease;
}

.hero.lit .hero-glow {
  opacity: 1;
}

.hero-motes i {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--candle);
  box-shadow: 0 0 6px #ffdca6;
  opacity: 0;
  animation: mote 14s linear infinite;
}

.hero-grid {
  padding-block: clamp(40px, 6vh, 72px);
}

.hero-copy {
  max-width: 660px;
}

.hero-kicker {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--gold);
  font-size: .79rem;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.hero-kicker .icon {
  font-size: 30px;
}

.hero h1 {
  margin: 22px 0 26px;
  font-size: clamp(60px, 7.4vw, 118px);
  line-height: .94;
}

.hero h1 .line {
  display: block;
}

.hero h1 em {
  font-weight: 500;
  color: transparent;
  background: linear-gradient(100deg, #f6e2bd 0%, #edc991 38%, #c99a5e 72%, #f2d7a8 100%) 0 0 / 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  padding-bottom: .12em;
  animation: rise 1.1s 240ms var(--ease) both, gilt 9s 1.4s ease-in-out infinite alternate;
}



.hero-lead {
  max-width: 34ch;
  color: #e9dcd3;
  font-size: clamp(1.02rem, 1.45vw, 1.22rem);
}

.actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 26px;
  margin-top: 30px;
}

.hero .text-link {
  color: #f0dac0;
}

.platforms {
  margin-top: 22px;
  color: #cdb8ab;
  font-size: .84rem;
  letter-spacing: .04em;
}

.hero :focus-visible, .testing :focus-visible, .footer :focus-visible {
  outline-color: var(--gold);
}

.hero-kicker { animation: rise 1s 40ms var(--ease) both; }
.hero h1 .line:first-child { animation: rise 1.1s 120ms var(--ease) both; }
.hero-lead { animation: rise 1.1s 380ms var(--ease) both; }
.hero .actions { animation: rise 1.1s 480ms var(--ease) both; }
.hero .platforms { animation: rise 1.1s 580ms var(--ease) both; }
.device {
  padding: 7px;
  border: 1px solid #8c7360;
  border-radius: 32px;
  background: #272018;
  overflow: hidden;
}

.device img {
  width: 100%;
  border-radius: 25px;
  background: var(--paper);
}

/* ---------- Showcase ---------- */

.showcase {
  position: relative;
  overflow: clip; /* hidden would capture view() timelines */
  padding-block: clamp(64px, 8vw, 112px) 0;
  background:
    radial-gradient(ellipse 50% 70% at 72% 30%, #6b273780, transparent 70%),
    var(--chapel);
  color: var(--ivory);
}

.showcase-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 6vw, 96px);
}

.showcase-copy {
  padding-bottom: clamp(64px, 8vw, 112px);
}

.showcase .eyebrow {
  color: var(--gold);
}

.showcase :focus-visible {
  outline-color: var(--gold);
}

.preview-controls {
  display: grid;
  margin-top: 30px;
  border-top: 1px solid #edc99133;
}

.preview-controls button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 72px;
  padding: 10px 4px;
  border: 0;
  border-bottom: 1px solid #edc99133;
  background: transparent;
  color: #b9a497;
  font: 500 clamp(26px, 2.8vw, 38px) / 1 var(--serif);
  letter-spacing: -.02em;
  text-align: start;
  cursor: pointer;
  transition: color 320ms ease, padding-left 520ms var(--ease);
}

.preview-controls .numeral {
  width: 2.2em;
  color: var(--brass);
  font-size: .5em;
  letter-spacing: .2em;
  transition: color 320ms ease;
}

.preview-controls button::after {
  content: '';
  position: absolute;
  inset: auto 0 -1px;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 700ms var(--ease);
}

.preview-controls button:hover,
.preview-controls button[aria-pressed='true'] {
  color: var(--ivory);
}

.preview-controls button[aria-pressed='true'] {
  padding-left: 16px;
}

.preview-controls button[aria-pressed='true']::after {
  transform: scaleX(1);
}

.preview-controls button[aria-pressed='true'] .numeral {
  color: var(--gold);
}

.arch-visual {
  position: relative;
  display: grid;
  place-items: end center;
  width: min(100%, 460px);
  margin-inline: auto;
  padding-top: 70px;
  isolation: isolate;
  align-self: end;
}

.arch-visual::before, .arch-visual::after {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  border: 1px solid #edc99152;
  border-bottom: 0;
  border-radius: 999px 999px 0 0;
  pointer-events: none;
}

.arch-visual::before {
  background: linear-gradient(180deg, #edc99126, #edc9910a 60%, transparent);
}

.arch-visual::after {
  inset: 12px 12px 0;
  border-color: #edc99126;
}

.rose-window {
  position: absolute;
  z-index: -1;
  top: 34px;
  left: 50%;
  width: 80%;
  margin-left: -40%;
  opacity: .55;
  animation: rose-turn 240s linear infinite;
}

.hero-phone {
  position: relative;
  display: grid;
  width: min(262px, 62%);
  margin-bottom: -84px;
  border-color: #d8ac72;
  background: #2d2021;
  box-shadow: 0 0 80px #dca86747, 0 -10px 60px -10px #0b0607;
  touch-action: pan-y pinch-zoom;
}

.hero-phone img {
  grid-area: 1 / 1;
}

.hero-phone img:not([aria-hidden='true']) {
  z-index: 1;
}

/* ---------- Verse ---------- */

.verse {
  position: relative;
  padding-block: clamp(72px, 10vw, 150px);
  text-align: center;
  background:
    radial-gradient(ellipse 60% 70% at 50% 0%, #edc9913d, transparent 70%),
    var(--paper);
}

.verse-inner {
  display: grid;
  justify-items: center;
}

.verse-cross {
  color: var(--brass);
  font-size: 40px;
}

.verse blockquote {
  max-width: 17ch;
  margin-block: 26px 28px;
  color: var(--deep);
  font: 600 clamp(40px, 6.6vw, 96px) / 1.02 var(--serif);
  letter-spacing: -.03em;
  text-wrap: balance;
}


.verse .w {
  opacity: .16;
  transition: opacity 700ms ease, text-shadow 700ms ease;
}

.verse .w.lit {
  opacity: 1;
  text-shadow: 0 0 34px #edc99199;
}

.verse figcaption {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--muted);
  font-size: .86rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.verse .rule {
  width: clamp(28px, 6vw, 72px);
  height: 1px;
  background: var(--paper-edge);
}

/* ---------- Triptych ---------- */

.triptych {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: clamp(14px, 3vw, 44px);
  padding-block: clamp(96px, 10vw, 150px) clamp(56px, 6vw, 88px);
}

.panel {
  display: grid;
  justify-items: center;
  gap: 4px;
  text-align: center;
  text-decoration: none;
}

.panel-art {
  position: relative;
  width: 100%;
  aspect-ratio: 5 / 7;
  margin-bottom: 20px;
  border-radius: 999px 999px 6px 6px;
  overflow: hidden;
  background: var(--chapel);
  box-shadow: 0 0 0 1px var(--paper-edge), 0 0 0 7px var(--ivory), 0 0 0 8px var(--paper-edge),
    0 34px 50px -30px #30251f8c;
  transition: box-shadow 600ms var(--ease), transform 600ms var(--ease);
}

.panel-centre .panel-art {
  aspect-ratio: 5 / 8;
}

.panel:last-child .panel-art img {
  object-position: 33% 50%;
}

.panel-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(.92) brightness(.9);
  transition: transform 1.4s var(--ease), filter 900ms ease;
}

.panel-art::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #ffdca626, transparent 40%, #24151b73);
  transition: opacity 900ms ease;
}

.panel-numeral {
  color: var(--brass);
  font: 600 1.15rem/1 var(--serif);
  letter-spacing: .2em;
}

.panel strong {
  font: 600 clamp(24px, 2.7vw, 38px) / 1.1 var(--serif);
  letter-spacing: -.02em;
}


.panel small {
  color: var(--muted);
  font-size: .9rem;
}

@media (hover: hover) {
  .panel:hover .panel-art {
    transform: translateY(-8px);
    box-shadow: 0 0 0 1px var(--brass), 0 0 0 7px var(--ivory), 0 0 0 8px var(--brass),
      0 44px 60px -30px #30251fa6;
  }
  .panel:hover .panel-art img {
    transform: scale(1.1);
    filter: saturate(1.05) brightness(1.04);
  }
  .panel:hover .panel-art::after {
    opacity: .35;
  }
}

/* ---------- Sermons ---------- */

.sermon-spread {
  padding-block: var(--section-space);
}

.section-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
  align-items: end;
  gap: var(--section-gap);
  margin-bottom: clamp(30px, 4vw, 52px);
}

.section-intro h2 {
  margin-bottom: 0;
}

.section-intro .section-deck {
  padding-bottom: 5px;
}

.sermon-folio {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr);
  background:
    linear-gradient(90deg, #30251f0d, transparent 3%),
    var(--ivory);
  border: 1px solid var(--paper-edge);
  border-radius: 3px 8px 8px 3px;
  box-shadow: 0 2px 0 -1px var(--ivory), 0 3px 0 -1px var(--paper-edge),
    0 6px 0 -3px var(--ivory), 0 7px 0 -3px var(--paper-edge), 0 40px 60px -40px #30251f66;
}

.sermon-folio::before {
  content: '';
  position: absolute;
  inset: -1px auto -1px -1px;
  width: 6px;
  border-radius: 3px 0 0 3px;
  background: linear-gradient(180deg, var(--wine), var(--deep));
}

.sample-note {
  padding: var(--folio-padding);
}

.note-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  color: var(--brass);
  font-size: 28px;
}

.sample-note h3 {
  margin-top: 26px;
  font-size: clamp(36px, 4.6vw, 62px);
  line-height: 1.04;
}


.sample-reference {
  display: inline-block;
  margin-top: 12px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--line);
  color: var(--wine);
  font-size: .86rem;
}

.waveform {
  width: min(100%, 420px);
  height: 44px;
  margin: 28px 0;
  fill: var(--brass);
  opacity: .8;
}

.waveform rect {
  transform-box: fill-box;
  transform-origin: center;
}

.waveform.playing rect {
  animation: wave 1.5s ease-in-out infinite alternate;
}

.waveform rect:nth-child(5n + 1) { animation-delay: -.2s; }
.waveform rect:nth-child(5n + 2) { animation-delay: -.9s; }
.waveform rect:nth-child(5n + 3) { animation-delay: -.5s; }
.waveform rect:nth-child(5n + 4) { animation-delay: -1.3s; }
.waveform rect:nth-child(7n) { animation-duration: 1.1s; }

.sample-subhead {
  margin-bottom: 4px;
  color: var(--wine);
  font-weight: 700;
}

.sample-reflection {
  max-width: 49ch;
  color: var(--muted);
}

.flash {
  display: grid;
  padding: var(--folio-padding);
  padding-inline-start: clamp(20px, 3vw, 40px);
  border-inline-start: 1px solid var(--line);
  perspective: 1200px;
}

.flash-card {
  display: grid;
  width: 100%;
  min-height: 300px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: start;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform 900ms var(--ease-soft);
}

.js .flash-face {
  grid-area: 1 / 1;
}

.flash-face {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(20px, 2.4vw, 30px);
  border: 1px solid var(--paper-edge);
  border-radius: 10px;
  background: var(--paper);
  box-shadow: 0 18px 30px -22px #30251f73;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transition: box-shadow 400ms ease;
}

.flash-back {
  border-color: var(--deep);
  background:
    radial-gradient(ellipse at 50% 0%, #edc99133, transparent 60%),
    var(--deep);
  color: var(--ivory);
  font-size: 30px;
}

.flash-back .cross {
  color: var(--gold);
}

.js .flash-back {
  transform: rotateY(180deg);
}

.js .flash-card.flipped {
  transform: rotateY(-180deg);
}

.flash-label {
  color: var(--wine);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.flash-question {
  font: 600 clamp(26px, 2.9vw, 40px) / 1.12 var(--serif);
  letter-spacing: -.02em;
}


.flash-answer {
  font: 500 clamp(19px, 1.7vw, 23px) / 1.4 var(--serif);
}


.flash-prompt {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: auto;
  padding-top: 12px;
  font-size: .84rem;
  font-weight: 700;
}

.flash-prompt .icon {
  transition: transform 600ms var(--ease);
}

@media (hover: hover) {
  .flash-card:hover .flash-face {
    box-shadow: 0 26px 40px -22px #30251f99;
  }
  .flash-card:hover .flash-prompt .icon {
    transform: rotate(180deg);
  }
}

.workflow {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--section-gap);
  margin-top: clamp(40px, 5vw, 64px);
  counter-reset: step;
}

.workflow::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: var(--paper-edge);
  transform-origin: left;
}

.anim .workflow::before {
  transform: scaleX(0);
  transition: transform 1.6s 200ms var(--ease-soft);
}

.anim .workflow.revealed::before {
  transform: scaleX(1);
}

.workflow div {
  position: relative;
  padding-top: 22px;
  counter-increment: step;
}

.workflow div::before {
  content: '';
  position: absolute;
  inset: -4px auto auto 0;
  width: 7px;
  height: 7px;
  background: var(--brass);
  transform: rotate(45deg);
}

.workflow dt::before {
  content: counter(step, upper-roman) '. ';
  color: var(--brass);
  font-family: var(--serif);
  font-size: 1.1em;
}

.workflow dt, .reading-tools dt, .devotion-moments dt {
  color: var(--wine);
  font-weight: 700;
}

.workflow dd, .reading-tools dd, .devotion-moments dd {
  color: var(--muted);
  font-size: .95rem;
}

/* ---------- Scripture ---------- */

.reader-band {
  padding-block: var(--section-space);
  background:
    radial-gradient(ellipse 50% 60% at 78% 40%, #fdf9f4, transparent 70%),
    var(--linen);
  border-block: 1px solid var(--line);
  overflow: clip; /* hidden would capture view() timelines */
}

.reader-layout {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1fr);
  grid-template-areas:
    'intro preview'
    'tools preview';
  column-gap: clamp(32px, 7vw, 104px);
  row-gap: 30px;
}

.reader-copy {
  grid-area: intro;
  align-self: end;
}

.reading-tools {
  grid-area: tools;
  align-self: start;
}

.reading-tools div {
  position: relative;
  display: grid;
  grid-template-columns: minmax(96px, .42fr) minmax(0, 1fr);
  align-items: baseline;
  gap: 14px;
  padding: 15px 0 15px 22px;
  border-bottom: 1px solid var(--line);
}

.reading-tools div:first-child {
  border-top: 1px solid var(--line);
}

.reading-tools div::before {
  content: '';
  position: absolute;
  inset: calc(15px + .825em - 3px) auto auto 0;
  width: 6px;
  height: 6px;
  background: var(--brass);
  transform: rotate(45deg);
  transition: background-color 420ms ease, transform 420ms var(--ease);
}

@media (hover: hover) {
  .reading-tools div:hover {
    background: linear-gradient(90deg, #fdf9f4b3, transparent);
  }
  .reading-tools div:hover::before {
    background: var(--wine);
    transform: rotate(45deg) scale(1.25);
  }
}

.reader-visual {
  grid-area: preview;
  position: relative;
  display: grid;
  justify-items: center;
  align-content: end;
  min-height: clamp(480px, 46vw, 620px);
  padding-bottom: 34px;
}

.niche {
  position: absolute;
  inset: 0 6% 34px;
  border-radius: 999px 999px 6px 6px;
  overflow: clip; /* hidden would capture view() timelines */
  box-shadow: 0 0 0 1px var(--paper-edge), 0 0 0 9px var(--ivory), 0 0 0 10px var(--paper-edge),
    0 50px 70px -40px #30251f8c;
}

.niche img {
  width: 100%;
  height: 136%;
  object-fit: cover;
  margin-top: -18%;
}

.niche::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, #24151b99);
}

.reader-phone {
  position: relative;
  width: clamp(200px, 21vw, 244px);
  margin-bottom: -6px;
  border-color: #d8ac72;
  box-shadow: 0 34px 60px -20px #1a0f0acc;
}

.reader-visual figcaption {
  position: absolute;
  inset: auto 0 0;
  color: var(--muted);
  font-size: .8rem;
  text-align: center;
}

/* ---------- Devotion ---------- */

.devotion-panel {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: clamp(460px, 44vw, 640px);
  overflow: clip; /* hidden would capture view() timelines */
  background: var(--chapel);
  color: var(--ivory);
}

.devotion-art {
  position: absolute;
  z-index: -1;
  inset: -8% 0;
  inset: -22% 0;
  background: url('assets/galilee-dawn.webp') right center / cover no-repeat;
}

.devotion-panel::after {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(90deg, var(--chapel) 12%, #24151be6 32%, #24151b59 60%, transparent 84%);
}

.devotion-copy {
  max-width: 480px;
  padding-block: var(--section-space);
}

.devotion-copy .eyebrow, .testing .eyebrow {
  color: var(--gold);
}

.devotion-copy p:not(.eyebrow), .testing p:not(.eyebrow) {
  max-width: 42ch;
  color: #f0e4df;
}

.devotion-moments {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--section-gap);
  padding-block: clamp(36px, 5vw, 64px);
  counter-reset: step;
}

.devotion-moments div {
  padding-left: 18px;
  border-left: 1px solid var(--paper-edge);
  counter-increment: step;
}

.devotion-moments div::before {
  content: counter(step, upper-roman);
  display: block;
  margin-bottom: 6px;
  color: var(--brass);
  font: 600 1.5rem/1 var(--serif);
}

/* ---------- AI study tools ---------- */

.study {
  padding-block: var(--section-space);
  border-top: 1px solid var(--line);
}

.study-layout {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(32px, 7vw, 104px);
  align-items: start;
}

.study-note {
  display: flex;
  gap: 14px;
  max-width: 44ch;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--paper-edge);
  color: var(--muted);
  font-size: .9rem;
}

.study-note .icon {
  margin-top: 2px;
  color: var(--brass);
  font-size: 22px;
}

.study-tools {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  counter-reset: step;
  border-top: 1px solid var(--paper-edge);
}

.study-tools div {
  position: relative;
  padding: clamp(22px, 2.6vw, 34px) clamp(18px, 2.4vw, 32px) clamp(22px, 2.6vw, 34px) 0;
  border-bottom: 1px solid var(--paper-edge);
  counter-increment: step;
}

.study-tools div:nth-child(even) {
  padding-left: clamp(18px, 2.4vw, 32px);
  border-left: 1px solid var(--paper-edge);
}

.study-tools div::before {
  content: counter(step, upper-roman);
  display: block;
  margin-bottom: 14px;
  color: var(--brass);
  font: 600 1rem/1 var(--serif);
  letter-spacing: .2em;
}

.study-tools dt {
  margin-bottom: 6px;
  font: 600 clamp(26px, 2.6vw, 36px) / 1.1 var(--serif);
  letter-spacing: -.02em;
  transition: color 320ms ease;
}

.study-tools dd {
  color: var(--muted);
  font-size: .95rem;
}

@media (hover: hover) {
  .study-tools div:hover dt {
    color: var(--wine);
  }
}

/* ---------- Closing ---------- */

.closing {
  padding-block: var(--section-space);
  background: #f1e9df;
  border-top: 1px solid #e1d4c6;
}

.closing-layout {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: start;
}

.testing {
  position: relative;
  isolation: isolate;
  overflow: clip; /* hidden would capture view() timelines */
  padding: clamp(28px, 3.8vw, 52px);
  border-radius: 200px 200px 10px 10px;
  padding-top: clamp(64px, 8vw, 104px);
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, #edc99140, transparent 70%),
    linear-gradient(180deg, var(--deep), var(--chapel));
  color: var(--ivory);
  text-align: center;
  box-shadow: 0 0 0 1px var(--deep), 0 0 0 8px var(--ivory), 0 0 0 9px var(--paper-edge),
    0 50px 70px -44px #30251fb3;
}

.testing-rose {
  position: absolute;
  z-index: -1;
  top: -150px;
  left: 50%;
  width: 440px;
  max-width: none;
  margin-left: -220px;
  opacity: .28;
  animation: rose-turn 300s linear infinite;
}

.testing > .cross {
  margin: 0 auto 18px;
  color: var(--gold);
  font-size: 40px;
}

.testing .eyebrow {
  justify-content: center;
}

.testing h2, .faq h2 {
  font-size: clamp(36px, 4vw, 56px);
}


.testing p:not(.eyebrow) {
  margin-inline: auto;
}

.testing .actions {
  justify-content: center;
}

.faq-list {
  border-top: 1px solid var(--paper-edge);
}

.faq details {
  border-bottom: 1px solid var(--paper-edge);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 64px;
  padding-block: 14px;
  font: 600 clamp(20px, 1.9vw, 25px) / 1.25 var(--serif);
  list-style: none;
  cursor: pointer;
  transition: color 260ms ease;
}


.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary .icon {
  width: 34px;
  height: 34px;
  padding: 9px;
  border: 1px solid var(--paper-edge);
  border-radius: 50%;
  color: var(--wine);
  transition: transform 520ms var(--ease), background-color 320ms ease, color 320ms ease,
    border-color 320ms ease;
}

.faq details[open]:not(.closing-item) summary .icon {
  transform: rotate(135deg);
  background: var(--wine);
  border-color: var(--wine);
  color: var(--ivory);
}

@media (hover: hover) {
  .faq summary:hover {
    color: var(--wine);
  }
}

.faq-answer {
  overflow: hidden;
}

.faq-answer p {
  max-width: 62ch;
  padding-bottom: 22px;
  color: var(--muted);
}

/* ---------- Footer ---------- */

.footer {
  background: var(--chapel);
  color: #cdb8ab;
  font-size: .88rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px 24px;
  padding-block: 34px;
}

.footer .brand {
  color: var(--ivory);
  font-size: 24px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 11px 24px;
}

.footer a {
  text-decoration: none;
  transition: color 240ms ease;
}

.footer-links a:hover {
  color: var(--gold);
}

/* ---------- Legal pages ---------- */

.icon.back {
  transform: rotate(180deg);
}

.legal-banner {
  position: relative;
  isolation: isolate;
  overflow: clip; /* hidden would capture view() timelines */
  padding: calc(var(--header) + clamp(40px, 6vw, 72px)) 0 0;
  background:
    radial-gradient(ellipse 50% 90% at 85% 0%, #6b273799, transparent 70%),
    var(--chapel);
  color: var(--ivory);
}

.legal-rose {
  position: absolute;
  z-index: -1;
  top: -90px;
  right: -110px;
  width: 520px;
  max-width: none;
  opacity: .3;
  animation: rose-turn 300s linear infinite;
}

.legal-banner h1 {
  margin: 20px 0 clamp(32px, 5vw, 56px);
  font-size: clamp(46px, 6.4vw, 88px);
  animation: rise 1.1s 120ms var(--ease) both;
}

.legal-banner :focus-visible {
  outline-color: var(--gold);
}

.legal-tabs {
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
  border-top: 1px solid #edc99133;
}

.legal-tabs a {
  position: relative;
  flex: none;
  padding: 18px 26px 18px 0;
  margin-right: 12px;
  color: #cdb8ab;
  text-decoration: none;
  white-space: nowrap;
  transition: color 260ms ease;
}

.legal-tabs a::before {
  content: '';
  position: absolute;
  inset: -1px 26px auto 0;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 520ms var(--ease);
}

.legal-tabs a:hover, .legal-tabs a[aria-current] {
  color: var(--ivory);
}

.legal-tabs a[aria-current]::before {
  transform: scaleX(1);
}

.legal-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 720px);
  justify-content: space-between;
  gap: clamp(32px, 6vw, 96px);
  padding-block: clamp(40px, 6vw, 80px) var(--section-space);
}

.legal-contents {
  position: sticky;
  top: calc(var(--header) + 24px);
  align-self: start;
  max-height: calc(100vh - var(--header) - 48px);
  overflow-y: auto;
  scrollbar-width: thin;
}

.legal-contents ol {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: clause;
  border-left: 1px solid var(--paper-edge);
}

.legal-contents a {
  position: relative;
  display: block;
  padding: 6px 0 6px 18px;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.35;
  text-decoration: none;
  transition: color 240ms ease, padding-left 420ms var(--ease);
}

.legal-contents a::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 -1px;
  width: 2px;
  background: var(--wine);
  transform: scaleY(0);
  transition: transform 420ms var(--ease);
}

.legal-contents a:hover, .legal-contents a[aria-current] {
  color: var(--wine);
}

.legal-contents a[aria-current] {
  padding-left: 24px;
}

.legal-contents a[aria-current]::before {
  transform: scaleY(1);
}

.legal {
  font-size: 1.03rem;
  animation: rise 1.1s 260ms var(--ease) both;
}

.legal-date {
  color: var(--wine);
  font-size: .8rem;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.legal > p:first-child:not(.legal-date), .legal-date + p {
  color: var(--deep);
  font: 500 clamp(22px, 2.3vw, 28px) / 1.35 var(--serif);
}

.legal h2 {
  margin: 56px 0 16px;
  padding-top: 26px;
  border-top: 1px solid var(--paper-edge);
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.12;
  letter-spacing: -.02em;
}

.legal h3 {
  margin: 34px 0 12px;
  color: var(--wine);
  font: 700 .8rem/1.4 var(--sans);
  letter-spacing: .14em;
  text-transform: uppercase;
}

.legal p {
  margin-bottom: 14px;
}

.legal ul {
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.legal li {
  position: relative;
  padding: 3px 0 3px 22px;
}

.legal li::before {
  content: '';
  position: absolute;
  inset: .82em auto auto 3px;
  width: 5px;
  height: 5px;
  background: var(--brass);
  transform: rotate(45deg);
}

.legal a {
  color: var(--wine);
  text-decoration-color: #6b273759;
  transition: text-decoration-color 240ms ease;
}

.legal a:hover {
  text-decoration-color: currentColor;
}

.table-scroll {
  margin: 20px 0 26px;
  overflow-x: auto;
  border: 1px solid var(--paper-edge);
  border-radius: 8px;
  background: var(--ivory);
}

.legal table {
  width: 100%;
  border-collapse: collapse;
  font-size: .93rem;
}

.legal th, .legal td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.legal th {
  color: var(--wine);
  font-size: .74rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.legal tr:last-child td {
  border-bottom: 0;
}

/* ---------- Parallax ---------- */

/* --depth is how many pixels a layer trails (positive) or runs ahead of
   (negative) the page while it crosses the viewport. */
:root { --depth-scale: 1; }
.hero-copy { --depth: 150; }
.verse-cross { --depth: 22; }
.arch-visual .rose-window { --depth: 90; }
.hero-phone { --depth: -70; }
.panel { --depth: -44; }
.panel-centre { --depth: 52; }
.niche img { --depth: 90; }
.reader-phone { --depth: -64; }
.devotion-art { --depth: 120; }
.devotion-copy { --depth: -40; }
.testing-rose { --depth: 70; }
.legal-rose { --depth: 110; }

@keyframes parallax {
  from { translate: 0 calc(var(--depth) * var(--depth-scale) * -1px); }
  to { translate: 0 calc(var(--depth) * var(--depth-scale) * 1px); }
}

@supports (animation-timeline: view()) {
  /* Runs on the compositor, so layers stay in step with scrolling. */
  .anim [data-depth] {
    animation: parallax linear both;
    animation-timeline: view();
    animation-range: cover 0% cover 100%;
    will-change: translate;
  }
  .anim .rose-window[data-depth], .anim .testing-rose[data-depth], .anim .legal-rose[data-depth] {
    animation: rose-turn 240s linear infinite, parallax linear both;
    animation-timeline: auto, view();
    animation-range: normal, cover 0% cover 100%;
  }
}

@supports not (animation-timeline: view()) {
  .anim [data-depth] {
    translate: 0 calc(var(--shift, 0) * 1px);
    will-change: translate;
  }
}

/* ---------- Scroll reveal ---------- */

.anim [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 1s var(--ease), transform 1.1s var(--ease);
}

.anim [data-reveal].revealed {
  opacity: 1;
  transform: none;
}

.anim .triptych .panel:nth-child(2) { transition-delay: 120ms; }
.anim .triptych .panel:nth-child(3) { transition-delay: 240ms; }

.anim .workflow div, .anim .devotion-moments div, .anim .reading-tools div, .anim .study-tools div {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 800ms var(--ease), transform 800ms var(--ease);
}

.anim .revealed > div {
  opacity: 1;
  transform: none;
}

.anim .revealed > div:nth-child(2) { transition-delay: 140ms; }
.anim .revealed > div:nth-child(3) { transition-delay: 280ms; }
.anim .revealed > div:nth-child(4) { transition-delay: 420ms; }

/* ---------- Keyframes ---------- */

@keyframes rise {
  from { opacity: 0; transform: translateY(26px); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: none; }
}

@keyframes painting-arrival {
  from { opacity: .2; transform: scale(1.08); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes rays-breathe {
  from { opacity: .45; transform: translateX(-1.5%); }
  to { opacity: 1; transform: translateX(1.5%); }
}

@keyframes gilt {
  to { background-position: 100% 0; }
}

@keyframes rose-turn {
  to { transform: rotate(360deg); }
}

@keyframes mote {
  0% { opacity: 0; transform: translate3d(0, 0, 0); }
  15% { opacity: var(--o, .7); }
  85% { opacity: var(--o, .7); }
  100% { opacity: 0; transform: translate3d(var(--dx, -40px), var(--dy, 120px), 0); }
}

@keyframes wave {
  from { transform: scaleY(.35); }
  to { transform: scaleY(1); }
}

@keyframes painting-drift {
  to { transform: translateY(9%) scale(1.05); }
}

@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .hero-painting {
      animation: painting-arrival 2.6s var(--ease) both, painting-drift linear both;
      animation-timeline: auto, scroll(root);
      animation-range: normal, 0 100vh;
    }
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 1020px) {
  .nav-section {
    display: none;
  }
}

@media (max-width: 860px) {
  :root {
    --header: 64px;
    --depth-scale: .5;
  }
  .wrap {
    width: calc(100% - 44px);
  }
  .hero {
    min-height: 0;
  }
  .hero {
    align-items: start;
    min-height: clamp(680px, 100svh, 900px);
  }
  .hero-grid {
    padding-block: 36px 0;
  }
  .hero-painting {
    inset: 40% 0 0 !important;
    background-position: 76% 50%;
  }
  .hero-rays {
    display: none;
  }
  .hero-shade {
    background: linear-gradient(180deg, #24151b 0%, #24151b 40%, #24151b99 52%, transparent 70%, #24151b 100%);
  }
  .showcase-grid {
    grid-template-columns: 1fr;
  }
  .showcase-copy {
    padding-bottom: 0;
  }
  .arch-visual {
    width: min(100%, 380px);
  }
  .legal-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .legal-contents {
    display: none;
  }
  .section-intro, .sermon-folio, .closing-layout, .study-layout {
    grid-template-columns: 1fr;
  }
  .section-intro {
    gap: 14px;
  }
  .flash {
    padding: 0 var(--folio-padding) var(--folio-padding);
    border-inline-start: 0;
  }
  .flash-card {
    min-height: 240px;
  }
  .reader-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      'intro'
      'preview'
      'tools';
  }
  .reader-visual {
    width: min(100%, 420px);
    margin-inline: auto;
    min-height: 500px;
  }
  .reader-phone {
    width: 210px;
  }
  .devotion-panel {
    align-items: flex-start;
    min-height: 620px;
  }
  .devotion-art {
    background-position: 62% bottom;
    background-size: auto 54%;
    inset: 0;
    animation: none;
    translate: none !important;
  }
  .devotion-panel::after {
    background: linear-gradient(180deg, var(--chapel) 40%, #24151bcc 52%, #24151b33 70%, transparent 88%);
  }
  .devotion-copy {
    padding-block: 48px 0;
  }
  .testing {
    max-width: 460px;
    margin-inline: auto;
  }
}

@media (max-width: 640px) {
  .wrap {
    width: calc(100% - 36px);
  }
  .header-inner {
    gap: 8px;
  }
  .brand {
    font-size: 24px;
    gap: 8px;
  }
  .brand img {
    width: 30px;
    height: 30px;
  }
  nav {
    gap: 12px;
    font-size: .85rem;
  }
  .button.compact {
    padding-inline: 13px;
  }
  .hero h1 {
    font-size: clamp(54px, 15vw, 84px);
  }
  .triptych {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }
  .panel-art {
    margin-bottom: 12px;
    box-shadow: 0 0 0 1px var(--paper-edge), 0 0 0 4px var(--ivory), 0 0 0 5px var(--paper-edge),
      0 24px 34px -24px #30251f8c;
  }
  .panel small {
    display: none;
  }
  .panel-numeral {
    font-size: .9rem;
  }
  .panel strong,   .workflow, .devotion-moments {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .workflow::before {
    inset: 0 auto 0 0;
    width: 1px;
    height: auto;
    transform-origin: top;
  }
  .anim .workflow::before {
    transform: scaleY(0);
  }
  .anim .workflow.revealed::before {
    transform: scaleY(1);
  }
  .workflow div {
    padding: 0 0 22px 22px;
  }
  .workflow div:last-child {
    padding-bottom: 0;
  }
  .workflow div::before {
    inset: 9px auto auto -3px;
  }
  .devotion-moments {
    gap: 22px;
  }
  .reading-tools div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .footer-inner {
    align-items: flex-start;
  }
  .footer small {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation: none !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
  }
  .hero-motes {
    display: none;
  }
  @view-transition {
    navigation: none;
  }
}
