/* The Ceremono Journal: shared styles for blog.php and blog-post.php. */
@font-face { font-family: 'Playfair Display'; src: url('../assets/journal-fonts/PlayfairDisplay-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Playfair Display'; src: url('../assets/journal-fonts/PlayfairDisplay-Italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Playfair Display'; src: url('../assets/journal-fonts/PlayfairDisplay-SemiBold.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Libre Baskerville'; src: url('../assets/journal-fonts/LibreBaskerville-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Libre Baskerville'; src: url('../assets/journal-fonts/LibreBaskerville-Italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Libre Baskerville'; src: url('../assets/journal-fonts/LibreBaskerville-Bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }

:root { --j-display: 'Playfair Display', Georgia, 'Times New Roman', serif; --j-read: 'Libre Baskerville', Georgia, 'Times New Roman', serif; --j-tint: #f7f3ec; --j-rule: #1a1a1a; }
[data-theme="dark"] { --j-tint: #1a1815; --j-rule: #ededed; }

.j-kicker { font-size: .75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); }
.j-meta { font-size: .8125rem; color: var(--text-muted); }
.j-meta .sep { margin: 0 7px; opacity: .6; }
.j-title-link { color: inherit; background-image: linear-gradient(currentColor, currentColor); background-size: 0 1px; background-position: 0 100%; background-repeat: no-repeat; transition: background-size .35s ease; }
a:hover .j-title-link { background-size: 100% 1px; }

/* ---- Masthead ---- */
.j-mast { padding: calc(var(--nav-h) + 56px) 0 0; text-align: center; }
.j-mast h1 { font-family: var(--j-display); font-weight: 400; font-size: clamp(3rem, 8.4vw, 6.75rem); line-height: 1; letter-spacing: -.02em; }
.j-mast h1 em { font-style: italic; }
.j-mast p { font-family: var(--j-display); font-style: italic; font-size: clamp(1.1rem, 2vw, 1.4rem); color: var(--text-muted); margin-top: 16px; }
.j-topics { display: flex; justify-content: center; gap: 36px; margin-top: 40px; padding: 15px 0; border-top: 2px solid var(--j-rule); border-bottom: 1px solid var(--j-rule); overflow-x: auto; scrollbar-width: none; }
.j-topics::-webkit-scrollbar { display: none; }
.j-topics a { flex: none; font-size: .8125rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); padding-bottom: 2px; border-bottom: 1px solid transparent; transition: var(--transition); }
.j-topics a:hover, .j-topics a.active { color: var(--text); border-bottom-color: currentColor; }

/* ---- Lead story ---- */
.j-lead { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 64px; align-items: center; padding: 56px 0; border-bottom: 1px solid var(--border); color: inherit; }
.j-lead-media { aspect-ratio: 3/2; overflow: hidden; background: var(--bg-alt); }
.j-lead-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2,.6,.2,1); }
.j-lead:hover .j-lead-media img { transform: scale(1.03); }
.j-lead h2 { font-family: var(--j-display); font-weight: 400; font-size: clamp(2.1rem, 3.9vw, 3.4rem); line-height: 1.1; letter-spacing: -.012em; margin: 16px 0 18px; }
.j-lead p { font-family: var(--j-read); font-size: 1rem; line-height: 1.8; color: var(--text-muted); margin-bottom: 20px; }
.j-more { display: inline-block; margin-top: 22px; font-family: var(--j-display); font-style: italic; font-size: 1.15rem; color: var(--text); }
.j-more::after { content: ' \2192'; font-family: var(--font); font-style: normal; font-size: .9em; }

/* ---- Feed + sidebar ---- */
.j-columns { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 72px; padding: 56px 0 96px; }
.j-feed-h { font-family: var(--j-display); font-weight: 400; font-style: italic; font-size: 1.6rem; padding-bottom: 14px; border-bottom: 1px solid var(--j-rule); }
.j-post { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 32px; align-items: center; padding: 32px 0; border-bottom: 1px solid var(--border); color: inherit; }
.j-post-media { aspect-ratio: 3/2; overflow: hidden; background: var(--bg-alt); }
.j-post-media img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .7s cubic-bezier(.2,.6,.2,1); }
.j-post:hover .j-post-media img { transform: scale(1.04); }
.j-post h3 { font-family: var(--j-display); font-weight: 400; font-size: clamp(1.45rem, 2.2vw, 1.8rem); line-height: 1.18; margin: 9px 0 10px; }
.j-post p { font-family: var(--j-read); font-size: .875rem; line-height: 1.75; color: var(--text-muted); margin-bottom: 11px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.j-side { display: flex; flex-direction: column; gap: 44px; align-self: start; }
.j-side h4 { font-size: .75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; padding-bottom: 12px; margin-bottom: 8px; border-bottom: 1px solid var(--j-rule); }
.j-about { background: var(--j-tint); padding: 24px; }
.j-about b { display: block; font-family: var(--j-display); font-weight: 400; font-style: italic; font-size: 1.3rem; margin-bottom: 8px; }
.j-about p { font-family: var(--j-read); font-size: .8125rem; line-height: 1.75; color: var(--text-muted); }
.j-search { position: relative; align-self: start; }
.j-search input { width: 100%; box-sizing: border-box; padding: 11px 0 11px 28px; border: 0; border-bottom: 1px solid var(--j-rule); background: transparent; color: var(--text); font-size: .9375rem; }
.j-search svg { position: absolute; left: 0; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.j-cats a { display: flex; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--border); font-size: .9375rem; color: var(--text); }
.j-cats a:hover, .j-cats a.active { font-weight: 600; }
.j-cats span { color: var(--text-muted); font-weight: 400; }
.j-pop { counter-reset: pop; }
.j-pop a { counter-increment: pop; display: grid; grid-template-columns: 34px minmax(0, 1fr); padding: 13px 0; border-bottom: 1px solid var(--border); font-family: var(--j-display); font-size: 1.0625rem; line-height: 1.3; color: var(--text); }
.j-pop a::before { content: counter(pop); font-style: italic; font-size: 1.5rem; line-height: 1; color: var(--text-muted); }
.j-promo { display: block; color: inherit; }
.j-promo img { width: 100%; aspect-ratio: 3/2; object-fit: cover; margin-bottom: 14px; background: var(--bg-alt); }
.j-promo b { display: block; font-family: var(--j-display); font-weight: 400; font-size: 1.3rem; line-height: 1.2; margin-bottom: 6px; }
.j-promo .j-more { margin-top: 2px; font-size: 1.05rem; }

.j-empty { padding: 72px 0; text-align: center; }
.j-empty h3 { font-family: var(--j-display); font-weight: 400; font-size: 1.8rem; margin-bottom: 8px; }
.j-empty p { color: var(--text-muted); }
.j-empty a { text-decoration: underline; }
.j-pager { display: flex; justify-content: center; flex-wrap: wrap; gap: 20px; margin-top: 44px; font-size: .9375rem; color: var(--text-muted); }
.j-pager a:hover { color: var(--text); }
.j-pager .cur { color: var(--text); font-weight: 600; border-bottom: 1px solid currentColor; }

/* ---- Article ---- */
.j-progress { position: fixed; top: 0; left: 0; z-index: 1100; height: 3px; width: 100%; background: var(--text); transform: scaleX(0); transform-origin: 0 50%; }
.a-head { max-width: 860px; margin: 0 auto; padding: calc(var(--nav-h) + 60px) 0 44px; text-align: center; }
.a-head .j-kicker a:hover { color: var(--text); }
.a-head h1 { font-family: var(--j-display); font-weight: 400; font-size: clamp(2.4rem, 5.6vw, 4.5rem); line-height: 1.08; letter-spacing: -.015em; margin: 20px 0 22px; }
.a-deck { max-width: 660px; margin: 0 auto 24px; font-family: var(--j-display); font-style: italic; font-size: clamp(1.15rem, 2vw, 1.4rem); line-height: 1.5; color: var(--text-muted); }
.a-cover { max-width: 1040px; margin: 0 auto 64px; }
.a-cover img { display: block; width: 100%; height: auto; background: var(--bg-alt); }
.a-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 680px) minmax(0, 1fr); column-gap: 56px; }
.a-layout > .a-main { grid-column: 2; }
.a-toc { grid-column: 1; align-self: start; position: sticky; top: calc(var(--nav-h) + 24px); }
.a-toc h4 { font-size: .75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 12px; }
.a-toc a { display: block; padding: 7px 0; font-size: .875rem; line-height: 1.4; color: var(--text-muted); }
.a-toc a:hover { color: var(--text); }

.a-body { font-family: var(--j-read); font-size: 1.0625rem; line-height: 1.95; color: var(--text); }
.a-body > *:first-child { margin-top: 0; }
.a-body p, .a-body li { color: inherit; }
.a-body p { margin: 0 0 1.5em; }
.a-body > p:first-child::first-letter { float: left; font-family: var(--j-display); font-size: 4.9em; line-height: .82; padding: .06em .09em 0 0; }
.a-body h2 { font-family: var(--j-display); font-weight: 400; font-size: clamp(1.7rem, 3.2vw, 2.25rem); line-height: 1.2; margin: 1.9em 0 .6em; scroll-margin-top: calc(var(--nav-h) + 20px); }
.a-body h3 { font-family: var(--j-display); font-weight: 600; font-size: 1.3rem; line-height: 1.3; margin: 1.7em 0 .5em; }
.a-body ul, .a-body ol { margin: 0 0 1.6em; padding-left: 1.5em; }
.a-body ul { list-style: disc; }
.a-body ol { list-style: decimal; }
.a-body li { margin-bottom: .55em; padding-left: .25em; }
.a-body li::marker { color: var(--text-muted); }
.a-body strong { font-weight: 700; }
.a-body a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.a-body blockquote { margin: 2em 0; padding: 0 0 0 26px; border-left: 2px solid var(--j-rule); font-family: var(--j-display); font-style: italic; font-size: 1.45rem; line-height: 1.45; color: var(--text); }
.a-body blockquote p { margin: 0; }
.a-body figure { margin: 2.2em 0; }
.a-body img { max-width: 100%; height: auto; }
.a-body figcaption { margin-top: 10px; font-family: var(--font); font-size: .8125rem; color: var(--text-muted); text-align: center; }
.a-body iframe, .a-body video { max-width: 100%; }
.a-body hr { border: none; border-top: 1px solid var(--border); margin: 2.5em 0; }
.a-body table { width: 100%; border-collapse: collapse; margin: 2em 0; font-family: var(--font); font-size: .9375rem; line-height: 1.5; }
.a-body th, .a-body td { padding: 13px 14px 13px 0; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.a-body th { font-size: .75rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; border-bottom: 1px solid var(--j-rule); }

.a-share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin-top: 48px; padding: 16px 0; border-top: 1px solid var(--j-rule); border-bottom: 1px solid var(--border); font-size: .875rem; }
.a-share b { font-family: var(--j-display); font-style: italic; font-weight: 400; font-size: 1.1rem; margin-right: auto; }
.a-share a, .a-share button { display: inline-flex; align-items: center; gap: 7px; font: inherit; color: var(--text-muted); padding: 0; transition: color .15s ease; }
.a-share a:hover, .a-share button:hover { color: var(--text); }
.a-share svg { width: 15px; height: 15px; flex: none; fill: currentColor; }
.a-share svg.line { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.a-author { display: flex; gap: 18px; align-items: center; margin-top: 32px; }
.a-author .mark { flex: none; width: 56px; height: 56px; border-radius: 50%; background: var(--j-tint); display: flex; align-items: center; justify-content: center; font-family: var(--j-display); font-style: italic; font-size: 1.6rem; }
.a-author b { display: block; font-family: var(--j-display); font-weight: 400; font-size: 1.15rem; }
.a-author p { font-size: .875rem; line-height: 1.55; color: var(--text-muted); }

.a-shop { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); align-items: center; margin-top: 72px; background: var(--j-tint); color: inherit; }
.a-shop img { width: 100%; height: 100%; aspect-ratio: 3/2; object-fit: cover; }
.a-shop div { padding: 28px 36px; }
.a-shop b { display: block; font-family: var(--j-display); font-weight: 400; font-size: 1.65rem; line-height: 1.18; margin-bottom: 8px; }
.a-shop p { font-size: .9375rem; line-height: 1.6; color: var(--text-muted); }

.a-next { max-width: 1040px; margin: 80px auto 96px; }
.a-next-h { font-family: var(--j-display); font-weight: 400; font-style: italic; font-size: 1.6rem; text-align: center; padding-bottom: 14px; border-bottom: 1px solid var(--j-rule); margin-bottom: 32px; }
.a-next-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px; }
.a-card { color: inherit; }
.a-card .j-post-media { margin-bottom: 14px; }
.a-card:hover .j-post-media img { transform: scale(1.04); }
.a-card h3 { font-family: var(--j-display); font-weight: 400; font-size: 1.3rem; line-height: 1.22; margin-top: 7px; }

.preview-banner { position: sticky; top: var(--nav-h); z-index: 50; background: #b45309; color: #fff; text-align: center; padding: 8px; font-size: .875rem; font-weight: 500; }
.a-admin { margin-top: 20px; font-size: .875rem; text-decoration: underline; }
.nf-wrap { text-align: center; padding: 220px 0 160px; }
.nf-wrap h1 { font-family: var(--j-display); font-weight: 400; font-size: clamp(2.5rem, 6vw, 4rem); margin-bottom: 16px; }
.nf-wrap p { color: var(--text-muted); margin-bottom: 32px; }

@media (max-width: 1180px) {
  .a-layout { grid-template-columns: minmax(0, 680px); justify-content: center; }
  .a-layout > .a-main { grid-column: 1; }
  .a-toc { grid-column: 1; position: static; margin-bottom: 36px; padding: 20px 22px; background: var(--j-tint); }
}
@media (max-width: 1024px) {
  .j-columns { grid-template-columns: minmax(0, 1fr); gap: 56px; }
  .j-side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; }
  .j-lead { gap: 36px; }
  .j-promo { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; align-content: center; }
  .j-promo img { grid-row: 1 / span 2; margin-bottom: 0; }
  .j-promo b { align-self: end; }
  /* The floating support button would sit on top of the text. */
  .support-fab { display: none !important; }
}
@media (max-width: 760px) {
  .j-mast { padding-top: calc(var(--nav-h) + 28px); }
  .j-topics { justify-content: flex-start; gap: 26px; margin-top: 28px; }
  .j-lead { grid-template-columns: minmax(0, 1fr); gap: 22px; padding: 28px 0 36px; }
  .j-columns { padding: 36px 0 64px; }
  .j-post { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 28px 0; }
  .j-side { grid-template-columns: minmax(0, 1fr); }
  .j-promo { display: block; }
  .j-promo img { margin-bottom: 14px; }
  .a-head { padding: calc(var(--nav-h) + 28px) 0 28px; }
  .a-cover { margin-bottom: 36px; }
  .a-body { font-size: 1rem; line-height: 1.9; }
  .a-shop { grid-template-columns: minmax(0, 1fr); }
  .a-shop div { padding: 22px; }
  .a-next { margin: 56px auto 64px; }
  .a-next-grid { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .nf-wrap { padding: 160px 0 120px; }
}
