:root {
  --primary: #370617;
  --primary-800: #4d0a20;
  --primary-700: #6a1030;
  --accent: #FFBA08;
  --accent-dark: #C98D00;
  --ink: #2b0a12;
  --paper: #FFF8EC;
  --paper-alt: #FCEFD6;
  --line: #E7CFA8;
  --white: #ffffff;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Noto Sans KR', 'Malgun Gothic', sans-serif;
  font-weight: 400;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.7;
  font-size: 16px;
  overflow-x: hidden;
}
h1, h2, h3 {
  font-family: 'Do Hyeon', 'Noto Sans KR', sans-serif;
  font-weight: 400;
  line-height: 1.35;
  color: var(--primary);
  margin: 0 0 .6em;
}
p { margin: 0 0 1em; }
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;
}

/* ===== Header ===== */
.site-header {
  background: var(--primary);
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 3px solid var(--accent);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  font-family: 'Do Hyeon', sans-serif;
  color: var(--accent);
  text-decoration: none;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}
.main-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin: 0;
  padding: 0;
}
.main-nav a {
  color: var(--paper);
  text-decoration: none;
  font-size: .95rem;
  padding: 10px 2px;
  display: inline-block;
}
.main-nav a:hover,
.main-nav a:focus-visible { color: var(--accent); }
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--accent);
  border-radius: 8px;
  color: var(--accent);
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 500;
  border-radius: 999px;
  white-space: nowrap;
  min-height: 44px;
  padding: 0 20px;
}
.btn-header {
  background: var(--accent);
  color: var(--primary);
  flex-shrink: 0;
}
.btn-header:hover, .btn-header:focus-visible { background: var(--accent-dark); }
.btn-accent {
  background: var(--accent);
  color: var(--primary);
  font-size: 1.05rem;
  padding: 0 28px;
}
.btn-accent:hover, .btn-accent:focus-visible { background: var(--accent-dark); }

/* ===== Hero ===== */
.hero {
  position: relative;
  background: linear-gradient(160deg, var(--primary) 0%, var(--primary-800) 60%, var(--primary-700) 100%);
  color: var(--paper);
  padding: 64px 20px 90px;
}
.hero-inner {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
}
.eyebrow {
  color: var(--accent);
  font-weight: 500;
  letter-spacing: .04em;
  margin-bottom: .8em;
}
.hero h1 {
  color: var(--white);
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: .5em;
}
.hero .lead {
  font-size: 1.1rem;
  color: #f4e3d0;
  margin-bottom: 1.6em;
}
.hero-cta { display: flex; justify-content: center; }

/* sound-wave divider */
.wave-divider {
  position: relative;
  height: 60px;
  margin-top: -40px;
  line-height: 0;
}
.wave-divider svg {
  width: 100%;
  height: 100%;
  display: block;
}
.wave-divider path { fill: var(--paper); }
.section-alt .wave-divider path,
.section-alt + .wave-divider path { fill: var(--paper-alt); }
.wave-divider-flip { transform: scaleY(-1); }

/* ===== Sections ===== */
.section { padding: 56px 20px; background: var(--paper); }
.section-alt { background: var(--paper-alt); }
.section-inner { max-width: 1000px; margin: 0 auto; }
.section h2 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  margin-bottom: .6em;
}
.section-desc { color: #5a2436; margin-bottom: 1.6em; }

.core-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.core-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  border-radius: 10px;
  padding: 22px 24px;
}
.core-card h3 { font-size: 1.15rem; margin-bottom: .5em; }
.core-card p { margin-bottom: 0; font-size: .98rem; }

/* ===== Table ===== */
.table-wrap { overflow-x: auto; border-radius: 10px; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; min-width: 560px; background: var(--white); }
caption { text-align: left; }
th, td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line); font-size: .95rem; }
thead th { background: var(--primary); color: var(--white); font-weight: 500; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:nth-child(even) { background: var(--paper-alt); }

@media (max-width: 640px) {
  .table-wrap table { min-width: 0; }
  thead { display: none; }
  tbody tr {
    display: block;
    border-bottom: 8px solid var(--paper);
    padding: 8px 0;
  }
  td {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px dashed var(--line);
    text-align: right;
  }
  td::before {
    content: attr(data-label);
    font-weight: 500;
    color: var(--primary);
    text-align: left;
  }
}

/* ===== Gallery ===== */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.gallery figure { margin: 0; }
.gallery picture {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.gallery img { aspect-ratio: 4 / 3; object-fit: cover; }

/* ===== Checklist ===== */
.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
  display: grid;
  gap: 16px;
}
.checklist li {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px 22px 20px 64px;
}
.checklist li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 18px;
  top: 20px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--primary);
  font-family: 'Do Hyeon', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}
.checklist h3 { font-size: 1.1rem; margin-bottom: .35em; }
.checklist p { margin-bottom: 0; font-size: .97rem; }

/* ===== CTA band ===== */
.cta-band {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-700) 100%);
  color: var(--white);
  padding: 56px 20px;
  text-align: center;
}
.cta-inner { max-width: 700px; margin: 0 auto; }
.cta-band h2 { color: var(--white); }
.cta-band p { color: #f4e3d0; margin-bottom: 1.5em; }

/* ===== Footer ===== */
footer {
  background: #1f0209;
  color: #f0d9c6;
  padding: 44px 20px 30px;
}
footer nav {
  max-width: 1000px;
  margin: 0 auto 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
}
footer nav a {
  color: #f0d9c6;
  text-decoration: none;
  font-size: .92rem;
}
footer nav a:hover, footer nav a:focus-visible { color: var(--accent); }
footer address {
  max-width: 1000px;
  margin: 0 auto 16px;
  font-style: normal;
  font-size: .9rem;
  line-height: 1.8;
  color: #d9bda4;
  border-top: 1px solid #4d0a20;
  padding-top: 20px;
}
footer address a { color: var(--accent); text-decoration: none; }
footer p { max-width: 1000px; margin: 0 auto; font-size: .82rem; color: #a9836b; }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .core-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .main-nav ul {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--primary);
    padding: 12px 20px 20px;
    gap: 4px;
  }
  .main-nav ul.is-open { display: flex; }
  .nav-toggle { display: flex; }
  .main-nav { position: static; width: 100%; order: 3; }
  .header-inner { flex-wrap: wrap; }
  .gallery { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .hero { padding: 48px 16px 76px; }
  .section { padding: 40px 16px; }
  .gallery { grid-template-columns: 1fr; }
  .checklist li { padding: 18px 18px 18px 58px; }
}

/* related-cards (관련 페이지 카드 그리드) */
.related-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.related-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid var(--line, #ddd);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  background: var(--paper, #fff);
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.related-card:hover,
.related-card:focus-visible {
  border-color: currentColor;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.related-card-arrow { opacity: 0.6; flex-shrink: 0; }
@media (max-width: 480px) {
  .related-cards { grid-template-columns: 1fr; }
}
