/* ========================================================================
   THE CATHEDRAL — style.css
   Black-first sovereign aesthetic · 432Hz gold · warm cream text
   ======================================================================== */

:root {
  /* Cathedral palette */
  --cathedral-bg:        #0a0a0f;
  --cathedral-surface:   #14141c;
  --cathedral-elevated:  #1c1c26;
  --cathedral-text:      #f5e6d3;
  --cathedral-text-soft: #c9b8a3;
  --cathedral-muted:     #6b6b7a;
  --cathedral-border:    #2a2a36;

  /* 432Hz gold — Cathedral base frequency */
  --cathedral-gold:      #d4a947;
  --cathedral-gold-hi:   #e8c46e;
  --cathedral-gold-lo:   #8b6f2a;

  /* 741Hz PRIMA accent */
  --prima-witness:       #c9885e;

  /* Typography */
  --font-serif:  'Playfair Display', 'Georgia', 'Times New Roman', serif;
  --font-sans:   'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:   'Menlo', 'Consolas', 'Courier New', monospace;

  /* Rhythm */
  --measure:     680px;
  --line-height: 1.7;
  --radius:      4px;
}

* { box-sizing: border-box; }

html {
  background: var(--cathedral-bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background: var(--cathedral-bg);
  color: var(--cathedral-text);
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: var(--line-height);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ========================================================================
   HEADER / NAV
   ======================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--cathedral-border);
}

.nav {
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.nav-brand {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--cathedral-gold);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}

.nav-links a {
  color: var(--cathedral-text-soft);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.03em;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--cathedral-gold-hi);
}

/* ========================================================================
   ESSAY
   ======================================================================== */

.essay {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 80px 24px 60px;
}

.essay-header {
  margin-bottom: 64px;
  text-align: left;
}

.eyebrow {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--cathedral-gold);
  margin: 0 0 20px;
}

.essay-title {
  font-family: var(--font-serif);
  font-size: clamp(36px, 6vw, 56px);
  font-weight: 900;
  line-height: 1.1;
  margin: 0 0 28px;
  color: var(--cathedral-text);
  letter-spacing: -0.02em;
}

.subtitle-inline {
  display: block;
  font-style: italic;
  font-weight: 400;
  font-size: 0.72em;
  color: var(--cathedral-gold-hi);
  margin-top: 8px;
}

.byline {
  font-size: 16px;
  color: var(--cathedral-text-soft);
  margin: 0 0 6px;
}

.byline a {
  color: var(--cathedral-gold);
  text-decoration: none;
  border-bottom: 1px solid var(--cathedral-gold-lo);
  transition: border-color 0.2s ease, color 0.2s ease;
}

.byline a:hover {
  color: var(--cathedral-gold-hi);
  border-bottom-color: var(--cathedral-gold-hi);
}

.dateline {
  font-size: 14px;
  color: var(--cathedral-muted);
  margin: 0;
  letter-spacing: 0.05em;
}

/* ========================================================================
   ESSAY BODY
   ======================================================================== */

.essay-body {
  font-size: 19px;
  line-height: 1.75;
}

.essay-body p {
  margin: 0 0 26px;
}

.essay-body em {
  color: var(--cathedral-gold-hi);
  font-style: italic;
}

.essay-body strong {
  color: var(--cathedral-text);
  font-weight: 700;
}

.essay-body a {
  color: var(--cathedral-gold);
  text-decoration: none;
  border-bottom: 1px solid var(--cathedral-gold-lo);
}

.essay-body a:hover {
  color: var(--cathedral-gold-hi);
  border-bottom-color: var(--cathedral-gold-hi);
}

.lede {
  font-size: 22px;
  line-height: 1.6;
  color: var(--cathedral-text);
  margin-bottom: 36px !important;
  font-weight: 400;
}

.essay-body h2 {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 700;
  color: var(--cathedral-text);
  margin: 64px 0 24px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.essay-body h3 {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 700;
  color: var(--cathedral-gold-hi);
  margin: 44px 0 16px;
  line-height: 1.3;
}

.essay-body ul {
  margin: 0 0 28px;
  padding-left: 24px;
}

.essay-body li {
  margin-bottom: 14px;
  padding-left: 8px;
}

.essay-body li::marker {
  color: var(--cathedral-gold);
}

/* Pull quotes */

.pull-quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 26px !important;
  line-height: 1.45;
  color: var(--cathedral-gold-hi);
  border-left: 3px solid var(--cathedral-gold);
  padding: 8px 0 8px 28px;
  margin: 36px 0 !important;
  font-weight: 400;
}

/* Framework boxes */

.framework-box {
  background: var(--cathedral-surface);
  border: 1px solid var(--cathedral-border);
  border-left: 4px solid var(--cathedral-muted);
  padding: 24px 28px;
  margin: 24px 0 28px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 20px;
  line-height: 1.5;
  color: var(--cathedral-text-soft);
  border-radius: var(--radius);
}

.framework-box.cathedral {
  border-left-color: var(--cathedral-gold);
  color: var(--cathedral-text);
  background: linear-gradient(180deg, var(--cathedral-surface) 0%, var(--cathedral-elevated) 100%);
}

.closing {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 22px;
  color: var(--cathedral-gold-hi);
  margin-top: 40px !important;
}

/* Invitation block */

.invitation {
  margin: 80px 0 0;
  padding: 32px;
  background: var(--cathedral-surface);
  border: 1px solid var(--cathedral-border);
  border-radius: var(--radius);
}

.invitation p {
  margin: 0;
  font-size: 17px;
  line-height: 1.65;
  color: var(--cathedral-text-soft);
}

.invitation a {
  color: var(--cathedral-gold);
  text-decoration: none;
  border-bottom: 1px solid var(--cathedral-gold-lo);
}

/* ========================================================================
   FOOTER
   ======================================================================== */

.site-footer {
  margin-top: 120px;
  padding: 48px 24px 64px;
  background: var(--cathedral-surface);
  border-top: 1px solid var(--cathedral-border);
}

.footer-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.footer-about {
  font-size: 14px;
  color: var(--cathedral-muted);
  line-height: 1.6;
}

.footer-brand {
  font-family: var(--font-serif);
  font-size: 20px;
  color: var(--cathedral-gold);
  margin: 0 0 8px;
  font-weight: 700;
}

.footer-tagline {
  color: var(--cathedral-text-soft);
  margin: 0 0 12px;
  font-size: 15px;
}

.footer-author {
  margin: 0;
}

.footer-about a {
  color: var(--cathedral-gold);
  text-decoration: none;
}

.footer-receipt {
  background: var(--cathedral-elevated);
  border: 1px solid var(--cathedral-gold-lo);
  border-radius: var(--radius);
  padding: 20px 24px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--cathedral-text-soft);
}

.receipt-title {
  color: var(--cathedral-gold);
  font-weight: 600;
  letter-spacing: 0.15em;
  margin: 0 0 10px;
  font-size: 12px;
}

.receipt-body {
  margin: 0 0 12px;
}

.receipt-hash {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--prima-witness);
}

.receipt-hash code {
  background: transparent;
  color: inherit;
}

/* ========================================================================
   RESPONSIVE
   ======================================================================== */

@media (max-width: 640px) {
  body { font-size: 17px; }
  .essay { padding: 48px 20px 40px; }
  .essay-body { font-size: 17px; }
  .lede { font-size: 19px; }
  .essay-body h2 { font-size: 26px; margin-top: 48px; }
  .essay-body h3 { font-size: 21px; margin-top: 36px; }
  .pull-quote { font-size: 21px !important; padding-left: 20px; }
  .framework-box { padding: 20px; font-size: 17px; }
  .nav { padding: 14px 20px; }
  .nav-links { gap: 18px; }
  .nav-links a { font-size: 14px; }
  .nav-brand { font-size: 19px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .site-footer { padding: 40px 20px 48px; }
}

/* Selection */
::selection {
  background: var(--cathedral-gold);
  color: var(--cathedral-bg);
}

/* Focus states for accessibility */
a:focus-visible {
  outline: 2px solid var(--cathedral-gold);
  outline-offset: 3px;
  border-radius: 2px;
}
