/**
 * =========================================================
 * SUNIVA Experience Engine
 * Presentation Styles v1.0.0
 *
 * 配置先
 * /html/assets/css/suniva/presentation.css
 * =========================================================
 */


/* =========================================================
   Viewer
   ========================================================= */

.suniva-presentation-viewer {
    position: fixed;
    z-index: 11000;
    inset: 0;
    display: grid;
    overflow: hidden;
    color: #ffffff;
    background:
        radial-gradient(
            circle at 50% 35%,
            #302a25 0,
            #171311 62%,
            #090807 100%
        );
    opacity: 0;
    visibility: hidden;
    isolation: isolate;
    transition:
        opacity 450ms ease,
        visibility 450ms ease;
}

.suniva-presentation-viewer::before {
    position: absolute;
    z-index: -1;
    inset: 0;
    content: "";
    pointer-events: none;
    background:
        radial-gradient(
            circle at 18% 14%,
            rgba(199, 163, 106, 0.13),
            transparent 34%
        ),
        radial-gradient(
            circle at 82% 76%,
            rgba(220, 235, 245, 0.08),
            transparent 36%
        );
}

.suniva-presentation-viewer[hidden] {
    display: none;
}

.suniva-presentation-viewer.is-open {
    opacity: 1;
    visibility: visible;
}

.suniva-presentation-viewer.is-fullscreen {
    width: 100vw;
    height: 100svh;
}


/* =========================================================
   Stage
   ========================================================= */

.suniva-presentation-stage {
    position: absolute;
    z-index: 0;
    inset: 0;
    pointer-events: none;
}

.suniva-presentation-scene-container {
    position: absolute;
    z-index: 1;
    inset: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
    transition:
        transform 300ms ease;
    touch-action: pan-y;
}


/* =========================================================
   Active Scene
   ========================================================= */

.suniva-presentation-active-scene {
    position: relative;
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    overflow: hidden;
    opacity: 0;
    transform: scale(1.018);
    transition:
        opacity 700ms ease,
        transform 1200ms
            cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}

.suniva-presentation-active-scene.is-visible {
    opacity: 1;
    transform: scale(1);
}

.suniva-presentation-active-scene.is-direction-next {
    transform:
        translateX(24px)
        scale(1.012);
}

.suniva-presentation-active-scene.is-direction-previous {
    transform:
        translateX(-24px)
        scale(1.012);
}

.suniva-presentation-active-scene.is-visible.is-direction-next,
.suniva-presentation-active-scene.is-visible.is-direction-previous {
    transform: none;
}

.suniva-presentation-active-scene > * {
    width: 100%;
    height: 100%;
}

.suniva-presentation-active-scene img,
.suniva-presentation-active-scene video,
.suniva-presentation-active-scene picture {
    display: block;
    width: 100%;
    height: 100%;
}

.suniva-presentation-active-scene img,
.suniva-presentation-active-scene video {
    object-fit: contain;
}


/* 背景全面型 */

.suniva-presentation-active-scene
    [data-presentation-cover] img,
.suniva-presentation-active-scene
    img[data-presentation-cover],
.suniva-presentation-active-scene
    .is-presentation-cover img {
    object-fit: cover;
}


/* =========================================================
   映像の上にあるテキスト
   ========================================================= */

.suniva-presentation-active-scene
    [data-presentation-content] {
    position: absolute;
    z-index: 2;
    right: clamp(28px, 7vw, 120px);
    bottom: clamp(70px, 11vh, 150px);
    left: clamp(28px, 7vw, 120px);
    width: min(720px, 80vw);
    height: auto;
    padding:
        clamp(22px, 4vw, 48px);
    border:
        1px solid rgba(255, 255, 255, 0.2);
    border-radius:
        clamp(18px, 3vw, 32px);
    color: #ffffff;
    background:
        rgba(19, 15, 13, 0.48);
    box-shadow:
        0 24px 70px rgba(0, 0, 0, 0.24);
    -webkit-backdrop-filter:
        blur(22px);
    backdrop-filter:
        blur(22px);
}

.suniva-presentation-active-scene
    [data-presentation-title] {
    margin: 0;
    color: #ffffff;
    font-size:
        clamp(30px, 5vw, 72px);
    font-weight: 500;
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.suniva-presentation-active-scene
    [data-presentation-caption] {
    max-width: 660px;
    margin: 22px 0 0;
    color:
        rgba(255, 255, 255, 0.78);
    font-size:
        clamp(14px, 1.7vw, 20px);
    line-height: 1.8;
}


/* =========================================================
   CTA
   ========================================================= */

.suniva-presentation-cta {
    position: absolute;
    z-index: 4;
    right: 50%;
    bottom:
        max(
            92px,
            calc(
                env(safe-area-inset-bottom)
                + 72px
            )
        );
    display: inline-flex;
    min-width: min(320px, 80vw);
    min-height: 58px;
    align-items: center;
    justify-content: center;
    padding: 15px 32px;
    border:
        1px solid rgba(255, 255, 255, 0.5);
    border-radius: 999px;
    color: #332a22;
    background:
        linear-gradient(
            135deg,
            #ffffff,
            #ead7ae
        );
    box-shadow:
        0 18px 50px
        rgba(199, 163, 106, 0.28);
    text-decoration: none;
    cursor: pointer;
    font-size:
        clamp(14px, 1.5vw, 18px);
    font-weight: 700;
    letter-spacing: 0.04em;
    transform: translateX(50%);
    transition:
        box-shadow 250ms ease,
        transform 250ms ease;
}

.suniva-presentation-cta:hover {
    color: #332a22;
    text-decoration: none;
    box-shadow:
        0 22px 60px
        rgba(199, 163, 106, 0.42);
    transform:
        translateX(50%)
        translateY(-3px);
}

.suniva-presentation-cta:focus-visible {
    outline:
        3px solid rgba(255, 255, 255, 0.62);
    outline-offset: 4px;
}


/* =========================================================
   Close
   ========================================================= */

.suniva-presentation-close {
    position: fixed;
    z-index: 8;
    top:
        max(18px, env(safe-area-inset-top));
    right:
        max(18px, env(safe-area-inset-right));
    display: grid;
    width: 50px;
    height: 50px;
    padding: 0;
    place-items: center;
    border:
        1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    color: #ffffff;
    background:
        rgba(255, 255, 255, 0.08);
    -webkit-backdrop-filter:
        blur(14px);
    backdrop-filter:
        blur(14px);
    cursor: pointer;
    font-size: 31px;
    font-weight: 200;
    line-height: 1;
    transition:
        background-color 250ms ease,
        border-color 250ms ease,
        transform 250ms ease;
}

.suniva-presentation-close:hover {
    border-color:
        rgba(255, 255, 255, 0.52);
    background:
        rgba(255, 255, 255, 0.16);
    transform: rotate(6deg);
}


/* =========================================================
   Previous / Next
   ========================================================= */

.suniva-presentation-nav {
    position: fixed;
    z-index: 7;
    top: 50%;
    display: grid;
    width: 62px;
    height: 62px;
    padding: 0;
    place-items: center;
    border:
        1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #ffffff;
    background:
        rgba(20, 16, 14, 0.35);
    -webkit-backdrop-filter:
        blur(14px);
    backdrop-filter:
        blur(14px);
    cursor: pointer;
    font-size: 44px;
    font-weight: 200;
    line-height: 1;
    transform: translateY(-50%);
    transition:
        opacity 250ms ease,
        background-color 250ms ease,
        border-color 250ms ease,
        transform 250ms ease;
}

.suniva-presentation-prev {
    left:
        max(20px, env(safe-area-inset-left));
}

.suniva-presentation-next {
    right:
        max(20px, env(safe-area-inset-right));
}

.suniva-presentation-nav:hover {
    border-color:
        rgba(255, 255, 255, 0.48);
    background:
        rgba(255, 255, 255, 0.14);
}

.suniva-presentation-prev:hover {
    transform:
        translateY(-50%)
        translateX(-3px);
}

.suniva-presentation-next:hover {
    transform:
        translateY(-50%)
        translateX(3px);
}

.suniva-presentation-nav:disabled {
    pointer-events: none;
    opacity: 0.14;
}


/* =========================================================
   Controls
   ========================================================= */

.suniva-presentation-controls {
    position: fixed;
    z-index: 8;
    bottom:
        max(
            22px,
            env(safe-area-inset-bottom)
        );
    left: 50%;
    display: flex;
    min-height: 48px;
    align-items: center;
    gap: 8px;
    padding: 7px;
    border:
        1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background:
        rgba(15, 12, 10, 0.54);
    box-shadow:
        0 16px 50px rgba(0, 0, 0, 0.24);
    -webkit-backdrop-filter:
        blur(18px);
    backdrop-filter:
        blur(18px);
    transform: translateX(-50%);
}

.suniva-presentation-play,
.suniva-presentation-fullscreen {
    display: grid;
    width: 38px;
    height: 38px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    transition:
        color 220ms ease,
        background-color 220ms ease,
        transform 220ms ease;
}

.suniva-presentation-play:hover,
.suniva-presentation-fullscreen:hover {
    color:
        var(--suniva-gold-light, #e6d3ad);
    background:
        rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.suniva-presentation-play.is-playing {
    color:
        var(--suniva-gold-light, #e6d3ad);
}

.suniva-presentation-counter {
    min-width: 66px;
    padding-inline: 9px;
    color:
        rgba(255, 255, 255, 0.72);
    font-size: 11px;
    font-variant-numeric:
        tabular-nums;
    letter-spacing: 0.16em;
    text-align: center;
}


/* =========================================================
   Progress
   ========================================================= */

.suniva-presentation-progress {
    position: fixed;
    z-index: 8;
    right: 0;
    bottom: 0;
    left: 0;
    height: 3px;
    overflow: hidden;
    background:
        rgba(255, 255, 255, 0.1);
}

.suniva-presentation-progress-bar {
    display: block;
    width: 0;
    height: 100%;
    border-radius: 999px;
    background:
        linear-gradient(
            90deg,
            var(--suniva-gold-dark, #8b6a37),
            var(--suniva-gold-light, #e6d3ad),
            #ffffff
        );
    box-shadow:
        0 0 18px
        rgba(230, 211, 173, 0.5);
    transition:
        width 650ms
        cubic-bezier(0.22, 1, 0.36, 1);
}


/* =========================================================
   Presentation用の画像レイアウト
   ========================================================= */

.suniva-presentation-active-scene
    .suniva-presentation-layout {
    position: relative;
    display: grid;
    width: min(100%, 1600px);
    height: 100%;
    grid-template-columns:
        minmax(0, 1.35fr)
        minmax(320px, 0.65fr);
    align-items: center;
    gap:
        clamp(28px, 5vw, 90px);
    margin-inline: auto;
    padding:
        clamp(72px, 9vw, 140px)
        clamp(72px, 9vw, 150px);
}

.suniva-presentation-active-scene
    .suniva-presentation-layout__image {
    min-width: 0;
    height: min(68vh, 780px);
    overflow: hidden;
    border-radius:
        clamp(18px, 3vw, 36px);
    box-shadow:
        0 34px 110px
        rgba(0, 0, 0, 0.36);
}

.suniva-presentation-active-scene
    .suniva-presentation-layout__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.suniva-presentation-active-scene
    .suniva-presentation-layout__content {
    width: auto;
    height: auto;
}

.suniva-presentation-active-scene
    .suniva-presentation-layout__content h2 {
    margin: 0;
    color: #ffffff;
    font-size:
        clamp(36px, 5vw, 76px);
    font-weight: 500;
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.suniva-presentation-active-scene
    .suniva-presentation-layout__content p {
    margin: 26px 0 0;
    color:
        rgba(255, 255, 255, 0.72);
    font-size:
        clamp(14px, 1.6vw, 20px);
    line-height: 1.9;
}


/* =========================================================
   Tablet
   ========================================================= */

@media (max-width: 1024px) {
    .suniva-presentation-nav {
        width: 50px;
        height: 50px;
        font-size: 36px;
    }

    .suniva-presentation-prev {
        left: 12px;
    }

    .suniva-presentation-next {
        right: 12px;
    }

    .suniva-presentation-active-scene
        .suniva-presentation-layout {
        grid-template-columns: 1fr;
        grid-template-rows:
            minmax(0, 1fr) auto;
        gap: 24px;
        padding:
            72px 74px 82px;
    }

    .suniva-presentation-active-scene
        .suniva-presentation-layout__image {
        height: auto;
        min-height: 0;
    }
}


/* =========================================================
   Smartphone
   ========================================================= */

@media (max-width: 767px) {
    .suniva-presentation-active-scene {
        padding:
            max(
                62px,
                env(safe-area-inset-top)
            )
            12px
            max(
                76px,
                calc(
                    env(safe-area-inset-bottom)
                    + 60px
                )
            );
    }

    .suniva-presentation-active-scene > * {
        height: auto;
        max-height: 100%;
    }

    .suniva-presentation-active-scene img,
    .suniva-presentation-active-scene video {
        max-height:
            calc(
                100svh -
                150px -
                env(safe-area-inset-top) -
                env(safe-area-inset-bottom)
            );
        object-fit: contain;
    }

    .suniva-presentation-active-scene
        [data-presentation-content] {
        right: 18px;
        bottom: 88px;
        left: 18px;
        width: auto;
        padding: 20px;
        border-radius: 18px;
    }

    .suniva-presentation-active-scene
        [data-presentation-title] {
        font-size:
            clamp(25px, 9vw, 42px);
    }

    .suniva-presentation-active-scene
        [data-presentation-caption] {
        display: -webkit-box;
        margin-top: 12px;
        overflow: hidden;
        font-size: 13px;
        line-height: 1.65;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
    }

    .suniva-presentation-close {
        top:
            max(
                10px,
                env(safe-area-inset-top)
            );
        right:
            max(
                10px,
                env(safe-area-inset-right)
            );
        width: 44px;
        height: 44px;
        font-size: 27px;
    }

    .suniva-presentation-nav {
        top: auto;
        bottom:
            max(
                18px,
                env(safe-area-inset-bottom)
            );
        width: 42px;
        height: 42px;
        font-size: 30px;
        transform: none;
    }

    .suniva-presentation-prev {
        left: 12px;
    }

    .suniva-presentation-next {
        right: 12px;
    }

    .suniva-presentation-prev:hover,
    .suniva-presentation-next:hover {
        transform: none;
    }

    .suniva-presentation-controls {
        bottom:
            max(
                14px,
                env(safe-area-inset-bottom)
            );
        min-height: 44px;
        gap: 2px;
        padding: 4px;
    }

    .suniva-presentation-play,
    .suniva-presentation-fullscreen {
        width: 34px;
        height: 34px;
        font-size: 12px;
    }

    .suniva-presentation-counter {
        min-width: 58px;
        padding-inline: 6px;
        font-size: 9px;
    }

    .suniva-presentation-cta {
        bottom:
            max(
                78px,
                calc(
                    env(safe-area-inset-bottom)
                    + 66px
                )
            );
        min-width:
            min(280px, 82vw);
        min-height: 52px;
        padding: 13px 24px;
        font-size: 14px;
    }

    .suniva-presentation-active-scene
        .suniva-presentation-layout {
        display: flex;
        height: 100%;
        flex-direction: column;
        justify-content: center;
        gap: 20px;
        padding:
            4px 54px 10px;
    }

    .suniva-presentation-active-scene
        .suniva-presentation-layout__image {
        width: 100%;
        height: auto;
        max-height: 54svh;
        border-radius: 18px;
    }

    .suniva-presentation-active-scene
        .suniva-presentation-layout__content h2 {
        font-size:
            clamp(27px, 9vw, 44px);
    }

    .suniva-presentation-active-scene
        .suniva-presentation-layout__content p {
        display: -webkit-box;
        margin-top: 12px;
        overflow: hidden;
        font-size: 13px;
        line-height: 1.65;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
    }
}


/* =========================================================
   横向きスマートフォン
   ========================================================= */

@media (
    max-height: 520px
) and (
    orientation: landscape
) {
    .suniva-presentation-active-scene {
        padding:
            14px 70px 14px;
    }

    .suniva-presentation-active-scene img,
    .suniva-presentation-active-scene video {
        max-height:
            calc(100svh - 28px);
    }

    .suniva-presentation-active-scene
        .suniva-presentation-layout {
        display: grid;
        grid-template-columns:
            minmax(0, 1.35fr)
            minmax(220px, 0.65fr);
        gap: 26px;
        padding: 12px 76px;
    }

    .suniva-presentation-active-scene
        .suniva-presentation-layout__image {
        max-height:
            calc(100svh - 24px);
    }

    .suniva-presentation-controls {
        bottom: 8px;
    }

    .suniva-presentation-nav {
        top: 50%;
        bottom: auto;
        transform: translateY(-50%);
    }

    .suniva-presentation-close {
        top: 8px;
        right: 8px;
    }
}


/* =========================================================
   Reduced Motion
   ========================================================= */

@media (
    prefers-reduced-motion: reduce
) {
    .suniva-presentation-viewer,
    .suniva-presentation-active-scene,
    .suniva-presentation-progress-bar,
    .suniva-presentation-nav,
    .suniva-presentation-close,
    .suniva-presentation-cta {
        transition-duration: 0.01ms;
    }

    .suniva-presentation-active-scene,
    .suniva-presentation-active-scene.is-visible {
        transform: none;
    }
}