/* 템플릿 위에 얹는 얇은 층. 색·글꼴은 템플릿 변수(--color-*, --font-*)만 쓴다. */
.fx-progress { position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 70; background: var(--color-4); transform-origin: 0 50%; transform: scaleX(0); pointer-events: none; }
.fx-ski { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 30; pointer-events: none; fill: none; }
.fx-ski path { stroke: var(--color-4); stroke-width: 1.5; opacity: .55; }
.fx-snow { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 31; pointer-events: none; }

.fx-cta { position: fixed; inset: auto 0 0 0; z-index: 45; display: none; padding: 10px var(--space-1) calc(10px + env(safe-area-inset-bottom)); background: var(--color-1); border-top: 1px solid var(--color-2); transform: translateY(110%); visibility: hidden; transition: transform .35s ease, visibility 0s .35s; }
.fx-cta.is-on { transform: none; visibility: visible; transition: transform .6s cubic-bezier(.2, 1.5, .4, 1), visibility 0s; }
.fx-cta .m-btn { display: flex; width: 100%; }
@media (max-width: 860px) { .fx-cta { display: block; } }

.contact__book { margin-top: clamp(28px, 4vw, 56px); }
.crew__grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 861px) { #reels .crew__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
[data-coach-bio] { white-space: pre-line; }
.footer__biz { flex-basis: 100%; }

/* 예약 위젯을 템플릿 팔레트에 맞춘다 */
#book { --bk-main: var(--color-2); --bk-line: var(--color-2); color: var(--color-2); font-family: var(--font-2); }
#book .bk { margin: 0; }
#book .bk-date, #book .bk-opt, #book .bk-in, #book .bk-go, #book .bk-kbtn, #book .bk-bank, #book .bk-resume, #book .bk-inapp { border-radius: 0; }
#book .bk .on { background: var(--color-5); }

@media (prefers-reduced-motion: reduce) {
  .fx-progress, .fx-ski, .fx-snow { display: none; }
  .fx-cta, .fx-cta.is-on { transition: none; }
}

.manifesto__name { margin-top: 20px; color: var(--color-3); }

/* 예약 구역 위로는 눈·스키 자국이 지나가지 않게 한다(입력 방해 방지) */
#contact { position: relative; z-index: 32; background: var(--color-1); }

/* ── 2층 효과 (fx.js 2층과 짝). 색은 템플릿 토큰만. 겹침 효과는 #contact 안에서 끈다 ── */

/* 로딩 인트로: CSS만으로 돈다(JS 기다리지 않음). 데스크톱 0.95초, 모바일 0.6초에 걷힌다 */
.fx-intro { position: fixed; inset: 0; z-index: 95; display: grid; place-content: center; justify-items: center; gap: 16px; background: var(--color-2); color: var(--color-1); pointer-events: none; animation: fx-intro-out .5s cubic-bezier(.76, 0, .24, 1) .45s forwards; }
.fx-intro__mark { font-size: clamp(56px, 13vw, 168px); line-height: .9; animation: fx-intro-mark .45s cubic-bezier(.2, .75, .15, 1) backwards; }
.fx-intro__line { width: min(60vw, 420px); height: 1px; background: var(--color-1); transform: scaleX(0); transform-origin: 0 50%; animation: fx-intro-line .5s cubic-bezier(.65, 0, .35, 1) forwards; }
.fx-intro__sub { color: var(--color-4); }
@keyframes fx-intro-out { to { clip-path: inset(0 0 100% 0); visibility: hidden; } }
@keyframes fx-intro-mark { from { transform: translateY(.5em); clip-path: inset(0 0 100% 0); } to { clip-path: inset(-20% 0 -20% 0); } }
@keyframes fx-intro-line { to { transform: scaleX(1); } }
@media (max-width: 860px) {
  .fx-intro { animation-duration: .36s; animation-delay: .22s; }
  .fx-intro__mark { animation-duration: .26s; }
  .fx-intro__line { animation-duration: .24s; }
}
body:has(:target) .fx-intro { display: none; }
/* 인트로가 걷히는 순간에 히어로 글자가 솟도록 템플릿 지연만 뒤로 민다 */
@media (prefers-reduced-motion: no-preference) {
  #hero .m-mark__ink { animation-delay: calc(.62s + var(--hero-i, 0) * 60ms); }
  #hero .hero__media-in { animation-delay: .45s; }
  #hero .hero__info { animation-delay: .85s; }
  @media (max-width: 860px) {
    #hero .m-mark__ink { animation-delay: calc(.3s + var(--hero-i, 0) * 35ms); }
    #hero .hero__media-in { animation-delay: .22s; }
    #hero .hero__info { animation-delay: .4s; }
  }
}

/* 스키 자국 머리 */
.fx-ski .fx-ski__dot { fill: var(--color-2); stroke: none; }

/* 글자 분해 */
.fx-w { display: inline-block; white-space: nowrap; }
.fx-ch { display: inline-block; }

/* 섹션 색 반전: 토큰을 뒤집어 버튼·선·글자가 한꺼번에 따라온다 */
:root { --fx-c1: var(--color-1); --fx-c2: var(--color-2); --fx-c4: var(--color-4); --fx-c6: var(--color-6); }
#clients, #method { background: var(--color-1); color: var(--color-2); transition: background-color .7s ease, color .7s ease; }
#clients .clients__row, #method .method__head { transition: border-color .7s ease; }
.fx-inv { --color-1: var(--fx-c2); --color-2: var(--fx-c1); --color-3: var(--fx-c4); --color-5: var(--fx-c6); }

/* 예약 버튼 펄스 (예약 위젯 밖 버튼만) */
@keyframes fx-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 45%, transparent); } 70%, 100% { box-shadow: 0 0 0 14px color-mix(in srgb, currentColor 0%, transparent); } }
.fx-on :is(.fx-cta .m-btn, #works .works__more .m-btn, #studio .studio__text .m-btn, #feature .feature__cta) { animation: fx-pulse 2.4s cubic-bezier(.2, .7, .3, 1) infinite; }

/* 카드 3D 틸트 + 스크롤 속도 기울기 + 빛 반사 (마우스 데스크톱) */
:is(#crew, #reels) .crew__photo { position: relative; }
.fx-fine #works .works__frame, .fx-fine :is(#crew, #reels) .crew__photo { transform: perspective(900px) rotateX(calc(var(--rx, 0) * 1deg)) rotateY(calc(var(--ry, 0) * 1deg)) skewY(calc(var(--fx-skew, 0) * 1deg)); }
.fx-fine #method .method__photo { transform: skewX(calc(var(--fx-skew, 0) * -1.5deg)); }
.fx-fine :is(#works .works__frame, #crew .crew__photo, #reels .crew__photo)::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), color-mix(in srgb, var(--color-1) 40%, transparent), transparent 58%); opacity: 0; transition: opacity .45s ease; }
.fx-fine .is-tilt::after { opacity: 1; }

/* 영상 카드 스포트라이트 */
#reels .crew__photo { transition: opacity .45s ease, filter .45s ease; }
#reels .fx-spot .crew__card:not(.is-spot) .crew__photo { opacity: .3; filter: grayscale(1); }

/* 커스텀 커서 */
.fx-cursor { position: fixed; left: 0; top: 0; z-index: 80; pointer-events: none; mix-blend-mode: difference; transition: opacity .25s ease; }
.fx-cursor.is-off { opacity: 0; }
.fx-cursor__ring { position: absolute; left: -18px; top: -18px; width: 36px; height: 36px; border: 1px solid var(--color-1); border-radius: 50%; transition: transform .4s cubic-bezier(.2, .8, .2, 1), background-color .25s ease; }
.fx-cursor.is-hot .fx-cursor__ring { transform: scale(1.7); }
.fx-cursor.is-label .fx-cursor__ring { transform: scale(2.3); background: var(--color-1); }
.fx-cursor__label { position: absolute; left: 0; top: 0; translate: -50% -50%; color: var(--color-2); white-space: nowrap; opacity: 0; transition: opacity .2s ease; }
.fx-cursor.is-label .fx-cursor__label { opacity: 1; }

/* 메뉴 링크 굴림 */
.fx-roll { display: inline-block; overflow: hidden; height: 1.15em; line-height: 1.15; vertical-align: top; }
.fx-roll > span { display: block; text-shadow: 0 1.15em 0 currentColor; transition: translate .45s cubic-bezier(.7, 0, .2, 1); }
@media (hover: hover) { a:hover > .fx-roll > span { translate: 0 -1.15em; } }

/* 지금 보는 구역 */
.fx-index { position: fixed; left: var(--space-1); bottom: 18px; z-index: 40; display: flex; gap: 12px; align-items: baseline; color: var(--color-1); mix-blend-mode: difference; pointer-events: none; visibility: hidden; opacity: 0; transition: visibility 0s .3s; }
.fx-index.is-on { visibility: visible; transition: none; }
.fx-index b { font-weight: 600; }
.fx-index i { font-style: normal; padding-left: 12px; border-left: 1px solid currentColor; }

/* 마우스 호버 디테일 */
@media (hover: hover) and (pointer: fine) {
  #expertise .expertise__row h3 { transition: translate .5s cubic-bezier(.2, .8, .2, 1); }
  #expertise .expertise__row:hover h3 { translate: 18px 0; }
  #studio .studio__spec dd { transition: translate .45s cubic-bezier(.2, .8, .2, 1); }
  #studio .studio__spec:hover dd { translate: 10px 0; }
  .fx-fine #hero .hero__push { translate: calc(var(--hx, 0) * -8px) calc(var(--hy, 0) * -6px); }
  .fx-fine #hero .m-mark__glyph { translate: calc(var(--hx, 0) * var(--fx-d, 1) * 10px) calc(var(--hy, 0) * var(--fx-d, 1) * 6px); }
  .fx-fine #hero .m-mark__glyph:nth-child(1) { --fx-d: .6; }
  .fx-fine #hero .m-mark__glyph:nth-child(2) { --fx-d: 1.3; }
  .fx-fine #hero .m-mark__glyph:nth-child(3) { --fx-d: -.9; }
  .fx-fine #hero .m-mark__glyph:nth-child(4) { --fx-d: -1.5; }
}

@media (prefers-reduced-motion: reduce) {
  .fx-intro, .fx-cursor, .fx-index { display: none; }
  .fx-on :is(.fx-cta .m-btn, #works .works__more .m-btn, #studio .studio__text .m-btn, #feature .feature__cta) { animation: none; }
}
