:root {
  --bg: #f8f4ec;
  --surface: #fffdf8;
  --ink: #1f2330;
  --muted: #5d6170;
  --line: #e6dfd1;
  --deep: #1e2c46;
  --deep-2: #2c4066;
  --gold: #b8812f;
  --gold-soft: #f1e3c8;
  --ok: #2f6b4f;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(30,44,70,.06), 0 8px 30px rgba(30,44,70,.07);
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12161f; --surface: #1a2030; --ink: #ece7dc; --muted: #a3a7b4; --line: #2a3246;
    --deep: #0c1220; --deep-2: #24375a; --gold: #d9a456; --gold-soft: #3a3020; --ok: #6fbf95;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 30px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--gold); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; letter-spacing: -.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.3rem, 6vw, 4rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.eyebrow { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); font-weight: 600; margin-bottom: .8em; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 1.3rem; font-weight: 600; color: var(--ink); text-decoration: none; }
.logo svg { width: 30px; height: 30px; }
.nav { display: flex; gap: 4px; align-items: center; }
.nav a { color: var(--ink); text-decoration: none; padding: 8px 12px; border-radius: 10px; font-size: .95rem; font-weight: 500; }
.nav a:hover, .nav a.active { background: var(--gold-soft); }
.nav .btn { margin-left: 8px; }
.menu-btn { display: none; background: none; border: 0; color: var(--ink); padding: 8px; cursor: pointer; }
@media (max-width: 860px) {
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; top: 66px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--surface); border-bottom: 1px solid var(--line); padding: 12px 20px 20px; }
  .nav.open { display: flex; }
  .nav .btn { margin: 8px 0 0; text-align: center; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border-radius: 999px; font: 600 .98rem var(--sans); text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: transform .15s, background .15s; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--gold); color: #fff; }
.btn-dark { background: var(--deep); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-light { background: #fff; color: var(--deep); }
.btn[disabled] { opacity: .6; cursor: default; transform: none; }

/* Hero */
.hero { padding: 80px 0 70px; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: -40% -20% auto auto; width: 700px; height: 700px; background: radial-gradient(circle, var(--gold-soft) 0%, transparent 65%); z-index: -1; }
.hero p.lead { font-size: 1.22rem; color: var(--muted); max-width: 600px; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.hero-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } .hero { padding: 48px 0; } }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.live-card { background: linear-gradient(150deg, var(--deep), var(--deep-2)); color: #fff; border: 0; }
.live-card .muted { color: #c6cde0; }
section { padding: 64px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

.verse { text-align: center; padding: 56px 20px; }
.verse blockquote { font: italic 500 clamp(1.35rem, 3vw, 2rem)/1.4 var(--serif); margin: 0 auto 14px; max-width: 820px; }
.verse cite { color: var(--muted); font-style: normal; font-size: .95rem; }

.course { display: flex; flex-direction: column; gap: 8px; }
.course .tag { align-self: flex-start; font-size: .75rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--gold-soft); color: var(--gold); }
.course .tag.free { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.course h3 { margin: 6px 0 2px; }
.course .meta { font-size: .88rem; color: var(--muted); }
.course .foot { margin-top: auto; padding-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.course .price { font: 600 1.35rem var(--serif); }

.features { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.feature .icon { width: 44px; height: 44px; border-radius: 12px; background: var(--gold-soft); color: var(--gold); display: grid; place-items: center; margin-bottom: 12px; }
.feature .icon svg { width: 22px; height: 22px; }

.band { background: var(--deep); color: #fff; border-radius: 28px; padding: 48px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: center; }
.band .muted { color: #c6cde0; }
@media (max-width: 760px) { .band { grid-template-columns: 1fr; padding: 32px 24px; } }
.checks { list-style: none; padding: 0; margin: 0; }
.checks li { padding: 6px 0 6px 30px; position: relative; }
.checks li::before { content: '✓'; position: absolute; left: 0; color: var(--gold); font-weight: 700; }

/* Forms */
label { display: block; font-weight: 600; font-size: .92rem; margin: 14px 0 6px; }
input[type=text], input[type=email], input[type=password], textarea { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: inherit; }
textarea { min-height: 130px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input { margin-top: 5px; }
.hp { position: absolute; left: -9999px; }
.notice { padding: 14px 16px; border-radius: 12px; background: var(--gold-soft); margin: 16px 0; font-size: .95rem; }
.notice.ok { background: color-mix(in srgb, var(--ok) 15%, transparent); }

/* Prayer wall */
.prayer { break-inside: avoid; margin-bottom: 16px; }
.prayer-wall { columns: 3 280px; column-gap: 16px; }
.prayer .who { font-weight: 600; font-size: .92rem; }
.prayer .when { font-size: .8rem; color: var(--muted); }
.prayer button { margin-top: 8px; background: none; border: 1px solid var(--line); color: var(--ink); border-radius: 999px; padding: 6px 14px; font: 500 .85rem var(--sans); cursor: pointer; }
.prayer button.done { background: var(--gold-soft); border-color: transparent; }

/* Course viewer */
.viewer { display: grid; grid-template-columns: 280px 1fr; gap: 28px; align-items: start; }
.lessons { position: sticky; top: 86px; padding: 14px; }
.lessons ol { list-style: none; margin: 0; padding: 0; counter-reset: l; }
.lessons li button { width: 100%; text-align: left; background: none; border: 0; padding: 10px 12px; border-radius: 10px; color: var(--ink); font: 500 .93rem var(--sans); cursor: pointer; display: flex; gap: 10px; }
.lessons li button::before { counter-increment: l; content: counter(l); min-width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; background: var(--line); }
.lessons li button.done::before { content: '✓'; background: var(--ok); color: #fff; }
.lessons li button.active { background: var(--gold-soft); }
.lessons li button.locked { color: var(--muted); }
.lesson-body h3 { margin-top: 1.4em; }
.progress { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; margin: 10px 0 4px; }
.progress div { height: 100%; background: var(--gold); width: 0; transition: width .3s; }
@media (max-width: 860px) { .viewer { grid-template-columns: 1fr; } .lessons { position: static; } }

/* Saarnat */
.sermon-layout { display: grid; grid-template-columns: 1fr 300px; gap: 28px; align-items: start; }
.sermon p { font-size: 1.08rem; }
.prayer-box { margin-top: 28px; padding: 20px 22px; border-left: 3px solid var(--gold); background: var(--gold-soft); border-radius: 0 14px 14px 0; font-style: italic; }
.prayer-box p { margin: 0; }
.archive { position: sticky; top: 86px; padding: 10px; max-height: calc(100vh - 110px); overflow: auto; }
.arch-item { display: block; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--ink); }
.arch-item:hover, .arch-item.active { background: var(--gold-soft); }
.arch-date { display: block; font-size: .78rem; color: var(--muted); text-transform: capitalize; }
.arch-title { display: block; font-weight: 600; }
.arch-ref { display: block; font-size: .82rem; color: var(--muted); }
@media (max-width: 860px) { .sermon-layout { grid-template-columns: 1fr; } .archive { position: static; max-height: none; } }

/* Pricing */
.pricing { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.plan.featured { border: 2px solid var(--gold); }
.plan .amount { font: 600 2.6rem var(--serif); }

.prose h2 { margin-top: 1.6em; font-size: 1.5rem; }
.prose h2:first-child { margin-top: 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 48px 0 32px; margin-top: 40px; font-size: .93rem; }
.site-footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.site-footer a { color: var(--muted); text-decoration: none; display: block; padding: 3px 0; }
.site-footer a:hover { color: var(--ink); }
.site-footer .fine { margin-top: 32px; color: var(--muted); font-size: .82rem; }
@media (max-width: 700px) { .site-footer .cols { grid-template-columns: 1fr; } }

.skeleton { background: linear-gradient(90deg, var(--line), var(--surface), var(--line)); background-size: 200% 100%; animation: sh 1.4s infinite; border-radius: var(--radius); min-height: 220px; }
@keyframes sh { to { background-position: -200% 0; } }
