/* Shared styles for every page on sabbathgospel.com. */

:root {
  --bg: #f6f1e7;
  --ink: #2a241c;
  --muted: #6f6353;
  --accent: #a9804a;
  --accent-ink: #7d5a2b;
  --card: #fbf8f1;
  --line: rgba(42, 36, 28, 0.12);
  --glow: rgba(214, 178, 120, 0.35);
  --wash: rgba(169, 128, 74, 0.07);
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14120f;
    --ink: #efe7da;
    --muted: #a89c87;
    --accent: #c9a26b;
    --accent-ink: #d8b583;
    --card: #1c1915;
    --line: rgba(239, 231, 218, 0.12);
    --glow: rgba(201, 162, 107, 0.14);
    --wash: rgba(201, 162, 107, 0.07);
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
main { flex: 1; }

::selection { background: var(--glow); }

a {
  color: var(--accent-ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover { text-decoration-thickness: 2px; }

strong { font-weight: 600; }
em { font-style: italic; }

.label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent-ink);
}

/* ---------- Site header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  white-space: nowrap;
}
.brand svg { width: 26px; height: 26px; color: var(--accent); flex: none; }
.site-nav ul {
  list-style: none;
  display: flex;
  gap: 4px 22px;
  flex-wrap: wrap;
}
.site-nav a {
  display: inline-block;
  padding: 4px 0;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 500;
  border-bottom: 1px solid transparent;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}
@media (max-width: 560px) {
  .site-header { position: static; }
  .site-header .inner { flex-direction: column; align-items: flex-start; }
  .site-nav ul { gap: 2px 18px; }
}

/* ---------- Site footer ---------- */
.site-footer {
  margin-top: 96px;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--muted);
}
.site-footer .inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 32px 20px 44px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 32px;
}
.site-footer ul { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.site-footer a { color: var(--muted); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  text-align: center;
  padding: 72px 20px 48px;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 70% at 50% 40%, var(--glow), transparent 70%);
  pointer-events: none;
  z-index: -1;
}
.hero .mark { width: 44px; height: 44px; color: var(--accent); margin-bottom: 28px; }
.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.7rem, 9vw, 4.9rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin-top: 18px;
}
.hero .mark + h1 { margin-top: 0; }
.rule {
  width: 64px;
  height: 1px;
  background: var(--accent);
  margin: 30px auto;
  opacity: 0.7;
}
.lede {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.3rem, 3.4vw, 1.65rem);
  line-height: 1.4;
  max-width: 32ch;
  margin: 0 auto;
}

/* ---------- Home: topic grid ---------- */
.home-section {
  max-width: 1040px;
  margin: 0 auto;
  padding: 24px 20px 0;
}
.home-section > .label { display: block; margin-bottom: 18px; }
.topics {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}
.topic {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 26px 24px 24px;
  transition: border-color .2s ease, transform .2s ease;
}
.topic:hover { border-color: var(--accent); transform: translateY(-2px); }
.topic h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.9rem;
  line-height: 1.1;
  margin: 10px 0 10px;
}
.topic h2 a { color: var(--ink); text-decoration: none; }
.topic h2 a::after { content: ""; position: absolute; inset: 0; border-radius: 16px; }
.topic p { color: var(--muted); font-size: 0.98rem; line-height: 1.6; flex: 1; }
.topic .more {
  margin-top: 18px;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-ink);
}
.topic .more.pending { color: var(--muted); }
.about {
  max-width: 640px;
  margin: 72px auto 0;
  padding: 0 20px;
  text-align: center;
}
.about p { color: var(--muted); }
.about .label { display: block; margin-bottom: 12px; }

/* ---------- Article layout ---------- */
.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
}
.wrap p + p { margin-top: 1.1em; }
.intro { font-size: 1.12rem; }

.breadcrumb { font-size: 0.8rem; color: var(--muted); }
.breadcrumb a { color: var(--muted); }

/* Contents: one list, each part with a one-line summary */
.contents {
  margin-top: 44px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 26px 18px;
}
.contents > h2 { margin-bottom: 8px; }
.contents > ol {
  list-style: none;
  counter-reset: c;
}
.contents > ol > li {
  counter-increment: c;
  position: relative;
  padding: 14px 0 14px 42px;
  border-top: 1px solid var(--line);
}
.contents > ol > li:first-child { border-top: 0; }
.contents > ol > li::before {
  content: counter(c);
  position: absolute;
  left: 0;
  top: 9px;
  width: 28px;
  text-align: right;
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 500;
  font-feature-settings: "lnum";
  color: var(--accent);
}
.contents a.part {
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}
.contents a.part:hover { color: var(--accent-ink); }
.contents .summary {
  display: block;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
  margin-top: 2px;
}
.contents .sub {
  list-style: none;
  margin-top: 10px;
  display: grid;
  gap: 6px;
  font-size: 0.93rem;
  line-height: 1.5;
}
.contents .sub li { position: relative; padding-left: 16px; }
.contents .sub li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 1px;
  background: var(--accent);
}
.contents .sub a { color: var(--ink); text-decoration: none; font-weight: 500; }
.contents .sub a:hover { color: var(--accent-ink); }
.contents .sub span { color: var(--muted); }

/* Sections */
section { padding-top: 72px; }
section h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.9rem, 5vw, 2.5rem);
  line-height: 1.12;
  margin-bottom: 22px;
  scroll-margin-top: 90px;
}
section h2 .num {
  display: block;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin-bottom: 10px;
}
h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.45rem;
  line-height: 1.25;
  margin: 34px 0 12px;
}

/* Scripture */
blockquote.verse {
  margin: 28px 0;
  padding: 2px 0 2px 22px;
  border-left: 2px solid var(--accent);
}
blockquote.verse p {
  font-family: var(--serif);
  font-size: 1.34rem;
  line-height: 1.45;
}
blockquote.verse cite {
  display: block;
  margin-top: 10px;
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-ink);
}

/* Lists inside sections */
.points, .reasons {
  margin: 22px 0;
  display: grid;
  gap: 14px;
}
.points { list-style: none; }
.points li {
  position: relative;
  padding-left: 22px;
}
.points li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.72em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
.reasons {
  list-style: none;
  counter-reset: r;
}
.reasons li {
  counter-increment: r;
  position: relative;
  padding-left: 40px;
}
.reasons li::before {
  content: counter(r);
  position: absolute;
  left: 0;
  top: 2px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  color: var(--accent-ink);
  font-size: 0.8rem;
  font-weight: 500;
  display: grid;
  place-items: center;
  line-height: 1;
}

.callout {
  margin: 30px 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px 24px;
}

/* Objections */
.objection {
  margin-top: 48px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 90px;
}
.tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.tag.claim { color: var(--muted); border: 1px solid var(--line); }
.tag.answer { color: var(--accent-ink); background: var(--wash); border: 1px solid transparent; margin-top: 22px; }
.claim-text {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.5rem;
  line-height: 1.35;
}
.verdict { font-weight: 600; }

.fact-list { margin: 22px 0; display: grid; gap: 16px; list-style: none; }
.fact-list li {
  background: var(--wash);
  border-radius: 12px;
  padding: 16px 20px;
}

/* Closing */
.closing {
  text-align: center;
  padding: 40px 0 8px;
}
.closing blockquote p {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 6vw, 2.8rem);
  line-height: 1.15;
}
.closing cite {
  display: block;
  margin-top: 14px;
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-ink);
}

/* Placeholder pages */
.pending-note {
  text-align: center;
  color: var(--muted);
}
.pending-note p + p { margin-top: 1em; }

.to-top {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--accent-ink);
  display: grid;
  place-items: center;
  text-decoration: none;
  font-size: 1.1rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

@media (max-width: 480px) {
  body { font-size: 1rem; }
  .hero { padding-top: 48px; }
  .contents { padding: 22px 18px 12px; }
  blockquote.verse { padding-left: 16px; }
  blockquote.verse p { font-size: 1.24rem; }
  .claim-text { font-size: 1.32rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .topic { transition: none; }
  .topic:hover { transform: none; }
}

@media print {
  .site-header, .site-nav, .to-top { display: none; }
  body { background: #fff; color: #000; }
  section { padding-top: 32px; }
}
