/* Painted Dawn & Book-of-Hours Editorial Stylesheet for Women's Bible (https://womensdevotional.app)
   Grounded in art/STYLE.md, src/theme/colors.ts, and src/theme/type.tsx */

:root {
  --ivory: #FBF6EF;
  --parchment: #F3EADF;
  --blush: #F4D3CB;
  --apricot: #F2A983;
  --dawn-gold: #EBC27E;
  --rose: #D98E8A;
  --rose-deep: #B5625E;
  --mauve: #A47C97;
  --lavender: #8F83B3;
  --sage: #A9B99A;
  --olive: #5E6A46;
  --gold-ink: #8A5A1E;       /* ~5.6:1 on ivory (#18 contrast fix) */
  --gold-rule: rgba(138, 90, 30, 0.36);
  --ink: #2E2630;
  --ink-soft: #5E525F;
  --ink-faint: #8C7F8A;
  --indigo: #1C1F3F;
  --deep-night: #0F1128;
  --starlight: #FFF1D0;
  --white: #FFFFFF;
  --card-bg: #FFFDF9;
  --hairline: rgba(46, 38, 48, 0.12);
  --hairline-strong: rgba(46, 38, 48, 0.20);
  --shadow-soft: 0 10px 30px rgba(28, 31, 63, 0.07);
  --shadow-hover: 0 16px 38px rgba(28, 31, 63, 0.12);
  --radius: 16px;
  --font-display: 'Fraunces', Georgia, serif;
  --font-reading: 'Newsreader', Georgia, serif;
  --font-ui: 'Manrope', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--font-reading);
  font-size: 19px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-ink); text-underline-offset: 3px; }
a:hover { color: var(--indigo); }

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

.wrap-narrow {
  max-width: 740px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================================
   HEADER — Transparent over painted dawn hero, crisp 56px mobile
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 246, 239, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hairline);
  transition: background 0.25s ease, border-color 0.25s ease;
}

body.share-letter .site-header {
  position: relative;
}

/* Transparent header floating over homepage painted dawn sky (#16) */
body.has-painted-hero .site-header {
  position: fixed;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, rgba(251, 246, 239, 0.72) 0%, rgba(251, 246, 239, 0.0) 100%);
  backdrop-filter: blur(4px);
  border-bottom-color: transparent;
}

body.has-painted-hero .site-header.scrolled {
  background: rgba(251, 246, 239, 0.96);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--hairline);
}

.site-header .inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 11px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(28, 31, 63, 0.14);
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.015em;
  line-height: 1.05;
  color: var(--ink);
  white-space: nowrap;
}

.brand-sub {
  display: block;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-soft);
  letter-spacing: 0.01em;
  margin-top: 2px;
  white-space: nowrap;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.site-nav a {
  font-family: var(--font-ui);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  white-space: nowrap;
}

.site-nav a:hover { color: var(--gold-ink); }

/* Indigo header anchor CTA (#19) */
.nav-cta {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-ui);
  background: var(--indigo);
  color: var(--starlight) !important;
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 13.5px;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(28, 31, 63, 0.20);
  transition: background 0.15s ease, transform 0.15s ease;
}

.nav-cta:hover {
  background: #2b305c;
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--hairline-strong);
  background: rgba(255, 253, 249, 0.9);
  color: var(--indigo);
  cursor: pointer;
  flex-shrink: 0;
}

/* ============================================================
   TYPOGRAPHY — Fraunces 600 Display + Newsreader Editorial Prose (#17)
   ============================================================ */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  margin-top: 0;
  letter-spacing: -0.02em;
  color: inherit;
}

h1 {
  font-size: clamp(34px, 4.8vw, 54px);
  margin-bottom: 16px;
}

h2 {
  font-size: clamp(25px, 3.2vw, 34px);
  margin: 0 0 14px;
}

.prose h2 { margin-top: 42px; }

h3 {
  font-size: 21px;
  margin: 0 0 8px;
}

.lede {
  font-family: var(--font-reading);
  font-size: 20.5px;
  line-height: 1.62;
  margin: 0 0 22px;
  max-width: 56ch;
  color: #3D3340;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: rgba(255, 253, 249, 0.88);
  color: var(--gold-ink);
  padding: 5px 13px;
  border-radius: 999px;
  border: 1px solid var(--gold-rule);
  text-decoration: none;
  margin-bottom: 16px;
}

/* ============================================================
   PAINTED DAWN HERO (Homepage #16, #17) + STANDARD HEROES
   ============================================================ */
.hero {
  background:
    linear-gradient(180deg, rgba(251, 246, 239, 0.64) 0%, rgba(251, 246, 239, 0.84) 72%, var(--ivory) 100%),
    url('/art/scene-dawn.webp') center 35% / cover no-repeat;
  color: var(--ink);
  border-bottom: 1px solid var(--hairline);
  padding: 50px 0 44px;
}

.hero.compact {
  padding: 40px 0 36px;
}

.hero.night {
  background:
    linear-gradient(180deg, rgba(28, 31, 63, 0.68) 0%, rgba(15, 17, 40, 0.86) 100%),
    url('/art/scene-night.webp') center bottom / cover no-repeat;
  color: var(--starlight);
  border-bottom: 1px solid rgba(255, 241, 208, 0.14);
}

.hero.night .eyebrow {
  background: rgba(255, 241, 208, 0.14);
  color: var(--dawn-gold);
  border-color: rgba(255, 241, 208, 0.25);
}

.hero.night .lede,
.hero.night .breadcrumbs,
.hero.night .breadcrumbs a,
.hero.night a {
  color: var(--starlight);
}

/* Full-bleed Painted Dawn Hero on Homepage (#16) — painted sky above, sunlit olive hills below */
.hero-painted {
  position: relative;
  min-height: 660px;
  padding: 110px 0 64px;
  display: flex;
  align-items: center;
  background-color: #EBCDBB;
  background-image:
    radial-gradient(ellipse 68% 72% at 28% 48%, rgba(251, 246, 239, 0.56) 0%, rgba(251, 246, 239, 0.14) 62%, transparent 100%),
    linear-gradient(180deg, rgba(251, 246, 239, 0.22) 0%, rgba(251, 246, 239, 0.04) 52%, rgba(46, 38, 48, 0.14) 100%),
    url('/art/scene-dawn.webp');
  background-size: cover;
  background-position: center 24%;
  border-bottom: 1px solid var(--hairline);
  color: var(--ink);
}

.hero-painted-grid {
  display: grid;
  grid-template-columns: 1.24fr 0.76fr;
  gap: 36px;
  align-items: center;
}

.painted-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(40px, 6.2vw, 80px);
  line-height: 1.03;
  letter-spacing: -0.025em;
  margin: 0 0 18px;
  color: var(--indigo);
  text-shadow: 0 2px 26px rgba(251, 246, 239, 0.85);
}

.painted-title em {
  font-style: italic;
  font-weight: 500;
  color: var(--gold-ink);
}

.hero-painted .lede {
  font-size: 21px;
  line-height: 1.54;
  max-width: 44ch;
  color: var(--indigo);
  text-shadow: 0 1px 18px rgba(251, 246, 239, 0.92);
  margin: 0 0 22px;
}

.hero-phone-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-phone {
  width: 100%;
  max-width: 288px;
  border-radius: 30px;
  filter: drop-shadow(0 24px 44px rgba(28, 31, 63, 0.34));
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 36px;
  align-items: center;
}

.hero-plate {
  border-radius: 999px 999px 14px 14px;
  border: 1px solid var(--gold-rule);
  box-shadow: 0 18px 42px rgba(28, 31, 63, 0.18);
  overflow: hidden;
  background: var(--parchment);
  max-width: 340px;
  margin-left: auto;
}

.hero-plate img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  object-position: center 62%;
}

.hero-meta {
  font-family: var(--font-ui);
  font-size: 13.5px;
  font-weight: 600;
  margin: 16px 0 0;
  color: var(--indigo);
  background: rgba(251, 246, 239, 0.76);
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
}

/* ============================================================
   BADGES + DESKTOP QR INSTALL WIDGET (60px Play Badge #7)
   ============================================================ */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 16px;
  margin: 18px 0 8px;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  align-items: center;
  margin: 18px 0 8px;
}

.cta-row .badges { margin: 0; }

.badges a {
  display: inline-block;
  line-height: 0;
}

.badges img {
  height: 56px;
  width: auto;
  border-radius: 9px;
}

.hero-painted .badges img,
.soft-wall .badges img,
.night-band .badges img {
  height: 60px;
}

.ios-note {
  font-family: var(--font-ui);
  display: inline-flex;
  align-items: center;
  padding: 8px 13px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--indigo);
  background: rgba(255, 253, 249, 0.90);
  border: 1px solid var(--hairline-strong);
  white-space: nowrap;
}

.soft-wall .ios-note,
.night-band .ios-note,
.hero.night .ios-note {
  color: var(--starlight);
  background: rgba(255, 241, 208, 0.10);
  border-color: rgba(255, 241, 208, 0.25);
}

.qr-install {
  font-family: var(--font-ui);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 253, 249, 0.96);
  color: var(--indigo);
  border: 1px solid var(--hairline-strong);
  border-radius: 12px;
  padding: 5px 12px 5px 6px;
  box-shadow: var(--shadow-soft);
}

.qr-install img {
  width: 52px;
  height: 52px;
  border-radius: 6px;
  display: block;
}

.qr-caption {
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  max-width: 11ch;
}

/* ============================================================
   SECTIONS — Book-of-Hours Pacing (Ivory / Parchment / Indigo Night)
   ============================================================ */
.section {
  padding: 64px 0;
}

.section-alt {
  background: var(--parchment);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}

.section-head-centered {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 36px;
}

.section-head-centered p {
  color: var(--ink-soft);
  margin: 0;
}

/* Gold rule divider */
.gold-rule {
  width: 68px;
  height: 1px;
  background: var(--gold-rule);
  border: 0;
  margin: 18px auto;
}

/* Full-bleed Deep Indigo Night Band (#8, #19) — starlight moon sky */
.night-band {
  position: relative;
  background:
    linear-gradient(100deg, rgba(15, 17, 40, 0.82) 0%, rgba(28, 31, 63, 0.62) 56%, rgba(15, 17, 40, 0.36) 100%),
    url('/art/scene-night.webp') center 24% / cover no-repeat;
  background-color: var(--indigo);
  color: var(--starlight);
  border-top: 1px solid rgba(255, 241, 208, 0.14);
  border-bottom: 1px solid rgba(255, 241, 208, 0.14);
  padding: 76px 0;
}

.night-band h2 {
  color: var(--dawn-gold);
  font-size: clamp(28px, 4.2vw, 44px);
  margin-bottom: 14px;
}

.night-band .eyebrow {
  background: rgba(255, 241, 208, 0.12);
  color: var(--dawn-gold);
  border-color: rgba(255, 241, 208, 0.28);
}

.night-band p { color: rgba(255, 241, 208, 0.92); }
.night-band a:not(.btn) { color: var(--dawn-gold); }

.night-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.night-quote-card {
  background: rgba(15, 17, 40, 0.76);
  border: 1px solid rgba(235, 194, 126, 0.30);
  border-radius: 18px;
  padding: 28px;
  backdrop-filter: blur(8px);
}

.night-quote-card .kicker {
  font-family: var(--font-ui);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--dawn-gold);
  margin: 0 0 8px;
}

.night-quote-card h3 { color: var(--starlight); font-size: 24px; margin-bottom: 12px; }
.night-quote-card .audio-bar { background: rgba(255, 241, 208, 0.08); border-color: rgba(255, 241, 208, 0.22); }
.night-quote-card .audio-bar .btn { background: var(--dawn-gold); color: var(--indigo); border-color: var(--dawn-gold); }
.night-quote-card .audio-bar .btn:hover { background: #f2cf94; color: var(--indigo); }
.night-quote-card .audio-meta { color: var(--starlight); }
.night-quote-card .audio-progress { background: rgba(255, 241, 208, 0.22); }
.night-quote-card .audio-wall { border-top-color: rgba(255, 241, 208, 0.20); color: var(--starlight); }

/* ============================================================
   WOMEN OF THE BIBLE ARCHED PORTRAIT GALLERY (#20)
   ============================================================ */
.arch-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px 22px;
}

.arch-card {
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.2s ease;
}

.arch-card:hover { transform: translateY(-4px); color: var(--indigo); }

.arch-frame {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 999px 999px 12px 12px;
  overflow: hidden;
  border: 1px solid var(--gold-rule);
  box-shadow: 0 12px 28px rgba(28, 31, 63, 0.12);
  background: var(--ivory);
  margin-bottom: 14px;
}

.arch-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 65%;
  transform: scale(1.16);
  transform-origin: center 68%;
  transition: transform 0.35s ease;
}

.arch-card:hover .arch-frame img {
  transform: scale(1.22);
}

.arch-ref {
  font-family: var(--font-ui);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold-ink);
  margin-bottom: 4px;
}

.arch-card h3 {
  font-family: var(--font-display);
  font-size: 21px;
  margin: 0 0 4px;
  color: var(--indigo);
}

.arch-card p {
  font-family: var(--font-reading);
  font-size: 15.5px;
  line-height: 1.45;
  color: var(--ink-soft);
  margin: 0;
  max-width: 24ch;
}

/* ============================================================
   HORIZONTAL JOURNEY RAIL (#8)
   ============================================================ */
.rail {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 6px 2px 18px;
  -webkit-overflow-scrolling: touch;
}

.rail::-webkit-scrollbar { height: 7px; }
.rail::-webkit-scrollbar-track { background: rgba(46, 38, 48, 0.08); border-radius: 999px; }
.rail::-webkit-scrollbar-thumb { background: var(--rose); border-radius: 999px; }

.rail-card {
  flex: 0 0 286px;
  scroll-snap-align: start;
  background: var(--card-bg);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.rail-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  color: var(--indigo);
}

.rail-card p {
  font-family: var(--font-reading);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink-soft);
  margin: 0;
}

/* ============================================================
   BOOK-OF-HOURS PRAYER CARD & SHARED PRAYER LETTER (#2, #3, #4, #17, #19)
   ============================================================ */
.reading-card {
  position: relative;
  overflow: hidden;
  background: var(--card-bg);
  border: 1px solid var(--gold-rule);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
  padding: 36px 38px 32px;
  margin: 24px 0;
}

.reading-card .kicker {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--gold-ink);
  margin: 0 0 8px;
}

.reading-card h3 {
  font-size: 28px;
  margin-bottom: 18px;
  color: var(--indigo);
}

/* Centered italic verse between thin gold rules (Book of Hours) */
.verse-quote {
  margin: 20px 0 24px;
  padding: 18px 20px;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--gold-rule);
  border-bottom: 1px solid var(--gold-rule);
  text-align: center;
}

.verse-quote p {
  font-family: var(--font-reading);
  font-size: 20px;
  line-height: 1.62;
  margin: 0 0 8px;
  font-style: italic;
  color: var(--ink);
}

.verse-quote cite {
  font-family: var(--font-ui);
  font-style: normal;
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-ink);
}

.reading-body {
  font-family: var(--font-reading);
  font-size: 19.5px;
  line-height: 1.75;
}

.reading-body p {
  margin: 0 0 16px;
  color: var(--ink);
}

/* Subtle Fraunces drop cap in rose on devotional prayers */
.book-dropcap p:first-child::first-letter {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 3.3em;
  line-height: 0.82;
  float: left;
  padding: 3px 5px 0 0;
  color: var(--rose-deep);
}

/* Full-bleed Painted Letter Hero for /p/... shared links (#2) */
.letter-hero {
  position: relative;
  min-height: 315px;
  display: flex;
  align-items: flex-start;
  padding: 40px 0 76px;
  background-color: #EBCDBB;
  background-image:
    linear-gradient(180deg, rgba(251, 246, 239, 0.44) 0%, rgba(251, 246, 239, 0.14) 55%, rgba(46, 38, 48, 0.24) 100%),
    url('/art/scene-dawn.webp');
  background-size: cover;
  background-position: center 34%;
  border-bottom: 1px solid var(--hairline);
  color: var(--indigo);
}

.letter-hero[data-scene="day"] {
  background-image:
    linear-gradient(180deg, rgba(251, 246, 239, 0.48) 0%, rgba(251, 246, 239, 0.16) 55%, rgba(46, 38, 48, 0.20) 100%),
    url('/art/scene-day.webp');
}

.letter-hero[data-scene="dusk"] {
  background-image:
    linear-gradient(180deg, rgba(28, 31, 63, 0.54) 0%, rgba(28, 31, 63, 0.24) 60%, rgba(15, 17, 40, 0.56) 100%),
    url('/art/scene-dusk.webp');
  color: var(--starlight);
}

.letter-hero[data-scene="night"] {
  background-image:
    linear-gradient(180deg, rgba(15, 17, 40, 0.42) 0%, rgba(15, 17, 40, 0.16) 58%, rgba(15, 17, 40, 0.58) 100%),
    url('/art/scene-night.webp');
  color: var(--starlight);
}

.letter-sender {
  font-family: var(--font-ui);
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  background: rgba(255, 253, 249, 0.90);
  color: var(--gold-ink);
  border: 1px solid var(--gold-rule);
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.letter-hero[data-scene="night"] .letter-sender,
.letter-hero[data-scene="dusk"] .letter-sender {
  background: rgba(255, 241, 208, 0.16);
  color: var(--dawn-gold);
  border-color: rgba(255, 241, 208, 0.30);
}

.letter-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0;
  max-width: 22ch;
}

.letter-sheet-wrap {
  position: relative;
  z-index: 5;
  margin-top: -50px;
  padding-bottom: 48px;
}

.letter-sheet {
  position: relative;
  overflow: hidden;
  background: var(--card-bg);
  border: 1px solid var(--gold-rule);
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(28, 31, 63, 0.12);
  padding: 38px 36px 32px;
}

/* Warm translucent gold wash blooming on Amen (#4) */
.letter-sheet::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 95%, rgba(235, 194, 126, 0.42) 0%, rgba(217, 142, 138, 0.16) 48%, transparent 76%);
  opacity: 0;
  transform: scale(0.88);
  transition: opacity 0.85s ease, transform 0.95s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.letter-sheet.amen-bloom::before {
  opacity: 1;
  transform: scale(1);
}

.letter-sheet > * { position: relative; z-index: 1; }

.letter-body {
  font-family: var(--font-reading);
  font-size: 21px;
  line-height: 1.76;
  color: var(--ink);
}

.letter-body p { margin: 0 0 18px; }
.letter-body p:last-child { margin-bottom: 0; }

/* Full-width 56px Rose Amen button (#4, #19 — #2E2630 on #D98E8A = 5.3:1 AA!) */
.btn-amen-hero {
  font-family: var(--font-ui);
  width: 100%;
  min-height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 700;
  background: var(--rose);
  color: var(--ink);
  border: 1px solid rgba(46, 38, 48, 0.16);
  border-radius: 999px;
  cursor: pointer;
  margin-top: 24px;
  box-shadow: 0 6px 20px rgba(217, 142, 138, 0.34);
  transition: background 0.25s ease, transform 0.14s ease, box-shadow 0.25s ease;
}

.btn-amen-hero:hover { background: #cf807c; transform: translateY(-1px); }

.btn-amen-hero.prayed {
  background: var(--dawn-gold);
  color: var(--indigo);
  box-shadow: 0 8px 24px rgba(235, 194, 126, 0.45);
}

/* Reciprocal Spouse Loop revealed after Amen (#4) */
.spouse-loop {
  display: none;
  margin-top: 20px;
  padding: 22px 24px;
  background: var(--parchment);
  border: 1px solid var(--gold-rule);
  border-radius: 16px;
  text-align: center;
  animation: fadeSlideUp 0.45s ease both;
}

.spouse-loop.show { display: block; }
.spouse-loop p { margin: 0 0 14px; font-size: 17px; color: var(--ink); }

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   BUTTONS & AUDIO PLAYERS (Round 56px Full Player + 30s Preview)
   ============================================================ */
.btn {
  font-family: var(--font-ui);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--indigo);
  color: var(--starlight);
  border: 1px solid var(--indigo);
  border-radius: 999px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.12s ease;
}

.btn:hover { background: #2c315e; color: var(--starlight); transform: translateY(-1px); }

.btn-secondary {
  background: var(--card-bg);
  color: var(--indigo);
  border-color: var(--hairline-strong);
}

.btn-secondary:hover { background: var(--blush); color: var(--indigo); border-color: var(--rose); }

/* Warm Rose Amen button on library cards (#19) */
.btn-rose {
  background: var(--rose);
  color: var(--ink);
  border-color: rgba(46, 38, 48, 0.14);
}

.btn-rose:hover { background: #cf807c; color: var(--ink); }

.btn-rose.prayed {
  background: var(--dawn-gold);
  color: var(--indigo);
  border-color: var(--gold-rule);
}

.audio-bar {
  font-family: var(--font-ui);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  background: var(--parchment);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  padding: 12px 15px;
  margin: 18px 0 22px;
}

.audio-bar.audio-full {
  background: var(--ivory);
  border-color: var(--gold-rule);
  padding: 14px 18px;
  gap: 16px;
}

.play-circle {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  border: 0;
  background: var(--indigo);
  color: var(--starlight);
  box-shadow: 0 6px 18px rgba(28, 31, 63, 0.24);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.12s ease, background 0.15s ease;
}

.play-circle:hover { background: #2c315e; transform: scale(1.03); }
.play-circle svg { width: 22px; height: 22px; fill: currentColor; }

.audio-meta {
  flex: 1;
  min-width: 170px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-soft);
}

.audio-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}

.audio-time {
  font-variant-numeric: tabular-nums;
  font-size: 12.5px;
  color: var(--gold-ink);
}

.audio-progress {
  height: 6px;
  background: rgba(28, 31, 63, 0.12);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 8px;
  cursor: pointer;
}

.audio-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--rose-deep), var(--gold-ink));
  transition: width 0.15s linear;
}

.audio-wall {
  display: none;
  width: 100%;
  padding-top: 10px;
  border-top: 1px solid var(--hairline);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.audio-wall.show { display: block; }

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
  align-items: center;
}

.letter-secondary-actions {
  font-family: var(--font-ui);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--hairline);
  font-size: 14px;
  font-weight: 600;
}

/* ============================================================
   EDITORIAL ARTICLE ELEMENTS (Guides & FAQ — #9, #17)
   ============================================================ */
.article-plate {
  margin: 0 0 30px;
  border-radius: 18px;
  border: 1px solid var(--gold-rule);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  background: var(--parchment);
}

.article-plate img {
  width: 100%;
  max-height: 330px;
  object-fit: cover;
  object-position: center 58%;
}

.article-plate figcaption {
  font-family: var(--font-ui);
  padding: 11px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  border-top: 1px solid var(--hairline);
  background: var(--card-bg);
}

/* Pull-quote Short Answer with thick rose-gold rule (#9) */
.verdict-card {
  background: transparent;
  border: 0;
  border-left: 4px solid var(--rose-deep);
  border-radius: 0;
  box-shadow: none;
  padding: 6px 0 6px 24px;
  margin: 28px 0 34px;
}

.verdict-kicker {
  font-family: var(--font-ui);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold-ink);
  margin: 0 0 8px;
}

.verdict-card p:not(.verdict-kicker) {
  font-family: var(--font-reading);
  font-size: 21px;
  line-height: 1.56;
  color: var(--indigo);
  margin: 0 0 18px;
}

.prose p { margin: 0 0 18px; max-width: 64ch; }
.prose ul { margin: 0 0 20px; padding-left: 22px; max-width: 64ch; }
.prose li { margin-bottom: 8px; }

/* FAQ list with quiet hairline rules */
.faq-list {
  margin: 26px 0 34px;
  border-top: 1px solid var(--gold-rule);
}

.faq-item {
  padding: 22px 0;
  border-bottom: 1px solid var(--hairline);
}

.faq-item h2,
.faq-item h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 21px;
  margin: 0 0 8px;
  color: var(--indigo);
}

.faq-item p { margin: 0; color: var(--ink-soft); max-width: 64ch; }

/* Expandable Facts Drawer (Homepage #8) + Facts Spec Sheet */
.facts-drawer {
  background: var(--card-bg);
  border: 1px solid var(--gold-rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.facts-drawer summary {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 21px;
  color: var(--indigo);
  list-style: none;
  cursor: pointer;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--parchment);
}

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

.facts-drawer summary::after {
  content: '+';
  font-family: var(--font-ui);
  font-size: 20px;
  font-weight: 700;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--gold-rule);
  background: var(--card-bg);
  color: var(--gold-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.facts-drawer[open] summary { border-bottom: 1px solid var(--hairline); }
.facts-drawer[open] summary::after { content: '–'; }
.facts-drawer .facts-inner { padding: 14px 24px 24px; }

.facts {
  background: var(--card-bg);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 24px 26px;
  margin: 30px 0;
}

.facts h2 { margin-top: 0; font-size: 24px; color: var(--indigo); }
.facts dl, .facts-drawer dl { margin: 0; font-family: var(--font-ui); }
.fact-row {
  display: grid;
  grid-template-columns: 185px 1fr;
  gap: 14px;
  padding: 11px 0;
  border-top: 1px solid var(--hairline);
}
.fact-row:first-child { border-top: 0; padding-top: 4px; }
.fact-row dt { font-weight: 700; color: var(--ink); font-size: 14.5px; }
.fact-row dd { margin: 0; color: var(--ink-soft); font-size: 15px; line-height: 1.55; }

/* Tables — desktop clean, phone stacked rows (#9) */
.table-wrap {
  font-family: var(--font-ui);
  margin: 26px 0 32px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--card-bg);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}

caption {
  text-align: left;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  padding: 14px 16px;
  background: var(--parchment);
  border-bottom: 1px solid var(--hairline);
  color: var(--indigo);
}

th, td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--hairline);
  vertical-align: top;
}

th { background: var(--ivory); font-weight: 700; color: var(--ink); }
tr:last-child td { border-bottom: 0; }

/* Grids & Cards */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.prayers-featured {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  margin-bottom: 22px;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card-link {
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.card-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: var(--gold-rule);
  color: var(--indigo);
}

.card-img {
  border-radius: 12px;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  width: 100%;
}

.card-img-wide {
  border-radius: 12px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center 62%;
  width: 100%;
}

.card-tag {
  font-family: var(--font-ui);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold-ink);
}

.card p { margin: 0; color: var(--ink-soft); font-size: 16px; line-height: 1.55; }

.card-opening {
  font-family: var(--font-reading);
  font-style: italic;
  color: var(--ink) !important;
  font-size: 17px !important;
  line-height: 1.55;
  border-left: 2px solid var(--rose);
  padding-left: 12px;
  margin-top: 2px !important;
}

/* Soft wall CTA — Painted Night Sky (Indigo + Starlight + Dawn Gold) */
.soft-wall {
  background:
    radial-gradient(ellipse 65% 80% at 90% 10%, rgba(143, 131, 179, 0.24), transparent 60%),
    linear-gradient(160deg, var(--indigo) 0%, var(--deep-night) 100%);
  color: var(--starlight);
  border: 1px solid rgba(255, 241, 208, 0.14);
  border-radius: 18px;
  box-shadow: 0 16px 40px rgba(15, 17, 40, 0.20);
  padding: 32px;
  margin: 36px 0;
}

.soft-wall h2, .soft-wall h3 { color: var(--dawn-gold); margin-top: 0; }
.soft-wall p { color: rgba(255, 241, 208, 0.92); margin: 0 0 16px; }
.soft-wall a:not(.btn) { color: var(--dawn-gold); }

/* Breadcrumbs & Navigation links */
.breadcrumbs {
  font-family: var(--font-ui);
  font-size: 13.5px;
  font-weight: 600;
  margin: 0 0 14px;
  color: var(--ink-soft);
}

.breadcrumbs a { color: var(--ink-soft); text-decoration: none; }
.breadcrumbs a:hover { color: var(--indigo); text-decoration: underline; }

.link-list {
  font-family: var(--font-ui);
  list-style: none;
  padding: 0;
  margin: 14px 0 26px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(225px, 1fr));
  gap: 8px 18px;
}

.link-list li a {
  display: block;
  padding: 7px 0;
  font-weight: 600;
  font-size: 14.5px;
  text-decoration: none;
  border-bottom: 1px solid var(--hairline);
}

.link-list li a:hover { color: var(--indigo); border-bottom-color: var(--rose-deep); }

/* Language pills live in footer (#6) */
.lang-bar {
  font-family: var(--font-ui);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

.lang-pill {
  font-size: 13px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--hairline-strong);
  background: var(--card-bg);
  color: var(--indigo);
  text-decoration: none;
}

.lang-pill.active,
.lang-pill:hover {
  background: var(--indigo);
  border-color: var(--indigo);
  color: var(--starlight);
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  font-family: var(--font-ui);
  border-top: 1px solid var(--hairline);
  background: var(--parchment);
  padding: 44px 0 50px;
  margin-top: 56px;
  font-size: 14px;
  color: var(--ink-soft);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 30px;
}

footer h4 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15.5px;
  margin: 0 0 10px;
  color: var(--indigo);
}

footer ul { list-style: none; padding: 0; margin: 0; }
footer li { margin-bottom: 7px; }
footer a { color: var(--ink); text-decoration: none; font-weight: 600; }
footer a:hover { color: var(--gold-ink); text-decoration: underline; }

.footer-langs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
  border-top: 1px solid var(--hairline);
}

.footer-langs-label {
  font-weight: 700;
  color: var(--indigo);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.footer-bottom {
  border-top: 1px solid var(--hairline);
  padding-top: 18px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

/* ============================================================
   RESPONSIVE — Crisp 56px Mobile Header, Stacked Tables, 2-col Arches
   ============================================================ */
@media (max-width: 960px) {
  .arch-gallery { grid-template-columns: repeat(2, 1fr); gap: 24px 18px; }
}

@media (max-width: 820px) {
  .wrap, .wrap-narrow { padding: 0 18px; }

  .site-header .inner {
    height: 56px;
    padding: 0 14px;
    gap: 10px;
  }

  .brand img { width: 30px; height: 30px; border-radius: 8px; }
  .brand-name { font-size: 16.5px; }
  .brand-sub { display: none; }

  .nav-cta {
    padding: 6px 12px;
    font-size: 12.5px;
  }

  .nav-toggle { display: inline-flex; }

  .site-nav {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: var(--ivory);
    border-bottom: 1px solid var(--hairline-strong);
    padding: 12px 18px 18px;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    box-shadow: 0 14px 32px rgba(28, 31, 63, 0.14);
  }

  .site-nav.open { display: flex; }

  .site-nav a {
    width: 100%;
    padding: 11px 2px;
    font-size: 16px;
    border-bottom: 1px solid var(--hairline);
  }

  .site-nav a:last-child { border-bottom: 0; }

  .hero-painted { min-height: auto; padding: 84px 0 42px; background-position: center 30%; }
  .hero-painted-grid,
  .hero-grid,
  .night-grid,
  .grid-3,
  .grid-2,
  .prayers-featured,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-phone { max-width: 248px; margin-top: 8px; }
  .hero-plate { margin-left: 0; max-width: 280px; }
  .qr-install { display: none; }
  .fact-row { grid-template-columns: 1fr; gap: 4px; }

  .reading-card { padding: 26px 22px 24px; }
  .letter-hero { min-height: 235px; padding: 28px 0 62px; }
  .letter-sheet { padding: 26px 22px 24px; }
  .letter-body { font-size: 20px; }
}

/* Stack comparison tables into labelled rows on phones (#9) */
@media (max-width: 680px) {
  .table-wrap { border: 0; background: transparent; box-shadow: none; }
  table, thead, tbody, tr, td { display: block; width: 100%; }
  thead { display: none; }
  caption {
    display: block;
    border: 1px solid var(--hairline-strong);
    border-radius: 12px 12px 0 0;
  }
  tr {
    background: var(--card-bg);
    border: 1px solid var(--hairline-strong);
    border-radius: 12px;
    margin-top: 12px;
    padding: 10px 14px;
    box-shadow: var(--shadow-soft);
  }
  td { border-bottom: 1px solid var(--hairline); padding: 8px 0; }
  td:last-child { border-bottom: 0; }
  td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gold-ink);
    margin-bottom: 2px;
  }
}
