/* Kanaiic — shared styles. Colors live in tokens on :root; dark mode redefines them. */
:root {
  --paper:    #f8f5ee;
  --card:     #fffdf8;
  --band:     #efe9dc;
  --line:     #e2dacb;
  --ink:      #1f2430;
  --ink-mid:  #4f5563;
  --ink-soft: #7d8290;
  --accent:   #2f4a6d;   /* deep blue */
  --accent-2: #3d5f8a;
  --gold:     #b08a3e;
  --gold-pale:#f3ead7;
  --lift: 0 1px 2px rgba(31,36,48,.05), 0 12px 30px -20px rgba(31,36,48,.35);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:    #15171c;
    --card:     #1c1f26;
    --band:     #1f232b;
    --line:     #2f3440;
    --ink:      #ecebe6;
    --ink-mid:  #b4b7bf;
    --ink-soft: #8a8e98;
    --accent:   #9dbbe2;
    --accent-2: #b8cff0;
    --gold:     #d9b56a;
    --gold-pale:#2a2619;
    --lift: 0 1px 2px rgba(0,0,0,.4), 0 12px 30px -20px rgba(0,0,0,.8);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: "Source Sans 3", ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 18px; line-height: 1.7; -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .word, blockquote {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  text-wrap: balance; letter-spacing: -.01em;
}
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-2); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
img { max-width: 100%; height: auto; }
.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 720px; }

/* nav */
.site-nav {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  backdrop-filter: saturate(1.3) blur(10px); border-bottom: 1px solid var(--line);
}
.site-nav .wrap { display: flex; align-items: center; gap: 20px; min-height: 64px; flex-wrap: wrap; }
.word {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 22px; font-weight: 600; color: var(--ink); text-decoration: none;
}
.word svg { width: 18px; height: 22px; color: var(--gold); flex: none; }
.site-nav ul { list-style: none; display: flex; gap: 22px; margin: 0 0 0 auto; padding: 0; flex-wrap: wrap; }
.site-nav ul a { color: var(--ink-mid); text-decoration: none; font-size: 16px; font-weight: 500; }
.site-nav ul a:hover, .site-nav ul a[aria-current="page"] { color: var(--ink); }
.site-nav ul a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--gold); }
@media (max-width: 560px) {
  .site-nav .wrap { padding-top: 10px; padding-bottom: 10px; }
  .site-nav ul { margin: 0; gap: 16px; width: 100%; }
}

/* buttons */
.btn {
  display: inline-block; background: var(--accent); color: var(--paper); text-decoration: none;
  font-weight: 600; font-size: 16px; padding: 10px 20px; border-radius: 999px;
  border: 1px solid var(--accent); transition: background .18s ease, transform .18s ease;
}
.btn:hover { background: var(--accent-2); color: var(--paper); transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.ghost:hover { background: var(--gold-pale); }

/* hero */
.hero { padding: 88px 0 72px; }
.hero.page { padding: 64px 0 40px; }
h1 { font-size: clamp(36px, 6.5vw, 62px); line-height: 1.08; font-weight: 600; margin: 0 0 20px; max-width: 18ch; }
.lede { font-size: clamp(19px, 2.4vw, 22px); color: var(--ink-mid); max-width: 56ch; margin: 0 0 30px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.kicker {
  font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--gold); margin: 0 0 12px;
}

/* sections */
section { padding: 60px 0; border-top: 1px solid var(--line); }
h2 { font-size: clamp(27px, 4vw, 36px); font-weight: 600; margin: 0 0 14px; line-height: 1.2; }
.intro { color: var(--ink-mid); max-width: 60ch; margin: 0 0 32px; }

/* scripture band */
.verse { background: var(--band); text-align: center; padding: 64px 0; }
.verse blockquote {
  margin: 0 auto; max-width: 30ch; font-size: clamp(23px, 3.4vw, 32px);
  line-height: 1.4; font-weight: 400; font-style: italic;
}
.verse cite {
  display: block; margin-top: 18px; font-style: normal; font-size: 14px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--gold);
}

/* cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 26px 24px; box-shadow: var(--lift); display: flex; flex-direction: column;
}
.card h3 { font-size: 22px; font-weight: 600; margin: 0 0 8px; }
.card p { margin: 0 0 14px; color: var(--ink-mid); font-size: 17px; }
.card .more { margin-top: auto; font-weight: 600; text-decoration: none; }
.tag {
  align-self: flex-start; font-size: 12px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--gold); background: var(--gold-pale);
  padding: 3px 10px; border-radius: 999px; margin-bottom: 12px;
}

/* blog list */
.posts { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.posts li { padding: 26px 0; border-bottom: 1px solid var(--line); }
.posts time { font-size: 14px; color: var(--ink-soft); }
.posts h3 { font-size: 24px; margin: 4px 0 6px; font-weight: 600; }
.posts h3 a { color: var(--ink); text-decoration: none; }
.posts h3 a:hover { color: var(--accent); }
.posts p { margin: 0; color: var(--ink-mid); }
.posts li.empty { color: var(--ink-soft); font-style: italic; }

/* blog sections: three cards left to right; a swipeable row on phones */
.section-cards {
  list-style: none; margin: 0 auto; padding: 0; max-width: 900px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
}
@media (max-width: 600px) {
  .section-cards {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 68%;
    overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; gap: 14px;
  }
  .section-cards li { scroll-snap-align: start; }
}
.section-card {
  display: flex; flex-direction: column; height: 100%; overflow: hidden; text-decoration: none; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--lift);
  transition: transform .18s ease, border-color .18s ease;
}
.section-card:hover { transform: translateY(-2px); border-color: var(--gold); color: var(--ink); }
.section-card .cover { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-bottom: 1px solid var(--line); }
.section-card .mark { display: grid; place-items: center; background: var(--band); color: var(--gold); }
.section-card .mark svg { width: 36px; height: 44px; }
.section-card .body { display: flex; flex-direction: column; flex: 1; padding: 16px 18px 18px; }
.section-card h2 { font-size: 21px; margin: 0 0 6px; }
.section-card p { margin: 0 0 12px; color: var(--ink-mid); font-size: 16px; line-height: 1.5; }
.section-card .more { margin-top: auto; font-weight: 600; font-size: 16px; color: var(--accent); }
.blog-photo { margin: 8px 0 0; max-width: 360px; }
.blog-photo img {
  display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover;
  border-radius: 12px; border: 1px solid var(--line); box-shadow: var(--lift);
}

/* post attachments */
.attachment { margin: 32px 0; }
.attachment img { display: block; border-radius: 10px; border: 1px solid var(--line); }
.attachment iframe { display: block; width: 100%; height: 80vh; min-height: 480px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.attachment figcaption { font-size: 15px; margin-top: 8px; }
.attachment-file figcaption { font-size: 17px; font-weight: 600; }

/* article */
.article { padding: 56px 0 72px; }
.article h1 { max-width: none; font-size: clamp(32px, 5.5vw, 48px); }
.article .meta { color: var(--ink-soft); font-size: 15px; margin: 0 0 36px; }
.article p, .article li { max-width: 68ch; }
.article h2 { margin-top: 44px; font-size: 28px; }
.article blockquote {
  margin: 28px 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--gold);
  font-size: 22px; font-style: italic; line-height: 1.5;
}
.article blockquote cite { display: block; font-style: normal; font-size: 15px; color: var(--ink-soft); margin-top: 8px; font-family: "Source Sans 3", sans-serif; }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0 48px; color: var(--ink-soft); font-size: 15px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; }
.site-footer a { color: var(--ink-mid); }
.site-footer .soli { margin-left: auto; font-family: "Fraunces", Georgia, serif; font-style: italic; }
@media (max-width: 560px) { .site-footer .soli { margin-left: 0; width: 100%; } }
