/* --- 1. Reset --- */

.mv-container h1 {
    margin: 0;
    padding: 0;
    text-wrap: auto;
}


/* --- 3. Container --- */
.mv-container {
    position: relative;
    width: 100%;
    /* 画面全体の高さからヘッダーの95pxを引く */
    height: calc(100vh - 95px); 
    overflow: hidden;
}

/* --- 4. Slideshow --- */
.slideshow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
    transform: translateX(100%);
    will-change: transform;
}

@keyframes premiumSlideIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0%); }
}

@keyframes premiumSlideOut {
    from { transform: translateX(0%); }
    to { transform: translateX(-100%); }
}

.slide.active {
    z-index: 2;
    transform: translateX(0%);
}

.slideshow.is-playing .slide.active {
    animation: premiumSlideIn 1.0s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.slide.last-active {
    z-index: 1;
    animation: premiumSlideOut 1.0s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* --- 5. Text Overlay --- */
.content-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    pointer-events: none;
}

.text-border-wrap {
    display: inline-block;
    position: relative;
    padding: 35px 40px;
    max-width: 850px;
}

.hero-text {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    color: #ffffff;
    font-size: clamp(1.2rem, 3.8vw, 2.4rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
    text-align: center;
}

/* --- 6. Border Lines --- */
.border-line {
    position: absolute;
    background-color: #ffffff;
}

.border-line.top { top: 0; left: 0; width: 0; height: 1px; transition: width 0.2s linear; }
.border-line.right { top: 0; right: 0; width: 1px; height: 0; transition: height 0.2s linear; }
.border-line.bottom { bottom: 0; right: 0; width: 0; height: 1px; transition: width 0.2s linear; }
.border-line.left { bottom: 0; left: 0; width: 1px; height: 0; transition: height 0.2s linear; }

.text-border-wrap.animate .border-line.top { width: 100%; transition-delay: 0s; }
.text-border-wrap.animate .border-line.right { height: 100%; transition-delay: 0.2s; }
.text-border-wrap.animate .border-line.bottom { width: 100%; transition-delay: 0.4s; }
.text-border-wrap.animate .border-line.left { height: 100%; transition-delay: 0.6s; }

/* --- 7. 下部の白いセクション --- */
.content-section {
    width: 100%;
    height: 100vh;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    font-family: 'Inter', sans-serif;
}

/* Mobile Optimization */
@media (max-width: 768px) {
    .site-header {
        height: 60px; /* スマホでは少し高さを抑えるのが一般的 */
    }
    .mv-container {
        height: calc(100vh - 60px);
    }
    .text-border-wrap {
        padding: 60px 20px;
        width: 85%;
        max-width: none;
    }
    .hero-text {
        font-size: 1.8rem; 
        line-height: 1.25;
    }
}