/* -------------------------
   Base Styles
------------------------- */
:root {
    --accent-color: #fce83a;
    --text-color: #ffffff;
    --peek-height: clamp(60px, 8vh, 90px); 
}

body,
html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    font-family: 'BIZ UDPMincho', sans-serif;
    color: var(--text-color);
    overflow: hidden;
}

/* --- 背景画像の指定 --- */
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    
    background-image: url('resource/brand/background.jpg');
    background-color: #3b4d61;
    z-index: -1;
    background-size: cover; 
    background-position: center 65%;
    background-repeat: no-repeat;
}

#qa-section.active~.background {
    filter: blur(3px);
}

/* -------------------------
   Header & Logo
------------------------- */
header {
    position: absolute;
    top: clamp(20px, 4vh, 50px);
    left: clamp(20px, 4vw, 50px);
    z-index: 10;
}

.logo-container {
    display: flex;
    flex-direction: column;
}

.logo-img {
    width: clamp(200px, 35vw, 600px);
    height: auto;
    margin-bottom: 5px;
}

/* -------------------------
   Side Navigation
------------------------- */
nav.side-nav {
    position: absolute;
    top: 50%;
    right: clamp(20px, 5vw, 50px);
    transform: translateY(-50%);
    z-index: 10;
}

.side-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: right;
    position: relative;
}

.side-nav li {
    margin-bottom: clamp(15px, 3vh, 30px);
    cursor: pointer;
    position: relative;
    padding-right: clamp(15px, 2vw, 25px);
}

.nav-img {
    height: clamp(25px, 2.5vw, 45px);
    width: auto;
    vertical-align: middle;
    transition: opacity 0.3s ease, filter 0.3s ease;
}

.side-nav li:hover .nav-img {
    opacity: 0.7;
}

.side-nav li.active .nav-img {
    filter: brightness(0) saturate(100%) invert(87%) sepia(35%) saturate(1067%) hue-rotate(344deg) brightness(105%) contrast(100%);
    opacity: 1;
}

.active-indicator {
    position: absolute;
    right: 0;
    width: 3px;
    background-color: var(--accent-color);
    transition: top 0.4s cubic-bezier(0.25, 1, 0.5, 1), height 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    pointer-events: none;
}

/* -------------------------
   Footer
------------------------- */
footer {
    position: absolute;
    bottom: clamp(10px, 2vh, 25px);
    right: clamp(20px, 4vw, 50px);
    z-index: 10;
}

.footer-img {
    height: clamp(14px, 1.5vw, 24px);
    width: auto;
}

/* -------------------------
   Main & Content Sections
------------------------- */
main {
    width: 100%;
    height: 100%;
    position: relative;
}

.section {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.section.active {
    opacity: 1;
    visibility: visible;
}

/* --- About Section --- */
.about-text {
    position: absolute;
    top: 25%;
    left: clamp(5%, 8vw, 10%);
    font-family: 'BIZ UDPMincho', serif;
    font-size: clamp(1.2rem, 2.5vw, 2.5rem);
    line-height: 1.5;
    letter-spacing: 0.05em;
}

.about-text .mt {
    margin-top: clamp(30px, 5vh, 60px);
}

/* --- Q&A Section --- */
.qa-container {
    position: absolute;
    top: 55%;
    left: 45%;
    transform: translate(-50%, -50%);
    width: clamp(300px, 85%, 900px);
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(0px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    padding: clamp(20px, 4vw, 50px);
    transition: backdrop-filter 0.8s ease 0.5s;
}

#qa-section.active .qa-container {
    backdrop-filter: blur(6px);
}

.qa-item {
    margin-bottom: clamp(20px, 4vh, 40px);
}

.qa-item:last-child {
    margin-bottom: 0;
}

.qa-question {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    margin: 0 0 15px 0;
    font-weight: normal;
}

.qa-answer {
    border-left: 4px solid #ffffff;
    padding-left: 15px;
    margin-left: 10px;
    font-size: clamp(0.95rem, 1.5vw, 1.15rem);
    line-height: 1.6;
}

.qa-answer p {
    margin: 0 0 5px 0;
}

.qa-answer a {
    color: inherit;
    text-decoration: none;
    transition: text-decoration 0.3s ease;
}

.qa-answer a:hover {
    text-decoration: underline;
}

/* -------------------------
   ③ Unified Download Box
------------------------- */
.download-box {
    position: absolute;
    left: 50%;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    width: clamp(300px, 80%, 800px);
    text-align: center;
    z-index: 20;
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.download-box h2 {
    margin: 0;
    line-height: 0;
    padding-bottom: clamp(20px, 4vh, 40px);
}

.download-title-img {
    height: clamp(30px, 3.5vw, 55px);
    width: auto;
}

.top-links {
    display: flex;
    gap: clamp(20px, 5vw, 80px);
    justify-content: center;
}

.top-links a {
    text-decoration: none;
    border-bottom: 2px solid white;
    padding-bottom: 5px;
    display: inline-block;
}

.link-img {
    height: clamp(20px, 2.5vw, 35px);
    width: auto;
    vertical-align: bottom;
    transition: opacity 0.3s ease;
}

.top-links a:hover .link-img {
    opacity: 0.8;
}

.download-box.state-center {
    bottom: 40%;
    transform: translate(-50%, 50%);
    border: 3px solid #ffffff;
    border-radius: 12px;
    padding: clamp(20px, 3vw, 40px) clamp(30px, 5vw, 80px);
}

.download-box.state-bottom {
    bottom: 0;
    transform: translate(-50%, calc(100% - var(--peek-height)));
    border: 3px solid #ffffff;
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    padding: clamp(10px, 2vh, 20px) clamp(30px, 5vw, 80px) clamp(20px, 4vh, 40px);
    cursor: pointer;
}

.download-box.state-bottom:hover {
    transform: translate(-50%, 0);
    background-color: rgba(0, 0, 0, 0.7);
}


/* -------------------------
   Responsive Design (Media Queries)
------------------------- */

/* スマートフォン（767px以下）向けのレイアウト調整 */
@media (max-width: 1400px) {
    html, body {
        overflow: hidden !important;
        overscroll-behavior: none;
        -webkit-overscroll-behavior: none;
        position: fixed;
        width: 100%;
        height: 100dvh;
    }

    /* --- Header & Logo --- */
    header {
        top: 5vw;
        left: 5vw;
    }
    .logo-img {
        width: clamp(50px, 65vw, 500px); 
    }

    /* --- Side Navigation --- */
    nav.side-nav {
        top: 10vw;
        right: 5vw; 
        transform: none;
    }
    .side-nav li {
        padding-right: clamp(8px, 2.5vw, 15px);
        margin-bottom: clamp(15px, 4.5vw, 25px); 
    }
    .nav-img {
        height: clamp(25px, 6vw, 35px);
    }

    /* --- About Section --- */
    .about-text {
        top: 25%;
        left: 6vw;
        width: 75%; 
        font-size: clamp(1rem, 4vw, 1.3rem);
        line-height: 1.8;
    }
    .about-text .mt {
        margin-top: clamp(15px, 6vw, 30px);
    }

    /* --- Q&A Section --- */
    .qa-container {
        top: 51%;
        left: 40%;
        width: 65%;
        max-height: 65vh; 
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: clamp(15px, 5vw, 30px) clamp(10px, 4vw, 25px);
    }
    .qa-item {
        margin-bottom: clamp(15px, 6vw, 30px);
    }
    .qa-question {
        font-size: 1.1rem;
        margin-bottom: clamp(8px, 2.5vw, 15px);
    }
    .qa-answer {
        font-size: 0.95rem;
        padding-left: clamp(8px, 2.5vw, 15px);
    }

    /* --- Download Box --- */
    .download-box.state-center {
        width: clamp(40px, 85%, 500px);
        bottom: 50%;
        padding: clamp(15px, 5vw, 30px) clamp(10px, 4vw, 25px);
    }
    .download-box.state-bottom {
        width: clamp(40px, 95%, 500px);
        padding: clamp(8px, 2vw, 15px) clamp(10px, 4vw, 25px) clamp(20px, 7vw, 40px);
    }
    .download-title-img {
        height: clamp(25px, 6vw, 40px);
    }
    
    .top-links {
        flex-direction: column; 
        gap: clamp(10px, 3.5vw, 20px);
        align-items: center;
    }

    /* --- Footer --- */
    main:has(#about-section.active) ~ footer,
    main:has(#qa-section.active) ~ footer {
        display: none;
    }
}