/* ═══════════════════════════════════════════════════════════════════════
   VLG · Shared design system
   Used by index.html, about.html, writing.html, contact.html
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  --linen: #EAE0C8;
  --linen-deep: #D9CCAE;
  --linen-card: #F0E8D4;
  --ink: #1A140C;
  --ink-soft: #3F3729;
  --ink-mute: #7A6D58;
  --crimson: #8B2330;
  --crimson-deep: #6B1A24;
  --loden: #5C5641;
  --gilt: #A8884A;
  --stone: #B8AE9A;
  --rule: rgba(26, 20, 12, 0.18);
  --rule-soft: rgba(26, 20, 12, 0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--linen);
  color: var(--ink);
  font-family: 'Crimson Pro', serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 40% at 50% 0%, rgba(168, 136, 74, 0.06), transparent 70%),
    radial-gradient(ellipse 60% 50% at 50% 100%, rgba(92, 86, 65, 0.04), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ─────────  THRESHOLD  ───────── */

.threshold {
  position: fixed;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(26, 20, 12, 0.09) 8%,
    rgba(26, 20, 12, 0.09) 92%,
    transparent 100%
  );
  z-index: 0;
  transform: translateX(-0.5px);
  pointer-events: none;
}

.threshold-mark {
  position: relative;
  width: 24px;
  height: 24px;
  margin: 12px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
.threshold-mark::before {
  content: '';
  position: absolute;
  width: 24px;
  height: 24px;
  background: radial-gradient(circle, var(--linen) 40%, transparent 70%);
  z-index: -1;
}
.threshold-mark svg {
  width: 12px;
  height: 8px;
  color: var(--gilt);
  opacity: 0.55;
}

/* ─────────  CONTAINERS  ───────── */

.container {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 32px;
}
.wide {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ─────────  HEADER  ───────── */

header.top {
  position: relative;
  z-index: 2;
  max-width: 980px;
  margin: 0 auto;
  padding: 28px 32px 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 32px;
}
.top-mark {
  font-family: 'Crimson Pro', serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--crimson);
}
.top-mark a { color: inherit; text-decoration: none; }
.top-nav {
  display: flex;
  gap: 28px;
  justify-content: center;
}
.top-nav a {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-mute);
  text-decoration: none;
  transition: color 0.2s;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
}
.top-nav a:hover {
  color: var(--crimson);
  border-bottom-color: var(--crimson);
}
.top-nav a.current {
  color: var(--ink);
  border-bottom-color: var(--gilt);
}
.top-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-mute);
  text-align: right;
}
.top-meta a { color: inherit; text-decoration: none; transition: color 0.2s; }
.top-meta a:hover { color: var(--crimson); }

/* ─────────  TITLE PAGE  ───────── */

.title-page {
  padding: 140px 0 96px;
  text-align: center;
  position: relative;
}
.title-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--gilt);
  margin-bottom: 56px;
  font-weight: 400;
}
.title-eyebrow::before,
.title-eyebrow::after {
  content: '·';
  margin: 0 14px;
  color: var(--gilt);
  opacity: 0.6;
}
.title-display {
  font-family: 'Crimson Pro', serif;
  font-size: clamp(48px, 7vw, 88px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin-bottom: 48px;
}
.title-display em {
  font-style: italic;
  color: var(--crimson);
  font-weight: 400;
}
.title-orientation {
  font-family: 'Crimson Pro', serif;
  font-size: 19px;
  line-height: 1.65;
  color: var(--ink-soft);
  font-style: italic;
  font-weight: 400;
  max-width: 540px;
  margin: 0 auto 64px;
}

/* ─────────  ORNAMENT  ───────── */

.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 48px 0;
}
.ornament-line {
  width: 80px;
  height: 1px;
  background: var(--gilt);
  opacity: 0.55;
}
.ornament-mark {
  width: 6px;
  height: 6px;
  border: 1px solid var(--gilt);
  transform: rotate(45deg);
  opacity: 0.7;
}

/* ─────────  EPIGRAPH  ───────── */

.epigraph {
  padding: 0 0 80px;
  max-width: 620px;
  margin: 0 auto;
  text-align: center;
}
.epigraph-text {
  font-family: 'Crimson Pro', serif;
  font-size: 22px;
  font-style: italic;
  font-weight: 400;
  line-height: 1.55;
  color: var(--ink);
  margin-bottom: 24px;
  letter-spacing: -0.005em;
}
.epigraph-text em {
  font-style: italic;
  color: var(--crimson);
  font-weight: 500;
}
.epigraph-attr {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-mute);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.epigraph-attr::before,
.epigraph-attr::after {
  content: '';
  width: 18px;
  height: 1px;
  background: var(--ink-mute);
  opacity: 0.5;
}
.epigraph-attr a { color: var(--crimson); text-decoration: none; }

/* ─────────  SECTION  ───────── */

.section {
  padding: 80px 0;
  border-top: 1px solid var(--rule);
}
.section-num {
  font-family: 'Crimson Pro', serif;
  font-style: italic;
  font-size: 16px;
  color: var(--gilt);
  margin-bottom: 14px;
  letter-spacing: 0.05em;
  font-weight: 400;
}
.section-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 48px;
  font-weight: 400;
}

/* Generic prose styles (used in About) */
.prose {
  font-family: 'Crimson Pro', serif;
  font-size: 19px;
  line-height: 1.7;
  color: var(--ink);
  font-weight: 400;
}
.prose p + p { margin-top: 18px; }
.prose em { font-style: italic; color: var(--crimson); }
.prose a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--gilt);
  transition: color 0.25s, border-color 0.25s;
}
.prose a:hover { color: var(--crimson); border-color: var(--crimson); }
.prose strong {
  font-weight: 500;
  color: var(--ink);
}

/* ─────────  NOTE  ───────── */

.note-section {
  padding: 64px 0 96px;
}
.note {
  max-width: 580px;
  margin: 0 auto;
  text-align: center;
  font-family: 'Crimson Pro', serif;
  font-style: italic;
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-soft);
  font-weight: 400;
}
.note a {
  color: var(--crimson);
  font-style: normal;
  text-decoration: none;
  border-bottom: 1px solid var(--crimson);
}

/* ─────────  FOOTER  ───────── */

footer {
  padding: 64px 0 40px;
  background: var(--linen-deep);
  border-top: 1px solid var(--rule);
}
.foot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.foot-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gilt);
  margin-bottom: 18px;
  font-weight: 400;
}
.foot-mark {
  font-family: 'Crimson Pro', serif;
  font-size: 30px;
  line-height: 1;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}
.foot-mark em { font-style: italic; color: var(--crimson); font-weight: 400; }
.foot-text {
  font-family: 'Crimson Pro', serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-soft);
  font-weight: 400;
  max-width: 280px;
}
.foot-link {
  display: block;
  font-family: 'Crimson Pro', serif;
  font-size: 17px;
  color: var(--ink);
  text-decoration: none;
  margin-bottom: 8px;
  transition: color 0.2s;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  width: fit-content;
}
.foot-link:hover { color: var(--crimson); border-bottom-color: var(--crimson); }
.foot-bottom {
  padding-top: 28px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

/* ─────────  REVEAL  ───────── */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  animation: reveal 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
.r-1 { animation-delay: 0.15s; }
.r-2 { animation-delay: 0.3s; }
.r-3 { animation-delay: 0.45s; }
.r-4 { animation-delay: 0.6s; }
@keyframes reveal { to { opacity: 1; transform: translateY(0); } }

/* ─────────  RESPONSIVE  ───────── */

@media (max-width: 720px) {
  .threshold { display: none; }
  header.top { padding: 24px; grid-template-columns: 1fr; gap: 12px; text-align: center; }
  .top-meta { text-align: center; }
  .top-nav { flex-wrap: wrap; gap: 16px; justify-content: center; }
  .container, .wide { padding: 0 24px; }
  .title-page { padding: 80px 0 64px; }
  .title-eyebrow {
    letter-spacing: 0.22em;
    margin-bottom: 40px;
  }
  .title-eyebrow::before,
  .title-eyebrow::after {
    margin: 0 8px;
  }
  .title-display { font-size: 44px; }
  .title-orientation { font-size: 17px; }
  .epigraph { padding: 0 32px 56px; }
  .epigraph-text { font-size: 19px; }
  .section { padding: 56px 0; }
  .prose { font-size: 17px; }
  .foot-grid { grid-template-columns: 1fr; gap: 32px; }
  .foot-bottom { flex-direction: column; gap: 12px; }
}
