/* Terra Intermaria — minimal site shell (FAQ phase) */

:root {
  --ink: #1c1917;
  --ink-soft: #44403c;
  --ink-muted: #78716c;
  --paper: #fafaf9;
  --paper-warm: #f5f0e8;
  --accent: #1e4d6b;
  --accent-pale: #dbeafe;
  --gold: #92600a;
  --border: rgba(28, 25, 23, 0.1);
  --font-display: 'Libre Baskerville', Georgia, serif;
  --font-body: 'Source Serif 4', Georgia, serif;
  --font-ui: system-ui, sans-serif;
  --content-max: 44rem;
  --max: var(--content-max);
  --nav-h: 4.75rem;
  --footer-h: 4.75rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 17px; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--paper); padding: 0.5rem 1rem; z-index: 9999;
}
.skip-link:focus { left: 0; }

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250, 250, 249, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  height: var(--nav-h);
}
.site-header-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.25rem 2rem;
}
.site-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  line-height: 0;
  grid-column: 2;
}
.site-brand-logo {
  display: block;
  height: 3.1rem;
  width: auto;
  max-width: min(420px, 72vw);
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 0.65rem;
}
.site-nav-left {
  grid-column: 1;
  justify-self: end;
  justify-content: flex-end;
}
.site-nav-right {
  grid-column: 3;
  justify-self: start;
  justify-content: flex-start;
}
.site-nav a {
  font-family: var(--font-ui); font-size: 0.78rem; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--ink-muted); text-decoration: none;
  padding: 0.35rem 0.5rem; border-radius: 3px;
}
.site-nav a:hover, .site-nav a.active { color: var(--accent); background: var(--accent-pale); }

.site-main {
  max-width: 72rem;
  margin: 0 auto;
  padding: 2rem 1.25rem calc(var(--footer-h) + 2rem);
}
.site-main > section {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
}
.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(250, 250, 249, 0.92);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--border);
  padding: 0.7rem 1.25rem 0.8rem;
  text-align: center;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--ink-muted);
}
.site-footer-inner {
  max-width: 72rem;
  margin: 0 auto;
}
.site-footer-nav {
  margin: 0;
  line-height: 1.5;
}
.site-footer-copy {
  margin: 0.35rem 0 0;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}
.site-footer a { color: var(--accent); text-decoration: underline; text-underline-offset: 0.12em; }
.site-footer a:hover { text-decoration-thickness: 1.5px; }

/* Editorial links — visible in running text and teasers */
.site-main :is(.home-body, .faq-answer, .essay-body, .prose, .symbols-page) a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  text-decoration-thickness: 1px;
}

.site-main :is(.home-body, .faq-answer, .essay-body, .prose, .symbols-page) a:hover {
  color: var(--ink);
  text-decoration-thickness: 1.5px;
}

.site-main .page-data-feeds {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  color: var(--ink-muted);
  margin: 0.85rem 0 0;
  line-height: 1.5;
}

.site-main .page-data-feeds-label {
  font-weight: 600;
  margin-right: 0.35rem;
}

.site-main .page-data-feeds-sep {
  margin: 0 0.35rem;
  opacity: 0.55;
}

.site-main .page-data-feeds a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.site-main .page-data-feeds a:hover {
  text-decoration-thickness: 1.5px;
}

.eyebrow {
  font-family: var(--font-ui); font-size: 0.72rem; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--gold); font-weight: 600; margin: 0 0 0.5rem;
}
.site-main h1 {
  font-family: var(--font-display); font-size: 2rem; font-weight: 700;
  line-height: 1.2; margin: 0 0 0.5rem;
}
.site-main > section > header > p {
  color: var(--ink-muted); margin: 0 0 1.5rem;
}
.page-lead { font-size: 1.1rem; color: var(--ink-muted); margin: 0 0 1.5rem; }

.btn {
  display: inline-block; font-family: var(--font-ui); font-size: 0.85rem;
  font-weight: 600; text-decoration: none; padding: 0.55rem 1.1rem; border-radius: 4px;
}
.btn-primary { background: var(--accent); color: var(--paper); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-secondary {
  background: transparent; color: var(--accent);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--accent-pale); border-color: var(--accent-pale); }

/* FAQ */
.faq-list { max-width: 100%; }
.faq-item {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}
.faq-item:last-child { border-bottom: none; }
.faq-item summary {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  line-height: 1.35;
  list-style-position: outside;
  color: var(--ink);
}
.faq-item summary:hover { color: var(--accent); }
.faq-item[open] summary { margin-bottom: 0.85rem; }
.faq-answer p { margin: 0 0 0.75rem; color: var(--ink-soft); line-height: 1.65; }
.faq-answer blockquote {
  margin: 1rem 0 1.25rem;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--accent);
  background: var(--paper-warm);
  font-family: var(--font-display);
  font-size: 0.98rem;
  line-height: 1.6;
}
.faq-answer blockquote p { margin: 0 0 0.85rem; color: var(--ink); }
.faq-answer blockquote p:last-child { margin-bottom: 0; }
.faq-more {
  font-family: var(--font-ui); font-size: 0.85rem; margin-top: 1rem !important;
}
.faq-more a { color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 0.12em; }
.faq-more a:hover { text-decoration-thickness: 1.5px; }

@media (max-width: 820px) {
  .site-header {
    height: auto;
    position: static;
  }
  .site-header-inner {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    height: auto;
    padding: 0.85rem 1.25rem 1rem;
    gap: 0.75rem 1rem;
  }
  .site-brand {
    grid-column: 1 / -1;
    grid-row: 1;
  }
  .site-brand-logo {
    height: 2.65rem;
    max-width: min(360px, 88vw);
  }
  .site-nav-left {
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
    justify-content: flex-start;
  }
  .site-nav-right {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
    justify-content: flex-end;
  }
}
