:root {
  --ink: #0E2B2C;
  --ink-soft: #16393B;
  --paper: #EFE7D8;
  --paper-dim: #E3D9C6;
  --brass: #B08245;
  --brass-bright: #C99A5C;
  --coral: #9C4A3F;
  --moss: #5A6E48;
  --mist: #C9D6D2;

  --font-display: "Fraunces", serif;
  --font-body: "Literata", serif;
  --font-mono: "IBM Plex Mono", monospace;

  --max: 1040px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  line-height: 1.6;
  font-size: 17px;
}

a {
  color: var(--brass-bright);
  text-decoration: none;
}
a:hover { text-decoration: underline; }
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--brass-bright);
  outline-offset: 3px;
}

/* Header */
.site-header {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: 0.01em;
  color: var(--paper);
}
.wordmark:hover { text-decoration: none; color: var(--brass-bright); }

.site-nav {
  display: flex;
  gap: 1.75rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.site-nav a { color: var(--mist); }
.site-nav a:hover { color: var(--brass-bright); }

/* Hero */
.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 3.5rem 1.5rem 4rem;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--brass-bright);
  margin: 0 0 1.25rem;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  line-height: 1.05;
  margin: 0 0 1.5rem;
  max-width: 14ch;
  color: var(--paper);
}

.hero-lede {
  max-width: 56ch;
  font-size: 1.1rem;
  color: var(--mist);
}

/* Ledger — signature element */
.ledger {
  position: relative;
  max-width: var(--max);
  margin: 0 auto 5rem;
  padding: 0 1.5rem;
}

.ledger-rail {
  position: absolute;
  left: calc(1.5rem + 27px);
  top: 0.5rem;
  bottom: 0.5rem;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--brass) 8%, var(--brass) 92%, transparent);
}

.ledger-entry {
  position: relative;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 1.25rem;
  align-items: start;
  padding: 1.5rem 0;
  border-bottom: 1px solid rgba(201, 214, 210, 0.12);
}
.ledger-entry:last-child { border-bottom: none; }

.ledger-tab {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--ink-soft);
  border: 1px solid var(--brass);
  color: var(--brass-bright);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-align: center;
}

.ledger-entry--open .ledger-tab {
  background: var(--moss);
  border-color: var(--moss);
  color: var(--paper);
}

.ledger-meta {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--brass-bright);
  margin-bottom: 0.4rem;
  letter-spacing: 0.02em;
}

.ledger-body h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.3rem;
  margin: 0 0 0.5rem;
  color: var(--paper);
}

.ledger-body p {
  margin: 0;
  max-width: 62ch;
  color: var(--mist);
  font-size: 0.98rem;
}

/* Pillars */
.pillars {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1rem 1.5rem 5rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}

@media (max-width: 780px) {
  .pillars { grid-template-columns: 1fr; }
  .site-header { padding-top: 2rem; }
}

.pillar {
  background: var(--ink-soft);
  border: 1px solid rgba(176, 130, 69, 0.25);
  border-radius: 2px;
  padding: 2rem 1.75rem 2.25rem;
}

.pillar-index {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--coral);
  margin-bottom: 0.75rem;
}

.pillar h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.5rem;
  margin: 0 0 0.75rem;
  color: var(--paper);
}

.pillar p {
  color: var(--mist);
  font-size: 0.96rem;
  margin: 0 0 1.25rem;
}

.pillar-link {
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

/* Footer */
.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  border-top: 1px solid rgba(201, 214, 210, 0.12);
  color: var(--mist);
  font-size: 0.85rem;
}

/* Article body (pillar content pages) */
.article {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

.article p {
  color: var(--paper);
  font-size: 1.03rem;
  margin: 0 0 1.4rem;
}

.article h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.6rem;
  color: var(--paper);
  margin: 2.5rem 0 1rem;
}

.record-card {
  background: var(--ink-soft);
  border: 1px solid rgba(176, 130, 69, 0.35);
  border-left: 3px solid var(--brass);
  padding: 1.75rem 1.75rem 1.5rem;
  margin: 0 auto 2.5rem;
  max-width: 720px;
}

.record-card .record-name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.4rem;
  color: var(--paper);
  margin: 0 0 0.3rem;
}

.record-card .record-dates {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--brass-bright);
  margin: 0 0 1rem;
}

.record-card .record-facts {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
  font-size: 0.92rem;
  color: var(--mist);
}

.record-card .record-facts strong {
  color: var(--paper);
  font-weight: 500;
}

.record-card .record-source {
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--mist);
  opacity: 0.8;
}

/* Stories & Memories */
.story-card {
  background: var(--ink-soft);
  border: 1px solid rgba(90, 110, 72, 0.35);
  border-radius: 2px;
  padding: 1.75rem;
  margin: 0 auto 1.5rem;
  max-width: 720px;
}

.story-card .story-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 1.15rem;
  color: var(--paper);
  margin: 0 0 1rem;
  line-height: 1.5;
}

.story-card .story-attribution {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--moss);
  margin: 0;
}

.story-empty {
  max-width: 720px;
  margin: 0 auto 2rem;
  padding: 2rem;
  border: 1px dashed var(--brass);
  text-align: center;
  color: var(--mist);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

/* Photo story entries */
.photo-story {
  max-width: 720px;
  margin: 0 auto 2rem;
  background: var(--ink-soft);
  border: 1px solid rgba(90, 110, 72, 0.35);
  border-radius: 2px;
  overflow: hidden;
}

.photo-story img {
  width: 100%;
  height: auto;
  display: block;
}

.photo-story .photo-story-body {
  padding: 1.5rem 1.75rem;
}

.photo-story .photo-story-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.15rem;
  color: var(--paper);
  margin: 0 0 0.5rem;
}

.photo-story .photo-story-meta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--moss);
  margin: 0;
}

/* Wordmark with crest icon */
.wordmark {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.wordmark img {
  height: 34px;
  width: auto;
  display: block;
}

/* Hero with crest */
.hero-with-crest {
  display: flex;
  align-items: center;
  gap: 3rem;
  flex-wrap: wrap-reverse;
}

.hero-with-crest .hero-text {
  flex: 1 1 420px;
}

.hero-with-crest .hero-crest {
  flex: 0 1 260px;
  max-width: 260px;
}

.hero-with-crest .hero-crest img {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 780px) {
  .hero-with-crest .hero-crest {
    max-width: 160px;
    margin: 0 auto;
  }
}

/* Historical photo gallery */
.gallery-intro {
  max-width: 720px;
  margin: 0 auto 2rem;
}

.gallery {
  max-width: 900px;
  margin: 0 auto 2.5rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  padding: 0 1.5rem;
}

@media (max-width: 700px) {
  .gallery { grid-template-columns: 1fr; }
}

.gallery figure {
  margin: 0;
  background: var(--ink-soft);
  border: 1px solid rgba(176, 130, 69, 0.3);
  border-radius: 2px;
  overflow: hidden;
}

.gallery img {
  width: 100%;
  height: auto;
  display: block;
}

.gallery figcaption {
  padding: 1rem 1.25rem 1.25rem;
}

.gallery figcaption .cap-title {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1rem;
  color: var(--paper);
  margin: 0 0 0.4rem;
  line-height: 1.4;
}

.gallery figcaption .cap-note {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--mist);
  margin: 0;
}

/* Place facts card */
.place-facts-card {
  background: var(--ink-soft);
  border: 1px solid rgba(90, 110, 72, 0.4);
  border-left: 3px solid var(--moss);
  padding: 1.5rem 1.75rem;
  margin: 0 auto 2rem;
  max-width: 720px;
}

.place-facts-card .place-facts-title {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brass-bright);
  margin: 0 0 1rem;
}

.place-facts-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.6rem;
}

.place-facts-card li {
  font-size: 0.92rem;
  color: var(--paper);
  line-height: 1.5;
}

.place-facts-card li strong {
  color: var(--brass-bright);
  font-weight: 500;
}

/* Factoid callout box */
.place-facts-box {
  max-width: 720px;
  margin: 0 auto 2.5rem;
  background: var(--ink-soft);
  border-left: 3px solid var(--coral);
  border-radius: 2px;
  padding: 1.75rem;
}

.place-facts-box .place-facts-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--coral);
  margin: 0 0 0.75rem;
}

.place-facts-box ul {
  margin: 0;
  padding-left: 1.1rem;
}

.place-facts-box li {
  color: var(--mist);
  font-size: 0.95rem;
  margin-bottom: 0.6rem;
  line-height: 1.55;
}

.place-facts-box li strong {
  color: var(--paper);
}

/* Illustrated story (no photo exists — atmospheric illustration instead) */
.illustrated-story {
  max-width: 720px;
  margin: 0 auto 2rem;
  background: var(--ink-soft);
  border: 1px solid rgba(90, 110, 72, 0.35);
  border-radius: 2px;
  overflow: hidden;
}

.illustrated-story svg,
.illustrated-story img {
  width: 100%;
  height: auto;
  display: block;
}

.illustrated-story .story-text {
  padding: 1.75rem;
}

.illustrated-story .story-text p {
  font-style: italic;
  color: var(--paper);
  font-size: 1rem;
  line-height: 1.7;
  margin: 0 0 1rem;
}

.illustrated-story .story-attribution {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--moss);
  font-style: normal;
  margin-top: 1.25rem;
}

/* Surprise Me button */
.surprise-btn {
  background: none;
  border: 1px solid var(--brass);
  color: var(--brass-bright);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.35rem 0.7rem;
  border-radius: 3px;
  cursor: pointer;
}
.surprise-btn:hover {
  background: var(--brass);
  color: var(--ink);
}

/* Last updated note */
.last-updated {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--moss);
  text-align: center;
  margin: -1rem auto 2rem;
  max-width: 720px;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.last-updated.is-loaded {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .last-updated {
    transition: none;
    opacity: 1;
  }
}

/* Read next prompts */
.read-next {
  max-width: 720px;
  margin: 0 auto 2.5rem;
  padding: 1rem 1.5rem;
  border-left: 2px solid var(--brass);
  background: var(--ink-soft);
}

.read-next .read-next-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--brass-bright);
  margin: 0 0 0.35rem;
}

.read-next a {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
}

/* Recent additions strip (homepage) */
.recent-additions {
  max-width: 1040px;
  margin: 0 auto 4rem;
  padding: 0 1.5rem;
}

.recent-additions .ra-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--brass-bright);
  margin: 0 0 1.25rem;
}

.ra-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

@media (max-width: 780px) {
  .ra-grid { grid-template-columns: 1fr; }
}

.ra-card {
  display: block;
  background: var(--ink-soft);
  border: 1px solid rgba(176, 130, 69, 0.3);
  border-radius: 2px;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.6s ease, border-color 0.2s ease;
}

.ra-card.is-loaded { opacity: 1; }
.ra-card:hover { border-color: var(--brass); text-decoration: none; }

.ra-card .ra-thumb {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
  background: var(--ink);
}

.ra-card .ra-icon-wrap {
  width: 100%;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
}

.ra-card .ra-icon-wrap svg {
  width: 48px;
  height: 48px;
}

.ra-card .ra-body {
  padding: 1rem 1.1rem;
}

.ra-card .ra-title {
  font-family: var(--font-display);
  font-size: 0.98rem;
  color: var(--paper);
  margin: 0 0 0.3rem;
  line-height: 1.4;
}

.ra-card .ra-date {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--moss);
}

@media (prefers-reduced-motion: reduce) {
  .ra-card { transition: none; opacity: 1; }
}
