/* 모서리 규칙: 버튼은 pill, 사진·타일은 24px, 아치 사진만 위쪽 반원(로고의 아치 창)
   색 출처: 로고(인스타 프로필) 선 #939d92 · 배경 #f1f1f1, 공방 간판 노랑 + 진한 갈색 글씨 */
:root {
  --bg: #f4f5f3;               /* 로고 배경의 밝은 회색에 세이지를 아주 조금 */
  --surface: #e9ebe7;
  --surface-2: #fbfbfa;
  --text: #1f221e;
  --muted: #565d55;
  --line: rgb(31 34 30 / .1);
  --accent: #5c675b;           /* 로고 선과 같은 색상, 글자 대비 5.4:1이 되게 어둡게 */
  --accent-soft: #939d92;      /* 로고 선 원래 색. 장식에만 */
  --cta: #f5d327;              /* 공방 간판 노랑. 예약하기에만 쓴다 */
  --on-cta: #2a2614;           /* 간판 글씨 색 계열, 대비 10:1 */
  --shadow: 0 24px 60px rgb(60 66 58 / .14);
  --r: 24px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #151715; --surface: #1d201d; --surface-2: #232723; --text: #ecedea; --muted: #a9b0a8;
    --line: rgb(236 237 234 / .1); --accent: #b4bfb3; --accent-soft: #6f786e;
    --shadow: 0 24px 60px rgb(0 0 0 / .45); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #151715; --surface: #1d201d; --surface-2: #232723; --text: #ecedea; --muted: #a9b0a8;
  --line: rgb(236 237 234 / .1); --accent: #b4bfb3; --accent-soft: #6f786e;
  --shadow: 0 24px 60px rgb(0 0 0 / .45); color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--text);
  font: 17px/1.65 "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  word-break: keep-all; -webkit-font-smoothing: antialiased; overflow-x: clip;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.muted { color: var(--muted); }
.accent { color: var(--accent); }

/* 로고 엠블럼: 한 장의 PNG를 마스크로 써서 다크 모드에서도 색이 따라온다 */
.mark {
  display: inline-block; width: 26px; height: 30px; flex: none; background: var(--accent);
  -webkit-mask: url("/img/emblem-mark.png") center / contain no-repeat; mask: url("/img/emblem-mark.png") center / contain no-repeat;
}
.mark-lg { width: 52px; height: 60px; margin-bottom: 20px; }

/* 버튼 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45em;
  height: 50px; padding: 0 26px; border-radius: 999px; font-weight: 600; white-space: nowrap;
  transition: transform .3s var(--ease), background-color .3s var(--ease);
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--cta); color: var(--on-cta); box-shadow: inset 0 0 0 1px rgb(42 38 20 / .14); }
.btn-primary:hover { background: color-mix(in srgb, var(--cta) 88%, var(--on-cta)); }
.btn-ghost { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--text) 22%, transparent); }
.btn-ghost:hover { background: var(--surface); }
.btn-sm { height: 36px; padding: 0 18px; font-size: 14px; }
.link { color: var(--accent); font-weight: 600; display: inline-flex; align-items: center; gap: .3em; }
.link i { transition: transform .3s var(--ease); }
.link:hover i { transform: translate(2px, -2px); }

/* 내비게이션 (반투명 막, 웹 근사치) */
.nav {
  position: sticky; top: 0; z-index: 10; height: 64px;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px);
  box-shadow: inset 0 -1px 0 var(--line);
}
@media (prefers-reduced-transparency: reduce) { .nav { background: var(--bg); } }
.nav-inner { max-width: 1160px; height: 100%; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; gap: 32px; }
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; font-weight: 500; letter-spacing: .04em; color: var(--accent); } /* 로고 글자처럼 가늘고 넓게 */
.nav-links { display: flex; gap: 28px; font-size: 15px; color: var(--muted); }
.nav-links a:hover { color: var(--text); }
@media (max-width: 767px) { .nav-links { display: none; } .nav-inner { gap: 12px; } }

/* 히어로: 왼쪽 글, 오른쪽 아치 사진 */
.hero {
  max-width: 1160px; margin: 0 auto; padding: clamp(40px, 7vh, 88px) 20px clamp(56px, 8vw, 104px);
  display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 6vw, 88px); align-items: center;
  min-height: calc(100dvh - 64px);
}
.eyebrow { font-size: 14px; font-weight: 600; letter-spacing: .14em; color: var(--muted); }
.hero h1 { margin-top: 18px; font-size: clamp(40px, 5.6vw, 72px); line-height: 1.14; letter-spacing: -.035em; font-weight: 800; }
.lead { margin-top: 22px; max-width: 30em; font-size: clamp(17px, 1.6vw, 20px); color: var(--muted); }
.hero-cta { margin-top: 32px; display: flex; gap: 12px; flex-wrap: wrap; }
.hero-arch { position: relative; padding: 18px 18px 0; justify-self: center; width: min(100%, 440px); }
.arch-line { position: absolute; inset: 0 0 auto; height: 100%; border: 3px solid var(--accent-soft); border-bottom: none; border-radius: 999px 999px 0 0; }
.arch { position: relative; border-radius: 999px 999px 0 0; overflow: hidden; aspect-ratio: 3 / 4; background: var(--surface); }
.arch img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-arch { width: min(78%, 360px); }
}

/* 공통 섹션 */
.section { max-width: 1160px; margin: 0 auto; padding: clamp(72px, 10vw, 128px) 20px; }
.section-title { font-size: clamp(30px, 4.2vw, 52px); line-height: 1.18; letter-spacing: -.035em; font-weight: 800; }
.section-sub { margin-top: 14px; max-width: 34em; color: var(--muted); font-size: 18px; }

/* 클래스: 크기가 다른 네 칸 */
.bento {
  margin-top: 44px; display: grid; gap: 18px;
  grid-template-columns: 1.25fr 1fr; grid-template-rows: 300px 300px;
  grid-template-areas: "soap jes" "soap kids";
}
.tile { position: relative; overflow: hidden; border-radius: var(--r); background: var(--surface); display: flex; flex-direction: column; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.tile:hover img { transform: scale(1.04); }
.tile-body { position: relative; margin-top: auto; padding: 22px 24px 24px; }
.tile h3 { font-size: 22px; letter-spacing: -.02em; }
.tile p { margin-top: 4px; font-size: 15px; color: var(--muted); }
.tile-soap { grid-area: soap; }
.tile-soap img { object-position: center 80%; } /* 간판 아래 의자 위 보석비누가 보이게 */
.tile-jes { grid-area: jes; }
.tile-jes img { object-position: 30% 92%; } /* 아래쪽 화분이 보이게 */
.tile-kids { grid-area: kids; }
/* 사진 위 글자는 진한 띠 위에 둔다 */
.tile-jes .tile-body, .tile-kids .tile-body, .on-image {
  color: #f4f7f2; background: linear-gradient(to top, rgb(16 26 20 / .82), rgb(16 26 20 / .45) 65%, transparent);
  padding-top: 72px;
}
.tile-jes p, .tile-kids p, .on-image p { color: rgb(244 247 242 / .88); }
.on-image h3 { font-size: 28px; }
@media (max-width: 860px) {
  .bento { grid-template-columns: 1fr 1fr; grid-template-rows: 380px 280px; grid-template-areas: "soap soap" "jes kids"; }
}
@media (max-width: 520px) {
  .bento { grid-template-columns: 1fr; grid-template-rows: 380px 280px 280px; grid-template-areas: "soap" "jes" "kids"; }
}

/* 영상: 화면 가운데 큰 창 */
.film { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.film-frame { border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 16 / 9; background: #f6f8f4; }
.film-frame video { width: 100%; height: 100%; object-fit: cover; }

/* 출강·답례품 */
.order { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.order-photo { border-radius: var(--r); overflow: hidden; aspect-ratio: 4 / 5; }
.order-photo img { width: 100%; height: 100%; object-fit: cover; }
.order-list { list-style: none; padding: 0; margin: 28px 0; display: grid; gap: 18px; }
.order-list li { display: flex; gap: 14px; align-items: flex-start; }
.order-list i { font-size: 26px; color: var(--accent); margin-top: 2px; }
.order-list b { display: block; font-size: 18px; }
.order-list span { color: var(--muted); }
.order-list b { color: var(--text); }
@media (max-width: 767px) { .order { grid-template-columns: 1fr; } .order-photo { aspect-ratio: 4 / 3; } }

/* 강사 자격: 세로 구분선만 */
.teacher { padding-top: 0; }
.cred { margin-top: 32px; display: grid; grid-template-columns: repeat(3, auto); justify-content: start; }
.cred div { padding: 4px 36px 4px 0; margin-right: 36px; border-right: 1px solid var(--line); }
.cred div:last-child { border-right: 0; }
.cred dt { font-size: 14px; font-weight: 600; color: var(--accent); }
.cred dd { margin: 4px 0 0; font-size: 18px; font-weight: 600; }
@media (max-width: 767px) {
  .cred { grid-template-columns: 1fr; gap: 16px; }
  .cred div { border-right: 0; padding: 0 0 16px; margin: 0; border-bottom: 1px solid var(--line); }
  .cred div:last-child { border-bottom: 0; }
}

/* 작품 사진 줄: 옆으로 넘겨 보기 */
.gallery { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 0 20px; }
.gallery::-webkit-scrollbar { display: none; }
.gallery-track { display: flex; gap: 16px; width: max-content; margin: 0 auto; }
.gallery img { width: clamp(200px, 22vw, 280px); aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--r); scroll-snap-align: center; }

/* 오시는 길 */
.visit { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px 64px; align-items: start; }
.address { margin-top: 18px; font-size: clamp(22px, 2.6vw, 30px); font-weight: 700; letter-spacing: -.02em; line-height: 1.35; }
.visit-main .muted { margin-top: 6px; }
.phone { margin-top: 18px; display: flex; align-items: center; gap: 8px; font-size: 20px; font-weight: 600; }
.phone a { color: var(--accent); }
.hours { padding: 28px; border-radius: var(--r); background: var(--surface); }
.hours h3 { font-size: 18px; }
.hours dl { margin: 14px 0 16px; display: grid; gap: 10px; }
.hours dl div { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.hours dl div:last-child { border-bottom: 0; padding-bottom: 0; }
.hours dt { color: var(--muted); }
.hours dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.hours .muted { font-size: 14px; }
.visit-links { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 767px) { .visit { grid-template-columns: 1fr; } .visit-links { display: grid; grid-template-columns: 1fr 1fr; } .visit-links .btn { width: 100%; } }

.footer {
  max-width: 1160px; margin: 0 auto; padding: 28px 20px 44px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  font-size: 14px; box-shadow: inset 0 1px 0 var(--line);
}
.footer .muted { margin-left: auto; }

/* 움직임: 스크롤 위치가 진행도. 지원 안 하는 브라우저는 정지 화면 */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: rise .9s var(--ease) both; }
  .hero-copy > :nth-child(2) { animation-delay: .08s; }
  .hero-copy > :nth-child(3) { animation-delay: .16s; }
  .hero-copy > :nth-child(4) { animation-delay: .24s; }
  .arch { animation: arch-in 1.1s var(--ease) .15s both; }
  .arch-line { animation: line-in 1.2s var(--ease) both; }
  @keyframes rise { from { opacity: 0; transform: translateY(22px); } }
  @keyframes arch-in { from { opacity: 0; transform: translateY(40px) scale(.96); } }
  @keyframes line-in { from { opacity: 0; transform: scale(.9); } }

  @supports (animation-timeline: view()) {
    .reveal { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 65%; }
    @keyframes reveal { from { opacity: 0; transform: translateY(44px); } }
    .film-frame { animation: film-grow linear both; animation-timeline: view(); animation-range: entry 10% cover 45%; }
    @keyframes film-grow { from { transform: scale(.9); } }
  }
}
