/* 공통 뼈대 — 초기화·접근성·브라우저 표면·움직임 장치. 색·글꼴·크기는 가게 theme.css 의 토큰(--bg --ink --ink-2 --line --accent --font …)을 읽는다. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; background: var(--bg, #fff); color: var(--ink, #111); font-family: var(--font, system-ui, sans-serif); font-size: 17px; line-height: 1.65; letter-spacing: -0.01em; word-break: keep-all; overflow-wrap: anywhere; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p, ol, ul, dl, dd, figure, blockquote { margin: 0; }
ol, ul { padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
::selection { background: var(--accent, #36f); color: #fff; }
:focus-visible { outline: 2px solid var(--focus, var(--accent, #36f)); outline-offset: 3px; border-radius: 4px; }
html { scrollbar-color: var(--ink-3, #999) transparent; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nw { white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 200; padding: 10px 16px; border-radius: 8px; background: var(--ink, #111); color: var(--bg, #fff); font-weight: 650; transition: top .2s; }
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: calc(var(--wrap, 1200px) + var(--gutter, 24px) * 2); margin: 0 auto; padding: 0 var(--gutter, 24px); }
.i { width: 20px; height: 20px; flex: none; }

/* 머리글 구조(색은 테마) */
.hd { position: fixed; inset: 0 0 auto; z-index: 100; transition: background-color .35s, border-color .35s, color .35s, transform .35s; border-bottom: 1px solid transparent; }
.hd__in { display: flex; align-items: center; gap: 24px; height: 72px; }
.hd__logo { display: block; flex: none; position: relative; }
.hd__logo img { height: 30px; width: auto; }
.hd__logo-night { position: absolute; inset: 0; opacity: 0; transition: opacity .35s; }
.hd__logo-day { transition: opacity .35s; }
.hd__name { display: block; font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em; line-height: 1.2; white-space: nowrap; }
.hd__nav { display: none; margin-left: auto; gap: 2px; }
.hd__nav a { position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; font-size: 15.5px; font-weight: 560; opacity: .78; transition: opacity .2s; }
.hd__nav a:hover, .hd__nav a[aria-current="page"] { opacity: 1; }
.hd__call { display: none; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; font-size: 15px; font-weight: 650; font-variant-numeric: tabular-nums; }
.hd__call .i { width: 17px; height: 17px; }
.hd__menu { position: relative; width: 44px; height: 44px; margin-left: auto; }
.hd__menu span:not(.sr) { position: absolute; left: 12px; right: 12px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .3s, top .3s; }
.hd__menu span:nth-child(1) { top: 17px; }
.hd__menu span:nth-child(2) { top: 25px; }
.hd__menu[aria-expanded="true"] span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.hd__menu[aria-expanded="true"] span:nth-child(2) { top: 21px; transform: rotate(-45deg); }
.mnav { padding: 8px var(--gutter, 24px) 24px; }
.mnav nav { display: grid; margin-bottom: 14px; }
.mnav nav a { display: flex; align-items: center; justify-content: space-between; min-height: 58px; border-bottom: 1px solid var(--line, #ddd); font-size: 19px; font-weight: 680; }
.mnav__call { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 54px; border-radius: 14px; font-weight: 700; }
@media (min-width: 1024px) { .hd__nav { display: flex; } .hd__call { display: inline-flex; } .hd__menu, .mnav { display: none !important; } .hd__logo img { height: 32px; } }
/* 머리글 배치(가게 디자인이 고른다) — split(기본: 로고 왼쪽·메뉴·전화) / center(넓은 화면: 메뉴 왼쪽·로고 가운데·전화 오른쪽) / minimal(로고·전화만, 메뉴는 늘 판으로) */
@media (min-width: 1024px) {
  .hd[data-layout="center"] .hd__in { display: grid; grid-template-columns: 1fr auto 1fr; }
  .hd[data-layout="center"] .hd__nav { grid-column: 1; grid-row: 1; margin: 0; justify-self: start; }
  .hd[data-layout="center"] .hd__logo { grid-column: 2; grid-row: 1; }
  .hd[data-layout="center"] .hd__call { grid-column: 3; grid-row: 1; justify-self: end; }
  .hd[data-layout="minimal"] .hd__nav { display: none; }
  .hd[data-layout="minimal"] .hd__call { margin-left: auto; }
  .hd[data-layout="minimal"] .hd__menu { display: block !important; margin-left: 8px; }
  .hd[data-layout="minimal"] .mnav:not([hidden]) { display: block !important; }
}
/* 바닥글 배치 — columns(기본) / center(가운데 한 줄씩) */
.ft[data-layout="center"] .ft__in { grid-template-columns: 1fr; justify-items: center; text-align: center; }
.ft[data-layout="center"] .ft__nav { flex-direction: row; justify-content: center; }
.ft[data-layout="center"] .ft__ch { justify-content: center; }
.ft__legal { font-size: .92em; }

/* 바닥글 구조 */
.ft__in { display: grid; gap: 32px; }
.ft__brand img { height: 30px; width: auto; }
.ft__brand p { margin-top: 16px; max-width: 30em; }
.ft__brand .ft__name { margin-top: 0; font-weight: 800; font-size: 1.2rem; }
.ft__ch { display: flex; gap: 4px; margin-top: 16px; }
.ft__ch a { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; }
.ft__nav { display: flex; flex-wrap: wrap; gap: 0 20px; }
.ft__nav a { display: inline-flex; align-items: center; min-height: 40px; font-weight: 600; }
.ft__info p { line-height: 1.85; font-variant-numeric: tabular-nums; }
@media (min-width: 1024px) { .ft__in { grid-template-columns: 1.2fr 1fr 1.4fr; gap: 48px; } .ft__nav { flex-direction: column; } }

/* AI 연출 사진 표시 — 사진 칸(position: relative) 안 오른쪽 아래. 10/14 개발자: 바탕 상자 없이 작은 흰 글자만(눈에 덜 띄게) —
   밝은 사진에서도 읽히게 옅은 그림자. 가게 디자인(theme.css)은 이 모양을 바꾸지 않는다(검사가 막음) */
.ai-tag { position: absolute; right: 9px; bottom: 7px; z-index: 2; padding: 0; background: none; color: rgba(255, 255, 255, .92); font-size: 10.5px; font-weight: 500; line-height: 1; letter-spacing: 0; text-shadow: 0 0 3px rgba(0, 0, 0, .55), 0 1px 1px rgba(0, 0, 0, .35); pointer-events: none; }

/* 유튜브(누르면 불러옴) */
.yt { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #000; border-radius: inherit; }
.yt img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease, ease), opacity .3s; opacity: .9; }
.yt:hover img { transform: scale(1.05); opacity: 1; }
.yt__play { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 68px; height: 68px; margin: -34px 0 0 -34px; border-radius: 50%; background: rgba(255, 255, 255, .95); color: var(--accent-2, #e11); box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .6); transition: transform .3s; }
.yt__play .i { width: 26px; height: 26px; margin-left: 3px; }
.yt:hover .yt__play { transform: scale(1.08); }
.yt-frame { position: relative; aspect-ratio: 16 / 9; }
.yt-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ── 움직임 장치(가게 디자인이 골라 쓴다). 동작 줄이기면 모두 멈춘 처음 모습 ── */
/* 1) 들어오며 보이기 */
.js [data-reveal] { opacity: 0; transform: translateY(var(--rv-y, 24px)); transition: opacity .9s var(--ease, ease), transform 1s var(--ease, ease); transition-delay: var(--rv-d, 0s); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
/* 2) 얕은 패럴랙스 — 스크롤에 따라 사진 층이 다른 속도로(--px: 움직임 크기) */
.px { will-change: transform; }
@supports (animation-timeline: view()) {
  .px { animation: awm-px linear both; animation-timeline: view(); animation-range: cover; }
  @keyframes awm-px { from { transform: translate3d(0, calc(var(--px, 6) * 1%), 0) scale(var(--px-s, 1.14)); } to { transform: translate3d(0, calc(var(--px, 6) * -1%), 0) scale(var(--px-s, 1.14)); } }
}
/* 3) 펼쳐지는 화면 — 눕혀 있던 화면이 스크롤에 따라 바로 선다 */
.unfold { transform-origin: 50% 100%; }
@supports (animation-timeline: view()) {
  .unfold { animation: awm-unfold linear both; animation-timeline: view(); animation-range: entry 10% cover 45%; }
  @keyframes awm-unfold { from { transform: perspective(1400px) rotateX(24deg) translateY(40px) scale(.94); } to { transform: perspective(1400px) rotateX(0) translateY(0) scale(1); } }
}
/* 4) 손 따라 기울기(포인터 있는 기기만) */
.tilt { transform: perspective(1200px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .5s var(--ease, ease); transform-style: preserve-3d; }
/* 5) 흐르는 줄 */
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee__track { display: flex; width: max-content; animation: awm-marquee var(--mq-s, 40s) linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes awm-marquee { to { transform: translateX(-50%); } }
/* 6) 글자가 켜지는 문장(runtime 이 낱말을 나눈다) */
.lightup .w { opacity: var(--lu-off, .18); transition: opacity .25s linear; }
.lightup .w.on { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .px, .unfold { animation: none !important; transform: none !important; }
  .tilt { transform: none !important; }
  .marquee__track { animation: none; flex-wrap: wrap; width: auto; }
  .lightup .w { opacity: 1; }
  [data-draw] { --draw: 1 !important; }
}
