/* ==========================================================================
   화면(페이지 뷰) 전환 기본 규칙
   - 한 번에 한 화면(.afcs-page-view.is-active)만 보인다.
   - 화면 전환 시 본문(.afcs-page-body)은 가운데부터 서서히 나타난다.
   ========================================================================== */
@property --afcs-reveal-core {
    syntax: "<number>";
    inherits: false;
    initial-value: 1;
}

@property --afcs-reveal-mid {
    syntax: "<number>";
    inherits: false;
    initial-value: 1;
}

@property --afcs-reveal-edge {
    syntax: "<number>";
    inherits: false;
    initial-value: 1;
}

#afcs-pages {
    padding-top: var(--afcs-nav-height);
}

.afcs-page-view {
    display: none;
    min-height: calc(100vh - var(--afcs-nav-height));
    padding: 0;   /* 기존 테마의 section { padding: 120px 0 } 를 덮어쓴다 */
    background: var(--afcs-surface);
}

.afcs-page-view.is-active {
    display: block;
}

/* 히어로 아래 본문 영역 : 모든 화면이 같은 여백과 폭을 쓴다 */
.afcs-page-body {
    max-width: var(--afcs-container);
    padding-top: var(--afcs-body-top);
    padding-bottom: var(--afcs-body-bottom);
}

/* 화면 전환 후 제목에 프로그램으로 포커스를 줄 때 생기는 테두리 제거 */
[tabindex="-1"]:focus {
    outline: none;
}

/* --------------------------------------------------------------------------
   본문 등장 효과 : 화면이 바뀔 때 가운데부터 연하게 서서히 나타난다 (약 1초)
   -------------------------------------------------------------------------- */
@keyframes afcs-body-reveal {
    0% {
        opacity: 0;
        --afcs-reveal-core: 0;
        --afcs-reveal-mid: 0;
        --afcs-reveal-edge: 0;
    }

    25% {
        opacity: 0.48;
        --afcs-reveal-core: 0.58;
        --afcs-reveal-mid: 0.12;
        --afcs-reveal-edge: 0;
    }

    55% {
        opacity: 0.85;
        --afcs-reveal-core: 0.92;
        --afcs-reveal-mid: 0.56;
        --afcs-reveal-edge: 0.16;
    }

    82% {
        opacity: 0.98;
        --afcs-reveal-core: 1;
        --afcs-reveal-mid: 0.9;
        --afcs-reveal-edge: 0.68;
    }

    100% {
        opacity: 1;
        --afcs-reveal-core: 1;
        --afcs-reveal-mid: 1;
        --afcs-reveal-edge: 1;
    }
}

.afcs-page-body.is-revealing {
    will-change: opacity;
    -webkit-mask-image: radial-gradient(
        ellipse 68% 240px at 50% 190px,
        rgb(0 0 0 / var(--afcs-reveal-core, 1)) 0%,
        rgb(0 0 0 / var(--afcs-reveal-mid, 1)) 58%,
        rgb(0 0 0 / var(--afcs-reveal-edge, 1)) 100%
    );
    mask-image: radial-gradient(
        ellipse 68% 240px at 50% 190px,
        rgb(0 0 0 / var(--afcs-reveal-core, 1)) 0%,
        rgb(0 0 0 / var(--afcs-reveal-mid, 1)) 58%,
        rgb(0 0 0 / var(--afcs-reveal-edge, 1)) 100%
    );
    animation: afcs-body-reveal 1s ease-out both;
}

@media (prefers-reduced-motion: reduce) {
    .afcs-page-body.is-revealing {
        -webkit-mask-image: none;
        mask-image: none;
        animation: none;
    }
}
