/* ================================================
   COMMON — shared across all baunuri pages
   ================================================ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --ink: #1a1715;
  --paper: #f6f3ee;
  --mid: #5c5650;
  --light: #7a756e;
  --wash: #e2ded7;
  --warm: #9a6f42;
  --sans: 'DM Sans', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', monospace;
}

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

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
a:hover { color: var(--warm); }

/* ---- GRAIN ---- */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.022;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---- TOP BAR ---- */
.topbar {
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--mid);
  letter-spacing: 0.03em;
  border-bottom: 1px solid var(--wash);
}
.topbar a { text-decoration: none; }
.topbar nav { display: flex; gap: 24px; }
.topbar nav a { transition: color 0.2s; }

/* ---- HERO LINE ---- */
.hero-line {
  width: 48px;
  height: 2px;
  background: var(--warm);
}

/* ---- FOOTER ---- */
footer {
  padding: 20px 40px 28px;
  border-top: 1px solid var(--wash);
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--light);
  letter-spacing: 0.03em;
}

/* ---- ANIMATION ---- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal.d1 { transition-delay: 0.1s; }
.reveal.d2 { transition-delay: 0.2s; }
.reveal.d3 { transition-delay: 0.3s; }

/* ---- I18N ---- */
html[lang="en"] .ko,
html[lang="ko"] .en { display: none; }

/* Override mono font in Korean mode to avoid 궁서체 fallback on mobile */
html[lang="ko"] {
  --mono: 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', system-ui, sans-serif;
}

.lang-toggle {
  cursor: pointer;
  font-family: 'IBM Plex Mono', 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', sans-serif;
  font-size: 0.72rem;
  color: var(--light);
  background: none;
  border: 1px solid var(--wash);
  border-radius: 3px;
  padding: 3px 8px;
  letter-spacing: 0.03em;
  transition: color 0.2s, border-color 0.2s;
  margin-left: 16px;
}
.lang-toggle:hover {
  color: var(--warm);
  border-color: var(--warm);
}

/* ---- RESPONSIVE BASE ---- */
@media (max-width: 520px) {
  .topbar, footer {
    padding-left: 20px;
    padding-right: 20px;
  }
}
