/*
Theme Name: Blockpost Journal
Theme URI: https://blockpost.tech/
Author: FeederText Platform
Description: A reader-first crypto news theme for Blockpost.
Version: 2.0.0
Requires at least: 6.6
Requires PHP: 8.1
Text Domain: blockpost-journal
*/

:root {
  --bp-black: #0a0a0a;
  --bp-text: #171717;
  --bp-muted: #616161;
  --bp-light: #f7f7f5;
  --bp-line: #d7d7d2;
  --bp-brand: #007f8b;
  --bp-brand-dark: #005f68;
  --bp-red: #c51b29;
  --bp-white: #fff;
  --bp-width: 1280px;
  --bp-reading: 720px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bp-white);
  color: var(--bp-text);
  font-family: Arial, "Noto Sans KR", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid #54c9d2; outline-offset: 3px; }
img { display: block; max-width: 100%; height: auto; }
button, input { font: inherit; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.screen-reader-text:focus { z-index: 100000; top: 8px; left: 8px; width: auto; height: auto; padding: 12px 16px; clip: auto; background: #fff; color: #111; }

.bp-shell { width: min(calc(100% - 40px), var(--bp-width)); margin-inline: auto; }
.bp-label { margin: 0; color: var(--bp-brand-dark); font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.bp-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 20px; padding-top: 12px; border-top: 4px solid var(--bp-black); }
.bp-section-head h2 { margin: 0; font-family: Georgia, "Noto Serif KR", serif; font-size: clamp(1.7rem, 3vw, 2.3rem); line-height: 1.1; letter-spacing: -.025em; }
.bp-section-head a { color: var(--bp-brand-dark); font-size: .78rem; font-weight: 700; white-space: nowrap; }

/* Masthead and navigation */
.site-utility { border-bottom: 1px solid var(--bp-line); background: #fff; }
.site-utility__inner { display: flex; align-items: center; justify-content: space-between; min-height: 38px; color: var(--bp-muted); font-size: .68rem; }
.site-utility__links { display: flex; gap: 16px; }
.site-utility a:hover { color: var(--bp-brand-dark); text-decoration: underline; }
.site-header { background: #fff; }
.site-header__main { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 96px; }
.site-header__date { color: var(--bp-muted); font-size: .72rem; }
.site-brand { display: inline-flex; align-items: baseline; justify-content: center; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 900; letter-spacing: -.055em; line-height: 1; }
.site-brand span { color: var(--bp-brand); }
.site-header__tagline { justify-self: end; max-width: 250px; color: var(--bp-muted); font-size: .7rem; text-align: right; }
.site-nav { border-block: 1px solid var(--bp-black); }
.site-nav__inner { overflow-x: auto; scrollbar-width: none; }
.site-nav__inner::-webkit-scrollbar { display: none; }
.site-nav ul { display: flex; align-items: center; justify-content: center; gap: 30px; min-width: max-content; min-height: 47px; margin: 0; padding: 0; list-style: none; }
.site-nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: .8rem; font-weight: 700; }
.site-nav a:hover, .site-nav .current-menu-item > a { color: var(--bp-brand-dark); }
.site-topics { border-bottom: 1px solid var(--bp-line); }
.site-topics__inner { display: flex; align-items: center; justify-content: center; gap: 22px; min-height: 36px; overflow-x: auto; scrollbar-width: none; }
.site-topics__inner::-webkit-scrollbar { display: none; }
.site-topics a { flex: 0 0 auto; color: #454545; font-size: .7rem; }
.site-topics a:hover { color: var(--bp-brand-dark); text-decoration: underline; }

/* Homepage */
.bp-home { padding: 36px 0 76px; }
.bp-home-title { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.bp-home-title h1 { margin: 0; font-family: Georgia, "Noto Serif KR", serif; font-size: clamp(2rem, 5vw, 3.25rem); line-height: 1; letter-spacing: -.035em; }
.bp-home-title time { color: var(--bp-muted); font-size: .72rem; }
.bp-top-grid { display: grid; grid-template-columns: minmax(200px,.72fr) minmax(0,1.55fr) minmax(220px,.72fr); border-block: 1px solid var(--bp-black); }
.bp-top-column { min-width: 0; padding: 20px; }
.bp-top-column:first-child { padding-left: 0; border-right: 1px solid var(--bp-line); }
.bp-top-column:last-child { padding-right: 0; border-left: 1px solid var(--bp-line); }
.bp-column-title { margin: 0 0 14px; color: var(--bp-muted); font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.bp-lead-story__image { display: block; aspect-ratio: 16/9; overflow: hidden; background: #e9e9e5; }
.bp-lead-story__image img { width: 100%; height: 100%; object-fit: cover; }
.bp-lead-story__placeholder { display: grid; width: 100%; height: 100%; place-items: center; background: linear-gradient(145deg, #121212 0%, #21383b 55%, #00818d 160%); color: #fff; font-family: Georgia, serif; font-size: clamp(2.5rem,8vw,6rem); font-weight: 900; letter-spacing: -.06em; }
.bp-lead-story__category { display: block; margin-top: 16px; color: var(--bp-brand-dark); font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.bp-lead-story h2 { margin: 8px 0 9px; font-family: Georgia, "Noto Serif KR", serif; font-size: clamp(2rem, 4.2vw, 3.35rem); line-height: 1.04; letter-spacing: -.04em; }
.bp-lead-story h2 a:hover { color: var(--bp-brand-dark); }
.bp-lead-story p { max-width: 760px; margin: 0; color: #494949; font-family: Georgia, "Noto Serif KR", serif; font-size: .98rem; line-height: 1.6; }
.bp-story-list { margin: 0; padding: 0; list-style: none; }
.bp-story-list li { padding: 14px 0; border-top: 1px solid var(--bp-line); }
.bp-story-list li:first-child { padding-top: 0; border-top: 0; }
.bp-story-list a { font-family: Georgia, "Noto Serif KR", serif; font-size: 1.05rem; font-weight: 700; line-height: 1.3; }
.bp-story-list a:hover { color: var(--bp-brand-dark); }
.bp-story-list time, .bp-story-list span { display: block; margin-top: 6px; color: var(--bp-muted); font-family: Arial, sans-serif; font-size: .64rem; }
.bp-topic-list { margin: 0; padding: 0; list-style: none; }
.bp-topic-list li { border-top: 1px solid var(--bp-line); }
.bp-topic-list li:first-child { border-top: 0; }
.bp-topic-list a { display: flex; align-items: center; justify-content: space-between; min-height: 47px; font-size: .8rem; font-weight: 700; }
.bp-topic-list a::after { content: "→"; color: var(--bp-brand); }
.bp-topic-list a:hover { color: var(--bp-brand-dark); }
.bp-newsroom-note { margin-top: 20px; padding-top: 17px; border-top: 3px solid var(--bp-black); }
.bp-newsroom-note h3 { margin: 0 0 8px; font-family: Georgia, "Noto Serif KR", serif; font-size: 1.1rem; }
.bp-newsroom-note p { margin: 0; color: var(--bp-muted); font-size: .75rem; }
.bp-newsroom-note a { display: inline-block; margin-top: 9px; color: var(--bp-brand-dark); font-size: .7rem; font-weight: 700; }

.bp-latest { padding-top: 46px; }
.bp-news-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); border-top: 1px solid var(--bp-line); border-left: 1px solid var(--bp-line); }
.bp-card { min-width: 0; padding: 18px; border-right: 1px solid var(--bp-line); border-bottom: 1px solid var(--bp-line); background: #fff; }
.bp-card__media { display: block; aspect-ratio: 16/10; overflow: hidden; margin-bottom: 13px; background: #ecece8; }
.bp-card__media img { width: 100%; height: 100%; object-fit: cover; }
.bp-card__placeholder { display: grid; height: 100%; place-items: center; background: #efefec; color: #888; font-family: Georgia, serif; font-size: 2rem; font-weight: 700; }
.bp-placeholder--markets { background: linear-gradient(145deg,#121212,#174d52); color: #fff; }
.bp-placeholder--bitcoin { background: linear-gradient(145deg,#34220b,#b86b08); color: #fff; }
.bp-placeholder--ethereum { background: linear-gradient(145deg,#25283c,#6065a8); color: #fff; }
.bp-placeholder--policy { background: linear-gradient(145deg,#18243a,#365d8a); color: #fff; }
.bp-placeholder--technology { background: linear-gradient(145deg,#162b28,#277568); color: #fff; }
.bp-card__meta { color: var(--bp-brand-dark); font-size: .65rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.bp-card h2, .bp-card h3 { margin: 8px 0; font-family: Georgia, "Noto Serif KR", serif; font-size: 1.25rem; line-height: 1.25; letter-spacing: -.018em; }
.bp-card h2 a:hover, .bp-card h3 a:hover { color: var(--bp-brand-dark); }
.bp-card p { margin: 0; color: var(--bp-muted); font-family: Georgia, "Noto Serif KR", serif; font-size: .78rem; }
.bp-card__footer { display: flex; gap: 8px; margin-top: 13px; color: var(--bp-muted); font-size: .62rem; text-transform: uppercase; }
.bp-empty { grid-column: 1 / -1; padding: 38px 0; color: var(--bp-muted); font-family: Georgia, "Noto Serif KR", serif; font-size: 1rem; }

/* Archives and pages */
.bp-page-head { padding: 42px 0 18px; border-bottom: 1px solid var(--bp-black); }
.bp-page-head h1, .bp-page-head .bp-section-title { margin: 0; font-family: Georgia, "Noto Serif KR", serif; font-size: clamp(2rem,5vw,3.25rem); line-height: 1.05; letter-spacing: -.035em; }
.bp-page-head p { max-width: 720px; margin: 12px 0 0; color: var(--bp-muted); }
.bp-archive { padding: 28px 0 72px; }
.bp-main-grid { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 54px; padding: 48px 0 78px; }

/* Article */
.bp-article { min-width: 0; }
.bp-article__header { max-width: 920px; margin-bottom: 28px; }
.bp-article__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; color: var(--bp-muted); font-size: .7rem; }
.bp-article__category { color: var(--bp-brand-dark); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.bp-article__title { margin: 14px 0; font-family: Georgia, "Noto Serif KR", serif; font-size: clamp(2.5rem,6vw,4.7rem); line-height: 1.03; letter-spacing: -.045em; }
.bp-article__dek { max-width: 780px; margin: 0; color: #4b4b4b; font-family: Georgia, "Noto Serif KR", serif; font-size: clamp(1rem,2vw,1.2rem); line-height: 1.65; }
.bp-article__image { margin: 30px 0 36px; }
.bp-article__image img { width: 100%; max-height: 620px; object-fit: cover; }
.bp-prose { max-width: var(--bp-reading); color: #242424; font-family: Georgia, "Noto Serif KR", serif; font-size: 1.08rem; line-height: 1.9; }
.bp-prose > *:first-child { margin-top: 0; }
.bp-prose h2, .bp-prose h3, .bp-prose h4 { color: var(--bp-black); font-family: Arial, "Noto Sans KR", sans-serif; line-height: 1.28; }
.bp-prose h2 { margin: 2.4em 0 .7em; padding-top: .65em; border-top: 1px solid var(--bp-black); font-size: 1.7rem; }
.bp-prose h3 { margin: 2em 0 .6em; font-size: 1.28rem; }
.bp-prose p, .bp-prose ul, .bp-prose ol { margin: 1.25em 0; }
.bp-prose a { color: var(--bp-brand-dark); text-decoration: underline; text-underline-offset: 3px; }
.bp-prose blockquote { margin: 2em 0; padding: 15px 20px; border-left: 4px solid var(--bp-black); background: var(--bp-light); font-style: italic; }
.bp-prose pre { overflow-x: auto; padding: 18px; background: #111; color: #eee; font-size: .85rem; }
.bp-prose table { width: 100%; border-collapse: collapse; font-family: Arial, sans-serif; font-size: .84rem; }
.bp-prose th, .bp-prose td { padding: 11px; border: 1px solid var(--bp-line); text-align: left; }
.bp-prose th { background: var(--bp-light); }
.bp-article-info { max-width: var(--bp-reading); margin-top: 44px; border-top: 1px solid var(--bp-black); border-bottom: 1px solid var(--bp-line); }
.bp-article-info summary { display: flex; align-items: center; justify-content: space-between; min-height: 52px; cursor: pointer; font-size: .78rem; font-weight: 700; list-style: none; }
.bp-article-info summary::-webkit-details-marker { display: none; }
.bp-article-info summary::after { content: "+"; font-size: 1rem; }
.bp-article-info[open] summary::after { content: "−"; }
.bp-article-info__content { padding: 4px 0 20px; }
.bp-article-info dl { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px 24px; margin: 0; }
.bp-article-info dt { color: var(--bp-muted); font-size: .62rem; font-weight: 700; text-transform: uppercase; }
.bp-article-info dd { margin: 3px 0 0; font-size: .76rem; }
.bp-disclaimer { max-width: var(--bp-reading); margin-top: 16px; color: var(--bp-muted); font-size: .7rem; }
.bp-disclaimer a { text-decoration: underline; }
.bp-sidebar { position: sticky; top: 20px; align-self: start; }
.bp-sidebar__box { margin-bottom: 26px; padding-top: 12px; border-top: 4px solid var(--bp-black); }
.bp-sidebar__box h2 { margin: 0 0 10px; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.bp-sidebar__box ul { margin: 0; padding: 0; list-style: none; }
.bp-sidebar__box li { padding: 11px 0; border-top: 1px solid var(--bp-line); font-family: Georgia, "Noto Serif KR", serif; font-size: .84rem; }
.bp-sidebar__box li:first-child { border-top: 0; }
.bp-sidebar__box a:hover { color: var(--bp-brand-dark); }

.nav-links { display: flex; justify-content: center; gap: 7px; margin-top: 32px; }
.page-numbers { display: grid; min-width: 38px; height: 38px; place-items: center; border: 1px solid var(--bp-line); font-size: .74rem; }
.page-numbers.current, .page-numbers:hover { border-color: var(--bp-black); background: var(--bp-black); color: white; }

/* Footer */
.site-footer { border-top: 3px solid var(--bp-black); background: var(--bp-light); }
.site-footer__top { display: grid; grid-template-columns: 1.4fr 1fr; gap: 60px; padding: 38px 0 30px; }
.site-footer__brand { font-family: Georgia, serif; font-size: 1.65rem; font-weight: 900; letter-spacing: -.04em; }
.site-footer__brand span { color: var(--bp-brand); }
.site-footer p { max-width: 590px; margin: 10px 0 0; color: var(--bp-muted); font-size: .75rem; }
.site-footer__links { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px 28px; align-content: start; }
.site-footer__links a { font-size: .75rem; font-weight: 700; }
.site-footer__links a:hover { color: var(--bp-brand-dark); text-decoration: underline; }
.site-footer__bottom { display: flex; justify-content: space-between; gap: 20px; padding: 18px 0 24px; border-top: 1px solid var(--bp-line); color: var(--bp-muted); font-size: .64rem; }

@media (max-width: 980px) {
  .site-header__main { grid-template-columns: 1fr auto; min-height: 76px; }
  .site-header__date { display: none; }
  .site-brand { justify-self: start; font-size: 2.35rem; }
  .site-header__tagline { max-width: 150px; }
  .site-nav ul, .site-topics__inner { justify-content: flex-start; }
  .bp-top-grid { grid-template-columns: minmax(0,1.6fr) minmax(230px,.75fr); }
  .bp-top-column:first-child { grid-column: 1 / -1; grid-row: 2; display: block; padding: 24px 0 0; border-top: 1px solid var(--bp-black); }
  .bp-top-column:nth-child(2) { padding-left: 0; }
  .bp-story-list { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 22px; }
  .bp-story-list li, .bp-story-list li:first-child { padding: 0; border-top: 0; }
  .bp-news-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .bp-main-grid { grid-template-columns: 1fr; }
  .bp-sidebar { position: static; }
}

@media (max-width: 640px) {
  .bp-shell { width: min(calc(100% - 28px), var(--bp-width)); }
  .site-utility__inner { min-height: 32px; }
  .site-utility__links a:first-child { display: none; }
  .site-header__main { min-height: 67px; }
  .site-brand { font-size: 2rem; }
  .site-header__tagline { display: none; }
  .site-nav ul { gap: 22px; }
  .site-topics__inner { gap: 18px; }
  .bp-home { padding-top: 26px; }
  .bp-home-title time { display: none; }
  .bp-top-grid { display: flex; flex-direction: column; }
  .bp-top-column:nth-child(2) { order: 1; }
  .bp-top-column:last-child { order: 2; }
  .bp-top-column:first-child { order: 3; }
  .bp-top-column { padding: 20px 0; border: 0 !important; }
  .bp-top-column:last-child { border-top: 1px solid var(--bp-black) !important; }
  .bp-top-column:first-child { border-top: 1px solid var(--bp-black) !important; }
  .bp-story-list { display: block; }
  .bp-story-list li { padding: 14px 0; border-top: 1px solid var(--bp-line); }
  .bp-story-list li:first-child { padding-top: 0; border-top: 0; }
  .bp-lead-story h2 { font-size: 2.25rem; }
  .bp-news-grid { grid-template-columns: 1fr; border-left: 0; }
  .bp-card { padding: 18px 0; border-right: 0; }
  .bp-card__media { aspect-ratio: 16/9; }
  .bp-main-grid { gap: 35px; padding: 34px 0 58px; }
  .bp-article__title { font-size: 2.55rem; }
  .bp-prose { font-size: 1rem; }
  .bp-article-info dl { grid-template-columns: 1fr; }
  .site-footer__top { grid-template-columns: 1fr; gap: 28px; }
  .site-footer__bottom { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
