/* 01-03 courses and enrollment flow: layout and fades.
   Behavior and scroll distances: scene-scroll.js, SETTINGS at the top. */
:root {
    --scene-copy-out-duration: 240ms;
    --scene-copy-in-duration: 570ms;
    --scene-copy-in-delay: 110ms;
    --scene-photo-duration: 680ms;
}
/* v18: centered, stationary copy dissolves with its photograph. */
.scene-stage {
    position: relative;
}

.scene-meter {
    display: none;
}

.scene-pinned {
    height: calc(var(--scene-height) + var(--scene-distance));
}

.scene-pinned > .scene-stage {
    position: sticky;
    top: 0;
    height: var(--scene-height);
    display: grid;
    place-items: center;
    padding: 32px 82px;
    isolation: isolate;
}

.scene-pinned .course-visual, .scene-pinned .flow-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.scene-pinned .course-content, .scene-pinned .flow-scenes {
    display: grid;
    align-items: center;
    width: min(100%, 650px);
    margin: 0;
    padding: 0;
}

.scene-pinned [data-scene-panel] {
    grid-area: 1 / 1;
    display: block;
    width: 100%;
    min-height: 0;
    margin: 0;
    padding: 0;
    transform: none;
}

.scene-pinned [data-scene-state='hidden'] {
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--scene-copy-out-duration) ease;
}

.scene-pinned [data-scene-state='active'] {
    opacity: 1;
    pointer-events: auto;
    transition: opacity var(--scene-copy-in-duration) ease var(--scene-copy-in-delay);
}

.scene-pinned .course__heading, .scene-pinned .course__body, .scene-pinned .flow-scene__copy {
    max-width: none;
}

.scene-pinned .course__meta {
    margin: 0 0 12px;
    gap: 16px;
}

.scene-pinned .course__number {
    font-size: 60px;
    line-height: 1;
}

.scene-pinned .course__english {
    font-size: 10px;
    line-height: 1.4;
    letter-spacing: .12em;
}

.scene-pinned .course h3, .scene-pinned .flow-scene h3 {
    margin: 0 0 20px;
    font-size: clamp(30px, 3.6vw, 46px);
    line-height: 1.5;
    letter-spacing: 0;
}

.scene-pinned .course__body p, .scene-pinned .flow-scene__copy > p:not(.flow-step__number) {
    font-size: 17px;
    line-height: 1.9;
    letter-spacing: 0;
    margin: 0;
}

.scene-pinned .course__body p + p, .scene-pinned .flow-scene__copy > p + p {
    margin-top: 14px;
}

.scene-pinned .course__topics {
    margin: 20px 0 17px;
}

.scene-pinned .course .text-link {
    background: none;
    min-height: 44px;
    padding: 9px 0;
    border-width: 0 0 1px;
    justify-content: space-between;
    font-size: 16px;
    letter-spacing: 0;
}

.scene-pinned .flow-scene .flow-step__number {
    margin: 0 0 20px;
    font-size: 75px;
    line-height: 1;
}

.scene-pinned .course-visual__frame::after, .scene-pinned .flow-backdrop::after {
    background: linear-gradient(90deg, rgb(255 255 255 / 38%), rgb(255 255 255 / 80%) 32%, rgb(255 255 255 / 80%) 68%, rgb(255 255 255 / 38%));
}

.scene-pinned .course-visual__image, .scene-pinned .flow-backdrop__image {
    transition: opacity var(--scene-photo-duration) ease;
}

.scene-pinned .scene-meter {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    display: block;
    width: 42px;
    z-index: 4;
}

.scene-meter__label {
    margin-bottom: 19px;
    text-align: center;
    font: 500 8px/1.5 Arial, sans-serif;
    letter-spacing: .1em;
}

.scene-meter ol {
    position: relative;
    margin: 0;
    padding: 0;
    list-style: none;
}

.scene-meter ol::before, .scene-meter ol::after {
    content: '';
    position: absolute;
    width: 2px;
    right: 3px;
    top: 0;
    height: 100%;
    background: rgb(17 17 17 / 18%);
    pointer-events: none;
}

.scene-meter ol::after {
    background: linear-gradient(var(--blue), var(--pink));
    transform: scaleY(var(--scene-progress, 0));
    transform-origin: top;
}

.scene-meter button {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 44px;
    height: 52px;
    padding: 0 0 0 4px;
    border: 0;
    background: transparent;
    color: var(--ink);
    font: 400 15px/1 'Times New Roman', serif;
    cursor: pointer;
    opacity: .5;
    transition: opacity 300ms ease;
}

.scene-meter button::after {
    content: '';
    position: absolute;
    right: -1px;
    top: 50%;
    width: 10px;
    height: 10px;
    margin-top: -5px;
    border: 1px solid rgb(17 17 17 / 28%);
    background: #fff;
    border-radius: 50%;
    z-index: 1;
}

.scene-meter button[aria-current='step'] {
    opacity: 1;
    font-weight: 700;
}

.scene-meter button[aria-current='step']::after {
    border-color: var(--ink);
    background: linear-gradient(135deg, var(--blue), var(--pink));
    box-shadow: 0 0 0 3px rgb(255 255 255 / 75%);
}

.scene-meter button:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 2px;
}

@media (max-width: 767px) {
    .scene-pinned > .scene-stage {
        padding: 23px 57px calc(var(--reservation-clearance) + 18px) 23px;
    }

    .scene-pinned .scene-meter {
        right: 9px;
        margin-top: calc(var(--reservation-clearance) * -.5);
    }

    .scene-pinned .course__number {
        font-size: 45px;
    }

    .scene-pinned .course__meta {
        margin-bottom: 10px;
    }

    .scene-pinned .course__meta i {
        width: 25px;
    }

    .scene-pinned .course h3, .scene-pinned .flow-scene h3 {
        font-size: clamp(27px, 7.4vw, 37px);
        line-height: 1.45;
        margin-bottom: 15px;
    }

    .scene-pinned .course__body p, .scene-pinned .flow-scene__copy > p:not(.flow-step__number) {
        font-size: 16px;
        line-height: 1.8;
    }

    .scene-pinned .course__body p + p, .scene-pinned .flow-scene__copy > p + p {
        margin-top: 12px;
    }

    .scene-pinned .course__topics {
        display: none;
    }

    .scene-pinned .course .text-link {
        margin-top: 15px;
        font-size: 14px;
        gap: 8px;
    }

    .scene-pinned .flow-scene .flow-step__number {
        font-size: 62px;
        margin-bottom: 16px;
    }

    .scene-pinned .course-visual__frame::after, .scene-pinned .flow-backdrop::after {
        background: linear-gradient(90deg, rgb(255 255 255 / 72%) 0%, rgb(255 255 255 / 78%) 72%, rgb(255 255 255 / 45%) 100%);
    }


}

@media (prefers-reduced-motion: reduce) {
    .scene-meter button, .scene-pinned [data-scene-panel], .scene-pinned .course-visual__image, .scene-pinned .flow-backdrop__image {
        transition: none;
    }
}

@media print {
    .scene-meter {
        display: none !important;
    }

    .scene-pinned {
        height: auto;
    }

    .scene-pinned > .scene-stage, .scene-pinned .course-content, .scene-pinned .flow-scenes {
        display: block;
        height: auto;
        position: static;
        padding: 0;
    }

    .scene-pinned [data-scene-panel] {
        opacity: 1 !important;
        padding: 25px 0;
    }
}

