/* ===== 사주헌(四柱軒) 기본 스타일 ===== */

/* ── 리셋 ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-serif);
  font-size: var(--text-body);
  line-height: 1.8;
  letter-spacing: 0.01em;
  color: var(--fg-primary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── 한지 텍스처 배경 ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── 타이포그래피 ── */
h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--fg-primary);
  letter-spacing: -0.01em;
}

h1 {
  font-size: var(--text-display);
  line-height: 1.3;
  letter-spacing: -0.02em;
}

h2 {
  font-size: var(--text-heading);
  line-height: 1.35;
}

h3 {
  font-size: var(--text-subheading);
  line-height: 1.4;
}

p {
  margin-bottom: var(--space-md);
}

/* ── 한자 병기 ── */
.hanja {
  font-size: 0.9em;
  color: var(--fg-secondary);
}

/* ── 링크 ── */
a {
  color: var(--gold-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--fg-primary);
}

a:focus-visible {
  outline: 2px solid var(--gold-accent);
  outline-offset: 2px;
}

/* ── 레이아웃 ── */
.container {
  width: 100%;
  max-width: var(--max-container);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.content {
  max-width: var(--max-content);
  margin: 0 auto;
}

/* ── 헤더 ── */
.site-header {
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border-color);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  font-family: var(--font-serif);
  font-size: var(--text-subheading);
  font-weight: 700;
  color: var(--fg-primary);
  text-decoration: none;
}

.site-logo:hover { color: var(--fg-primary); }

.site-logo .logo-hanja {
  font-size: 0.85em;
  color: var(--fg-secondary);
  margin-left: var(--space-xxs);
}

.site-nav {
  display: flex;
  gap: var(--space-lg);
}

.site-nav a {
  font-family: var(--font-sans);
  font-size: var(--text-small);
  color: var(--fg-secondary);
  padding: var(--space-xs) var(--space-sm);
}

.site-nav a:hover { color: var(--fg-primary); }

/* ── 푸터 ── */
.site-footer {
  margin-top: var(--space-xxxl);
  padding: var(--space-xl) 0;
  border-top: 1px solid var(--border-color);
  font-family: var(--font-sans);
  font-size: var(--text-tiny);
  color: var(--fg-tertiary);
  text-align: center;
  line-height: 1.8;
}

.site-footer a {
  color: var(--fg-tertiary);
  text-decoration: underline;
}

.site-footer .footer-links {
  margin-bottom: var(--space-md);
}

.site-footer .footer-links a {
  margin: 0 var(--space-sm);
}

.site-footer .footer-biz {
  margin-top: var(--space-md);
  line-height: 2;
}

.site-footer .disclaimer {
  max-width: var(--max-content);
  margin: var(--space-md) auto 0;
}

/* ── 먹 번짐 구분선 ── */
.ink-divider {
  border: none;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    var(--fg-tertiary) 20%,
    var(--fg-tertiary) 80%,
    transparent
  );
  margin: var(--space-xl) 0;
}

/* ── 접근성 ── */
.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;
}

:focus-visible {
  outline: 2px solid var(--gold-accent);
  outline-offset: 2px;
}

/* ── 모바일 대응 ── */
@media (max-width: 480px) {
  .site-nav a {
    font-size: var(--text-tiny);
    padding: var(--space-xs);
  }
}
