:root {
    --bg-color: #000;
    --text-color: #fff;
    --accent-glow: rgba(255, 255, 255, 0.15);
    --transition-speed: 2.0s; /* テキストのフェード速度 */
}
/* デフォルトは常に非表示（=通常は出ない） */
#loading {
  display: none;
}

/* JSが初回と判断したときだけ表示 */
html.show-loader #loading {
  display: flex;
}
#loading {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background-color: #000;
    align-items: center;
    justify-content: center;
    transition: opacity 1.5s cubic-bezier(0.65, 0, 0.35, 1), visibility 1.5s;
}
#loading.loaded {
    opacity: 0;
    visibility: hidden;
}
.loader-content {
    text-align: center;
    position: relative;
    width: 100%;
}
.loader-text-container {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.loader-text {
    position: absolute;
    font-size: 42px;
    font-weight: 700;
    color: #ffffff;
    font-family: 'Cormorant Garamond', 'Noto Serif JP', serif;
    opacity: 0;
    filter: blur(10px);
    transform: translateY(10px);
    transition: opacity var(--transition-speed) ease, 
                filter var(--transition-speed) ease, 
                transform var(--transition-speed) ease;
    white-space: nowrap;
    letter-spacing: 0.05em;
}
.loader-text.active {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
}
.loader-text.exit {
    opacity: 0;
    filter: blur(10px);
    transform: translateY(-10px);
}
.loader-text.logo {
    font-family: 'Cormorant Garamond', serif;
    font-size: 64px;
    letter-spacing: 0.5em; /* 最初は広く */
    transition: opacity 3s cubic-bezier(0.215, 0.61, 0.355, 1), 
                filter 3s cubic-bezier(0.215, 0.61, 0.355, 1), 
                letter-spacing 4s cubic-bezier(0.215, 0.61, 0.355, 1);
}
.loader-text.logo span {
    font-size: 90px;
    display: inline-block;
}
/* ロゴがアクティブになった時、文字間隔を縮めて収束させる */
.loader-text.logo.active {
    opacity: 1;
    filter: blur(0);
    letter-spacing: 0.15em;
}
/* ロゴの後ろに光が広がるような演出 */
.loader-text.logo::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0%;
    height: 100%;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    z-index: -1;
    opacity: 0;
    transition: width 4s ease, opacity 4s ease;
}
.loader-text.logo.active::after {
    width: 150%;
    opacity: 1;
}
@media screen and (max-width: 768px) {
    .loader-text-container {
        height: 80px;
    }
    .loader-text {
        font-size: 28px;
    }
    .loader-text.logo {
        font-family: 'Cormorant Garamond', serif;
        font-size: 42px;
    }
    .loader-text.logo span {
        font-size: 60px;
    }
    
}


#main .ttl {
    margin-bottom: 40px;
}
#main .ttl h2 {
    font-size: 32px;
    margin-bottom: 20px;
}
#main .ttl p {
    font-size: 18px;
}
/* --- SECTION HEADERS --- */
.section-title-box {
    text-align: center;
    margin-bottom: 80px;
    position: relative;
}
.section-title-en {
    font-family: 'Oswald', sans-serif;
    font-size: 8rem;
    font-weight: 700;
    color: rgba(0, 157, 212, 0.04);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    white-space: nowrap;
    z-index: 1;
}
.section-title-jp {
    font-size: 2.25rem;
    font-weight: 700;
    position: relative;
    z-index: 2;
    display: inline-block;
}
.section-title-jp::after {
    content: "";
    display: block;
    width: 40px;
    height: 4px;
    background: var(--primary-blue);
    margin: 15px auto 0;
    border-radius: 2px;
}
@media screen and (max-width: 768px) {
    .section-title-box {
        margin-bottom: 40px;
        object-fit: cover;
    }
    .section-title-en {
        font-size: 3.5rem;
    }
    .section-title-jp {
        font-size: 28px;
    }
}

#mv {
    width: 100%;
    height: calc(100vh - 100px);
    /* 複数の背景を指定（上に重なる順に記述） */
    background-image: 
        /* 2. 下部の白い影（下から上へ：白から透明へ） */
        linear-gradient(to top, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 10%),
        /* 1. 全体を薄暗くする黒いオーバーレイ */
        linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
        /* 0. 元の画像 */
        url("../img/mv.jpg");
    
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
}
#mv .hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    color: #fff;
    margin-left: 50px;
}
#mv .hero h2 {
    font-size: 58px;
    line-height: 1.5;
    margin-bottom: 20px;
}
#mv .hero .discription {
    line-height: 2;
    border-left: 2px solid #26B0B0;
    padding-left: 10px;
}
@media screen and (max-width: 768px) {
    #main {
        overflow: hidden;
    }
    #mv {
        height: calc(100vh - 70px);
    }
    #mv .hero {
        margin-left: 20px;
    }
    #mv .hero h2 {
        font-size: 42px;
        line-height: 1.5;
        margin-bottom: 20px;
    }
    #mv .hero .discription {
        padding-left: 10px;
        font-size: 14px;
    }
}

#m-company {
    padding: 120px 0;
    background-color: var(--white);
}
#m-company  .description {
    line-height: 2;
    text-align: center;
    margin-bottom: 40px;
}
#m-company .contents {
    display: flex;
    justify-content: space-between;
}
#m-company .contents .item {
    width: 32%;
    background-color: #F8FAFC;
    border-radius: 5px;
    padding: 20px;
}
#m-company .contents .item h3 {
    font-size: 24px;
    margin-bottom: 20px;
}
#m-company .contents .item h3 span {
    font-size: 18px;
}
#m-company .contents .item p {
    padding-left: 10px;
}
#m-company .contents .item:nth-child(1) h3 span {
    color: #26B0B0;
}
#m-company .contents .item:nth-child(2) h3 span {
    color: #4657A7;
}
#m-company .contents .item:nth-child(3) h3 span {
    color: #3482C0;
}
#m-company .contents .item:nth-child(1) p {
    border-left: 1px solid #26B0B0;
}
#m-company .contents .item:nth-child(2) p {
    border-left: 1px solid #4657A7;
}
#m-company .contents .item:nth-child(3) p {
    border-left: 1px solid #3482C0;
}
@media screen and (max-width: 768px) {
    #m-company {
        padding: 60px 0 40px 0;
    }
    #m-company  .description {
        line-height: 2;
        text-align: center;
        margin-bottom: 40px;
    }
    #m-company .contents {
        flex-direction: column;
    }
    #m-company .contents .item {
        width: 100%;
        padding: 20px;
        margin-bottom: 20px;
    }
}

#m-business {
    padding: 120px 0;
    background-color: var(--bg-light);
}

#m-business .contents {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
}
#m-business .contents .item {
    position: relative;
    width: 32%;
    height: 500px;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: var(--white);
    display: block;
}
#m-business .business-img-bg {
    position: absolute;
    inset: 0;
    z-index: 1;
}
#m-business .business-img-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
    filter: brightness(0.6) grayscale(0.3);
}
#m-business .business-item:hover .business-img-bg img {
    transform: scale(1.1);
    filter: brightness(0.8) grayscale(0);
}
#m-business .business-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 60%);
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
#m-business .business-item:hover img {
    transform: scale(1.1);
}
#m-business .business-content {
    position: relative;
    z-index: 2;
    height: 100%;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0) 60%);
}
#m-business .business-num {
    font-family: 'Oswald', sans-serif;
    font-size: 4rem;
    line-height: 1;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
    position: absolute;
    top: 30px;
    right: 30px;
    transition: color 0.4s;
    z-index: 10;
}
#m-business .business-item:hover .business-num {
    color: var(--primary-blue);
}
#m-business h3 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 12px;
    transform: translateY(10px);
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
#m-business p {
    font-size: 0.875rem;
    line-height: 1.6;
    opacity: 0.8;
    transform: translateY(10px);
    transition: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
#m-business .business-link-arrow {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
    transition: all 0.4s;
}
#m-business .item:hover .business-link-arrow {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
}
@media screen and (max-width: 768px) {
    #m-business {
        padding: 60px 0;
    }
    
    #m-business .contents {
        flex-direction: column;
        margin-bottom: 40px;
    }
    #m-business .contents .item {
        width: 100%;
        margin-bottom: 20px;
    }

}

#m-products {
    background-color: var(--white);
    padding: 120px 0;
}
#m-products .contents {
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
}
#m-products .contents .item {
    display: block;
    width: 32%;
    margin-right: 2%;
    margin-bottom: 40px;
    color: inherit;
    cursor: pointer;
}
#m-products .contents .item:nth-child(3n) {
    margin-right: 0;
}
#m-products .contents .item img {
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 4px;
    object-fit: cover;
    margin-bottom: 20px;
    transition: transform 0.5s ease;
}
#m-products .contents .item img:hover {
    transform: scale(1.08);
}
#m-products .contents .item h3 {
    font-size: 18px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 10px;
    transition: color 0.3s;
}
#m-products .contents .item:hover h3 {
    color: var(--primary-blue);
}
#m-products .view-product {
    display: flex;
    justify-content: center;
}
#m-products .btn-outline {
    display: inline-block;
    padding: 14px 40px;
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 700;
    margin-top: 30px;
    transition: 0.3s;
}
#m-products .btn-outline:hover {
    background: var(--primary-blue);
    color: var(--white);
}
@media screen and (max-width: 768px) {
    #m-products {
        padding: 60px 0;
    }
    #m-products .contents .item {
        width: 100%;
        margin-right: 0;
        margin-bottom: 40px;
    }
}

#m-info {
    padding: 120px 40px;
    background-color: var(--bg-light);
    overflow: hidden;
}
#m-info .about-flex {
    display: flex;
    align-items: center;
}
#m-info .about-text {
    width: calc(100% - 450px);
}

#m-info .about-image {
    width: 400px;
    position: relative;
}

#m-info .about-image img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.1);
}
#m-info .about-image::after {
    content: "";
    position: absolute;
    top: -20px;
    right: -20px;
    width: 100px;
    height: 100px;
    background: var(--primary-blue);
    z-index: -1;
    border-radius: 8px;
    opacity: 0.2;
}
#m-info .btn-outline {
    display: inline-block;
    padding: 14px 40px;
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 700;
    margin-top: 30px;
    transition: 0.3s;
}
#m-info .btn-outline:hover {
    background: var(--primary-blue);
    color: var(--white);
}
@media screen and (max-width: 768px) {
    #m-info {
        padding: 60px 0;
    }
    #m-info .about-flex {
        flex-direction: column;
    }
    #m-info h2 {
        font-size: 24px !important;
    }
    #m-info .about-text {
        width: 100%;
        margin-bottom: 40px;
    }
    #m-info .about-image {
        width: 100%;
    }
    #m-info .about-image img {
        width: 100%;
    }
    #m-info .btn-outline {
        display: inline-block;
        padding: 14px 40px;
        border: 2px solid var(--primary-blue);
        color: var(--primary-blue);
        text-decoration: none;
        font-weight: 700;
        margin-top: 30px;
        transition: 0.3s;
    }
    #m-info .btn-outline:hover {
        background: var(--primary-blue);
        color: var(--white);
    }
    
}