/* 에스비스타일랩 — 색은 기존 로고(#633000 갈색, #2E2D2B 차콜)에서 가져옴 */
:root {
  --paper: #f7f7f5;
  --ink: #2e2d2b;
  --umber: #633000;
  --heather: #d9d5cf;
  --mist: #eceae6;
  --muted: #6b6864;
  --line: #d9d5cf;
  --measure: 38rem;
  --gutter: clamp(1rem, 4vw, 3rem);
  --max: 72rem;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "IBM Plex Sans KR", "Apple SD Gothic Neo", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.75;
  word-break: keep-all;
  overflow-wrap: break-word;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--umber); outline-offset: 3px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- 헤더 ---------- */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 10; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 4.5rem; gap: 1rem; }
.brand { display: flex; align-items: center; text-decoration: none; }
.brand img { height: 3.1rem; width: auto; mix-blend-mode: multiply; }
.nav { display: flex; align-items: center; gap: 1.75rem; font-size: 0.95rem; }
.nav a { text-decoration: none; padding: 0.25rem 0; }
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--umber); }
.nav .btn { padding: 0.55rem 1.1rem; }
.nav-toggle { display: none; background: none; border: 1px solid var(--ink); padding: 0.45rem 0.8rem; font: inherit; font-size: 0.9rem; color: var(--ink); cursor: pointer; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; gap: 0; padding: 0.5rem var(--gutter) 1.25rem; }
  .nav.open { display: flex; }
  .nav a { padding: 0.7rem 0; border-bottom: 1px solid var(--mist); }
  .nav a[aria-current="page"] { box-shadow: none; color: var(--umber); font-weight: 600; }
  .nav .btn { margin-top: 0.9rem; text-align: center; border-bottom: 0; }
}

/* ---------- 버튼 ---------- */
.btn {
  display: inline-block; background: var(--umber); color: #fff; text-decoration: none;
  padding: 0.85rem 1.5rem; font-weight: 600; font-size: 1rem; border: 0; cursor: pointer; font-family: inherit;
}
.btn:hover { background: #4d2500; }
.btn-line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--paper); }

/* ---------- 타이포 ---------- */
h1, h2, h3 { line-height: 1.3; letter-spacing: -0.02em; margin: 0; font-weight: 600; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.7rem); line-height: 1.22; }
h2 { font-size: clamp(1.55rem, 3vw, 2.25rem); }
h3 { font-size: 1.2rem; }
p { margin: 0; }
.lede { font-size: 1.15rem; color: var(--ink); max-width: var(--measure); }
.prose { max-width: var(--measure); }
.prose p + p { margin-top: 1rem; }
.muted { color: var(--muted); }

/* ---------- 섹션 ---------- */
.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; border-top: 1px solid var(--line); }
.section-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 2rem 4rem; align-items: start; }
.section-head h2 { max-width: 22ch; }
@media (max-width: 860px) { .section-head { grid-template-columns: 1fr; gap: 1.25rem; } }

/* ---------- 히어로 ---------- */
.hero { padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(3rem, 7vw, 6rem); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 3rem; align-items: center; }
.hero h1 { max-width: 16ch; }
.hero .lede { margin-top: 1.5rem; }
.hero .actions { margin-top: 2.25rem; display: flex; gap: 0.75rem; flex-wrap: wrap; }
.stitch-panel { margin: 0; }
.stitch-panel canvas { width: 100%; height: auto; display: block; background: var(--mist); }
.stitch-panel figcaption { font-size: 0.85rem; color: var(--muted); margin-top: 0.6rem; }
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .stitch-panel { max-width: 22rem; }
}

/* 페이지 머리말 (서브 페이지) */
.page-head { padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(2.5rem, 5vw, 4rem); }
.page-head h1 { font-size: clamp(1.9rem, 4.4vw, 3.1rem); max-width: 20ch; }
.page-head .lede { margin-top: 1.25rem; }

/* ---------- 진행 단계 (실제 순서가 있는 내용에만 번호 사용) ---------- */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; gap: 0; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 3.25rem minmax(0, 1fr); gap: 1rem; padding: 1.25rem 0; border-top: 1px solid var(--line); }
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps li::before { content: counter(step, decimal-leading-zero); font-weight: 600; color: var(--umber); font-variant-numeric: tabular-nums; }
.steps strong { display: block; font-weight: 600; }
.steps.cols { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 2rem; }
.steps.cols li { grid-template-columns: 1fr; gap: 0.5rem; border-bottom: 1px solid var(--line); }
@media (max-width: 860px) { .steps.cols { grid-template-columns: 1fr; } .steps.cols li { border-bottom: 0; } .steps.cols li:last-child { border-bottom: 1px solid var(--line); } }

/* ---------- 공정 띠 ---------- */
.process { display: flex; flex-wrap: wrap; gap: 0; margin-top: 2.5rem; border: 1px solid var(--ink); }
.process span { flex: 1 1 8rem; padding: 1rem 1.1rem; border-right: 1px solid var(--ink); font-weight: 500; }
.process span:last-child { border-right: 0; }
@media (max-width: 640px) { .process span { flex-basis: 50%; border-bottom: 1px solid var(--ink); } .process span:nth-child(2n) { border-right: 0; } }

/* ---------- 공장 사양표 ---------- */
.spec { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 2px solid var(--ink); }
.spec div { padding: 1.4rem 1.25rem 1.6rem 0; border-bottom: 1px solid var(--line); }
.spec dt { font-size: clamp(1.6rem, 3.2vw, 2.4rem); font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.spec dd { margin: 0.35rem 0 0; color: var(--muted); font-size: 0.95rem; }
@media (max-width: 640px) { .spec { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- 목록·표 ---------- */
.rows { margin: 0; padding: 0; list-style: none; }
.rows > li, .rows > div { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 0.5rem 2rem; padding: 1.5rem 0; border-top: 1px solid var(--line); }
.rows > :last-child { border-bottom: 1px solid var(--line); }
.rows h3 { font-size: 1.15rem; }
@media (max-width: 760px) { .rows > li, .rows > div { grid-template-columns: 1fr; } }

.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 2rem; padding: 0; list-style: none; }
.tags li { border: 1px solid var(--heather); padding: 0.35rem 0.8rem; font-size: 0.95rem; background: #fff; }

.brands { display: flex; flex-wrap: wrap; gap: 0.75rem 2.5rem; margin-top: 2rem; font-size: clamp(1.15rem, 2vw, 1.4rem); font-weight: 600; }

.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 1.2rem 2rem 1.2rem 0; font-weight: 600; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0.25rem; top: 1.1rem; font-weight: 400; font-size: 1.3rem; color: var(--umber); }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 0 1.4rem; max-width: var(--measure); }

.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; }
.two-col > div { border-top: 2px solid var(--ink); padding-top: 1.25rem; }
.two-col h3 { margin-bottom: 0.6rem; }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } }

/* ---------- 사진 자리 (10/24 촬영 후 교체) ---------- */
.photo-slot {
  aspect-ratio: 4 / 5; background-color: var(--mist);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='12'%3E%3Cpath d='M1 1 L7 10 M13 1 L7 10' stroke='%23d9d5cf' stroke-width='3' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  display: flex; align-items: flex-end; padding: 0.75rem; font-size: 0.85rem; color: var(--muted);
}
.photo-slot.wide { aspect-ratio: 16 / 9; }

.products { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem 1.25rem; margin-top: 2rem; }
.products figure { margin: 0; }
.products figcaption { margin-top: 0.6rem; display: flex; justify-content: space-between; gap: 0.5rem; font-weight: 500; }
.products figcaption small { color: var(--muted); font-weight: 400; }
@media (max-width: 860px) { .products { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.filter { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.filter button { font: inherit; font-size: 0.95rem; padding: 0.45rem 1rem; background: transparent; border: 1px solid var(--heather); color: var(--ink); cursor: pointer; }
.filter button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 1.5rem; padding: 1.1rem 0; border-top: 1px solid var(--line); }
.timeline li:last-child { border-bottom: 1px solid var(--line); }
.timeline b { font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .timeline li { grid-template-columns: 1fr; gap: 0.2rem; } }

.info { margin: 0; display: grid; grid-template-columns: 9rem minmax(0, 1fr); }
.info dt, .info dd { padding: 0.8rem 0; border-top: 1px solid var(--line); margin: 0; }
.info dt { color: var(--muted); }

/* ---------- 마무리 CTA ---------- */
.closing { background: var(--ink); color: var(--paper); padding: clamp(3.5rem, 8vw, 6rem) 0; }
.closing .wrap { display: flex; justify-content: space-between; align-items: end; gap: 2rem; flex-wrap: wrap; }
.closing h2 { max-width: 18ch; }
.closing .btn { background: var(--paper); color: var(--ink); }
.closing .btn:hover { background: #fff; }

/* ---------- 문의 폼 ---------- */
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem 1.5rem; max-width: 46rem; }
.form .full { grid-column: 1 / -1; }
.form label, .form legend { display: block; font-weight: 500; margin-bottom: 0.45rem; font-size: 0.97rem; }
.form .req { color: var(--umber); font-weight: 400; font-size: 0.85rem; margin-left: 0.3rem; }
.form input[type="text"], .form input[type="email"], .form input[type="tel"], .form select, .form textarea {
  width: 100%; font: inherit; font-size: 1rem; padding: 0.75rem 0.85rem; border: 1px solid #b9b4ad; background: #fff; color: var(--ink); border-radius: 0;
}
.form textarea { min-height: 10rem; resize: vertical; }
.form fieldset { border: 0; padding: 0; margin: 0; }
.form .checks { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.form .checks label { font-weight: 400; display: inline-flex; align-items: center; gap: 0.4rem; border: 1px solid var(--heather); background: #fff; padding: 0.45rem 0.8rem; margin: 0; cursor: pointer; }
.form .hint { font-size: 0.88rem; color: var(--muted); margin-top: 0.4rem; }
.form-status { grid-column: 1 / -1; padding: 1rem 1.1rem; border-left: 3px solid var(--umber); background: #fff; }
@media (max-width: 640px) { .form { grid-template-columns: 1fr; } }

/* ---------- 확인 필요 표시 (초안 전용, 오픈 전 전부 제거) ---------- */
.todo { background: #fff3b0; color: #5a4a00; font-size: 0.85rem; padding: 0.1rem 0.4rem; font-weight: 500; }

/* ---------- 푸터 ---------- */
.site-footer { padding: 3rem 0 3.5rem; font-size: 0.9rem; color: var(--muted); }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.site-footer p + p { margin-top: 0.3rem; }
.site-footer strong { color: var(--ink); font-weight: 600; }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }

.products img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--mist); }

/* 함께한 브랜드 로고 : 검정 단색 + 50% → 무한 루프 */
.marquee { display: flex; overflow: hidden; margin-top: 3rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; align-items: center; gap: clamp(3rem, 8vw, 6rem); padding: 2rem clamp(1.5rem, 4vw, 3rem); margin: 0; list-style: none; flex-shrink: 0; min-width: 100%; justify-content: space-around; animation: marquee 28s linear infinite; }
.marquee-track img { width: auto; max-width: none; filter: brightness(0); opacity: 0.5; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; flex-wrap: wrap; }
  .marquee-track[aria-hidden="true"] { display: none; }
}
