:root {
  --paper: #f7f2e8;
  --paper-2: #efe8d9;
  --card: #fffdf8;
  --ink: #2a3126;
  --muted: #55594a;
  --line: #d9d0bc;
  --apple: #a3262a;
  --leaf: #3b6636;
  --leaf-soft: #dfe8d3;
  --fill: #fff1a8;
  --maxw: 1120px;
  --textw: 720px;
  --gutter-l: max(16px, env(safe-area-inset-left));
  --gutter-r: max(16px, env(safe-area-inset-right));
  --font: "Pretendard", -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.05rem;
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-text-size-adjust: 100%;
}
p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--apple); outline-offset: 3px; border-radius: 4px; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
}

/* 제목 4단계: h1 / h2 / h3 / h4 */
h1 { font-size: clamp(1.9rem, 5.5vw, 3.1rem); line-height: 1.25; margin: 0; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3.6vw, 2.1rem); line-height: 1.3; margin: 0; letter-spacing: -0.01em; }
h3 { font-size: 1.35rem; line-height: 1.35; margin: 0; }
h4 { font-size: 1.1rem; line-height: 1.4; margin: 0; color: var(--leaf); }

/* 헤더 */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(247, 242, 232, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; }
.logo { font-weight: 800; letter-spacing: 0.08em; text-decoration: none; color: var(--apple); font-size: 1.1rem; flex: none; }
.nav { --nav-px: 12px; display: flex; gap: 4px 6px; overflow-x: auto; scrollbar-width: none; padding: 6px; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  white-space: nowrap; text-decoration: none; font-size: 0.95rem;
  padding: 6px var(--nav-px); border-radius: 999px; color: var(--ink);
}
.nav a:hover { background: var(--leaf-soft); }
.site-footer .nav { margin-left: calc(-1 * (var(--nav-px) + 6px)); }

/* 히어로 */
.hero { padding: 40px 0 56px; }
.eyebrow { color: var(--leaf); font-weight: 700; font-size: 0.95rem; margin-bottom: 12px; }
.hero h1 { max-width: 20em; text-wrap: balance; }
.lead { max-width: var(--textw); margin-top: 20px; font-size: 1.15rem; text-wrap: pretty; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 36px; }
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 999px;
  text-decoration: none; font-weight: 700; border: 2px solid var(--apple);
}
.btn-primary { background: var(--apple); color: #fff; }
.btn-ghost { color: var(--apple); background: transparent; }

/* 절 공통 */
.section { padding: 64px 0; }
.section.alt { background: var(--paper-2); }
.section h2 + * { margin-top: 20px; }
.sub { color: var(--muted); max-width: var(--textw); }
.body-text { max-width: var(--textw); }
.body-text + .team, .body-text + .contact-list { margin-top: 24px; }
.note { color: var(--muted); font-size: 0.95rem; margin-top: 12px; }
.section figure.photo-slot { margin-top: 32px; }

/* 사진 자리 */
.photo-slot {
  position: relative;
  aspect-ratio: var(--ratio, 16/9);
  width: 100%;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 16px;
  background: linear-gradient(135deg, #dfe8d3 0%, #efe6cf 100%);
  border: 2px dashed #9aa88a;
  border-radius: 14px;
  color: var(--muted); font-size: 0.95rem; line-height: 1.5;
}
.photo-slot .tag {
  display: inline-block; font-size: 0.8rem; font-weight: 700;
  background: var(--card); color: var(--leaf);
  border: 1px solid var(--leaf); border-radius: 999px;
  padding: 0 8px; margin-right: 6px;
}
.photo-slot img { width: 100%; height: 100%; object-fit: cover; }
.photo-slot:has(img) figcaption { display: none; }
.photo-slot:has(img) { border: 0; padding: 0; }

/* 영상 자리 */
.video-slot {
  aspect-ratio: 16/9; width: 100%;
  background: #1f2519; border-radius: 14px; overflow: hidden;
}
.video-slot video { width: 100%; height: 100%; display: block; background: #000; }
.video-missing {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 16px;
  background: #e9e2d0; color: var(--muted);
  border: 2px dashed #b3a98d; border-radius: 14px;
  font-size: 0.95rem;
}

/* 채움 표시 */
.fill {
  display: inline-block; background: var(--fill); color: #4a3d00;
  border: 2px dashed #b89b00; border-radius: 6px; padding: 2px 12px;
  font-weight: 700;
}

/* 숫자 타일 */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.tile {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 20px; display: flex; flex-direction: column; gap: 10px;
}
.tile .big { font-size: clamp(1.8rem, 3vw, 2.4rem); font-weight: 800; color: var(--apple); line-height: 1.15; }
.tile .what { font-size: 0.98rem; line-height: 1.6; }
.tile .src { margin-top: auto; font-size: 0.9rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 8px; }

/* 서비스 */
.svc {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 40px; padding: 48px 0; border-top: 1px solid var(--line);
}
.svc:first-of-type { margin-top: 32px; }
.svc-text { display: flex; flex-direction: column; gap: 16px; }
.svc-media { display: flex; flex-direction: column; gap: 16px; align-self: start; position: sticky; top: 80px; }
.num { font-size: 3.4rem; font-weight: 800; line-height: 1; color: var(--apple); }
.one { font-weight: 600; font-size: 1.12rem; }
.steps, .makes, .five { display: flex; flex-direction: column; gap: 12px; }
.steps { counter-reset: s; }
.steps li {
  counter-increment: s; position: relative;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px 14px 52px;
}
.steps li::before {
  content: counter(s); position: absolute; left: 14px; top: 14px;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--leaf); color: #fff; font-weight: 700; font-size: 0.9rem;
  display: flex; align-items: center; justify-content: center;
}
.steps li strong, .makes li strong { display: block; }
.makes li {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px;
}
.makes.plain li { background: none; border: 0; border-left: 3px solid var(--leaf); border-radius: 0; padding: 2px 0 2px 12px; }
.five { counter-reset: f; }
.five li {
  counter-increment: f; position: relative;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px 14px 52px;
}
.five li::before {
  content: counter(f); position: absolute; left: 14px; top: 14px;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--apple); color: #fff; font-weight: 700; font-size: 0.9rem;
  display: flex; align-items: center; justify-content: center;
}
.item-title { font-weight: 700; margin-bottom: 4px; }
.block-tag {
  display: inline-block; font-size: 0.85rem; font-weight: 700;
  color: var(--apple); border: 1px solid var(--apple); border-radius: 999px;
  padding: 0 10px; margin-left: 6px; white-space: nowrap;
}
.block-tag.proof { color: var(--leaf); border-color: var(--leaf); }
.facts { display: flex; flex-direction: column; gap: 10px; }
.facts div { border-left: 3px solid var(--leaf); padding-left: 12px; }
.facts dt { font-weight: 700; font-size: 0.92rem; color: var(--leaf); }
.svc-text h4 { margin-top: 12px; }

/* 일하는 방식 */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 28px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.card-n { font-size: 1.6rem; font-weight: 800; color: var(--apple); line-height: 1; margin-bottom: 8px; }
.card h3 { margin-bottom: 6px; }

/* 팀 */
.team { display: flex; flex-wrap: wrap; gap: 10px; }
.team li { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 6px 18px; font-weight: 600; }

/* 문의 */
.contact-list { display: flex; flex-direction: column; gap: 12px; max-width: var(--textw); }
.contact-list div { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.contact-list dt { font-weight: 700; min-width: 5.5em; }

/* 근거 */
.sources { display: flex; flex-direction: column; gap: 6px; font-size: 0.9rem; color: var(--muted); }
.sources li { padding-left: 14px; position: relative; }
.sources li::before { content: ""; position: absolute; left: 0; top: 0.8em; width: 5px; height: 5px; border-radius: 50%; background: var(--leaf); }

/* 푸터 */
.site-footer { padding: 32px 0 40px; border-top: 1px solid var(--line); font-size: 0.92rem; color: var(--muted); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.draft { width: 100%; }

/* 폰·태블릿 */
@media (max-width: 960px) {
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .svc { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .svc-media { position: static; }
}
@media (min-width: 561px) and (max-width: 960px) {
  .svc-media { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}
@media (max-width: 560px) {
  .section { padding: 48px 0; }
  .hero { padding: 24px 0 40px; }
  .tiles { gap: 10px; }
  .tile { padding: 14px; }
  .tile .what { font-size: 0.9rem; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .header-inner { gap: 0 8px; flex-wrap: wrap; padding-top: 8px; }
  .site-header .nav { flex-basis: 100%; overflow: visible; flex-wrap: wrap; padding-top: 0; }
  .nav { --nav-px: 10px; }
  .nav a { font-size: 0.92rem; }
  .block-tag { margin-left: 0; display: table; margin-top: 4px; }
}

/* 인쇄 */
@media print {
  .video-slot, .video-missing { display: none; }
  .photo-slot { border: 0; background: none; }
  .photo-slot:not(:has(img)) { display: none; }
  .site-header { position: static; }
  .site-header .nav, .btn-row { display: none; }
  .svc-media { position: static; }
}
