/*
Theme Name: FramedTruth
Theme URI: https://framedtruth.com
Author: VELLA TEAM
Description: Cinematic history & science archive magazine theme for FramedTruth. Custom-built, no page builder. Maps the VELLA TEAM HTML design onto every post automatically.
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: framedtruth
*/


/* ═══════════════════════════════
   ROOT
═══════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

:root {
  --gold:     #FFD400;
  --gold2:    #F5C400;
  --black:    #111111;
  --ink:      #1A1A1A;
  --white:    #FFFFFF;
  --bg:       #F8F6F1;
  --bg2:      #F2EFE8;
  --text:     #1C1C1C;
  --text2:    #444;
  --text3:    #999;
  --divider:  #E0DDD5;
  --link:     #9B2020;
}

body {
  font-family: 'Lora', serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; height: auto; }

/* ═══════════════════════════════
   READING MODE
═══════════════════════════════ */

body.reading-mode .article-body { max-width: 1080px; margin: 0 auto; }
body.reading-mode .article-body p { line-height: 2.05; }

/* ── 리딩모드: 메인이미지+가로바+세로바+푸터 숨김 / 본문·구분선·앞글뒷글 남김 ── */
body.reading-mode .home-hero,
body.reading-mode .site-header,
body.reading-mode .sidebar,
body.reading-mode .site-footer,
body.reading-mode .view-mobile-bar {
  display: none !important;
}
/* 리딩모드 본문 가운데 넓게 (홈보다 확실히 크게) */
body.reading-mode .story-column { max-width: 1180px; margin: 0 auto; width: 100%; }
body.reading-mode .content-wrap { display: block; }

/* 리딩모드 = 몰입 읽기: 본문 텍스트 1.5배 (모바일 18px 규칙보다 뒤·구체적으로 덮음) */
body.reading-mode .cover-image img { width: 100%; }
body.reading-mode .article-body p,
body.reading-mode .article-body { font-size: 27px; line-height: 1.9; }
body.reading-mode .article-body h2,
body.reading-mode .article-body h2.wp-block-heading { font-size: 42px; }
body.reading-mode .article-body h3,
body.reading-mode .article-body h3.wp-block-heading { font-size: 33px; }
/* 제목: 클래스 있든(.article-title) 없든(.title-block h1) 둘 다 1.5배 */
body.reading-mode .title-block h1,
body.reading-mode .title-block .article-title { font-size: clamp(39px, 5vw, 66px); }

body.reading-mode { background: #FAF8F3; }

.reading-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  background: rgba(248,246,241,0.88);
  border: 1px solid rgba(0,0,0,0.1);
  color: #bbb;
  font-family: 'Inter', sans-serif;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 6px 13px;
  cursor: pointer;
  border-radius: 2px;
  backdrop-filter: blur(6px);
  transition: color 0.2s, border-color 0.2s;
}
.reading-btn:hover,
body.reading-mode .reading-btn {
  color: var(--black);
  border-color: rgba(0,0,0,0.25);
}

/* ═══════════════════════════════
   HEADER
═══════════════════════════════ */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--divider);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: opacity 0.5s;
}
.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 8px 40px;
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-logo img { width: 88px; height: 88px; object-fit: contain; display:block; }
.desktop-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.desktop-nav a {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text2);
  transition: color 0.2s;
}
.desktop-nav a:hover { color: var(--black); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--black);
  border-radius: 1px;
}

/* mobile nav */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  flex-direction: column;
  background: var(--white);
}
.mobile-nav.open { display: flex; }
.mobile-nav-header {
  background: var(--gold);
  height: 50px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--black);
}
.mobile-nav-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--black);
}
.mobile-nav-close {
  font-size: 20px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--black);
}
.mobile-nav-links a {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--black);
  padding: 18px 28px;
  border-bottom: 1px solid var(--divider);
  text-align: center;
}

/* ═══════════════════════════════
   LAYOUT
═══════════════════════════════ */
.page-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
}
.content-wrap {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 56px;
  padding: 48px 0 80px;
  align-items: start;
}

/* ═══════════════════════════════
   TITLE BLOCK — 골드 배경 + 블랙 텍스트
═══════════════════════════════ */
.title-block {
  background: var(--gold);
  padding: 32px 40px 28px;
  margin-bottom: 36px;
}
.article-byline {
  font-family: 'Inter', sans-serif;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: rgba(0,0,0,0.45);
  margin-bottom: 12px;
}
.article-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(26px, 3.5vw, 44px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--black);
}

/* Cover */
.cover-image {
  width: 100%;
  margin-bottom: 36px;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #D4D0C8;
}
.cover-image img { width: 100%; height: 100%; object-fit: cover; }
.img-ph {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #252018 0%, #141210 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.img-ph span {
  font-family: 'Cormorant Garamond', serif;
  font-size: 80px;
  font-weight: 700;
  color: rgba(255,212,0,0.07);
  letter-spacing: -0.04em;
  user-select: none;
}

/* ═══════════════════════════════
   ARTICLE BODY
═══════════════════════════════ */
.article-body p {
  font-family: 'Lora', serif;
  font-size: 22px;
  line-height: 1.85;
  color: var(--text);
  margin-bottom: 26px;
}

/* dropcap — gradient gold line */
.dropcap-wrap {
  display: flex;
  align-items: flex-start;
  gap: 0;
  margin-bottom: 26px;
}
.dropcap-line {
  width: 2px;
  height: 52px;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(255,212,0,0.5) 20%,
    rgba(255,212,0,0.5) 80%,
    transparent 100%
  );
  margin-right: 18px;
  margin-top: 8px;
  flex-shrink: 0;
}
.dropcap-p {
  font-family: 'Lora', serif;
  font-size: 17px;
  line-height: 1.85;
  color: var(--text);
  flex: 1;
}
.dropcap-p::first-letter {
  font-family: 'Playfair Display', serif;
  font-size: 66px;
  font-weight: 900;
  float: left;
  line-height: 0.82;
  margin: 4px 10px 0 -4px;
  color: var(--black);
}

.article-body h2 {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--black);
  line-height: 1.25;
  margin: 48px 0 18px;
  padding-bottom: 9px;
  border-bottom: 1.5px solid var(--black);
}
.article-body figure { margin: 36px 0; }
.article-body figure .fig-ph {
  width: 100%;
  aspect-ratio: 3/2;
  background: linear-gradient(135deg, #E8E4DC, #D8D4CC);
  display: flex;
  align-items: center;
  justify-content: center;
}
.article-body figure .fig-ph span {
  font-family: 'Inter', sans-serif;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #bbb;
}
.article-body blockquote {
  margin: 32px 0;
  padding: 0 0 0 22px;
  border-left: 2px solid rgba(255,212,0,0.6);
}
.article-body blockquote p {
  font-family: 'Playfair Display', serif;
  font-size: 19px;
  font-style: italic;
  color: var(--ink);
  line-height: 1.6;
  margin-bottom: 0;
}
.pullquote {
  background: var(--black);
  padding: 26px 34px;
  margin: 38px 0;
}
.pullquote p {
  font-family: 'Playfair Display', serif !important;
  font-size: 19px !important;
  font-style: italic;
  font-weight: 700 !important;
  color: var(--gold) !important;
  line-height: 1.5 !important;
  margin-bottom: 0 !important;
}

/* Archive / Sources */
.archive-notes {
  margin-top: 52px;
  border-top: 1px solid var(--divider);
  padding-top: 30px;
}
.archive-notes-title {
  font-family: 'Inter', sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 20px;
}
.archive-q {
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--black);
  margin: 20px 0 7px;
}
.archive-a {
  font-family: 'Lora', serif;
  font-size: 15px;
  line-height: 1.8;
  color: var(--text2);
}
.verified-sources {
  margin-top: 40px;
  background: var(--bg2);
  padding: 22px 26px;
  border-left: 2px solid var(--black);
}
.vs-title {
  font-family: 'Inter', sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 12px;
}
.vs-list { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.vs-list li {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  color: var(--text2);
  line-height: 1.6;
  padding-left: 14px;
  position: relative;
}
.vs-list li::before { content: '—'; position: absolute; left: 0; color: #ccc; }

/* ═══════════════════════════════
   STORY SEPARATOR
   FRAMEDTRUTH 텍스트 + 좌우 라인 + 골드 도트
═══════════════════════════════ */
.story-separator {
  padding: 64px 0 56px;
  transition: opacity 0.5s;
}
.sep-rule {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 40px;
}
.sep-line { flex: 1; height: 1px; background: var(--black); }
.sep-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.sep-text {
  font-family: 'Playfair Display', serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--black);
  white-space: nowrap;
}
.sep-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
}

/* 이전 글 이미지 2개 가로 */
.sep-prev-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.sep-prev-card { display: block; cursor: pointer; }
.sep-prev-card:hover .sep-prev-title { color: var(--link); }
.sep-prev-img {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  margin-bottom: 12px;
}
.sep-prev-img-ph {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1E1B16, #2A2218);
  display: flex;
  align-items: center;
  justify-content: center;
}
.sep-prev-img-ph span {
  font-family: 'Cormorant Garamond', serif;
  font-size: 30px;
  font-weight: 700;
  color: rgba(255,212,0,0.1);
}
.sep-prev-cat {
  font-family: 'Inter', sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 5px;
}
.sep-prev-title {
  font-family: 'Playfair Display', serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--black);
  line-height: 1.3;
  transition: color 0.2s;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ═══════════════════════════════
   SIDEBAR
═══════════════════════════════ */
.sidebar { align-self: stretch; }
.sidebar-inner { position: sticky; top: 116px; }
.sidebar-label {
  font-family: 'Inter', sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--divider);
}
.sidebar-cards { display: flex; flex-direction: column; gap: 24px; }
.sidebar-card { display: block; cursor: pointer; }
.sidebar-card:hover .sidebar-card-title { color: var(--link); }
.sidebar-card-img {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  margin-bottom: 10px;
}
.sidebar-card-img-ph {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1E1B16, #2A2218);
  display: flex;
  align-items: center;
  justify-content: center;
}
.sidebar-card-img-ph span {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 700;
  color: rgba(255,212,0,0.09);
}
.sidebar-card-cat {
  font-family: 'Inter', sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 5px;
}
.sidebar-card-title {
  font-family: 'Playfair Display', serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--black);
  line-height: 1.32;
  transition: color 0.2s;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ═══════════════════════════════
   FOOTER
   3번째 + 4번째 이미지 구조
═══════════════════════════════ */
.site-footer {
  background: var(--black);
  padding: 64px 40px 0;
  transition: opacity 0.5s;
}
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 60px;
  padding-bottom: 48px;
  align-items: start;
}

/* 좌측 — 브랜드 */
.footer-brand { }
.footer-logo-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--white);
  margin-bottom: 12px;
}
/* TRUTH 골드 박스 */
.footer-logo-text .truth-box {
  background: var(--gold);
  color: var(--black);
  padding: 0 4px;
  display: inline;
}
.footer-tagline {
  font-family: 'Lora', serif;
  font-size: 14px;
  font-style: italic;
  color: #FFFFFF;
  line-height: 1.75;
}

/* 우측 — 네비게이션 */
.footer-nav { }
.footer-nav-title {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #E5C76B;
  margin-bottom: 16px;
}
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #FFFFFF;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--gold); }

/* copyright */
.footer-copy {
  max-width: 1280px;
  margin: 0 auto;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 18px 0;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: #FFFFFF;
}

/* ═══════════════════════════════
   VIEW MOBILE OPTIMIZED
═══════════════════════════════ */
.view-mobile-bar {
  display: none;
  background: var(--black);
  text-align: center;
  padding: 20px;
}
.view-mobile-bar a {
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.03em;
}

/* ═══════════════════════════════
   RESPONSIVE
═══════════════════════════════ */
@media (max-width: 960px) {
  .content-wrap { grid-template-columns: 1fr; padding: 28px 0 56px; }
  .sidebar { display: none; }
  .page-wrap { padding: 0 20px; }
  .header-inner { padding: 0 20px; }
  .desktop-nav { display: none; }
  .hamburger { display: flex; }
  .title-block { padding: 26px 24px 22px; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .site-footer { padding: 44px 20px 0; }
  .sep-prev-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .reading-btn { display: none; }
  .view-mobile-bar { display: block; }
  .pullquote { padding: 20px 22px; }
}
@media (max-width: 480px) {
  .sep-prev-grid { grid-template-columns: 1fr; }
  .article-body p { font-size: 18px; }
  .article-title { font-size: 24px; }
}

/* ═══════════════════════════════════════════════════════════
   WORDPRESS REAL-POST MAPPING  (실제 글 h1/h2/h3/p/figure 자동 적용)
   원본 디자인을 워드프레스 글 출력 구조에 연결 — 워크플로우 0 변경
═══════════════════════════════════════════════════════════ */

/* 제목 (제목란 <h1> 또는 자동 h1) */
.title-block h1, .title-block .article-title{
  font-family:'Playfair Display',serif; font-size:clamp(26px,3.5vw,44px);
  font-weight:900; line-height:1.1; letter-spacing:-0.01em; color:var(--black); margin:0;
}

/* 첫 문단 드롭캡 자동 (dropcap class 없이도 적용) */
.article-body > p:first-of-type::first-letter{
  font-family:'Playfair Display',serif; font-size:66px; font-weight:900;
  float:left; line-height:0.82; margin:4px 10px 0 -4px; color:var(--black);
}

/* 구텐베르크 헤딩 클래스 대응 */
.article-body h2, .article-body h2.wp-block-heading{
  font-family:'Playfair Display',serif; font-size:23px; font-weight:700; color:var(--black);
  line-height:1.25; margin:48px 0 18px; padding-bottom:9px; border-bottom:1.5px solid var(--black);
}
.article-body h3, .article-body h3.wp-block-heading{
  font-family:'Playfair Display',serif; font-size:18px; font-weight:700; color:var(--black);
  margin:30px 0 8px; line-height:1.3;
}

/* 실제 이미지 (비주얼 에디터로 넣은 사진) */
.article-body img{ width:100%; height:auto; display:block; }
.article-body figure, .article-body figure.wp-block-image{ margin:36px 0; }
.article-body figure img{ width:100%; height:auto; }
.article-body figcaption{
  font-family:'Inter',sans-serif; font-size:11px; color:var(--text3);
  text-align:center; margin-top:8px; letter-spacing:0.04em;
}
.article-body .alignfull img, .article-body .alignwide img{ width:100%; }
.article-body a{ color:var(--link); border-bottom:1px solid rgba(155,32,32,0.3); }

/* ───────── HOME ───────── */
.home-hero{ width:100%; background:var(--black); }
.home-hero img{ width:100%; height:auto; display:block; }

/* ───────── PAGE (About / Contact / Privacy) ───────── */
.page-narrow{ max-width:760px; margin:0 auto; padding:48px 40px 80px; }
.page-narrow .article-body h2{ margin-top:36px; }
@media(max-width:768px){ .page-narrow{ padding:32px 22px 60px; } }


/* story-separator 카드에 실제 대표이미지가 들어갈 때 */
.sep-prev-img img { width:100%; height:100%; object-fit:cover; display:block; }

/* byline FramedTruth 링크 */
.article-byline a{ color:inherit; border:none; text-decoration:none; }
.article-byline a:hover{ color:var(--black); }

/* ── single 이어지는 글 (continue-reading) ── */
.single-article .story-column{ max-width:760px; margin:0 auto; }
.continue-reading{ margin-top:10px; }
.cr-item{ display:block; margin:0; }
.cr-img{ width:100%; aspect-ratio:16/9; background:#1a1a1a; overflow:hidden; }
.cr-img img{ width:100%; height:100%; object-fit:cover; display:block; }
.cr-img-ph{ width:100%; height:100%; background:linear-gradient(135deg,#252018,#141210); }
.cr-title{
  font-family:'Playfair Display',serif; font-size:clamp(22px,2.4vw,30px); font-weight:700;
  line-height:1.18; color:var(--black); margin:16px 0 8px;
}
.cr-item:hover .cr-title{ color:var(--link); }
/* 리딩모드에서도 story-separator/continue-reading/cover/title/body 는 보임(이동 통로 유지) */

/* ── 본문 피드 (홈·싱글 공통): 글과 글 사이 여백/호흡 ── */
.ft-story{ margin: 0; }
.story-separator{ margin: 64px 0 72px; }     /* 구분선 위아래 큰 여백 */
.ft-story .cover-image{ margin-bottom: 0; }
.ft-story .title-block{ margin-top: 0; }
.ft-story .article-body{ margin-bottom: 8px; }
/* 다음 글과의 큰 간격은 story-separator 아래 margin으로 확보됨 */

/* 앞글/뒷글 빈칸(뒷글 없을 때 오른쪽 비움) */
.sep-prev-empty{ display:block; }

/* single: 세로바 없이 본문 가운데 넓게 */
.single-wrap .story-column{ max-width: 760px; margin: 0 auto; width:100%; }
.single-wrap .sidebar{ display:none; }

/* 홈 페이지네이션 */
.home-pagination{ margin-top: 60px; text-align:center; }
.home-pagination .page-numbers{
  font-family:'Inter',sans-serif; font-size:14px; padding:8px 14px; color:var(--text2);
  border:1px solid var(--divider); margin:0 3px; text-decoration:none;
}
.home-pagination .page-numbers.current{ background:var(--black); color:var(--white); border-color:var(--black); }

/* 홈 히어로 아래 헤더가 붙도록 */
.home-hero + .site-header{ margin-top:0; }
@media(max-width:768px){
  .header-logo img{ width:72px; height:72px; }
  .single-wrap .story-column{ padding:0 6px; }
  .story-separator{ margin:48px 0 54px; }
}

/* ══ ADD ONLY : 3번째 기둥 RELEASES (NAVIGATE와 짝 / baseline 유지) ══ */
.footer-releases { }
.footer-releases-text {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #FFFFFF;
  line-height: 1.75;
  margin-bottom: 14px;
}
.footer-releases-email a {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #E5C76B;
  text-decoration: none;
  transition: color 0.2s;
}
.footer-releases-email a:hover { color: var(--gold); }
