:root {
  --color-primary: hsl(55 55% 32%);
  --color-primary-dark: hsl(55 60% 22%);
  --color-bg: hsl(50 30% 96%);
  --color-accent: hsl(48 65% 45%);
  --color-ink: hsl(55 20% 15%);
  --color-ink-soft: hsl(50 10% 35%);
  --color-line: hsl(50 20% 85%);
  --color-white: #FFFFFF;

  --font-title: 'Pretendard', 'Noto Sans KR', sans-serif;
  --font-body: 'Pretendard', 'Noto Sans KR', sans-serif;

  --fs-body: 1rem;
  --fs-small: 0.875rem;
  --fs-h3: 1.3rem;
  --fs-h2: 1.7rem;
  --fs-h1: 2.3rem;
  --fs-lede: 1.1rem;

  --radius: 0px;
  --section-pad: 96px;
  --section-pad-mobile: 56px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-display: swap;
  font-size: var(--fs-body);
  line-height: 1.7;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--font-title);
  font-display: swap;
  color: var(--color-primary);
  line-height: 1.35;
  margin: 0 0 0.6em;
  font-weight: 800;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); margin-top: 0; }
h3 { font-size: var(--fs-h3); }

p { margin: 0 0 1em; color: var(--color-ink-soft); }
a { color: var(--color-primary); }
img { max-width: 100%; height: auto; display: block; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 68px;
  display: flex;
  align-items: center;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-line);
}

.header-inner {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo { font-family: var(--font-title); font-weight: 800; font-size: 1.15rem; color: var(--color-primary); text-decoration: none; }

.btn {
  display: inline-block;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  transition: background-color 0.15s ease;
}

.btn-header { background: var(--color-primary); color: var(--color-white); padding: 10px 18px; font-size: var(--fs-small); }
.btn-header:hover { background: var(--color-primary-dark); }

.btn-primary { background: var(--color-accent); color: #fff; padding: 14px 26px; font-size: 1rem; }
.btn-primary:hover { background: var(--color-primary-dark); }

.btn-ghost { background: transparent; color: var(--color-primary); padding: 13px 25px; font-size: 1rem; border: 1.5px solid var(--color-primary); }
.btn-ghost:hover { background: var(--color-bg); }

.btn-large { padding: 16px 32px; font-size: 1.05rem; }

/* Hero — scattered caution-note cards archetype */
.hero { padding: var(--section-pad-mobile) 0 32px; background: linear-gradient(180deg, hsl(50 35% 93%), var(--color-bg)); }

.hero-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
}

.eyebrow { font-size: var(--fs-small); font-weight: 700; color: var(--color-accent); letter-spacing: 0.02em; margin: 0 0 0.6em; }

.hero-visual { order: 1; }

.hero-svg { width: 100%; max-width: 340px; height: auto; margin: 0 auto; display: block; }

.hero-text { order: 2; }

.hero-lede { font-size: var(--fs-lede); color: var(--color-ink); max-width: 46ch; }

.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

/* Breadcrumb */
.breadcrumb { font-size: var(--fs-small); color: var(--color-ink-soft); padding: 14px 20px 0; }
.breadcrumb a { color: var(--color-ink-soft); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span[aria-current] { color: var(--color-primary); font-weight: 600; }

/* Sections */
.section { padding: var(--section-pad-mobile) 0; border-bottom: 1px solid var(--color-line); }
.section:last-of-type { border-bottom: none; }

/* Sidenote (margin annotation) archetype */
.note-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 40px;
}
.note-row:last-child { margin-bottom: 0; }

.note-main h2 { margin-top: 0; }
.note-main p { margin-bottom: 1em; }

.note-aside {
  background: var(--color-white);
  border: 1px solid var(--color-primary);
  border-left: 6px solid var(--color-primary);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.note-label {
  margin: 0 0 6px;
  font-size: var(--fs-small);
  font-weight: 800;
  color: var(--color-primary);
  text-transform: none;
  letter-spacing: 0.02em;
}

.note-aside p:last-child { margin: 0; font-size: var(--fs-small); color: var(--color-ink-soft); }

/* Table */
.table-scroll { overflow-x: auto; border: 1px solid var(--color-line); border-radius: var(--radius); }
table { width: 100%; min-width: 560px; border-collapse: collapse; background: var(--color-white); }
caption { text-align: left; padding: 12px 16px; font-size: var(--fs-small); color: var(--color-ink-soft); background: var(--color-bg); }
th, td { padding: 12px 16px; text-align: left; border-top: 1px solid var(--color-line); font-size: var(--fs-small); }
thead th { background: var(--color-primary); color: var(--color-white); font-weight: 600; }
tbody th[scope="row"] { color: var(--color-primary); font-weight: 700; white-space: nowrap; }

/* Gallery — two-up, centered */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  max-width: 720px;
  margin: 16px auto 0;
}

.gallery figure { margin: 0; background: var(--color-white); border: 1px solid var(--color-line); border-radius: var(--radius); overflow: hidden; text-align: center; }
.gallery img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; margin-inline: auto; }
.gallery figcaption { padding: 12px 14px; font-size: var(--fs-small); color: var(--color-ink-soft); }

@media (max-width: 560px) {
  .gallery { grid-template-columns: 1fr; max-width: 360px; }
}

/* FAQ */
.faq-list { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.faq-list details { background: var(--color-white); border: 1px solid var(--color-line); border-radius: var(--radius); padding: 4px 16px; }
.faq-list summary { cursor: pointer; padding: 14px 0; font-weight: 700; color: var(--color-primary); }
.faq-list details p { padding-bottom: 14px; margin: 0; }

/* Related links */
.related-links { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.related-links li { padding: 12px 16px; background: var(--color-white); border: 1px solid var(--color-line); border-radius: var(--radius); font-size: var(--fs-small); color: var(--color-ink-soft); }
.related-links a { font-weight: 700; text-decoration: none; }
.related-links a:hover { text-decoration: underline; }

/* CTA */
.cta-section { background: var(--color-primary); }
.cta-inner { text-align: center; }
.cta-section h2, .cta-section p { color: var(--color-white); }
.cta-section p { max-width: 56ch; margin-left: auto; margin-right: auto; }
.cta-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 20px; }
.cta-section .btn-ghost { color: var(--color-white); border-color: var(--color-white); }
.cta-section .btn-ghost:hover { background: rgba(255,255,255,0.12); }
.cta-section .btn-primary { background: var(--color-white); color: var(--color-primary-dark); }
.cta-section .btn-primary:hover { background: hsl(50 35% 92%); }

/* Footer */
.site-footer { background: var(--color-primary-dark); padding: 40px 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 14px 20px; margin-bottom: 18px; }
.footer-links a { color: hsl(50 55% 85%); font-size: var(--fs-small); text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.footer-info { color: hsl(50 30% 70%); font-size: var(--fs-small); margin: 0; }

/* Breakpoints */
@media (min-width: 1024px) {
  :root { --section-pad-mobile: var(--section-pad); }
  .hero { padding: 72px 0 64px; }
  .hero-inner { grid-template-columns: 1fr 340px; gap: 56px; }
  .hero-visual { order: 1; }
  .hero-text { order: 0; }

  .note-row { grid-template-columns: 1fr 240px; gap: 32px; align-items: start; }
  .note-aside { position: sticky; top: 88px; }
}

@media (min-width: 1280px) {
  .container, .header-inner, .hero-inner { max-width: 1140px; }
}
