/* Meditatio — a quiet Ghost theme. See Brand guidelines v1.0 */
:root {
  --ink: #1F2A3C;
  --parchment: #F6F0E4;
  --gold: #C9973F;
  --olive: #4F5D41;
  --clay: #8F4A38;

  --bg: var(--parchment);
  --text: var(--ink);
  --muted: #566074;
  --rule: rgba(201, 151, 63, .55);
  --link: var(--clay);
  --accent-text: var(--olive);

  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --sans: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root[data-scheme="auto"] {
    --bg: var(--ink);
    --text: var(--parchment);
    --muted: #B3B7BF;
    --rule: rgba(201, 151, 63, .5);
    --link: var(--gold);
    --accent-text: #A9B795;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }

.wrap { width: min(100% - 3rem, 64rem); margin-inline: auto; }
.wrap-narrow { width: min(100% - 3rem, 40rem); margin-inline: auto; }

.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--parchment); padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; top: 1rem; }

/* Header */
.site-header { padding: 2rem 0 1rem; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: .85rem; color: var(--text); text-decoration: none; }
.brand-name { font: 500 2.1rem/1 var(--serif); letter-spacing: .01em; }
.brand-logo { max-height: 2.5rem; width: auto; }
.mark { color: var(--text); flex: none; }
.mark-sun { fill: var(--gold); }

.site-nav .nav { list-style: none; display: flex; flex-wrap: wrap; gap: .25rem 1.75rem; margin: 0; padding: 0; }
.site-nav a { color: var(--text); text-decoration: none; font-size: .975rem; padding: .25rem 0; border-bottom: 1px solid transparent; }
.site-nav a:hover { border-bottom-color: var(--gold); }
.site-nav .nav-current a { border-bottom-color: var(--gold); }

/* Hero */
.hero { padding: clamp(4rem, 10vw, 7.5rem) 0 clamp(2.5rem, 6vw, 4rem); max-width: 46rem; margin-inline: auto; text-align: center; }
.hero::before { content: ""; display: block; width: 4rem; height: 2px; background: var(--gold); margin: 0 auto 2rem; }
.hero-title { font: 500 clamp(2.5rem, 6.5vw, 4.5rem)/1.08 var(--serif); letter-spacing: -.005em; margin: 0; text-wrap: balance; }
.hero-small { padding-top: clamp(3rem, 7vw, 5rem); }
.hero-small .hero-title { font-size: clamp(2.25rem, 5vw, 3.25rem); }
.hero-sub { font-size: 1.125rem; color: var(--muted); margin: 1.25rem auto 0; max-width: 34rem; }

/* Home hero: centered dawn */
.hero-home { position: relative; overflow: hidden; max-width: none; padding: clamp(3rem, 6vw, 4.5rem) 1.5rem clamp(4rem, 8vw, 6rem); }
.hero-home::before { display: none; }
.hero-inner { position: relative; max-width: 52rem; margin-inline: auto; }
.hero-home .hero-title { font-size: clamp(2.75rem, 8vw, 5.25rem); line-height: 1.04; max-width: 50rem; margin: 0 auto; }
.hero-rule { width: 4rem; height: 2px; background: var(--gold); margin: 2rem auto; }
.hero-home .hero-sub { font-size: 1.19rem; max-width: 38.75rem; margin: 0 auto; }
.hero-rings { position: absolute; left: 50%; top: 11rem; width: 0; height: 0; pointer-events: none; }
.hero-rings span { position: absolute; left: 0; top: 0; border-radius: 50%; border: 1px solid rgba(201, 151, 63, .35); transform: translate(-50%, -50%); }
.hero-rings span:nth-child(1) { width: 660px; height: 660px; }
.hero-rings span:nth-child(2) { width: 940px; height: 940px; border-color: rgba(201, 151, 63, .28); }
.hero-rings span:nth-child(3) { width: 1280px; height: 1280px; border-color: rgba(201, 151, 63, .2); }

/* Feed */
.feed { display: grid; grid-template-columns: repeat(auto-fill, minmax(17.5rem, 1fr)); gap: 2.5rem; }
.entry { padding-top: 1.75rem; border-top: 1px solid var(--rule); min-width: 0; }
.feed .entry:first-child { border-top: 2px solid var(--gold); }
.entry-meta { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin: 0 0 .6rem; font-size: .9rem; color: var(--muted); }
.entry-tag { color: var(--accent-text); font-weight: 600; text-decoration: none; }
.entry-title { font: 500 clamp(1.75rem, 3.6vw, 2.25rem)/1.15 var(--serif); margin: 0 0 .6rem; text-wrap: balance; }
.entry-title a { color: var(--text); text-decoration: none; }
.entry-title a:hover { color: var(--link); }
.entry-excerpt { margin: 0; color: var(--muted); }

.pagination { display: flex; justify-content: space-between; align-items: center; margin: 3.5rem 0 4rem; padding-top: 1.5rem; border-top: 1px solid var(--rule); font-size: .95rem; }
.pagination-pos { color: var(--muted); }

/* Article */
.article-header { padding: clamp(3.5rem, 9vw, 6rem) 0 2rem; }
.article-header .entry-meta { margin-bottom: 1.25rem; }
.article-title { font: 500 clamp(2.5rem, 6vw, 4rem)/1.08 var(--serif); margin: 0; text-wrap: balance; }
.article-lede { font: 400 1.5rem/1.45 var(--serif); font-style: italic; color: var(--muted); margin: 1.5rem 0 0; }
.article-image { margin-bottom: 3rem; }
.article-image img { width: 100%; border-radius: 4px; }
.article-image figcaption, .kg-card figcaption { font-size: .875rem; color: var(--muted); text-align: center; margin-top: .6rem; }
.article-author { margin: 3.5rem 0 5rem; padding-top: 1.5rem; border-top: 1px solid var(--rule); color: var(--muted); font-size: .95rem; }

/* Reading text: Scripture-weight serif, generous leading, short measure */
.gh-content { font: 400 1.4rem/1.7 var(--serif); }
.gh-content > * + * { margin-top: 1.4rem; }
.gh-content h2, .gh-content h3, .gh-content h4 { font-family: var(--serif); font-weight: 500; line-height: 1.2; margin-top: 3rem; }
.gh-content h2 { font-size: 2.1rem; }
.gh-content h3 { font-size: 1.65rem; }
.gh-content h4 { font-size: 1.4rem; font-style: italic; }
.gh-content strong { font-weight: 600; }
.gh-content p, .gh-content li { text-wrap: pretty; }
.gh-content ul, .gh-content ol { padding-left: 1.4rem; }
.gh-content li + li { margin-top: .4rem; }
.gh-content li::marker { color: var(--gold); }
.gh-content hr { border: 0; height: 1px; background: var(--rule); margin: 3rem auto; width: 4rem; }
.gh-content code { font-size: .85em; background: rgba(79, 93, 65, .12); padding: .1em .35em; border-radius: 3px; }
.gh-content pre { font-size: .9rem; line-height: 1.6; background: var(--ink); color: var(--parchment); padding: 1.25rem; border-radius: 4px; overflow-x: auto; }
.gh-content pre code { background: none; padding: 0; }

/* Scripture: blockquotes */
.gh-content blockquote {
  margin-inline: 0; padding: .25rem 0 .25rem 1.5rem;
  border-left: 2px solid var(--gold);
  font-size: 1.6rem; line-height: 1.5; font-style: italic;
}
.gh-content blockquote.kg-blockquote-alt { border: 0; text-align: center; padding: 0; font-size: 1.9rem; }

/* Koenig editor cards */
.kg-width-wide { width: min(100vw - 3rem, 64rem); margin-left: 50%; transform: translateX(-50%); }
.kg-width-full { width: 100vw; margin-left: 50%; transform: translateX(-50%); }
.kg-width-full img { width: 100%; }
.kg-image { margin-inline: auto; }
.kg-card { font-family: var(--sans); font-size: 1rem; }
.kg-callout-card { border-radius: 4px; padding: 1.25rem 1.5rem; }
.kg-bookmark-card a { text-decoration: none; }
.kg-bookmark-container { display: flex; color: var(--text); border: 1px solid var(--rule); border-radius: 4px; overflow: hidden; }
.kg-bookmark-content { padding: 1.1rem 1.25rem; flex: 1; }
.kg-bookmark-title { font: 500 1.3rem/1.2 var(--serif); }
.kg-bookmark-description, .kg-bookmark-metadata { font-size: .875rem; color: var(--muted); }
.kg-bookmark-thumbnail { width: 30%; position: relative; }
.kg-bookmark-thumbnail img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.kg-bookmark-icon { width: 1.1rem; height: 1.1rem; display: inline-block; vertical-align: middle; margin-right: .4rem; }
.kg-gallery-container { display: flex; flex-direction: column; gap: .5rem; }
.kg-gallery-row { display: flex; gap: .5rem; }
.kg-gallery-image img { width: 100%; height: 100%; object-fit: cover; }
.kg-embed-card { display: flex; flex-direction: column; align-items: center; }

/* Buttons */
.button, .kg-btn { display: inline-block; background: var(--clay); color: var(--parchment); padding: .7rem 1.4rem; border-radius: 4px; text-decoration: none; font-weight: 600; font-size: 1rem; }
.button:hover, .kg-btn:hover { background: #7a3d2d; }

/* Home: hero button */
.hero-actions { margin: 2.25rem 0 0; display: flex; flex-wrap: wrap; gap: .75rem 1rem; justify-content: center; }
.hero-actions .button { padding: .85rem 1.75rem; font-size: 1.05rem; }
.button-secondary { background: transparent; color: var(--text); box-shadow: inset 0 0 0 2px var(--gold); }
.button-secondary:hover { background: var(--gold); color: var(--ink); }

/* How to use: the six practices graphic */
.steps-graphic { margin-top: 3rem; margin-bottom: 3rem; }
.steps-graphic img { width: 100%; height: auto; border-radius: 4px; box-shadow: 0 0 0 1px var(--rule); }

.how-to .gh-content h2 { scroll-margin-top: 1.5rem; }
.how-to .gh-content h2 .num { color: var(--link); font-style: italic; margin-right: .2em; }
.how-to .gh-content .closing { margin: 3.5rem 0 0; padding-top: 2.5rem; border-top: 1px solid var(--rule); text-align: center; font-size: 1.9rem; line-height: 1.35; font-style: italic; text-wrap: balance; }
.how-to .article-end { height: 5rem; }


/* Footer */
.site-footer { margin-top: 6rem; padding: 2.5rem 0 3rem; border-top: 1px solid var(--rule); }
.footer-inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .5rem; }
.footer-line { font: italic 400 1.3rem/1.3 var(--serif); margin: 0; }
.footer-meta { margin: 0; color: var(--muted); font-size: .9rem; }

@media (max-width: 600px) {
  body { font-size: 1rem; }
  .gh-content { font-size: 1.25rem; }
  .gh-content blockquote { font-size: 1.4rem; }
  .brand-name { font-size: 1.8rem; }
  .kg-bookmark-container { flex-direction: column-reverse; }
  .kg-bookmark-thumbnail { width: 100%; height: 10rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* Mobile menu: right-aligned dropdown */
.nav-toggle { display: none; background: none; border: 0; padding: .4rem; margin: -.4rem; color: var(--text); cursor: pointer; border-radius: 4px; }
.nav-toggle:hover { color: var(--link); }
.header-inner { position: relative; }
@media (max-width: 700px) {
  .header-inner { flex-wrap: nowrap; }
  .nav-toggle { display: inline-flex; }
  .js .site-nav { display: none; position: absolute; right: 0; top: calc(100% + .5rem); z-index: 20; min-width: 13rem; padding: 1rem 1.5rem; background: var(--bg); border: 1px solid var(--rule); border-radius: 4px; box-shadow: 0 8px 24px rgba(31, 42, 60, .14); text-align: right; }
  .js .site-nav.is-open { display: block; }
  .js .site-nav .nav { flex-direction: column; align-items: flex-end; gap: .35rem; }
  .js .site-nav a { display: inline-block; padding: .4rem 0; font-size: 1.05rem; }
}

/* Home: today's meditation card */
:root { --panel: #FAF5EA; --field: #FFFFFF; }
@media (prefers-color-scheme: dark) { :root[data-scheme="auto"] { --panel: rgba(246, 240, 228, .05); --field: #F6F0E4; } }
.today { background: var(--ink); color: var(--parchment); border-radius: 8px; padding: clamp(2rem, 5vw, 3.5rem); }
@media (prefers-color-scheme: dark) { :root[data-scheme="auto"] .today { background: #273449; box-shadow: inset 0 0 0 1px rgba(201, 151, 63, .35); } }
.today-label { margin: 0 0 .6rem; font-size: .875rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.today-title { font: 500 clamp(2.5rem, 6vw, 4rem)/1.05 var(--serif); margin: 0 0 1rem; }
.today-title a { color: inherit; text-decoration: none; }
.today-title a:hover { text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: .12em; }
.today-excerpt { margin: 0; max-width: 40rem; font-size: 1.19rem; color: #B3B7BF; }
.today-listen { display: flex; align-items: center; gap: 1.25rem; margin-top: 2.25rem; padding: 1rem 1.25rem; border: 1px solid rgba(201, 151, 63, .5); border-radius: 6px; color: var(--parchment); text-decoration: none; font-weight: 600; }
.today-listen:hover { border-color: var(--gold); }
.play { flex: none; display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 50%; background: var(--gold); color: var(--ink); }
.today-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.75rem; margin-top: 1.75rem; }
.today-actions a:not(.button) { color: var(--parchment); font-size: .95rem; }
.button-light { background: var(--parchment); color: var(--ink); }
.button-light:hover { background: #fff; }

/* Home: email signup */
.signup-wrap { margin-top: 3.5rem; }
.signup { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.75rem 3rem; padding: 2.5rem 3rem; border: 1px solid var(--rule); border-radius: 8px; background: var(--panel); }
.signup-text { flex: 1 1 22rem; min-width: 0; }
.signup-title { font: 500 clamp(1.75rem, 3.5vw, 2.4rem)/1.1 var(--serif); margin: 0 0 .4rem; }
.signup-sub { margin: 0; color: var(--muted); }
.signup-form { flex: 1 1 24rem; display: flex; flex-wrap: wrap; align-items: flex-end; gap: .75rem; min-width: 0; }
.signup-field { flex: 1 1 14rem; display: flex; flex-direction: column; gap: .25rem; font-size: .875rem; color: var(--muted); }
.signup-field input { font: inherit; font-size: 1.0625rem; color: var(--ink); background: var(--field); padding: .7rem .875rem; border: 1px solid var(--muted); border-radius: 4px; width: 100%; }
.signup-form .button { border: 0; font: inherit; font-weight: 600; cursor: pointer; padding: .8rem 1.6rem; }
.signup-msg { display: none; flex-basis: 100%; margin: 0; font-size: .95rem; }
.signup-form.success .signup-success, .signup-form.error .signup-error { display: block; }
.signup-form.success .signup-field, .signup-form.success .button { display: none; }
.signup-form.loading .button { opacity: .6; }
.home-template .feed { margin-top: 4rem; }
.home-template .feed .entry:first-child { border-top: 1px solid var(--rule); }

/* Footer links */
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 1.5rem; margin: .5rem 0 0; font-size: .95rem; }
.footer-links a { color: var(--text); }
.footer-links:not(:has(a)) { display: none; }

/* About page */
.about-lede { font: italic 400 1.7rem/1.55 var(--serif); color: var(--muted); margin: 0; }
.about .gh-content { margin-top: 2.5rem; }
.about .gh-content h2:first-child { margin-top: 0; }
.about-actions { display: flex; flex-wrap: wrap; gap: .75rem 1rem; margin: 3rem 0 5rem; }

@media (max-width: 600px) { .signup { padding: 1.75rem 1.5rem; } }

/* Header logo: always Vigil Ink (Parchment only in optional dark mode) */
.brand, .brand-name, .mark { color: var(--ink); }
:root[data-scheme="auto"] .brand, :root[data-scheme="auto"] .brand-name, :root[data-scheme="auto"] .mark { color: var(--text); }
@media (prefers-color-scheme: light) { :root[data-scheme="auto"] .brand, :root[data-scheme="auto"] .brand-name, :root[data-scheme="auto"] .mark { color: var(--ink); } }

/* Support page */
.support .gh-content { margin-top: 0; }
.give-embed { margin: 3rem 0 5rem; padding: 1rem; background: var(--panel); border: 1px solid rgba(201,151,63,.45); border-radius: 6px; }
.give-embed iframe { max-width: 100%; }
