/* =============================
   쿠가세 ISSUE 02 - Editorial
   Cream · Forest · Red
   ============================= */

:root {
  --cream: #F5F0E6;
  --cream-2: #EAE2D2;
  --cream-3: #DDD0B7;
  --forest: #143628;
  --forest-2: #0B2418;
  --forest-3: #1F4D3A;
  --red: #E63946;
  --red-2: #C12D39;
  --ink: #1A1A1A;
  --ink-2: #444;
  --muted: #6E6A60;
  --rule: #C9BFA7;
  --gold: #E9C46A;
  --serif: 'Gowun Batang', 'Playfair Display', Georgia, serif;
  --display: 'Playfair Display', 'Gowun Batang', serif;
  --body: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'tnum', 'kern';
  /* Paper grain */
  background-image:
    radial-gradient(circle at 23% 35%, rgba(20,54,40,0.025) 0.5px, transparent 0.7px),
    radial-gradient(circle at 67% 78%, rgba(20,54,40,0.025) 0.4px, transparent 0.6px),
    radial-gradient(circle at 88% 12%, rgba(230,57,70,0.02) 0.5px, transparent 0.7px);
  background-size: 80px 80px, 120px 120px, 100px 100px;
}

.container { max-width: 1180px; margin: 0 auto; padding: 0 28px; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

/* ============ RIBBON ============ */
.ribbon {
  background: var(--forest);
  color: var(--cream);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.ribbon-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 9px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  font-weight: 700;
}
.ribbon-mid {
  flex: 1;
  text-align: center;
  font-style: italic;
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--gold);
}
.ribbon-issue { color: var(--cream); }
.ribbon-date { color: var(--cream); font-feature-settings: 'tnum'; }

/* ============ MASTHEAD ============ */
.masthead { background: var(--cream); }
.mast-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  padding-bottom: 18px;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  background: var(--forest);
  color: var(--cream);
  border-radius: 50%;
  font-family: var(--display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0;
}
.brand-mark.sm { width: 32px; height: 32px; font-size: 15px; }
.brand-wordmark {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 26px;
  color: var(--forest);
  letter-spacing: -0.02em;
}
.mast-nav {
  display: flex;
  gap: 28px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
}
.mast-nav a:hover { color: var(--red); }
.mast-meta {
  font-family: var(--display);
  font-style: italic;
  color: var(--muted);
  font-size: 14px;
}
.mast-rule {
  height: 1px;
  background: var(--forest);
  position: relative;
  margin-top: 4px;
}
.mast-rule::before, .mast-rule::after {
  content: '';
  position: absolute;
  left: 28px;
  right: 28px;
  height: 1px;
  background: var(--forest);
}
.mast-rule::before { top: -4px; }
.mast-rule::after { display: none; }

/* ============ COVER ============ */
.cover {
  padding: 70px 0 100px;
  border-bottom: 1px solid var(--rule);
  position: relative;
}
.cover-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 60px;
  align-items: center;
}
.kicker {
  display: inline-block;
  font-family: var(--body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--red);
  text-transform: uppercase;
  padding-bottom: 6px;
  border-bottom: 1.5px solid var(--red);
  margin-bottom: 22px;
}
.cover-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(40px, 5.5vw, 72px);
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: var(--forest);
  margin-bottom: 26px;
}
.cover-title em {
  font-family: var(--display);
  font-style: italic;
  font-weight: 500;
  color: var(--red);
}
.cover-title .red { color: var(--red); }
.cover-lede {
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink-2);
  max-width: 540px;
  margin-bottom: 32px;
  font-weight: 400;
}

/* CTA */
.cover-cta {
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: flex-start;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--forest);
  color: var(--cream);
  padding: 16px 28px;
  font-weight: 700;
  font-size: 15px;
  border-radius: 0;
  border: 1.5px solid var(--forest);
  letter-spacing: -0.005em;
  transition: all 0.2s ease;
  position: relative;
}
.btn-primary::before {
  content: '';
  position: absolute;
  top: 4px; left: 4px;
  right: -4px; bottom: -4px;
  border: 1.5px solid var(--forest);
  z-index: -1;
  transition: all 0.2s ease;
}
.btn-primary:hover {
  background: var(--red);
  border-color: var(--red);
  transform: translate(-2px, -2px);
}
.btn-primary:hover::before { border-color: var(--red); }
.btn-primary svg { transition: transform 0.2s ease; }
.btn-primary:hover svg { transform: translateX(3px); }

.btn-secondary {
  font-family: var(--display);
  font-style: italic;
  color: var(--forest);
  font-size: 16px;
  font-weight: 500;
  border-bottom: 1.5px solid var(--forest);
  padding-bottom: 2px;
}
.btn-secondary:hover { color: var(--red); border-color: var(--red); }

.cover-timer {
  background: var(--cream-2);
  border: 1.5px solid var(--forest);
  padding: 16px 22px;
  display: inline-block;
}
.timer-label {
  display: block;
  font-family: var(--body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--forest);
  margin-bottom: 10px;
}
.timer-row {
  display: flex;
  gap: 16px;
  align-items: baseline;
}
.t-cell {
  display: flex;
  align-items: baseline;
  gap: 3px;
}
.t-num {
  font-family: var(--display);
  font-weight: 700;
  font-size: 30px;
  color: var(--forest);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1;
}
.t-unit {
  font-family: var(--display);
  font-style: italic;
  font-size: 13px;
  color: var(--red);
  letter-spacing: 0.05em;
}

.cover-art {
  width: 100%;
  max-width: 440px;
  margin-left: auto;
  display: block;
  filter: drop-shadow(8px 12px 0 rgba(20, 54, 40, 0.12));
}

/* ============ TOC ============ */
.toc {
  padding: 70px 0;
  background: var(--cream-2);
  border-bottom: 1px solid var(--rule);
}
.toc-head { margin-bottom: 40px; }
.serif-h2 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--forest);
}
.serif-h2.light { color: var(--cream); }
.serif-h2 em {
  font-family: var(--display);
  font-style: italic;
  font-weight: 500;
  color: var(--red);
}
.toc-list {
  list-style: none;
  max-width: 880px;
}
.toc-list li {
  border-top: 1px solid var(--rule);
}
.toc-list li:last-child { border-bottom: 1px solid var(--rule); }
.toc-list li a {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  align-items: baseline;
  padding: 18px 0;
  gap: 24px;
  font-size: 17px;
  color: var(--forest);
  transition: background 0.2s ease, padding 0.2s ease;
}
.toc-list li a:hover {
  background: linear-gradient(90deg, transparent 0%, rgba(230,57,70,0.06) 50%, transparent 100%);
  padding-left: 12px;
}
.toc-list li a:hover .toc-text { color: var(--red); }
.toc-num {
  font-family: var(--display);
  font-style: italic;
  font-weight: 500;
  font-size: 22px;
  color: var(--red);
}
.toc-text {
  font-family: var(--serif);
  font-weight: 400;
  transition: color 0.2s ease;
}
.toc-page {
  font-family: var(--display);
  font-style: italic;
  font-size: 14px;
  color: var(--muted);
}

/* ============ ARTICLE GRID ============ */
.article {
  padding: 90px 0;
  border-bottom: 1px solid var(--rule);
}
.article.alt { background: var(--cream-2); }
.article.dark {
  background: var(--forest);
  color: var(--cream);
}
.article-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 60px;
  align-items: start;
}
.article-meta {
  position: sticky;
  top: 30px;
  border-top: 2px solid var(--forest);
  padding-top: 14px;
}
.article-meta.light { border-top-color: var(--cream); }
.art-no {
  display: block;
  font-family: var(--display);
  font-style: italic;
  font-weight: 700;
  font-size: 48px;
  color: var(--red);
  line-height: 1;
  margin-bottom: 12px;
}
.art-tag {
  display: block;
  font-size: 11px;
  letter-spacing: 0.22em;
  font-weight: 700;
  color: var(--forest);
  text-transform: uppercase;
}
.article-meta.light .art-tag { color: var(--cream); }

.article-body { max-width: 760px; }

/* Article typography */
.article-body h2 { margin-bottom: 28px; }
.article-body .lede,
.article-body p.lede {
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.6;
  color: var(--forest);
  margin-bottom: 28px;
  font-weight: 400;
}
.article-body .lede.light { color: var(--cream); }
.article-body p {
  font-size: 16px;
  line-height: 1.85;
  color: var(--ink-2);
  margin-bottom: 18px;
}
.article-body strong { color: var(--forest); font-weight: 700; }
.article.dark .article-body p { color: rgba(245,240,230,0.85); }
.article.dark .article-body strong { color: var(--cream); }

.bodytext { font-size: 16px; }

.dropcap .drop {
  float: left;
  font-family: var(--serif);
  font-size: 72px;
  font-weight: 700;
  color: var(--red);
  line-height: 0.85;
  padding: 6px 10px 0 0;
}

.signature {
  font-family: var(--display);
  font-style: italic;
  color: var(--red);
  margin-top: 28px !important;
  font-size: 17px !important;
}

.footnote {
  font-size: 12px !important;
  color: var(--muted) !important;
  margin-top: 24px !important;
  font-style: italic;
}

/* CALENDAR */
.cal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-top: 30px;
  margin-bottom: 24px;
}
.cal-card {
  background: var(--cream);
  border: 1.5px solid var(--forest);
  padding: 28px 24px;
  position: relative;
}
.article.alt .cal-card { background: var(--cream); }
.cal-art {
  width: 100%;
  max-width: 200px;
  margin: 0 auto 20px;
  display: block;
}
.cal-h {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 20px;
  color: var(--forest);
  margin-bottom: 8px;
}
.cal-p {
  font-size: 14px !important;
  color: var(--ink-2);
  line-height: 1.7 !important;
  margin: 0 !important;
}

/* INSIDE 3-COL */
.inside-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin: 36px 0 36px;
}
.inside-col {
  border-top: 2px solid var(--cream);
  padding-top: 20px;
}
.inside-art {
  width: 80px;
  height: 80px;
  margin-bottom: 18px;
}
.inside-h {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 19px;
  color: var(--cream);
  margin-bottom: 10px;
}
.inside-col p {
  font-size: 14px !important;
  line-height: 1.7;
  color: rgba(245,240,230,0.78);
  margin: 0;
}

.pullquote {
  border-left: 3px solid var(--gold);
  padding: 18px 0 18px 28px;
  margin-top: 36px;
}
.pullquote p {
  font-family: var(--display);
  font-style: italic;
  font-size: 24px !important;
  line-height: 1.5 !important;
  color: var(--gold) !important;
  margin-bottom: 12px !important;
  font-weight: 500;
}
.pullquote cite {
  font-style: normal;
  font-size: 13px;
  color: rgba(245,240,230,0.6);
  letter-spacing: 0.05em;
}

/* DATA TABLE */
.data-wrap { margin: 30px 0; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: var(--cream);
  border: 1.5px solid var(--forest);
}
.data-table caption {
  text-align: left;
  font-family: var(--display);
  font-style: italic;
  font-size: 14px;
  color: var(--muted);
  padding: 0 0 12px;
  caption-side: top;
}
.data-table thead th {
  background: var(--forest);
  color: var(--cream);
  padding: 14px 12px;
  text-align: left;
  font-size: 12px;
  letter-spacing: 0.08em;
  font-weight: 700;
  text-transform: uppercase;
  border-bottom: 2px solid var(--forest-2);
}
.data-table tbody td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--rule);
  color: var(--ink-2);
}
.data-table tbody td:first-child {
  font-family: var(--serif);
  font-weight: 700;
  color: var(--forest);
}
.data-table tbody tr.hi {
  background: rgba(230, 57, 70, 0.06);
}
.data-table tbody tr.hi td:first-child { color: var(--red); }
.data-table tbody tr:last-child td { border-bottom: none; }

/* HEATMAP */
.heatmap-wrap {
  margin: 40px 0;
  background: var(--cream);
  border: 1.5px solid var(--forest);
  padding: 24px;
}
.hm-title {
  font-family: var(--display);
  font-style: italic;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 16px;
  font-weight: 500;
}
.heatmap { width: 100%; max-width: 700px; }
.hm-legend {
  display: flex;
  gap: 24px;
  margin-top: 16px;
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
}
.hm-legend span { display: inline-flex; align-items: center; gap: 8px; }
.lg { width: 14px; height: 14px; display: inline-block; }
.lg-hi { background: var(--red); }
.lg-mid { background: #F4A6A6; }
.lg-lo { background: var(--cream); border: 1px solid var(--forest); }

/* CALLOUTS */
.callouts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 36px;
}
.callout {
  background: var(--cream);
  border-top: 3px solid var(--red);
  padding: 22px 22px;
}
.article.alt .callout { background: var(--cream-2); border-color: var(--red); }
.co-no {
  display: block;
  font-family: var(--display);
  font-style: italic;
  font-size: 14px;
  color: var(--red);
  font-weight: 700;
  margin-bottom: 8px;
}
.callout p {
  font-size: 14px !important;
  line-height: 1.7 !important;
  color: var(--ink-2) !important;
  margin: 0 !important;
}
.callout strong { color: var(--forest); }

/* BRAND COLUMNS */
.brand-columns {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-top: 30px;
}
.brand-col {
  border-top: 2px solid var(--forest);
  padding-top: 16px;
}
.brand-h {
  font-family: var(--display);
  font-style: italic;
  font-size: 14px;
  color: var(--red);
  margin-bottom: 12px;
  font-weight: 500;
}
.brand-col ul {
  list-style: none;
}
.brand-col li {
  font-family: var(--serif);
  font-size: 16px;
  color: var(--forest);
  padding: 7px 0;
  border-bottom: 1px dotted var(--rule);
}
.brand-col li:last-child { border-bottom: none; }

/* MATRIX */
.matrix-wrap { margin: 28px 0 28px; }
.matrix-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--cream);
  border: 1.5px solid var(--forest);
  font-size: 15px;
}
.matrix-table caption {
  text-align: left;
  font-family: var(--display);
  font-style: italic;
  font-size: 14px;
  color: var(--muted);
  padding: 0 0 12px;
  caption-side: top;
}
.matrix-table th, .matrix-table td {
  padding: 14px 16px;
  text-align: center;
  border: 1px solid var(--rule);
}
.matrix-table thead th {
  background: var(--forest);
  color: var(--cream);
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.05em;
}
.matrix-table tbody th {
  text-align: left;
  font-family: var(--serif);
  font-weight: 700;
  color: var(--forest);
  background: var(--cream-2);
  font-size: 14px;
}
.matrix-table td {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 500;
  color: var(--ink-2);
}
.matrix-table td:has-text('◎'),
.matrix-table tbody tr td {
  font-weight: 500;
}
/* highlight ◎ via JS would be ideal; we use just font weight */
.legend {
  font-family: var(--display);
  font-style: italic;
  font-size: 13px;
  color: var(--muted);
  margin-top: 12px !important;
}
.payment-art {
  width: 100%;
  max-width: 400px;
  margin: 28px 0;
}

/* CLOSING */
.closing-cta {
  display: flex;
  gap: 24px;
  align-items: center;
  margin-top: 28px;
  flex-wrap: wrap;
}

/* COLOPHON */
.colophon {
  background: var(--forest);
  color: var(--cream);
  padding: 56px 0 36px;
}
.colo-grid {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 30px;
  align-items: center;
}
.colo-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.colo-brand .brand-wordmark { color: var(--cream); }
.colo-meta {
  text-align: center;
  font-family: var(--display);
  font-style: italic;
  font-size: 13px;
  color: rgba(245,240,230,0.7);
}
.colo-meta p { margin: 2px 0; }
.colo-nav {
  display: flex;
  gap: 24px;
  font-size: 14px;
  font-weight: 600;
}
.colo-nav a:hover { color: var(--gold); }
.colo-copy {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 12px;
  color: rgba(245,240,230,0.5);
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(245,240,230,0.12);
}

/* RESPONSIVE */
@media (max-width: 1000px) {
  .article-grid { grid-template-columns: 1fr; gap: 24px; }
  .article-meta { position: static; }
  .art-no { font-size: 38px; }
}

@media (max-width: 780px) {
  .ribbon-mid { display: none; }
  .cover { padding: 50px 0 70px; }
  .cover-grid { grid-template-columns: 1fr; gap: 40px; }
  .cover-right { order: -1; }
  .cover-art { max-width: 300px; margin: 0 auto; }
  .toc-list li a {
    grid-template-columns: 40px 1fr auto;
    gap: 12px;
    font-size: 15px;
  }
  .toc-page { font-size: 12px; }
  .toc-num { font-size: 18px; }
  .article { padding: 60px 0; }
  .cal-grid { grid-template-columns: 1fr; }
  .inside-grid { grid-template-columns: 1fr; }
  .callouts { grid-template-columns: 1fr; }
  .brand-columns { grid-template-columns: 1fr 1fr; }
  .colo-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .colo-brand, .colo-nav { justify-content: center; }
  .heatmap-wrap { overflow-x: auto; padding: 16px; }
  .heatmap { min-width: 600px; }
  .data-table { font-size: 13px; }
  .data-table th, .data-table td { padding: 10px 8px; }
  .matrix-table { font-size: 13px; }
  .matrix-table th, .matrix-table td { padding: 10px 8px; }
  .matrix-table td { font-size: 16px; }
}

@media (max-width: 480px) {
  .container { padding: 0 20px; }
  .ribbon-inner { padding: 8px 20px; font-size: 10px; }
  .timer-row { gap: 12px; }
  .t-num { font-size: 24px; }
  .brand-wordmark { font-size: 22px; }
  .brand-columns { grid-template-columns: 1fr; }
  .closing-cta { flex-direction: column; align-items: flex-start; }
}
