:root {
  --bg: #faf7f2;
  --bg-alt: #f2ebe0;
  --surface: #ffffff;
  --text: #24211d;
  --text-muted: #5f584f;
  --border: #e2d8ca;
  --stitch: #c9b8a1;
  --primary: #984827;
  --primary-hover: #8d4325;
  --secondary: #4e5d4b;
  --error: #c62828;
  --error-bg: #fdecea;
  --success: #2e7d32;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(36, 33, 29, 0.05), 0 14px 32px -12px rgba(36, 33, 29, 0.16);
  --max-w: 1120px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  /* 평직(가로·세로 실) 질감 */
  --weave:
    repeating-linear-gradient(0deg, rgba(36, 33, 29, 0.035) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(90deg, rgba(36, 33, 29, 0.035) 0 1px, transparent 1px 4px);
  /* 커튼 주름 한 골: background-size 폭으로 주름 간격을 정한다 */
  --folds: linear-gradient(90deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 30%, rgba(0, 0, 0, 0.16) 62%, rgba(0, 0, 0, 0) 88%, rgba(255, 255, 255, 0.22));
  --hang-shade: linear-gradient(180deg, rgba(0, 0, 0, 0.22), transparent 16%);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  color: var(--text);
  background-color: var(--bg);
  line-height: 1.65;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  line-height: 1.3;
  text-wrap: balance;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--text);
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 1000;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 247, 242, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--text);
}

.brand-mark {
  display: inline-flex;
  color: var(--primary);
}

.brand-mark svg {
  width: 34px;
  height: 34px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-text strong {
  font-size: 1.12rem;
  letter-spacing: -0.02em;
}

.brand-text small {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.primary-nav a {
  text-decoration: none;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
}

.primary-nav a:hover {
  color: var(--primary);
}

.primary-nav a:not(.nav-cta):hover {
  text-decoration: underline dashed;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 7px;
}

.primary-nav .nav-cta {
  background: var(--primary);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-weight: 600;
}

.primary-nav .nav-cta:hover {
  background: var(--primary-hover);
  color: #fff;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 0.4rem;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: background-color 0.2s ease, transform 0.15s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 6px 16px -8px rgba(152, 72, 39, 0.7);
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--stitch);
}

.btn-secondary:hover {
  border-color: var(--text);
}

.btn-full {
  width: 100%;
}

/* Hero */
.hero {
  padding: 5rem 0 4.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3.5rem;
  align-items: center;
}

.eyebrow {
  margin: 0 0 0.85rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
}

/* 시침질 한 땀 */
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 1.9rem;
  margin-right: 0.6rem;
  vertical-align: middle;
  border-top: 2px dashed currentColor;
}

.hero h1 {
  margin: 0 0 1.4rem;
  font-size: clamp(2rem, 4.2vw, 3.2rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.035em;
}

.hero-desc {
  margin: 0 0 2rem;
  color: var(--text-muted);
  font-size: 1.06rem;
  max-width: 54ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 2rem;
}

.hero-badges {
  list-style: none;
  padding: 1.1rem 0 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
  border-top: 1.5px dashed var(--stitch);
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* 스와치 북: 봉에 걸린 원단 샘플 */
.atelier-card,
.location-card {
  position: relative;
}

.atelier-card::before,
.location-card::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1.5px dashed var(--stitch);
  border-radius: calc(var(--radius) - 5px);
  pointer-events: none;
}

.atelier-card {
  background: var(--weave), var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.atelier-card-top {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.4rem;
}

.pill {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: #f6e7df;
  color: var(--primary);
}

.pill-alt {
  background: #e6ede4;
  color: var(--secondary);
}

.atelier-pattern {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 0.7rem;
  align-items: start;
  margin-bottom: 1.5rem;
}

/* 커튼 봉 */
.atelier-pattern::before {
  content: "";
  grid-column: 1 / -1;
  position: relative;
  z-index: 1;
  height: 9px;
  margin: 0 -0.5rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #8a7560, #4a3d31 70%, #3a2f26);
  box-shadow: 0 3px 5px rgba(36, 33, 29, 0.25);
}

.swatch {
  margin-top: -3px;
  display: flex;
  align-items: flex-end;
  padding: 0.6rem 0.5rem 1rem;
  /* 핑킹가위로 자른 밑단 */
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 10px 100%;
  mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 10px 100%;
}

.swatch span {
  background: var(--surface);
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.3;
  padding: 0.22rem 0.45rem;
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.swatch-1 {
  height: 172px;
  background:
    var(--hang-shade),
    var(--folds) 0 0 / 17px 100%,
    repeating-linear-gradient(0deg, rgba(120, 96, 62, 0.14) 0 1px, transparent 1px 3px),
    #eadfcc;
}

.swatch-2 {
  height: 196px;
  background:
    var(--hang-shade),
    var(--folds) 0 0 / 31px 100%,
    linear-gradient(180deg, #474d54, #2f3338);
}

.swatch-3 {
  height: 152px;
  background:
    var(--hang-shade),
    var(--folds) 0 0 / 52px 100%,
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.13) 0 1.5px, transparent 1.5px 5px),
    #8f4526;
}

.atelier-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding-top: 1.25rem;
  border-top: 1.5px dashed var(--stitch);
}

.atelier-stats strong {
  display: block;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}

.atelier-stats span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Sections */
.section {
  position: relative;
  padding: 5.5rem 0;
}

.section-alt {
  background: var(--weave), var(--bg-alt);
}

/* 단 처리(헴)처럼 위아래를 박은 스티치 */
.section-alt::before,
.section-alt::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  border-top: 1.5px dashed var(--stitch);
}

.section-alt::before {
  top: 7px;
}

.section-alt::after {
  bottom: 7px;
}

.section-head {
  margin-bottom: 2.75rem;
  max-width: 44rem;
}

.section-head h2,
.inquiry-info h2 {
  margin: 0 0 0.7rem;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.section-sub {
  margin: 0;
  color: var(--text-muted);
}

.two-col-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.three-col-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.25rem;
}

/* 서비스 카드: 셀비지(식서) 띠 색으로 B2C / B2B 구분 */
.service-card {
  --accent: var(--primary);
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 5px solid var(--accent);
  border-radius: var(--radius);
  padding: 2.25rem 2rem 2rem;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.service-card--b2b {
  --accent: var(--secondary);
}

.service-card::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 1rem;
  right: 1rem;
  border-top: 1.5px dashed var(--accent);
  opacity: 0.45;
}

.service-card:hover,
.service-card:focus-within {
  box-shadow: var(--shadow);
  border-color: var(--stitch);
  border-top-color: var(--accent);
}

.service-tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary);
  background: #f6e7df;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.service-tag-b2b {
  color: var(--secondary);
  background: #e6ede4;
}

.service-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
}

.service-card > p {
  margin: 0 0 1.25rem;
  color: var(--text-muted);
}

.check-list {
  list-style: none;
  padding: 1.25rem 0 0;
  margin: 0 0 1.5rem;
  display: grid;
  gap: 0.65rem;
  border-top: 1px solid var(--border);
  font-size: 0.95rem;
}

.check-list li::before {
  content: "✓ ";
  color: var(--accent, var(--primary));
  font-weight: 700;
}

.text-link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  text-underline-offset: 5px;
}

.service-card .text-link {
  color: var(--accent);
}

.text-link:hover {
  text-decoration: underline;
}

/* 강점: 카드 대신 굵은 윗선의 에디토리얼 컬럼 */
.feature-box {
  padding-top: 1.4rem;
  border-top: 2px solid var(--text);
}

.feature-num {
  display: block;
  font-family: var(--serif);
  font-style: italic;
  font-size: 2.5rem;
  line-height: 1;
  color: var(--primary);
  margin-bottom: 1rem;
}

.feature-box h3 {
  margin: 0 0 0.6rem;
  font-size: 1.18rem;
  letter-spacing: -0.02em;
}

.feature-box p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Portfolio */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.75rem;
}

.filter-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.5rem 1.1rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.filter-btn:hover {
  border-color: var(--text);
  color: var(--text);
}

.filter-btn.is-active {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.portfolio-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.portfolio-card[hidden] {
  display: none;
}

.portfolio-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--stitch);
}

.portfolio-card:hover .portfolio-detail {
  text-decoration: underline;
}

.portfolio-thumb {
  position: relative;
  height: 190px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 0.9rem;
  overflow: hidden;
}

/* 직조 라벨 */
.portfolio-thumb span {
  position: relative;
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  font-size: 0.82rem;
  line-height: 1.35;
  padding: 0.35rem 0.6rem;
  border-radius: 3px;
  outline: 1px dashed var(--stitch);
  outline-offset: -3px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.22);
}

.portfolio-thumb::before {
  position: absolute;
  pointer-events: none;
}

/* 1. 쉬폰 속커튼 + 암막 겉커튼 드레이프 */
.thumb-1 {
  background:
    var(--hang-shade),
    var(--folds) 0 0 / 27px 100%,
    linear-gradient(90deg, #ede4d5 0 62%, #50565c 62%);
}

/* 2. 캔버스 평직 + 상침 스티치 */
.thumb-2 {
  background:
    repeating-linear-gradient(0deg, rgba(60, 50, 34, 0.13) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(90deg, rgba(60, 50, 34, 0.13) 0 1px, transparent 1px 4px),
    linear-gradient(160deg, #e2dccd, #c9c1ae);
}

.thumb-2::before {
  content: "";
  inset: 14px 14px auto;
  height: 7px;
  border-top: 1.5px dashed rgba(60, 50, 34, 0.55);
  border-bottom: 1.5px dashed rgba(60, 50, 34, 0.55);
}

/* 3. 방수 코튼 트윌 + 앞치마 포켓 */
.thumb-3 {
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0 1.5px, transparent 1.5px 5px),
    linear-gradient(160deg, #62725d, #414d3e);
}

.thumb-3::before {
  content: "";
  top: 22px;
  right: 22px;
  width: 38%;
  height: 46%;
  border: 1.5px dashed rgba(255, 255, 255, 0.6);
  border-top-style: solid;
  border-radius: 0 0 10px 10px;
}

/* 4. 모달·순면 티킹 스트라이프 침구 */
.thumb-4 {
  background:
    radial-gradient(ellipse at 25% -10%, rgba(255, 255, 255, 0.65), transparent 55%),
    radial-gradient(ellipse at 90% 110%, rgba(120, 80, 60, 0.22), transparent 55%),
    repeating-linear-gradient(90deg, rgba(152, 72, 39, 0.2) 0 2px, transparent 2px 14px),
    #ead9cc;
}

/* 5. 다이아몬드 누빔 + 지퍼 */
.thumb-5 {
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.26) 0 1px, transparent 1px 24px),
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.26) 0 1px, transparent 1px 24px),
    linear-gradient(160deg, #a2522f, #78391f);
}

.thumb-5::before {
  content: "";
  inset: 16px 0 auto;
  height: 12px;
  background:
    repeating-linear-gradient(90deg, #e3d2ad 0 2px, transparent 2px 5px) center / 100% 4px no-repeat,
    #4a2413;
}

/* 6. 린넨 슬럽 + 초크 패턴선 */
.thumb-6 {
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 5px),
    linear-gradient(160deg, #57514b, #332f2a);
}

.thumb-6::before {
  content: "";
  top: -45%;
  right: -18%;
  width: 70%;
  height: 120%;
  border: 1.5px dashed rgba(255, 255, 255, 0.55);
  border-radius: 50%;
}

.portfolio-body {
  padding: 1.25rem;
}

.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.4rem;
}

.portfolio-body h3 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.portfolio-body p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Process: 다섯 단계를 한 가닥 실로 꿰어 연결 */
.process-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.5rem;
}

.process-step {
  position: relative;
  padding-top: 2.5rem;
}

/* 실 */
.process-step::before {
  content: "";
  position: absolute;
  top: calc(0.65rem - 1px);
  left: 0;
  right: -1.5rem;
  border-top: 2px dashed var(--primary);
  opacity: 0.55;
}

.process-step:last-child::before {
  right: 45%;
}

/* 매듭 */
.process-step::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 50%;
  border: 2px solid var(--primary);
  background: radial-gradient(circle, var(--primary) 0 3px, var(--bg) 3.5px);
}

.step-num {
  display: inline-block;
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--primary);
  margin-bottom: 0.4rem;
}

.process-step h3 {
  margin: 0 0 0.45rem;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
}

.process-step p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* FAQ */
.faq-container {
  max-width: 820px;
}

.faq-list {
  border-top: 2px solid var(--text);
}

.faq-list details {
  border-bottom: 1px solid var(--stitch);
  padding: 1.25rem 0.25rem;
}

.faq-list summary {
  font-weight: 700;
  font-size: 1.02rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.faq-list summary:hover {
  color: var(--primary);
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: "+";
  flex: none;
  font-family: var(--serif);
  font-size: 1.5rem;
  line-height: 1;
  color: var(--primary);
}

.faq-list details[open] summary::after {
  content: "−";
}

.faq-list details p {
  margin: 0.85rem 0 0;
  max-width: 62ch;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Inquiry & Form */
.inquiry-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 3rem;
  align-items: start;
}

.inquiry-desc {
  color: var(--text-muted);
  margin: 0 0 1.75rem;
}

/* 케어 라벨처럼 박음질한 매장 정보 */
.location-card {
  background: var(--weave), var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.9rem 1.75rem;
}

.location-card h3 {
  margin: 0 0 1rem;
  font-size: 1.1rem;
}

.info-dl {
  margin: 0;
  display: grid;
}

.info-dl > div {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 0.5rem;
  padding: 0.65rem 0;
  border-top: 1px dotted var(--stitch);
  font-size: 0.92rem;
}

.info-dl dt {
  font-weight: 700;
  color: var(--text);
}

.info-dl dd {
  margin: 0;
  color: var(--text-muted);
}

/* 문의 유형에 따라 강조색이 바뀐다 (B2C 테라코타 / B2B 그린) */
.inquiry-form-wrap {
  --accent: var(--primary);
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 5px solid var(--accent);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: border-color 0.25s ease;
}

.inquiry-form-wrap:has(#mode-b2b[aria-selected="true"]) {
  --accent: var(--secondary);
}

.mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  background: var(--bg-alt);
  padding: 0.35rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
}

.mode-tab {
  border: none;
  background: transparent;
  padding: 0.7rem 0.65rem;
  border-radius: 9px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.mode-tab:hover {
  color: var(--text);
}

.mode-tab.is-active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.mode-tab.is-active::before {
  content: "";
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  margin-right: 0.45rem;
  border-radius: 50%;
  background: var(--accent);
}

.inquiry-form-wrap .btn-primary {
  background: var(--accent);
  box-shadow: none;
}

.inquiry-form-wrap .btn-primary:hover {
  filter: brightness(0.92);
}

.quote-form {
  display: grid;
  gap: 1.1rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.field {
  display: flex;
  flex-direction: column;
}

.field label {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
}

.hint {
  display: block;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-bottom: 0.3rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  background: #fff;
  color: var(--text);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
  border-color: var(--primary);
}

.error-msg {
  display: none;
  color: var(--error);
  font-size: 0.82rem;
  margin-top: 0.3rem;
}

/* Explicit ARIA states also work in browsers without :user-invalid support. */
.field input[aria-invalid="true"],
.field select[aria-invalid="true"] {
  border-color: var(--error);
  background-color: var(--error-bg);
}

.field input[aria-invalid="true"] ~ .error-msg,
.field select[aria-invalid="true"] ~ .error-msg {
  display: block;
}

@supports selector(:user-invalid) {
  .field input:user-invalid:not([data-validation-suppressed]),
  .field select:user-invalid:not([data-validation-suppressed]) {
    border-color: var(--error);
    background-color: var(--error-bg);
  }

  .field input:user-invalid:not([data-validation-suppressed]) ~ .error-msg,
  .field select:user-invalid:not([data-validation-suppressed]) ~ .error-msg {
    display: block;
  }

  .field input:user-valid:not([data-validation-suppressed]),
  .field select:user-valid:not([data-validation-suppressed]) {
    border-color: var(--success);
  }
}

.quote-result {
  margin-top: 1.5rem;
  background: #f5f9f4;
  border: 1px solid #c5dec0;
  border-radius: var(--radius);
  padding: 1.25rem;
}

.quote-result-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.btn-copy {
  background: var(--secondary);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.45rem 0.85rem;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

/* 작업 전표 느낌의 요약문 */
.quote-result pre {
  margin: 0 0 0.75rem;
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.8;
  background: #fff;
  padding: 1rem 1.1rem;
  border-radius: 6px;
  border: 1.5px dashed var(--stitch);
}

.quote-result-note {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Footer */
.site-footer {
  position: relative;
  background: #1f1c18;
  color: #dcd4c8;
  padding: 3rem 0 2.5rem;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 0;
  right: 0;
  border-top: 1.5px dashed rgba(220, 212, 200, 0.35);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-inner strong {
  color: #fff;
  font-size: 1.05rem;
}

.footer-inner p {
  margin: 0.3rem 0 0;
  font-size: 0.88rem;
}

.copyright {
  font-size: 0.82rem;
  color: #a69d90;
}

/* Responsive */
@media (max-width: 960px) {
  .hero-grid,
  .inquiry-grid {
    grid-template-columns: 1fr;
  }

  .three-col-grid,
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* 좁은 화면에서는 실이 세로로 내려간다 */
  .process-list {
    grid-template-columns: 1fr;
    gap: 0;
    max-width: 40rem;
  }

  .process-step {
    padding: 0 0 1.9rem 2.4rem;
  }

  .process-step:last-child {
    padding-bottom: 0;
  }

  .process-step::before {
    top: 0.65rem;
    bottom: -0.65rem;
    left: calc(0.65rem - 1px);
    right: auto;
    border-top: 0;
    border-left: 2px dashed var(--primary);
  }

  .process-step:last-child::before {
    display: none;
  }
}

@media (max-width: 840px) {
  .nav-toggle {
    display: flex;
  }

  .primary-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1.25rem;
    gap: 1rem;
  }

  .primary-nav.is-open {
    display: flex;
  }

}


/* Keyboard focus and anchor targets remain clear of the sticky header. */
:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 4px;
}

[id] {
  scroll-margin-top: 5.5rem;
}

.portfolio-note,
.mode-guidance {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0 0 1.25rem;
}

.mode-guidance {
  padding-left: 0.8rem;
  border-left: 3px solid var(--accent);
}

.portfolio-detail {
  background: none;
  border: none;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  margin-top: 0.75rem;
  padding: 0.5rem 0;
  text-align: left;
}

.portfolio-dialog {
  width: min(600px, calc(100% - 2rem));
  max-height: calc(100dvh - 2rem);
  overflow: auto;
  border: 1px solid var(--border);
  border-top: 5px solid var(--primary);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  padding: 1.5rem 1.75rem 1.75rem;
  box-shadow: 0 24px 60px -20px rgba(36, 33, 29, 0.5);
}

.portfolio-dialog::backdrop {
  background: rgb(36 33 29 / 60%);
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
}

.portfolio-dialog h2 {
  margin: 0;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
}

.portfolio-specs {
  margin: 1.5rem 0 0;
}

.portfolio-specs > div {
  padding: 0.75rem 0;
  border-top: 1.5px dashed var(--stitch);
}

.portfolio-specs dt {
  font-weight: 700;
}

.portfolio-specs dd {
  margin: 0.25rem 0 0;
  color: var(--text-muted);
}

.mobile-inquiry {
  display: none;
}

@media (max-width: 720px) {
  .two-col-grid,
  .three-col-grid,
  .portfolio-grid,
  .process-list,
  .form-row {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 3rem 0;
  }

  .section {
    padding: 4rem 0;
  }

  .atelier-card,
  .inquiry-form-wrap {
    padding: 1.5rem;
  }

  html {
    scroll-padding-bottom: calc(6rem + env(safe-area-inset-bottom));
  }

  .site-footer {
    padding-bottom: calc(7.5rem + env(safe-area-inset-bottom));
  }

  .mobile-inquiry:not([hidden]) {
    display: flex;
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: calc(0.75rem + env(safe-area-inset-bottom));
    z-index: 90;
    box-shadow: 0 4px 20px rgb(36 33 29 / 20%);
  }

  body:has(dialog[open]) .mobile-inquiry,
  body:has(.quote-form :focus) .mobile-inquiry {
    display: none;
  }
}

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

  .btn,
  .service-card,
  .portfolio-card,
  .filter-btn,
  .mode-tab,
  .inquiry-form-wrap {
    transition: none;
  }

  .portfolio-card:hover {
    transform: none;
  }
}

/* Stretch the native detail button across its card. */
@supports selector(:has(*)) {
  .portfolio-detail:focus-visible {
    outline: none;
  }
}

.portfolio-detail::after {
  content: "";
  position: absolute;
  inset: 0;
}

.portfolio-card:has(.portfolio-detail:focus-visible) {
  outline: 3px solid var(--primary);
  outline-offset: 4px;
}


/* Reference Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.gallery-card {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.gallery-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.gallery-trigger {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  text-align: left;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.gallery-trigger img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.gallery-card:hover .gallery-trigger img {
  transform: scale(1.03);
}

.gallery-trigger figcaption {
  padding: 1rem 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.gallery-tag {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: #f6e7df;
  color: var(--primary);
}

.gallery-tag--b2b {
  background: #e6ede4;
  color: var(--secondary);
}

.gallery-trigger strong {
  font-size: 0.98rem;
  line-height: 1.35;
}

.gallery-dialog {
  max-width: 680px;
}

.gallery-dialog-img {
  display: block;
  width: 100%;
  max-height: 55vh;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 1.15rem;
  border: 1px solid var(--border);
}

.gallery-dialog-cta {
  margin-top: 1.25rem;
}

/* Guide & Package */
.guide-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 4px solid var(--primary);
  border-radius: var(--radius);
  padding: 2rem;
}

.guide-card--b2b {
  border-top-color: var(--secondary);
}

.guide-card--b2b .check-list li::before,
.guide-card--b2b .text-link {
  color: var(--secondary);
}

.guide-card h3 {
  margin: 0 0 1rem;
  font-size: 1.25rem;
}

.guide-desc {
  margin: 0 0 1.25rem;
  color: var(--text-muted);
}

.guide-steps {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  display: grid;
  gap: 0.9rem;
}

.guide-steps li {
  display: grid;
  gap: 0.2rem;
  padding-left: 0.9rem;
  border-left: 2px dashed var(--border);
}

.guide-steps strong {
  font-size: 0.95rem;
  color: var(--primary);
}

.guide-steps span {
  font-size: 0.92rem;
  color: var(--text-muted);
}

/* Customer Voice / Reviews */
.review-badge-note {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}

.review-card {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.25rem;
}

.review-quote {
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.7;
  color: var(--text);
}

.review-card footer {
  border-top: 1px dashed var(--border);
  padding-top: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.review-card footer strong {
  font-size: 0.92rem;
}

.review-card footer span {
  font-size: 0.82rem;
  color: var(--text-muted);
}

@media (max-width: 960px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

@media (prefers-reduced-motion: reduce) {
  .gallery-card,
  .gallery-trigger img {
    transition: none;
  }

  .gallery-card:hover {
    transform: none;
  }

  .gallery-card:hover .gallery-trigger img {
    transform: none;
  }
}
