/* ---------- 크래프트 매거진 테마 : 창고바닥코팅전문 ---------- */
:root {
  --primary: #5A3E2B;
  --accent: #E4D5B7;
  --ink: #3A2A1D;
  --paper: #FBF6EC;
  --paper-line: #D8C6A3;
  --radius: 3px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'S-CoreDream-3Light', 'Apple SD Gothic Neo', sans-serif;
  font-display: swap;
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: 'S-CoreDream-3Light', 'Apple SD Gothic Neo', sans-serif; color: var(--primary); line-height: 1.35; }
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---------- 마스트헤드 헤더 ---------- */
.site-header {
  background: var(--accent);
  padding: 16px 20px 0;
  border-bottom: none;
}
.masthead-top {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-family: 'S-CoreDream-3Light', sans-serif;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--primary);
}
.masthead-tagline {
  max-width: 1280px;
  margin: 4px auto 12px;
  font-size: 0.85rem;
  color: var(--primary);
  opacity: 0.75;
  letter-spacing: 0.04em;
}
.masthead-rule {
  max-width: 1280px;
  margin: 0 auto;
  border-top: 3px solid var(--primary);
  border-bottom: 1px solid var(--primary);
  height: 5px;
}
.menu-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  cursor: pointer;
  padding: 0;
  align-items: center;
}
.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--primary);
}
#primary-nav {
  max-width: 1280px;
  margin: 0 auto;
  display: none;
  flex-direction: column;
  padding: 12px 0 16px;
}
#primary-nav.is-open { display: flex; }
#primary-nav a {
  text-decoration: none;
  padding: 12px 4px;
  min-height: 44px;
  display: flex;
  align-items: center;
  color: var(--primary);
  font-weight: 700;
  border-bottom: 1px dashed var(--paper-line);
}

/* ---------- 매거진 2컬럼 ---------- */
.magazine-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 20px 60px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
.mag-sidebar {
  background: #fff;
  border: 1px solid var(--paper-line);
  border-radius: var(--radius);
  padding: 20px;
  align-self: start;
  order: 2;
}
.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--primary);
  margin: 0 0 12px;
}
.mag-toc-title { font-weight: 700; margin: 0 0 8px; color: var(--primary); }
.mag-toc ol { margin: 0 0 20px; padding-left: 18px; }
.mag-toc li { margin-bottom: 8px; }
.mag-toc a { text-decoration: none; border-bottom: 1px solid var(--paper-line); }
.pull-quote {
  margin: 0 0 20px;
  padding: 16px;
  background: var(--accent);
  border-left: 4px solid var(--primary);
  font-family: 'S-CoreDream-3Light', sans-serif;
  font-size: 1rem;
}
.pull-quote p { margin: 0; }
.mag-cta { display: flex; flex-direction: column; gap: 12px; }

.mag-article { order: 1; min-width: 0; }
.mag-article h1 { font-size: 1.8rem; margin: 0 0 12px; }
.lede { font-size: 1.05rem; margin: 0 0 32px; }
.mag-article section { margin: 0 0 40px; padding-top: 32px; border-top: 1px solid var(--paper-line); }
.mag-article section:first-of-type { border-top: none; padding-top: 0; }
.mag-article h2 { font-size: 1.35rem; margin: 0 0 16px; }
.h2-sub { display: block; font-size: 0.8rem; font-weight: 400; color: var(--primary); opacity: 0.7; margin-top: 4px; }
.mag-article h3 { font-size: 1.05rem; margin: 20px 0 8px; }
.mag-article p { margin: 0 0 14px; }

/* ---------- 스탬프 버튼 ---------- */
.btn-stamp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 26px;
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  box-shadow: 0 0 0 3px var(--paper), 0 0 0 4px var(--primary);
  outline-offset: 4px;
  font-family: 'S-CoreDream-3Light', sans-serif;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  background: var(--primary);
  color: var(--paper);
  transform: rotate(-1deg);
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn-stamp:hover { transform: rotate(0deg) translateY(-2px); }
.btn-stamp-ghost {
  background: transparent;
  color: var(--primary);
  box-shadow: 0 0 0 3px var(--paper), 0 0 0 4px var(--paper-line);
  transform: rotate(1deg);
}
.btn-stamp-ghost:hover { background: var(--accent); transform: rotate(0deg) translateY(-2px); }

/* ---------- 표 ---------- */
.table-scroll { overflow-x: auto; margin-bottom: 8px; }
table { border-collapse: collapse; width: 100%; min-width: 480px; background: #fff; }
th, td { border: 1px solid var(--paper-line); padding: 10px 12px; text-align: left; font-size: 0.92rem; }
th { background: var(--accent); color: var(--primary); font-family: 'S-CoreDream-3Light', sans-serif; }

/* ---------- 갤러리 ---------- */
.gallery-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.gallery-grid picture { display: block; border: 1px solid var(--paper-line); border-radius: var(--radius); overflow: hidden; }
.gallery-grid img { width: 100%; }

/* ---------- 주의사항 ---------- */
.notice-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.notice-list li {
  background: #fff;
  border: 1px solid var(--paper-line);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.notice-list strong { color: var(--primary); }

/* ---------- 아코디언 ---------- */
.accordion-item { border-bottom: 1px solid var(--paper-line); }
.accordion-item h3 { margin: 0; font-size: 1rem; }
.accordion-trigger {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  font-family: 'S-CoreDream-3Light', sans-serif;
  font-size: 1rem;
  color: var(--primary);
  padding: 16px 28px 16px 0;
  min-height: 44px;
  cursor: pointer;
  position: relative;
}
.accordion-trigger::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
}
.accordion-trigger[aria-expanded="true"]::after { content: "\2212"; }
.accordion-panel { padding: 0 0 16px; }
.accordion-panel p { margin: 0; }

/* ---------- 관련 페이지 ---------- */
.related-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.related-card {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 44px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--paper-line);
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 700;
  color: var(--primary);
}
.related-card:hover { background: var(--accent); }

/* ---------- CTA ---------- */
.cta-section {
  background: var(--primary);
  color: var(--paper);
  padding: 28px;
  border-radius: var(--radius);
  border-top: none;
}
.cta-section h2, .cta-section p { color: var(--paper); }
.cta-section .btn-stamp { box-shadow: 0 0 0 3px var(--primary), 0 0 0 4px var(--paper); background: var(--paper); color: var(--primary); }
.cta-section .btn-stamp-ghost { box-shadow: 0 0 0 3px var(--primary), 0 0 0 4px var(--accent); background: transparent; color: var(--paper); }

/* ---------- 푸터 ---------- */
.site-footer {
  background: var(--primary);
  color: var(--accent);
  padding: 32px 20px;
}
.footer-nav {
  max-width: 1280px;
  margin: 0 auto 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.footer-nav a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.footer-nav a:hover { text-decoration: underline; }
address {
  max-width: 1280px;
  margin: 0 auto 16px;
  font-style: normal;
  font-size: 0.85rem;
  line-height: 1.9;
  color: var(--accent);
  opacity: 0.9;
}
address a { color: var(--accent); text-decoration: underline; }
.site-footer p { max-width: 1280px; margin: 0 auto; font-size: 0.8rem; opacity: 0.75; }

/* ---------- 반응형 ---------- */
@media (min-width: 480px) {
  .related-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 768px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .mag-cta { flex-direction: row; }
  .related-cards { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1024px) {
  .menu-toggle { display: none; }
  #primary-nav { display: flex !important; flex-direction: row; gap: 24px; padding: 10px 0 16px; }
  #primary-nav a { border-bottom: none; min-height: auto; padding: 4px; }
  .magazine-wrap { grid-template-columns: 280px 1fr; align-items: start; }
  .mag-sidebar { position: sticky; top: 20px; order: 1; }
  .mag-article { order: 2; }
  .mag-article h1 { font-size: 2.2rem; }
  .lede { font-size: 1.1rem; }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1280px) {
  .magazine-wrap { grid-template-columns: 320px 1fr; gap: 48px; }
}
