/* 힘찬한의원 — 화면 움직임 (motion.js 와 한 쌍)
   html.motion 이 붙었을 때만 적용되어, JS가 꺼져도 내용은 그대로 보입니다. */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: clip; }

/* 글·카드: 아래에서 천천히 떠오름 */
html.motion [data-rv] {
  opacity: 0; transform: translate3d(0, 44px, 0);
  transition: opacity 1.1s cubic-bezier(.22,.61,.36,1), transform 1.4s cubic-bezier(.16,1,.3,1);
  transition-delay: var(--d, 0s);
}
html.motion [data-rv="left"]  { transform: translate3d(-60px, 0, 0); }
html.motion [data-rv="right"] { transform: translate3d(60px, 0, 0); }
html.motion [data-rv].in { opacity: 1; transform: none; }
/* 떠오른 뒤 hover 효과가 늦게 반응하지 않도록 */
html.motion .tile.in, html.motion .post-card.in { transition-delay: 0s; }

/* 사진: 가운데에서 위아래로 열리며, 살짝 확대된 상태에서 제자리로 */
html.motion [data-rv-img] {
  clip-path: inset(22% 0 22% 0); transform: scale(1.06);
  transition: clip-path 1.5s cubic-bezier(.77,0,.18,1), transform 2.2s cubic-bezier(.16,1,.3,1);
  transition-delay: var(--d, 0s);
}
html.motion [data-rv-img].in { clip-path: inset(0 0 0 0); transform: none; }

/* 첫 화면 슬라이드: 사진이 천천히 줌아웃되며 교차 */
html.motion .slide img { transform: scale(1.08); transition: transform 7s cubic-bezier(.2,.6,.3,1); }
html.motion .slide.is-active img { transform: scale(1); }
.hero .visual { will-change: transform; }

/* 휴대폰: 이동 거리를 줄여 가볍게 */
@media (max-width: 860px) {
  html.motion [data-rv] { transform: translate3d(0, 24px, 0); transition-duration: .7s, .9s; transition-delay: calc(var(--d, 0s) * .6); }
  html.motion [data-rv="left"], html.motion [data-rv="right"] { transform: translate3d(0, 28px, 0); }
  html.motion [data-rv-img] { clip-path: inset(12% 0 12% 0); }
}
@media print { html.motion [data-rv], html.motion [data-rv-img] { opacity: 1 !important; transform: none !important; clip-path: none !important; } }

/* ── 페이지 넘어가는 효과 ── */
html.pt-in::after { content: ""; position: fixed; inset: 0; z-index: 2147483000; background: #1E2B4D;
  animation: ptSafe 0s 2.5s forwards; }            /* 스크립트가 안 돌아도 2.5초 뒤엔 사라짐 */
@keyframes ptSafe { to { visibility: hidden; } }
.pt { position: fixed; inset: 0; z-index: 2147483001; pointer-events: none; background: #1E2B4D;
  display: flex; align-items: center; justify-content: center; transform: translate3d(0, 100%, 0); }
.pt i { position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--amber, #F9A720); }
.pt img { width: 64px; height: auto; opacity: 0; transform: translate3d(0, 16px, 0) scale(.92); }
.pt.pt-leave { transition: transform .34s cubic-bezier(.65,0,.35,1); transform: none; pointer-events: auto; }
.pt.pt-leave img { transition: opacity .2s .12s, transform .3s .1s cubic-bezier(.16,1,.3,1); opacity: 1; transform: none; }
.pt.pt-cover { transform: none; }
.pt.pt-cover img { opacity: 1; transform: none; }
.pt.pt-cover i { top: auto; bottom: 0; }
.pt.pt-out { transition: transform .5s cubic-bezier(.65,0,.35,1); transform: translate3d(0, -100%, 0); }
.pt.pt-out img { transition: opacity .18s, transform .3s; opacity: 0; transform: translate3d(0, -24px, 0); }

/* 처음 들어올 때 — 로고 아래 인사말 */
html.pt-in.intro::after { animation-delay: 4.5s; }
.pt.pt-intro { flex-direction: column; gap: 22px; }
.pt.pt-intro img { width: 76px; }
.pt-hello { display: flex; flex-direction: column; align-items: center; gap: 10px; color: #fff; text-align: center;
  opacity: 0; transform: translate3d(0, 12px, 0); transition: opacity .7s ease, transform .9s cubic-bezier(.16,1,.3,1); }
.pt-hello b { font-family: var(--serif); font-weight: 800; font-size: 34px; letter-spacing: -.5px; }
.pt-hello span { font-family: var(--serif); font-weight: 800; font-size: 19px; color: #F9C35C; }
.pt.pt-hello-on .pt-hello { opacity: 1; transform: none; }
.pt.pt-intro.pt-out { transition-duration: .9s; }
.pt.pt-intro.pt-out .pt-hello { opacity: 0; transform: translate3d(0, -20px, 0); transition: opacity .3s, transform .5s; }
@media (max-width: 860px) { .pt-hello b { font-size: 28px; } .pt-hello span { font-size: 17px; } }

/* ── 버튼 물결 ── */
.has-ripple { position: relative; overflow: hidden; isolation: isolate; }
.ripple { position: absolute; border-radius: 50%; pointer-events: none; z-index: -1;
  background: currentColor; opacity: .22; transform: scale(0); animation: ripple .7s cubic-bezier(.16,1,.3,1) forwards; }
@keyframes ripple { to { transform: scale(1); opacity: 0; } }
html.motion .btn, html.motion .nav a.nav-soo, html.motion .quick a { transition: background-color .25s, color .25s, border-color .25s, transform .2s; }
html.motion .btn:active, html.motion .nav a.nav-soo:active, html.motion .quick a:active { transform: scale(.97); }

/* 메뉴 글자 밑에 주황 선이 그어짐 (PC) */
@media (min-width: 861px) {
  .nav a:not(.nav-soo) { position: relative; }
  .nav a:not(.nav-soo)::before { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px;
    background: var(--amber, #F9A720); transform: scaleX(0); transform-origin: right; transition: transform .45s cubic-bezier(.16,1,.3,1); }
  .nav a:not(.nav-soo):hover::before, .nav a[aria-current="page"]::before { transform: scaleX(1); transform-origin: left; }
}

/* 의료진 카드 — 스크롤에 맞춰 카드 전체가 아래에서 위로 (motion.js 가 위치를 계산) */
html.motion .doctors .doc { will-change: transform, opacity; }

/* 진료 일정표 ● — 하나씩 차례로: 커지며 주황빛으로 물들고, 둘레로 빛의 고리가 퍼짐 */
html.motion .sched td .dot { display: inline-block; position: relative; transform-origin: center; }
html.motion .sched td .dot::after { content: ""; position: absolute; left: 50%; top: 50%; width: 1.6em; height: 1.6em;
  margin: -.8em 0 0 -.8em; border-radius: 50%; border: 2px solid var(--amber, #F9A720); opacity: 0; transform: scale(.3); pointer-events: none; }
html.motion .sched td .dot.glow { animation: dotGlow 1.3s cubic-bezier(.22,.61,.36,1); }
html.motion .sched td .dot.glow::after { animation: dotRing 1.3s cubic-bezier(.16,1,.3,1); }
@keyframes dotGlow {
  0%   { transform: scale(1);    color: var(--accent); text-shadow: none; }
  22%  { transform: scale(1.55); color: var(--amber, #F9A720); text-shadow: 0 0 10px rgba(249,167,32,.85), 0 0 22px rgba(249,167,32,.45); }
  55%  { transform: scale(1.1);  color: var(--amber-dark, #E8930A); text-shadow: 0 0 6px rgba(249,167,32,.4); }
  100% { transform: scale(1);    color: var(--accent); text-shadow: none; }
}
@keyframes dotRing {
  0%   { opacity: .9; transform: scale(.3); }
  100% { opacity: 0;  transform: scale(2.1); }
}

/* 빛나는 요일의 머리글(월·화…)도 함께 주황으로 물듦 */
html.motion .sched thead th.glow { animation: dayHead 1.3s cubic-bezier(.22,.61,.36,1); }
@keyframes dayHead { 0%,100% { color: inherit; } 25% { color: var(--amber-dark, #E8930A); } }

/* 휴대폰 메뉴 — 열 때 항목이 차례로 나타남 */
@media (max-width: 860px) {
  html.motion .nav.open a { animation: navIn .42s cubic-bezier(.16,1,.3,1) both; animation-delay: calc(var(--i, 0) * 35ms); }
}
@keyframes navIn { from { opacity: 0; transform: translate3d(0, -8px, 0); } to { opacity: 1; transform: none; } }
