/* =========================================================
   When We Were Apart — "First Edition" Ghost theme
   Lara Catledge Reedick
   ========================================================= */

:root {
  --paper:      #f7f2e9;
  --paper-2:    #f1ebde;
  --ink:        #1c1712;
  --ink-soft:   #2a2419;
  --ink-body:   #332a20;
  --accent:     #8a6a2f;   /* gold-brown */
  --accent-lt:  #c9a35f;
  --rule:       #e0d7c4;
  --rule-2:     #e6ddca;
  --muted:      #6a5c45;
  --muted-2:    #9a875f;
  --dark:       #1c1712;
  --serif:      'EB Garamond', Georgia, 'Times New Roman', serif;
  --display:    'Cormorant Garamond', Georgia, serif;
  --mono:       'IBM Plex Mono', ui-monospace, monospace;
  --wrap:       1120px;
  --measure:    720px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }

::selection { background: var(--accent-lt); color: var(--ink); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 32px; }
.measure { max-width: var(--measure); margin-left: auto; margin-right: auto; }

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--accent);
}
.rule-label {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--serif);
  font-size: 14px; letter-spacing: .42em; text-transform: uppercase;
  color: var(--accent);
}
.rule-label::before, .rule-label::after {
  content: ""; width: 26px; height: 1px; background: var(--accent);
}

.section { padding: 96px 0; border-bottom: 1px solid var(--rule); }
.section--center { text-align: center; }

/* ---------- Navigation ---------- */
.site-nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247,242,233,.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.site-nav__inner {
  max-width: var(--wrap); margin: 0 auto; padding: 16px 32px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.site-nav__brand {
  font-family: var(--display); font-size: 23px; font-weight: 500; letter-spacing: .01em;
  color: var(--ink);
}
.site-nav__links {
  display: flex; gap: 30px; align-items: center;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--muted);
  list-style: none; margin: 0; padding: 0;
}
.site-nav__links a:hover { color: var(--accent); }
.nav-cta { color: var(--accent) !important; }
.site-nav__toggle { display: none; }

/* ---------- Hero / title page ---------- */
.hero { padding: 120px 0 110px; text-align: center; border-bottom: 1px solid var(--rule); }
.hero__kicker { margin-bottom: 56px; }
.hero__title {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(58px, 11vw, 112px); line-height: .94; letter-spacing: -.02em;
  margin: 0 0 36px; color: var(--ink);
}
.hero__sub {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(19px, 2.4vw, 24px); line-height: 1.6;
  max-width: 620px; margin: 0 auto 50px; color: #463c2d;
}
.hero__byline {
  font-family: var(--serif); font-size: 17px; letter-spacing: .34em;
  text-transform: uppercase; color: var(--ink);
}
.hero__status {
  margin-top: 12px; font-family: var(--mono); font-size: 11px;
  letter-spacing: .22em; text-transform: uppercase; color: var(--muted-2);
}

/* ---------- Prose blocks (About the Book, etc.) ---------- */
.prose p { font-size: clamp(19px, 2.2vw, 22px); line-height: 1.82; margin: 0 0 28px; color: var(--ink-soft); }
.prose p:last-child { margin-bottom: 0; }
.pull {
  font-family: var(--display); font-style: italic;
  font-size: clamp(23px, 3vw, 28px); line-height: 1.5;
  margin: 44px 0 0; color: var(--accent);
}
.section-title {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(36px, 5vw, 46px); margin: 0 0 8px; color: var(--ink);
}
.section-intro {
  font-family: var(--serif); font-style: italic; font-size: 19px;
  color: var(--muted); margin: 0 auto 56px; max-width: 540px;
}

/* ---------- Author ---------- */
.author__photo {
  display: block; width: 156px; height: 156px; border-radius: 50%;
  object-fit: cover; object-position: center 28%; margin: 0 auto 30px;
  filter: sepia(.35) contrast(1.02);
  box-shadow: 0 8px 24px rgba(28,23,18,.22);
}
.author__name {
  font-family: var(--display); font-weight: 500; font-size: 42px;
  margin: 12px 0 28px; color: var(--ink);
}

/* ---------- Reading list ---------- */
.reading { text-align: left; max-width: 820px; margin: 0 auto; }
.reading__group { margin-bottom: 46px; }
.reading__group-title {
  text-align: center; font-family: var(--serif); font-size: 14px;
  letter-spacing: .28em; text-transform: uppercase; color: var(--accent);
  margin-bottom: 26px;
}
.reading__item { text-align: center; padding: 14px 0; border-top: 1px solid var(--rule-2); }
.reading__title { font-family: var(--display); font-size: 25px; color: var(--ink); }
.reading__meta { font-family: var(--mono); font-size: 11px; letter-spacing: .04em; color: var(--muted-2); margin-top: 5px; }

/* ---------- Field Notes list ---------- */
.notes { max-width: 740px; margin: 0 auto; }
.note {
  text-align: center; padding: 32px 0; border-top: 1px solid var(--rule-2);
  display: block;
}
.note:hover .note__title { color: var(--accent); }
.note__date { font-family: var(--mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.note__title { font-family: var(--display); font-size: clamp(26px, 3.4vw, 31px); margin-bottom: 14px; color: var(--ink); transition: color .2s ease; }
.note__excerpt { margin: 0 auto; font-size: 18px; line-height: 1.76; color: #3a3225; max-width: 600px; }
.note__more { display:inline-block; margin-top:18px; font-family: var(--mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); }

.archive-more { text-align: center; margin-top: 56px; }
.btn-outline {
  display: inline-block; font-family: var(--mono); font-size: 12px;
  letter-spacing: .16em; text-transform: uppercase; color: var(--ink);
  border: 1px solid var(--ink); padding: 14px 30px; transition: all .2s ease;
}
.btn-outline:hover { background: var(--ink); color: var(--paper); }

/* ---------- Single post / page ---------- */
.article { padding: 88px 0 40px; }
.article__header { text-align: center; max-width: 760px; margin: 0 auto 48px; }
.article__date { font-family: var(--mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); margin-bottom: 20px; }
.article__title { font-family: var(--display); font-weight: 400; font-size: clamp(42px, 6vw, 64px); line-height: 1.02; margin: 0; color: var(--ink); }
.article__feature { margin: 48px auto; max-width: 1040px; }
.article__feature img { width: 100%; border-radius: 4px; }

.gh-content {
  display: grid;
  grid-template-columns:
    [full-start] minmax(32px, 1fr)
    [wide-start] minmax(0, 120px)
    [main-start] min(var(--measure), 100% - 64px) [main-end]
    minmax(0, 120px) [wide-end]
    minmax(32px, 1fr) [full-end];
}
.gh-content > * {
  grid-column: main-start / main-end;
  margin: 0 0 1.5em;
}
.gh-content > .kg-width-wide { grid-column: wide-start / wide-end; }
.gh-content > .kg-width-full { grid-column: full-start / full-end; }
.gh-content p { font-size: 20px; line-height: 1.8; color: var(--ink-soft); }
.gh-content h2 { font-family: var(--display); font-weight: 500; font-size: 38px; line-height: 1.1; margin: 1.6em 0 .5em; color: var(--ink); }
.gh-content h3 { font-family: var(--display); font-weight: 500; font-size: 30px; margin: 1.4em 0 .4em; color: var(--ink); }
.gh-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.gh-content strong { font-weight: 600; }
.gh-content blockquote {
  border-left: 2px solid var(--accent); margin: 1.6em 0; padding: 4px 0 4px 28px;
  font-family: var(--display); font-style: italic; font-size: 26px; line-height: 1.5; color: var(--accent);
}
.gh-content img, .gh-content figure { border-radius: 4px; margin-left: 0; margin-right: 0; }
.gh-content figcaption { font-family: var(--mono); font-size: 12px; color: var(--muted-2); text-align: center; margin-top: 10px; }
.gh-content hr { border: none; border-top: 1px solid var(--rule); max-width: 120px; margin: 3em auto; }
.gh-content ul, .gh-content ol { padding-left: 1.4em; }
.gh-content li { font-size: 20px; line-height: 1.8; color: var(--ink-soft); margin-bottom: .5em; }

/* ---------- Koenig editor cards ---------- */
.kg-width-wide { width: 100%; }
.kg-width-full { width: 100%; }
.kg-width-full img { width: 100%; border-radius: 0; }

figure.kg-card { margin: 0 0 1.5em; }
.kg-image { display: block; margin-left: auto; margin-right: auto; }
.kg-image-card img { width: 100%; }

.kg-gallery-container { display: flex; flex-direction: column; }
.kg-gallery-row { display: flex; flex-direction: row; justify-content: center; gap: 12px; margin-bottom: 12px; }
.kg-gallery-image img { display: block; width: 100%; height: 100%; margin: 0; }

.kg-embed-card { display: flex; flex-direction: column; align-items: center; width: 100%; }
.kg-embed-card iframe { max-width: 100%; }

.kg-bookmark-card, .kg-bookmark-card * { box-sizing: border-box; }
.kg-bookmark-card { width: 100%; }
.kg-bookmark-container { display: flex; min-height: 148px; border: 1px solid var(--rule); border-radius: 4px; color: var(--ink); text-decoration: none; overflow: hidden; }
.kg-bookmark-container:hover { color: var(--ink); }
.kg-bookmark-content { flex-grow: 1; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; padding: 20px; }
.kg-bookmark-title { font-family: var(--display); font-size: 21px; font-weight: 500; }
.kg-bookmark-description { display: -webkit-box; font-size: 15px; line-height: 1.5; color: var(--muted); margin-top: 8px; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kg-bookmark-metadata { display: flex; align-items: center; font-family: var(--mono); font-size: 12px; margin-top: 14px; color: var(--muted-2); }
.kg-bookmark-icon { width: 20px; height: 20px; margin-right: 8px; }
.kg-bookmark-thumbnail { position: relative; min-width: 33%; max-height: 100%; }
.kg-bookmark-thumbnail img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.kg-callout-card { display: flex; padding: 20px 24px; border-radius: 4px; background: var(--paper-2); }
.kg-callout-emoji { padding-right: 14px; font-size: 20px; }
.kg-callout-text { font-size: 18px; line-height: 1.6; }

.kg-toggle-card { border: 1px solid var(--rule); border-radius: 4px; padding: 20px 24px; }
.kg-toggle-heading { display: flex; justify-content: space-between; align-items: center; font-family: var(--display); font-size: 22px; }

.kg-header-card { text-align: center; padding: 80px 32px; }
.kg-header-card h2 { font-family: var(--display); }

.kg-button-card { display: flex; }
.kg-button-card.kg-align-center { justify-content: center; }
.kg-btn { display: inline-block; padding: 12px 28px; font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; border-radius: 0; }
.kg-btn-accent { background: var(--accent); color: #fff; }

.kg-audio-card, .kg-file-card, .kg-product-card, .kg-video-card { width: 100%; }
.kg-file-card a { display: flex; border: 1px solid var(--rule); border-radius: 4px; padding: 16px 20px; text-decoration: none; }

@media (max-width: 640px) {
  .kg-gallery-row { flex-direction: column; }
  .kg-bookmark-container { flex-direction: column-reverse; }
  .kg-bookmark-thumbnail { min-height: 160px; }
}

.post-footer { max-width: var(--measure); margin: 64px auto 0; padding-top: 28px; border-top: 1px solid var(--rule); text-align: center; }
.post-footer .eyebrow { display:block; margin-bottom: 10px; }
.tag-link { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; color: var(--muted); }

/* ---------- Archive header ---------- */
.page-head { padding: 100px 0 20px; text-align: center; }
.page-head__title { font-family: var(--display); font-weight: 400; font-size: clamp(44px, 7vw, 64px); margin: 14px 0 0; color: var(--ink); }

/* ---------- Follow / newsletter (global footer) ---------- */
.follow { padding: 104px 0 60px; text-align: center; background: var(--dark); color: var(--paper); }
.follow .rule-label { color: var(--accent-lt); }
.follow .rule-label::before, .follow .rule-label::after { background: var(--accent-lt); }
.follow__title { font-family: var(--display); font-weight: 400; font-size: clamp(36px, 5vw, 48px); margin: 30px 0 16px; }
.follow__text { margin: 0 auto 34px; font-size: 18px; line-height: 1.62; max-width: 500px; color: #d6cbb4; }

.subscribe { display: flex; gap: 10px; max-width: 440px; margin: 0 auto; }
.subscribe input {
  flex: 1; background: transparent; border: 1px solid #4a4030; color: var(--paper);
  padding: 14px 16px; font-family: var(--serif); font-size: 16px; border-radius: 0;
}
.subscribe input::placeholder { color: #8a7c60; }
.subscribe button {
  background: var(--accent-lt); color: var(--ink); border: none; padding: 14px 28px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; cursor: pointer;
}
.subscribe button:hover { background: #d8b877; }
.subscribe-message { min-height: 20px; margin: 14px 0 0; font-family: var(--mono); font-size: 12px; letter-spacing: .06em; }
.subscribe-message.error { color: #e0a58f; }
.subscribe-message.success { color: var(--accent-lt); }

.follow__contact { margin: 40px 0 0; font-size: 16px; line-height: 1.6; color: #b8ac93; }
.follow__contact a { color: var(--accent-lt); }
.follow__contact a:hover { text-decoration: underline; }

.footer-bar {
  max-width: var(--wrap); margin: 64px auto 0; padding: 26px 32px 0;
  border-top: 1px solid #3a3225;
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
  font-family: var(--mono); font-size: 11px; letter-spacing: .12em; color: #8a7c60;
}
.footer-bar a:hover { color: var(--accent-lt); }

/* ---------- Members states ---------- */
.member-only { display: none; }
body.members-enabled .subscribe { display: flex; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .section { padding: 64px 0; }
  .hero { padding: 84px 0 72px; }
  .site-nav__links { gap: 18px; font-size: 10.5px; }
}
@media (max-width: 640px) {
  body { font-size: 18px; }
  .wrap { padding: 0 22px; }
  .site-nav__links { display: none; }
  .site-nav__links.is-open {
    display: flex; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 20px; background: var(--paper);
    border-bottom: 1px solid var(--rule); padding: 24px 22px;
  }
  .site-nav__toggle {
    display: block; background: none; border: none; cursor: pointer;
    font-family: var(--mono); font-size: 11px; letter-spacing: .16em;
    text-transform: uppercase; color: var(--ink);
  }
  .subscribe { flex-direction: column; }
  .article__header { text-align: left; }
  .gh-content blockquote { font-size: 22px; }
}
