/* 페이지 전환 커튼 보정 — site.ts 의 injectPageCurtain 이 모든 공개 페이지 머리 끝에 싣는다.
   시안의 커튼(motion.js·v1-motion.js)은 그대로 두고, 깜빡여 보이던 요인만 고친다. */

/* 메뉴줄은 커튼(z-index 1000) 위 — 본문만 닦이고 메뉴는 사라지지 않는다 */
#site-header { z-index: 1001 !important; }

/* 모든 페이지 커튼 색을 같게 (Careers 는 blue-gray.css 가 없어 베이지였다) */
.page-transition-curtain { background: linear-gradient(110deg, #f1f5f9, #dfe8f0) !important; }

/* 새 페이지가 준비될 때까지 커튼을 덮어 둔 채 기다린다(page-curtain.js 가 curtain-hold 를 뗀다) */
.curtain-hold .page-transition-curtain { animation-play-state: paused !important; }

@media (prefers-reduced-motion: no-preference) {
  /* 커튼은 본문 끝 스크립트가 만들므로, 그 스크립트를 기다리는 사이 빈 페이지가 한 번 그려졌다.
     첫 화면부터 CSS 로 같은 판을 깔아 둔다 */
  .curtain-hold body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 999;
    pointer-events: none;
    background: linear-gradient(110deg, #f1f5f9, #dfe8f0);
  }

  /* 시안에 커튼이 없는 페이지(Locations)용 — motion.css 의 커튼과 같은 움직임 */
  .pc-curtain {
    position: fixed;
    inset: 0;
    z-index: 1000;
    pointer-events: none;
    animation: pc-curtain-reveal .7s cubic-bezier(.76, 0, .24, 1) .06s both;
  }
  body.page-exit .pc-curtain { animation: pc-curtain-close .32s cubic-bezier(.76, 0, .24, 1) both; }
  @keyframes pc-curtain-close { from { transform: translateX(-102%); } to { transform: translateX(0); } }
  @keyframes pc-curtain-reveal { from { transform: translateX(0); } to { transform: translateX(102%); } }
}
@media (prefers-reduced-motion: reduce) {
  .pc-curtain { display: none; }
}
