/* 지붕 첫 쪽 — 다섯 칸(49 제안 · 안 B 큰 제목). 원본 견본 ui ux handoff/261102-지붕첫쪽/견본(draft.css · top.css)을 .hm 안으로 옮긴 것.
   지붕 공용 서식(eq.css)과 겹치는 이름(hero · btn · ghost · mut · on · tag · wrap · bar · file)은 hm- 를 붙였다. 인라인 style 없음(CSP) */
.hm { --bg: #fff; --card: #f4f4f1; --band: #ebebe7;   /* 지붕 바탕이 흰색 — 카드 면은 옅은 회색, 카드 안 장면은 흰색 */
   --fg: #17191c; --mut: #5d636e; --acc: #1f6feb; --acc-fg: #fff; --soft: #eef3fd; --link: #1a5bd0; --r: 20px;
  --eq-duration: 180ms; --eq-ease: cubic-bezier(.2, .7, .2, 1);
  width: 100%; max-width: 1120px; margin: 0 auto; color: var(--fg); font-size: 16px; line-height: 1.65; container: hm / inline-size; }
.hm h1, .hm h2, .hm h3 { margin: 0; font-weight: 700; line-height: 1.25; letter-spacing: -0.02em; text-wrap: balance; }
.hm h2 { font-size: 20px; }
.hm p { margin: 0; }
.hm img { display: block; max-width: 100%; height: auto; }
.hm .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hm :focus-visible { outline: 3px solid var(--acc); outline-offset: 2px; }
.hm-still { display: flex; justify-content: flex-end; }
.hm-still label { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--mut); cursor: pointer; }
.hm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 28px; border-radius: 999px; font-weight: 700; font-size: 16px; line-height: 1.2; text-decoration: none; white-space: nowrap; transition: transform var(--eq-duration) var(--eq-ease); }
.hm-btn.acc { background: var(--acc); color: var(--acc-fg); }
.hm-btn.hm-ghost { background: var(--band); color: var(--fg); }
@media (hover: hover) { .hm-btn:hover, .hm-btn:focus-visible { transform: translateY(-4px); } }   /* 단추 «뜸 4px» */

.hm section { margin-top: clamp(72px, 10vw, 128px); }
.hm .sec-h { display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px; }

/* 1 첫 화면 — 가운데 큰 제목 · 아래 넓은 «짜임 ↔ 내 화면» */
.hm-hero { text-align: center; margin-top: clamp(24px, 6vw, 80px); }
.hm-hero h1 { font-size: 72px; line-height: 1.04; letter-spacing: -0.04em; }   /* 제목 단은 하나(폭마다 한 값) */
.hm-hero .lead { margin: 22px auto 0; max-width: 30em; font-size: 20px; color: var(--mut); text-wrap: balance; }
.hm-hero .acts { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 32px; }
.hm .keys { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 20px 0 0; padding: 0; list-style: none; }
.hm .keys li { display: inline-flex; align-items: center; gap: 6px; font-size: 16px; color: var(--mut); background: var(--band); border-radius: 999px; padding: 4px 12px 4px 8px; line-height: 1.4; }
.hm .keys svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hm .cmpw { max-width: 1040px; margin: clamp(40px, 6vw, 72px) auto 0; text-align: left; }
.hm .cmp { position: relative; aspect-ratio: 16 / 10; border-radius: var(--r); overflow: hidden; background: var(--card); --x: 50%; touch-action: pan-y; }
.hm .cmp img, .hm .cmp .bones { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hm .cmp .bones { clip-path: inset(0 calc(100% - var(--x)) 0 0); background: var(--card); }
.hm .cmp .hm-bar { position: absolute; top: 0; bottom: 0; left: var(--x); width: 2px; margin-left: -1px; background: var(--acc); pointer-events: none; }
.hm .cmp .knob { position: absolute; top: 50%; left: var(--x); width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 999px; background: var(--acc); color: var(--acc-fg); display: grid; place-items: center; border: 3px solid var(--card); pointer-events: none; }
.hm .cmp .knob svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.hm .cmp input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.hm .cmp-cap { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 10px; font-size: 12px; line-height: 1.4; color: var(--mut); }
.hm .cmp-cap .hm-tag { font-weight: 700; line-height: 1; padding: 6px 10px; border-radius: 999px; white-space: nowrap; color: #fff; }
.hm .cmp-cap .hm-tag.l { background: var(--fg); }
.hm .cmp-cap .hm-tag.r { background: var(--acc); }

/* 2 세 걸음 */
.hm .steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.hm .step { background: var(--card); border-radius: var(--r); padding: 18px; display: grid; gap: 14px; align-content: start; }
.hm .step .lab { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 700; line-height: 1.2; white-space: nowrap; }
.hm .step .lab i { font-style: normal; width: 26px; height: 26px; border-radius: 999px; background: var(--soft); color: var(--link); display: grid; place-items: center; font-size: 14px; }
.hm .scene { height: 120px; border-radius: 12px; background: var(--bg); padding: 12px; overflow: hidden; }
.hm .sc-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; height: 100%; }
.hm .sc-pick img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.hm .sc-pick .hm-on { outline: 3px solid var(--acc); outline-offset: 2px; }
.hm .sc-fill { display: grid; grid-template-columns: 64px 1fr; gap: 10px; height: 100%; align-items: center; }
.hm .sc-fill img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; }
.hm .sc-fill .f { display: grid; gap: 6px; font-size: 14px; line-height: 1.3; }
.hm .sc-fill .f span { background: var(--card); border-radius: 8px; padding: 6px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm .sc-get { display: flex; align-items: center; justify-content: center; gap: 12px; height: 100%; }
.hm .sc-get .hm-file { display: inline-flex; align-items: center; gap: 8px; background: var(--card); border-radius: 10px; padding: 10px 14px; font: 700 14px/1.2 ui-monospace, Consolas, monospace; white-space: nowrap; }
.hm .sc-get .dl { width: 40px; height: 40px; border-radius: 999px; background: var(--acc); color: #fff; display: grid; place-items: center; }
.hm .sc-get svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* 3 숫자로 다듬기 — 움직이는 이퀄라이저(값은 스크립트가 CSS 변수로) */
.hm .eqz { display: grid; grid-template-columns: minmax(0, 3fr) minmax(260px, 2fr); gap: 16px; align-items: stretch; }
.hm .stage { background: var(--card); border-radius: var(--r); padding: 20px; display: grid; place-items: center; container-type: inline-size; }
.hm .demo { --pad: 28px; --fs: 26px; --rad: 14px; --ac: #1f6feb; --c: #1f6feb; width: 100%; max-width: var(--w, 100%); border-radius: var(--rad); overflow: hidden; display: grid; grid-template-columns: 1fr 1fr; background: #fff; box-shadow: 0 0 0 1px var(--band); transition: max-width var(--eq-duration) var(--eq-ease); }
.hm .demo .ph { min-height: 220px; position: relative; }
.hm .demo .ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hm .demo .tx { padding: var(--pad); display: grid; gap: 10px; align-content: center; }
.hm .demo .tx small { font-size: 12px; color: var(--mut); }
.hm .demo .tx h3 { font-size: var(--fs); }
.hm .demo .tx p { font-size: 14px; color: var(--mut); line-height: 1.6; }
.hm .demo .tx a { justify-self: start; margin-top: 4px; background: var(--ac); color: #fff; border-radius: var(--rad); padding: 10px 16px; font-size: 14px; font-weight: 700; text-decoration: none; }
@container (max-width: 420px) { .hm .demo { grid-template-columns: 1fr; } .hm .demo .ph { min-height: 160px; } }
.hm .knobs { background: var(--card); border-radius: var(--r); padding: 20px; display: grid; gap: 18px; align-content: start; }
.hm .kn { display: grid; grid-template-columns: 24px 1fr 44px; gap: 10px; align-items: center; font-size: 14px; }
.hm .kn svg { width: 22px; height: 22px; fill: none; stroke: var(--fg); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hm .kn input { width: 100%; accent-color: var(--acc); }
.hm .kn output { text-align: right; color: var(--mut); font-variant-numeric: tabular-nums; }
.hm .dots { display: flex; gap: 10px; align-items: center; }
.hm .dots button { width: 32px; height: 32px; border-radius: 999px; border: 0; cursor: pointer; background: var(--c); }
.hm .dots button[aria-pressed="true"] { outline: 3px solid var(--fg); outline-offset: 2px; }
.hm .wbtns { display: flex; gap: 8px; }
.hm .wbtns button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; border-radius: 999px; border: 0; background: var(--band); font: inherit; font-size: 14px; line-height: 1.2; cursor: pointer; color: var(--fg); }
.hm .wbtns button[aria-pressed="true"] { background: var(--fg); color: #fff; }
.hm .wbtns svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* 4 틀 견본 */
.hm .gal { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.hm .gal a { display: grid; gap: 10px; text-decoration: none; color: var(--fg); }
.hm .gal .im { border-radius: 12px; overflow: hidden; background: var(--card); aspect-ratio: 16 / 10; }
.hm .gal .im img { width: 100%; height: 100%; object-fit: cover; transition: transform 500ms var(--eq-ease); }
@media (hover: hover) { .hm .gal a:hover .im img, .hm .gal a:focus-visible .im img { transform: scale(1.05); } }
.hm .gal .nm { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 700; line-height: 1.2; white-space: nowrap; }
.hm .gal .nm svg { width: 20px; height: 20px; fill: none; stroke: var(--acc); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* 5 약속 */
.hm .prom { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.hm .prom li { background: var(--card); border-radius: var(--r); padding: 18px; display: grid; gap: 10px; align-content: start; font-size: 16px; font-weight: 700; line-height: 1.3; }
.hm .prom svg { width: 28px; height: 28px; fill: none; stroke: var(--acc); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hm .prom span { font-size: 14px; font-weight: 400; color: var(--mut); }

/* 등장 «옆에서» 한 번 · 움직임 멈춤 · 덜 움직이기 */
.hm .rv { opacity: 0; transform: translateX(-16px); transition: opacity 420ms var(--eq-ease), transform 420ms var(--eq-ease); }
.hm .rv.in { opacity: 1; transform: none; }
html.still .hm .rv, html.still .hm-btn, html.still .hm .gal img { transition: none !important; transform: none !important; opacity: 1 !important; }
@media (prefers-reduced-motion: reduce) { .hm .rv { opacity: 1; transform: none; transition: none; } .hm-btn, .hm .gal img { transition: none; } .hm-btn:hover, .hm .gal a:hover .im img { transform: none; } }

/* 칸이 좁으면 — 창 폭이 아니라 이 칸 폭으로 */
@container hm (max-width: 820px) {
  .hm .steps, .hm .eqz { grid-template-columns: minmax(0, 1fr); }
  .hm .scene { height: 104px; }
  .hm .gal { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hm .prom { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .hm-hero { text-align: left; } .hm-hero h1 { font-size: 40px; } .hm-hero .lead { font-size: 16px; margin-left: 0; }
  .hm-hero .acts, .hm .keys { justify-content: flex-start; }
  .hm .gal { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hm .gal a:first-child { grid-column: span 2; }
  .hm .prom { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hm section { margin-top: 56px; }
}
