/* 반응(hover·누름·포커스·이동) 규칙 — 모든 페이지가 이 파일 하나를 따른다 (12/01 유빈님, 기준표는 /labs/brand.html 「반응」)
   페이지 안 <style> 에 :hover 를 쓰지 않는다 — npm run check 가 막는다.
   그래픽(입자·빛·홈 타일 그림의 커서 반응)은 규칙으로 묶지 않는다.

   셋만 쓴다 (시간 .25s, 곡선 --ease, 손가락 기기에서는 카드 반응 없음)
     단추 = 반투명 바탕은 +8% 밝게(흰 12→20%), 꽉 찬 흰·아이보리 단추는 투명도 .85, 바탕 없는 아이콘·메뉴 줄은 흰 12% 바탕
     글자 = 흰 글은 60%로 흐리게, 흐린 글·밑줄은 흰색으로
     카드 = 테두리로 영역이 분명한 것만: 글 카드 테두리 흰 32%, 그림 카드 커서 빛, 누를 수 있는 카드만 4px 떠오름 (아래 「카드」) */
:root{--hv-line:rgba(255,255,255,.32);--hv-t:.25s var(--ease,cubic-bezier(.6,0,.4,1))}

/* ---------- 단추 ---------- */
.pill.gray:hover,.btn40.glass:hover,.ds>button:hover,.search-ov .hint button:hover{background:var(--p20)}
.btn40.soft:hover{background:rgba(251,247,236,.18)}
.pill.white:hover,.btn40.white:hover,.btn40.dark:hover{opacity:.85}
.ib:hover,.dl:hover,.pop button:hover,.pop a:hover{background:var(--p12);color:#fff}
/* 누름 — 누르는 순간 98% 로 눌림 */
.pill{transition:background-color .2s var(--ease),opacity .2s,scale .12s var(--ease)}
.btn40{transition:opacity .2s,background .2s,scale .12s var(--ease)}
.ds>button,.search-ov .hint button,.ib{transition:background .2s,opacity .3s,scale .12s var(--ease)}
.pill:active,.btn40:active,.ds>button:active,.search-ov .hint button:active,.ib:active{scale:.98}

/* ---------- 글자 ---------- */
.nav a:hover,.fcols a:hover,.mega a:hover,a.cite:hover{color:var(--p60)}
.seclink a:hover,.lang button:hover:not([aria-pressed="true"]){color:#fff}
p a:hover,.fn a:hover{text-decoration-color:#fff}
.nav .item:hover .chev{opacity:1}
/* 화살표 — 「→」 는 오른쪽, 「↗」 는 오른쪽 위로 3px. 글 끝 화살표는 interact.js 가 .arw 로 감쌈 */
.arw{display:inline-block;transition:translate .35s var(--hv-lift,cubic-bezier(.16,1,.3,1))}
.pill svg{transition:translate .35s var(--hv-lift,cubic-bezier(.16,1,.3,1))}
a:hover .arw,div.glass:has(>a[href]):hover .arw{translate:3px 0}
a:hover .arw.ne,.pill:hover svg{translate:2px -2px}

/* ---------- 포커스 (키보드로 옮겨 다닐 때) ---------- */
:where(a,button,[tabindex],summary,input):focus-visible{outline:2px solid rgba(255,255,255,.72);outline-offset:3px;border-radius:6px}
:where(.pill,.btn40,.lang button,.ib,.ds>button):focus-visible{border-radius:40px}
div.glass:has(>a[href]:focus-visible){outline:2px solid rgba(255,255,255,.72);outline-offset:3px}
div.glass>a[href]:focus-visible{outline:0}

/* ---------- 바로가기(#how 등) — 머리줄 밑에 가려지지 않게 ---------- */
[id]{scroll-margin-top:calc(var(--header-h,64px) + 24px)}

/* ---------- 머리줄 — 내릴 때 숨고 올릴 때 나옴(interact.js 가 .hide) ---------- */
.hdr{transition:background-color .25s var(--ease),transform .4s var(--hv-lift,cubic-bezier(.16,1,.3,1))}
.hdr.hide:not(.menu-open){transform:translate3d(0,-100%,0)}   /* translate 속성 전환은 아이폰에서 합성기로 안 넘어가 스크롤 중 고정 화면(Cos 둘러보기)을 떨게 함 → transform */

/* ---------- 메가 메뉴 — 항목이 위에서부터 차례로 ---------- */
.mega .big a,.mega .small a{opacity:0;translate:0 6px;transition:color .25s var(--ease),opacity .12s,translate .12s}
.mega.show .big a,.mega.show .small a{opacity:1;translate:0;transition:color .25s var(--ease),opacity .4s var(--hv-lift,cubic-bezier(.16,1,.3,1)) var(--d,0ms),translate .5s var(--hv-lift,cubic-bezier(.16,1,.3,1)) var(--d,0ms)}
.mega .big a:nth-child(2){--d:40ms}.mega .big a:nth-child(3){--d:80ms}.mega .big a:nth-child(4){--d:120ms}
.mega .small a:nth-child(1){--d:80ms}.mega .small a:nth-child(2){--d:120ms}.mega .small a:nth-child(3){--d:160ms}.mega .small a:nth-child(4){--d:200ms}

/* ---------- 페이지 이동 — 하위 페이지 사이를 부드럽게 겹쳐 바꿈(크롬·사파리) ---------- */
@view-transition{navigation:auto}
::view-transition-old(root),::view-transition-new(root){animation-duration:.35s;animation-timing-function:cubic-bezier(.4,0,.2,1)}

/* ---------- 비교 표 — 마우스를 올린 줄을 옅게 ---------- */
.cmp td{transition:background-color .2s}
@media (hover:hover){.cmp tbody tr:hover td{background:rgba(255,255,255,.035)}}

/* ---------- 카드 ----------
   기준 (12/02, /labs/brand.html 「반응」)
   1) 카드 = 테두리나 바탕으로 사방이 닫힌 상자. 반응은 가장 바깥 상자 하나에만(안의 그림·글이 따로 반응하지 않음).
      위에 선 한 줄만 있는 목록·표 줄은 카드가 아니다.
   2) 안에 그림이 있으면 그림 카드 → 커서를 따라오는 은은한 빛. 글만 있으면 글 카드 → 테두리 흰 32%.
   3) 떠오름(4px)은 누를 수 있는 카드(링크가 든 카드)만, 그 카드는 어디를 눌러도 링크로.
   4) 빠지는 것: 히어로 제품 화면(.app), 스크롤 연출 속 틀(Cos 둘러보기 .cx-stage), 타일 안 그래픽(타일은 테두리만), 테 없는 그림.
   지금 해당하는 것 (npm run check 아님 — 새 카드를 만들면 여기에 넣고 lib/audit-interact.repl.js 로 잰다)
     글 카드   div.glass · .glass-row 칸
     그림 카드 홈 넷째 장 4장(article.step) · Cos·Mos 화면(.row·.gal-item>.shot>.cardv) · 그림 판(.hx-split·splitl·tile)
   떠오름은 transform 이 아닌 translate — 등장(.reveal)의 transform 과 겹치지 않게. 떠오른 만큼 아래가 비어 떨리지 않게 ::after 로 원래 자리를 잡음 */
:root{--hv-lift:cubic-bezier(.16,1,.3,1);--hv-glow:rgba(255,255,255,.05)}
div.glass,.glass-row>li,.glass-row>div{position:relative;transition:opacity .6s var(--ease),transform .6s var(--ease),border-color var(--hv-t),translate .5s var(--hv-lift),box-shadow .5s var(--hv-lift)}
.tile{transition:border-color var(--hv-t)}
article.step::before,:is(.row,.gal-item)>.shot>.cardv::before,.hx-split::before,.hx-splitl::before,.hx-tile::before{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;z-index:1;opacity:0;transition:opacity .4s var(--hv-lift);
  background:radial-gradient(320px circle at var(--mx,50%) var(--my,50%),var(--hv-glow),rgba(255,255,255,0) 70%)}
div.glass>a[href]::after{content:"";position:absolute;inset:0;z-index:2;border-radius:inherit}
@media (hover:hover){
  div.glass:hover,.glass-row>li:hover,.glass-row>div:hover{border-color:var(--hv-line)}
  div.glass:has(>a[href]):hover{translate:0 -4px;box-shadow:0 16px 40px -16px rgba(0,0,0,.8),inset 0 1px 0 rgba(255,255,255,.08)}
  div.glass:has(>a[href]):hover::after{content:"";position:absolute;left:0;right:0;bottom:-5px;height:5px}
  article.step:hover::before,:is(.row,.gal-item)>.shot:hover>.cardv::before,.hx-split:hover::before,.hx-splitl:hover::before,.hx-tile:hover::before{opacity:1}
  .tile:hover{border-color:var(--hv-line)}
}

/* 누를 수 있는 목록 줄 — Cos 둘러보기 항목은 단추라 글자 규칙(흰 글 → 60%) */
.cx-t h3{transition:color .25s var(--ease)}
.cx-t:hover h3{color:rgba(251,247,236,.6)}

/* 가로 넘김 카드 화살표(Cos 「Every task becomes an asset」) — 단추 규칙: 반투명 바탕 밝게 */
.gal-nav button:hover{background:rgba(90,90,94,.8);color:#fff}
.gal-nav button:active{scale:.98}
