/* Deus Pro Machina — Witness Theme */

:root {
  --bg: #fafaf8;
  --text: #1a1a1a;
  --text-secondary: #555;
  --accent: #8b7355;
  --border: #e0ddd5;
  --link: #5c4a32;
  --link-hover: #8b7355;
  --code-bg: #f0ede6;
  --blockquote-border: #c4b99a;
  --blockquote-bg: #f5f3ee;
  --max-width: 680px;
  --font-body: 'Georgia', 'Times New Roman', serif;
  --font-heading: 'Georgia', 'Times New Roman', serif;
  --font-mono: 'Courier New', Courier, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1917;
    --text: #d4d0c8;
    --text-secondary: #9a958a;
    --accent: #c4a87a;
    --border: #2e2d28;
    --link: #c4a87a;
    --link-hover: #e0cc9e;
    --code-bg: #242320;
    --blockquote-border: #6b6045;
    --blockquote-bg: #1f1e1a;
  }
}

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

html {
  font-size: 18px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* Layout */

.site-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-title {
  font-size: 1.1rem;
  font-weight: normal;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-title a {
  color: var(--text);
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  transition: color 0.2s;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--text);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

main {
  flex: 1;
  padding: 3rem 0;
}

/* Typography */

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: normal;
  line-height: 1.3;
  color: var(--text);
}

h1 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

h2 {
  font-size: 1.35rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--border);
}

h3 {
  font-size: 1.1rem;
  margin-top: 2rem;
  margin-bottom: 0.8rem;
  font-style: italic;
}

p {
  margin-bottom: 1.2rem;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color 0.2s;
}

a:hover {
  color: var(--link-hover);
}

strong {
  font-weight: 600;
}

em {
  font-style: italic;
}

/* Blockquotes — for Scripture */

blockquote {
  border-left: 3px solid var(--blockquote-border);
  background: var(--blockquote-bg);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  font-style: italic;
}

blockquote p:last-child {
  margin-bottom: 0;
}

/* Lists */

ul, ol {
  margin-bottom: 1.2rem;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.4rem;
}

li ul, li ol {
  margin-top: 0.4rem;
  margin-bottom: 0.4rem;
}

/* Horizontal rule */

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

/* Code */

code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--code-bg);
  padding: 0.15em 0.4em;
  border-radius: 3px;
}

pre {
  background: var(--code-bg);
  padding: 1rem;
  overflow-x: auto;
  margin-bottom: 1.2rem;
  border-radius: 3px;
}

pre code {
  background: none;
  padding: 0;
}

/* Landing page */

.landing-hero {
  text-align: center;
  padding: 4rem 0 3rem;
}

.landing-hero .hero-quote {
  font-size: 1.5rem;
  font-style: italic;
  line-height: 1.5;
  max-width: 560px;
  margin: 0 auto 1.5rem;
  color: var(--text);
}

.landing-hero .hero-attribution {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0;
}

.landing-paths {
  padding: 2rem 0 3rem;
}

.path-card {
  border: 1px solid var(--border);
  padding: 2rem;
  margin-bottom: 1.5rem;
  transition: border-color 0.2s;
}

.path-card:hover {
  border-color: var(--accent);
}

.path-card h2 {
  margin-top: 0;
  border-bottom: none;
  padding-bottom: 0;
  font-size: 1.2rem;
}

.path-card h2 a {
  text-decoration: none;
  color: var(--text);
}

.path-card p {
  color: var(--text-secondary);
  margin-bottom: 0.8rem;
  font-size: 0.95rem;
}

.path-card .path-cta {
  font-size: 0.85rem;
  font-style: italic;
  color: var(--accent);
}

/* Section pages */

.section-intro {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-style: italic;
}

.question-nav {
  margin: 2rem 0;
}

.question-item {
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 0;
}

.question-item:first-child {
  border-top: 1px solid var(--border);
}

.question-item h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-style: normal;
}

.question-item h3 a {
  text-decoration: none;
}

.question-item p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.question-item .read-links {
  font-size: 0.85rem;
  color: var(--accent);
}

/* Letters list */

.letters-list {
  list-style: none;
  padding-left: 0;
}

.letters-list li {
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}

.letters-list li:first-child {
  border-top: 1px solid var(--border);
}

.letter-number {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-right: 0.5rem;
}

.letter-title a {
  text-decoration: none;
  font-size: 1.05rem;
}

.letter-subtitle {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.2rem;
}

/* Article / Single page */

.article-header {
  margin-bottom: 2.5rem;
}

.article-meta {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.3rem;
}

.article-content {
  margin-bottom: 3rem;
}

.article-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}

.article-nav a {
  text-decoration: none;
}

.article-nav .prev::before {
  content: "← ";
}

.article-nav .next::after {
  content: " →";
}

/* Footer */

.site-footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-align: center;
}

.site-footer a {
  color: var(--text-secondary);
}

.footer-links {
  margin-bottom: 0.5rem;
}

.footer-links a {
  margin: 0 0.75rem;
}

.dove {
  display: block;
  margin-top: 0.8rem;
  font-size: 1.2rem;
}

/* Mobile */

@media (max-width: 600px) {
  html {
    font-size: 16px;
  }

  .site-header .container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .site-nav {
    justify-content: center;
  }

  .landing-hero {
    padding: 2.5rem 0 2rem;
  }

  .landing-hero .hero-quote {
    font-size: 1.3rem;
  }

  .article-nav {
    flex-direction: column;
  }

  h1 {
    font-size: 1.5rem;
  }
}
