/* Snyder's Treasures — editorial collector's journal
   Warm, vintage, calm. Transitional serif headings, clean sans body. */

@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:wght@400;500;600;700&family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&family=Source+Sans+3:ital,wght@0,400;0,600;0,700;1,400&display=swap');

:root {
  --paper:        #f4ecdb;  /* aged paper background */
  --paper-2:      #faf4e8;  /* lifted card / article sheet */
  --ink:          #2b2723;  /* charcoal body text */
  --ink-soft:     #564e44;  /* secondary text */
  --ink-faint:    #897e6e;  /* meta, captions */
  --oxblood:      #6e2630;  /* primary accent */
  --oxblood-deep: #561d26;
  --brown:        #4a3526;  /* deep brown */
  --rule:         #d9cdb4;  /* hairline rules */
  --rule-soft:    #e6dcc6;
  --tag-bg:       #e8dcc3;

  --serif: 'Libre Baskerville', Georgia, 'Times New Roman', serif;
  --sans:  'Source Sans 3', system-ui, -apple-system, sans-serif;

  --measure: 36rem;        /* article line length */
  --wide:    62rem;        /* page max */
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 19px;
  line-height: 1.72;
  font-weight: 400;
  /* faint paper grain */
  background-image:
    radial-gradient(circle at 20% 10%, rgba(150,120,70,0.035), transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(110,38,48,0.03), transparent 45%);
  background-attachment: fixed;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--oxblood); text-decoration: none; }
a:hover { color: var(--oxblood-deep); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--wide); margin: 0 auto; padding: 0 1.5rem; }
.measure { max-width: var(--measure); margin-left: auto; margin-right: auto; }

/* ---------- masthead ---------- */
.masthead {
  border-bottom: 1px solid var(--rule);
  background: rgba(250,244,232,0.55);
}
.masthead__inner {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1.5rem; padding: 1.5rem 1.5rem 1.3rem;
  max-width: var(--wide); margin: 0 auto; flex-wrap: wrap;
}
.brand { display: block; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand__name {
  display: block;
  font-family: var(--serif); font-weight: 700; color: var(--brown);
  font-size: 1.7rem; letter-spacing: 0.01em; line-height: 1.1;
}
.brand__name .amp { color: var(--oxblood); font-style: italic; font-weight: 400; }
.brand__tag {
  display: block; white-space: nowrap;
  font-family: var(--sans); font-size: 0.86rem; color: var(--ink-faint);
  letter-spacing: 0.04em; margin-top: 0.35rem; font-style: italic;
}
.nav { display: flex; gap: 1.6rem; align-items: baseline; }
.nav a {
  white-space: nowrap;
  font-family: var(--sans); font-size: 0.82rem; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--ink-soft); font-weight: 600;
}
.nav a:hover { color: var(--oxblood); text-decoration: none; }
.nav a.is-active { color: var(--oxblood); }

/* ---------- footer ---------- */
.foot {
  border-top: 1px solid var(--rule); margin-top: 5rem;
  padding: 2.2rem 0 3rem; color: var(--ink-faint);
  font-size: 0.84rem; text-align: center; letter-spacing: 0.03em;
}
.foot a { color: var(--ink-soft); }

/* ---------- home ---------- */
.home-intro { padding: 3.4rem 0 1rem; text-align: center; }
.home-intro h1 {
  font-family: var(--serif); font-weight: 700; color: var(--brown);
  font-size: clamp(1.9rem, 4.2vw, 2.8rem); line-height: 1.2; margin: 0 auto 1rem;
  max-width: 22ch; text-wrap: balance;
}
.home-intro p {
  max-width: 40rem; margin: 0 auto; color: var(--ink-soft); font-size: 1.08rem;
}
.eyebrow {
  font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.18em;
  font-size: 0.74rem; font-weight: 700; color: var(--oxblood); margin: 0 0 1rem;
}
.section-rule {
  display: flex; align-items: center; gap: 1rem; margin: 3.2rem 0 2rem;
}
.section-rule::before, .section-rule::after {
  content: ""; height: 1px; background: var(--rule); flex: 1;
}
.section-rule span {
  font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.16em;
  font-size: 0.76rem; font-weight: 700; color: var(--ink-faint);
}

/* post list */
.posts { list-style: none; padding: 0; margin: 0; }
.post-item {
  display: grid; grid-template-columns: 1fr; gap: 0.35rem;
  padding: 1.7rem 0; border-bottom: 1px solid var(--rule-soft);
}
.post-item:last-child { border-bottom: 0; }
.post-item__meta {
  white-space: nowrap;
  font-family: var(--sans); font-size: 0.76rem; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--ink-faint); display: flex; gap: 0.55rem; align-items: center;
}
.post-item__topic { color: var(--oxblood); font-weight: 700; }
.post-item__title {
  font-family: var(--serif); font-weight: 700; font-size: 1.4rem; line-height: 1.28;
  margin: 0.15rem 0 0.2rem;
}
.post-item__title a { color: var(--brown); }
.post-item__title a:hover { color: var(--oxblood); text-decoration: none; }
.post-item__excerpt { color: var(--ink-soft); margin: 0; font-size: 1rem; max-width: 46rem; }

/* ---------- article ---------- */
.article { padding: 2.6rem 0 0; }
.article__head { text-align: center; max-width: 44rem; margin: 0 auto 2.4rem; }
.article__topic {
  font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.16em;
  font-size: 0.76rem; font-weight: 700; color: var(--oxblood); margin-bottom: 0.9rem;
}
.article__topic a { color: var(--oxblood); }
.article h1 {
  font-family: var(--serif); font-weight: 700; color: var(--brown);
  font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.22; margin: 0 0 1rem;
  text-wrap: balance;
}
.article__byline {
  font-family: var(--sans); color: var(--ink-faint); font-size: 0.9rem;
  letter-spacing: 0.02em;
}
.article__byline .sep { margin: 0 0.55rem; opacity: 0.6; }
.article__rule {
  width: 60px; height: 2px; background: var(--oxblood); margin: 2rem auto 0; opacity: 0.7;
}

.prose { font-size: 1.06rem; line-height: 1.78; color: var(--ink); }
.prose > * { max-width: var(--measure); margin-left: auto; margin-right: auto; }
.prose p { margin: 0 0 1.3rem; }
.prose .lead { font-size: 1.2rem; color: var(--ink-soft); line-height: 1.65; }
.prose h2 {
  font-family: var(--serif); font-weight: 700; color: var(--brown);
  font-size: 1.5rem; line-height: 1.3; margin: 2.6rem auto 0.9rem;
}
.prose h3 {
  font-family: var(--sans); font-weight: 700; color: var(--ink);
  font-size: 1.1rem; letter-spacing: 0.01em; margin: 1.8rem auto 0.6rem;
}
.prose ul, .prose ol { margin: 0 auto 1.3rem; padding-left: 1.3rem; }
.prose li { margin: 0 0 0.55rem; padding-left: 0.3rem; }
.prose li::marker { color: var(--oxblood); }
.prose strong { color: var(--brown); }
.prose a { text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; text-decoration-color: rgba(110,38,48,0.4); }

blockquote {
  margin: 2rem auto; padding: 0.2rem 0 0.2rem 1.4rem;
  border-left: 3px solid var(--oxblood); color: var(--ink-soft);
  font-family: var(--serif); font-style: italic; font-size: 1.15rem; line-height: 1.5;
}

.callout {
  background: var(--paper-2); border: 1px solid var(--rule);
  border-radius: 2px; padding: 1.3rem 1.5rem; margin: 2rem auto;
}
.callout h3 { margin-top: 0; }
.callout p:last-child { margin-bottom: 0; }

/* faq */
.faq { margin: 2.6rem auto 0; }
.faq h2 { text-align: left; }
.faq__q {
  font-family: var(--sans); font-weight: 700; color: var(--brown);
  font-size: 1.06rem; margin: 1.5rem auto 0.4rem;
}
.faq__a { margin: 0 auto 1rem; color: var(--ink); }

/* article footer / back link */
.article__foot {
  max-width: var(--measure); margin: 3rem auto 0; padding-top: 1.6rem;
  border-top: 1px solid var(--rule); display: flex; justify-content: space-between;
  align-items: center; gap: 1rem; flex-wrap: wrap;
  font-family: var(--sans); font-size: 0.86rem; color: var(--ink-faint);
}
.sig { font-family: var(--serif); font-style: italic; color: var(--ink-soft); }
.sig::before { content: "\002766\00a0"; font-style: normal; color: var(--oxblood); opacity: 0.75; }

/* topic hub */
.hub-head { padding: 3rem 0 0; text-align: center; max-width: 40rem; margin: 0 auto; }
.hub-head h1 {
  font-family: var(--serif); font-weight: 700; color: var(--brown);
  font-size: clamp(1.9rem, 4vw, 2.7rem); margin: 0.6rem 0 1rem;
}
.hub-head p { color: var(--ink-soft); font-size: 1.08rem; }

/* page (about) */
.page { padding: 2.6rem 0 0; }
.page__head { text-align: center; margin: 0 auto 2.2rem; }
.page__head h1 {
  font-family: var(--serif); font-weight: 700; color: var(--brown);
  font-size: clamp(1.9rem, 4vw, 2.7rem); margin: 0 0 0.5rem;
}
.page__head .article__rule { margin-top: 1.4rem; }

/* topic chips on hub list */
.hub-list { margin-top: 1rem; }

@media (max-width: 640px) {
  body { font-size: 18px; }
  .masthead__inner { flex-direction: column; gap: 0.9rem; padding: 1.2rem 1.25rem; }
  .nav { gap: 1.1rem; flex-wrap: wrap; }
  .home-intro { padding: 2.4rem 0 0.5rem; }
  .prose { font-size: 1.02rem; }
}

/* ============================================================
   TWEAKABLE DESIGN VARIANTS (toggled from the Tweaks panel)
   theme-paper = base look (no overrides needed)
   ============================================================ */

/* texture toggle */
body.no-texture { background-image: none !important; }

/* ---------- Variant 2: Oxblood Press ----------
   Bold dark masthead band, left-aligned editorial intro, larger feed. */
body.theme-press .masthead {
  background: var(--oxblood-deep);
  border-bottom-color: var(--oxblood-deep);
}
body.theme-press .brand__name { color: #f6efe0; }
body.theme-press .brand__name .amp { color: #e7b9a6; }
body.theme-press .brand__tag { color: rgba(246,239,224,0.72); }
body.theme-press .nav a { color: rgba(246,239,224,0.82); }
body.theme-press .nav a:hover,
body.theme-press .nav a.is-active { color: #fff; }
body.theme-press .home-intro { text-align: left; padding-top: 3rem; }
body.theme-press .home-intro h1 {
  margin-left: 0; max-width: 18ch;
  font-size: clamp(2.1rem, 5vw, 3.3rem); line-height: 1.12;
}
body.theme-press .home-intro p { margin-left: 0; }
body.theme-press .section-rule { margin-top: 2.6rem; }
body.theme-press .post-item__title { font-size: 1.62rem; }
body.theme-press .post-item__topic { letter-spacing: 0.14em; }

/* ---------- Variant 3: Archive Ledger ----------
   Lighter paper, EB Garamond headings, numbered index feed. */
body.theme-ledger { --paper: #f4f0e6; }
body.theme-ledger .brand__name,
body.theme-ledger .home-intro h1,
body.theme-ledger .post-item__title a {
  font-family: 'EB Garamond', Georgia, serif;
}
body.theme-ledger .brand__name { font-weight: 600; letter-spacing: 0.02em; font-size: 1.85rem; }
body.theme-ledger .home-intro h1 {
  font-weight: 600; letter-spacing: 0.004em;
  font-size: clamp(2rem, 4.6vw, 3rem);
}
body.theme-ledger .posts { counter-reset: post; }
body.theme-ledger .post-item { position: relative; padding-left: 3.4rem; }
.post-num { display: none; }
body.theme-ledger .post-num {
  display: block; position: absolute; left: 0; top: 1.95rem;
  font-family: var(--sans); font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.08em; color: var(--oxblood);
}
body.theme-ledger .post-item__title { font-size: 1.5rem; font-weight: 600; }

@media (max-width: 640px) {
  body.theme-ledger .post-item { padding-left: 2.6rem; }
  body.theme-press .home-intro { padding-top: 2rem; }
}

/* ============================================================
   QUALITY PASS: lead images, author card, related posts
   (static placeholders sized for real photos in the build)
   ============================================================ */

/* lead image */
.lead-figure { max-width: var(--measure); margin: 0 auto 2.6rem; }
.figph {
  position: relative; width: 100%; aspect-ratio: 3 / 2; overflow: hidden;
  border: 1px solid var(--rule); border-radius: 3px;
  background:
    repeating-linear-gradient(45deg, rgba(74,53,38,0.04) 0 14px, rgba(74,53,38,0.0) 14px 28px),
    linear-gradient(135deg, #ece1c9, #d6c6a9);
  display: flex; align-items: center; justify-content: center;
}
.figph::after {
  content: attr(data-label);
  font-family: var(--sans); font-size: 0.72rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: rgba(74,53,38,0.5); font-weight: 700;
}
.lead-figure figcaption {
  font-family: var(--sans); font-size: 0.82rem; color: var(--ink-faint);
  margin-top: 0.65rem; font-style: italic; line-height: 1.45;
}
.figph--portrait { aspect-ratio: 1 / 1; border-radius: 50%; max-width: 132px; }

/* author card */
.author-card {
  display: flex; gap: 1.15rem; align-items: flex-start;
  max-width: var(--measure); margin: 3rem auto 0; padding-top: 1.9rem;
  border-top: 1px solid var(--rule);
}
.author-card__avatar {
  flex: none; width: 60px; height: 60px; border-radius: 50%; overflow: hidden;
  border: 1px solid var(--rule);
  background: linear-gradient(135deg, #ece1c9, #cdbb9c);
}
.author-card__name {
  font-family: var(--serif); font-weight: 700; color: var(--brown);
  font-size: 1.05rem; margin: 0 0 0.3rem;
}
.author-card__bio { margin: 0; font-size: 0.95rem; color: var(--ink-soft); line-height: 1.6; }

/* related posts */
.related { max-width: var(--measure); margin: 2.8rem auto 0; }
.related h2 {
  font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.14em;
  font-size: 0.76rem; color: var(--ink-faint); font-weight: 700; margin: 0 0 1.1rem;
}
.related ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.related li { border-top: 1px solid var(--rule-soft); padding-top: 0.95rem; }
.related li:first-child { border-top: 0; padding-top: 0; }
.related__topic {
  font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.1em;
  font-size: 0.7rem; font-weight: 700; color: var(--oxblood); display: block; margin-bottom: 0.2rem;
}
.related a {
  font-family: var(--serif); font-weight: 700; color: var(--brown);
  font-size: 1.16rem; line-height: 1.3; text-decoration: none;
}
.related a:hover { color: var(--oxblood); text-decoration: none; }

/* about portrait */
.about-portrait { display: flex; justify-content: center; margin: 0 auto 2rem; }
