﻿@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@100..900&display=swap');

/* 外層容器設定 */
.media-wrapper {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

/* 背景圖片設定 */
.background-image {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 1;
}

/* 文字整體區塊 */
.text-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #003366;
    font-family: 'Noto Sans TC', sans-serif;
    z-index: 2;
    width: 100%;
    max-width: 80vw;
    padding: 0 5vw;
    text-align: center;
}

/* 小標題 */
.small-title {
    font-family: 'Noto Sans TC', sans-serif;
    font-size: 2.5vw;
    margin: 0;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s ease forwards;
    animation-delay: 0.3s;
    color: dodgerblue;
    font-weight: 700;
}

/* 大標題主字體設定 */
.big-title {
    font-family: 'Noto Sans TC', sans-serif;
    font-size: 3.5vw;
    margin: 0 0 30px 0;
    color: dodgerblue;
    text-shadow: 2px 2px 6px rgba(30, 144, 255, 0.3), 1px 1px 0px rgba(255, 255, 255, 0.1);
    white-space: nowrap;
    letter-spacing: 0.05em;
    opacity: 1;
    font-weight: 900;
}

    /* 大標題的每個字動畫 */
    .big-title span {
        display: inline-block;
        font-family: 'Noto Sans TC', sans-serif;
        opacity: 0;
        transform: translateX(-50px);
        animation-name: slideJumpIn;
        animation-duration: 0.4s;
        animation-fill-mode: forwards;
        animation-timing-function: ease-out;
        animation-iteration-count: 1;
        animation-delay: calc(0.3s * var(--group));
    }

/* 關鍵動畫：滑入加彈跳 */
@keyframes slideJumpIn {
    0% {
        opacity: 0;
        transform: translateX(-50px);
    }

    50% {
        opacity: 1;
        transform: translateX(0) translateY(-15px);
    }

    100% {
        opacity: 1;
        transform: none;
    }
}

/* intro-text 區域文字設定 */
.intro-text {
    font-family: 'Noto Sans TC', sans-serif;
    text-align: center;
    font-size: 1.6vw;
    line-height: 2;
    color: #444;
    max-width: 60vw;
    margin: 40px auto 0;
    font-weight: 900;
}

    /* 每個 intro 字逐字動畫 */
    .intro-text span {
        display: inline-block;
        opacity: 0;
        transform: translateY(20px);
        animation-name: waveIn;
        animation-duration: 0.4s;
        animation-fill-mode: forwards;
        animation-timing-function: ease-out;
        animation-iteration-count: 1;
    }

/* 各行延遲設計 */
.intro-text span {
    animation-name: waveIn;
    animation-duration: 0.4s;
    animation-fill-mode: forwards;
    animation-timing-function: ease-out;
    animation-iteration-count: 1;
    opacity: 0;
    transform: translateY(20px);
}

    .intro-text > div {
        white-space: nowrap;
        transform-origin: left center;
        max-width: 100%;
    }

/* 手機版縮小整行 */
@media (max-width: 768px) {
    .intro-text > div {
        position: relative;
        left: 50%;
        transform: translateX(-50%) scale(1.65);
        transform-origin: center center;
        margin-bottom: 5vw; /* 可依需求調整 */
    }
}


/* intro 動畫 */
@keyframes waveIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    60% {
        opacity: 1;
        transform: translateY(-5px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .small-title {
        font-size: 5vw;
    }

    .big-title {
        font-size: 7vw;
        letter-spacing: 0.03em;
    }

}
