/* 共通クラス */
.product-title-container {
    width: 100%;
}

.official-button {
    display: flex;
    justify-content: flex-start;
    margin-top: 20px;
}

.product-content {
    display: block;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth; /* スムーズスクロールを有効化 */
}
body, html {
    font-family: 'Hanken Grotesk', 'Noto Sans JP', sans-serif;
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    
    position: relative;
    font-family: 'Hanken Grotesk', 'Noto Sans JP', sans-serif;
    background-color: #fff;
    color: #222;
    overflow-x: hidden;
}

.container {
    max-width: 1440px;
    margin: 0 auto;
    position: relative;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 15px;
    width: 100vw;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0);
    max-width: none;
    margin-left: calc(-50vw + 50%);
}

/* Hamburger Menu */
.hamburger-menu {
    display: none;
    cursor: pointer;
    z-index: 1001;
}

.bar1, .bar2, .bar3 {
    width: 35px;
    height: 5px;
    background-color: #222;
    margin: 6px 0;
    transition: 0.4s;
}

/* Rotate first bar */
.change .bar1 {
    transform: translate(0, 11px) rotate(-45deg);
}

/* Fade out the second bar */
.change .bar2 {
    opacity: 0;
}

/* Rotate last bar */
.change .bar3 {
    transform: translate(0, -11px) rotate(45deg);
}

.logo-container {
    display: flex;
    align-items: center;
}

.theme-toggle {
    display: flex;
    align-items: center;
    margin-right: 15px;
}

.toggle-switch {
    position: relative;
    width: 40px;
    height: 20px;
    background-color: #000;
    border-radius: 20px;
    cursor: pointer;
    border: 1px solid #000;
}

.toggle-circle {
    position: absolute;
    top: 1px;
    left: 1px;
    width: 16px;
    height: 16px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.logo {
    background: url('./assets/site/sp_logo.png') no-repeat center center;
    background-size: contain;
    width: 200px;
    height: 34px;
}

.nav-container {
    display: flex;
    align-items: center;
}

.nav {
    display: flex;
    gap: 40px;
    margin-right: 30px;
}

.nav-item {
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    text-decoration: none;
    color: #222;
}

.language-selector {
    display: flex;
    align-items: center;
    background-color: rgba(240, 240, 240, 0.7);
    border-radius: 20px;
    padding: 3px;
    margin-left: 20px;
}

.language-option {
    display: flex;
    align-items: center;
    margin: 0 2px;
}

.language-circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid #222;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.language-circle.active {
    background-color: #222;
}

.language-text {
    font-size: 12px;
    font-weight: 600;
    color: #222;
}

.language-text.active {
    color: #fff;
}

/* Main Visual */
.main-visual {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    margin-bottom: 0;
    padding-left: 0;
    overflow: visible;
}

/* main-visual::beforeのスタイルはwave-animation.jsで動的に追加されます */

.main-content {
    position: relative;
    z-index: 10;
    width: 90%;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 10;
}

.main-title {
    color: #222;
    text-align: center;
    font-family: "Hanken Grotesk";
    font-size: 50px;
    font-style: normal;
    font-weight: 700;
    line-height: 114%; /* 57px */
}

.main-subtitle {
    font-size: 18px;
    font-weight: 500;
    margin-top: 20px;
    font-family: 'Noto Sans JP', sans-serif;
    color: #000;
    letter-spacing: 0.5px;
    text-align: center;
    position: relative;
    z-index: 10;
    display: block;
    width: 100%;
    margin-bottom: 20px;
}

/* Section Titles */
.section-title-container {
    position: relative;
    margin-bottom: 0;
}

.section-title {
    font-size: 92px;
    height: 120px;
    font-weight: 700;
    text-align: center;
    line-height: 1;
    letter-spacing: -0.4px;
    position: relative;
    z-index: 2;
    text-indent: -9999px;
    overflow: hidden;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.product-section .section-title {
    background-image: url('./assets/site/sp_products.png');
}

.message-section .section-title {
    background-image: url('./assets/site/sp_message.png');
}

.values-section .section-title {
    background-image: url('./assets/site/sp_values.png');
}

.careers-section .section-title {
    background-image: url('./assets/site/sp_careers.png');
}

.section-number {
    position: absolute;
    right: 50px;
    top: 0;
    font-size: 20px;
    font-weight: 700;
}

.noise-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('./assets/site/sp_noise_effect.png');
    background-repeat: repeat;
    opacity: 0.15;
    mix-blend-mode: overlay;
    z-index: 1;
}

/* Products Section */
.product-section {
    padding: 30px 0;
    margin: 15px;
}

.product-item {
    padding: 40px 0;
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    display: flex;
    flex-direction: column;
}

.product-content {
    padding: 0 20px;
    margin-bottom: 30px;
    display: flex !important;
    flex-direction: column;
}

@media (max-width: 768px) {
    .product-content {
        flex-direction: column;
    }
    
    .product-info {
        width: 100%;
    }
    
    .official-button {
        width: 100%;
        margin-left: 0;
        margin-top: 20px;
        order: 4; /* スマホ表示時にボタンを最後に表示 */
    }
    
    .product-image {
        order: 3; /* スマホ表示時に画像を3番目に表示 */
    }
}

.product-title-container {
    order: 1; /* タイトル部分 */
}

.product-title {
    font-size: 60px;
    font-weight: 700;
    letter-spacing: -0.4px;
    line-height: 1;
    color: #000;
    margin-bottom: 5px;
}

.product-subtitle {
    font-size: 16px;
    font-weight: 700;
    font-family: 'Noto Sans JP', sans-serif;
    margin-top: 5px;
    margin-bottom: 20px;
}

.product-tag {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 10px;
    display: inline-block;
    line-height: 1em;
}

.product-text {
    order: 2; /* 説明文 */
    color: #222;
    font-family: "Noto Sans JP";
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 1.7em;
    margin-bottom: 20px;
    max-width: 500px;
}

.product-image {
    order: 3; /* 画像 */
    width: 100%;
    height: 200px;
    margin: 20px 0;
    padding: 0;
}

.product-image.avvy {
    background: url('./assets/site/sp_avvy.png') no-repeat center center;
    background-size: contain;
}

.product-image.mayflower {
    background: url('./assets/site/sp_mayflower.png') no-repeat center center;
    background-size: contain;
}

.official-button {
    order: 4; /* ボタン */
    margin-top: 20px;
    width: 100%;
    display: flex !important;
    justify-content: center !important; /* ボタンをセンター揃え */
}

/* Button */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 15px;
    border-radius: 30px;
    border: 1px solid #ddd;
    width: 157px;
    height: 60px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: url('./assets/site/sp_btn.png') no-repeat center center;
    background-size: cover;
    margin-top: 10px;
}

.btn:hover {
    opacity: 0.9;
}

.btn-text {
    font-size: 14px;
    font-weight: 700;
    color: #000;
}

.btn-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.btn-circle-black {
    background-color: #222;
}

.btn-circle-white {
    background-color: #fff;
    border: 2px solid #222;
    position: absolute;
}

/* 新しいボタンスタイル */
.btn-new {
    width: calc(100% - 64px); /* 左右マージン32pxを考慮した幅 */
    margin: 0 32px; /* 左右マージン32px */
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 10px 20px;
    flex-direction: column;
    gap: 10px;
    border-radius: 30px;
    border: 1px solid #DDD;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    background-color: #fff;
}

.btn-new:hover {
    background-color: #f8f8f8;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.btn-new .btn-text {
    font-size: 14px;
    font-weight: 700;
    color: #000;
}

.btn-new .btn-circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.btn-new .btn-circle-black {
    width: 30px;
    height: 30px;
    background-color: #222;
}

.btn-new .btn-circle-white {
    width: 30px;
    height: 30px;
    background-color: #fff;
    border: 2px solid #222;
    position: absolute;
    transform: translate(5px, 5px);
}

/* Message Section */
.message-section {
    padding: 30px 0;
    margin: 15px;
}

.message-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 20px;
}

.message-subtitle {
    color: #222;
    font-family: "Noto Sans JP";
    font-size: 28px;
    font-style: normal;
    font-weight: 700;
    line-height: 160%; /* 44.8px */
    letter-spacing: 0.56px;
    margin-top: 32px;
    margin-bottom: 32px;
}

.message-title {
    font-size: 48px;
    font-weight: 700;
    text-align: center;
    font-family: 'Noto Sans JP', sans-serif;
    margin-bottom: 50px;
    line-height: 1.6em;
    letter-spacing: 2%;
}

.message-body {
    display: flex;
    flex-direction: column-reverse;
    gap: 50px;
    margin-bottom: 50px;
}

.message-image {
    width: 100%;
    height: 300px;
    background: url('./assets/site/sp_captain.png') no-repeat center center;
    background-size: contain;
}

.message-text {
    font-size: 12px;
    font-weight: 400;
    line-height: 1.7em;
    width: 100%;
    letter-spacing: 0;
    font-family: 'Noto Sans JP', sans-serif;
}

.message-signature {
    display: none;
}

.signature-title {
    font-size: 12px;
}

.signature-name {
    max-height: 60px;
    width: auto;
}

/* Values Section */
.values-section {
    padding: 30px 0;
    margin: 15px;
}

.values-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 0;
}

.value-item {
    width: 300px;
    height: 300px;
    position: relative;
    margin: 20px;
}

.value-circle {
    width: 300px;
    height: 300px;
    border: 2px solid rgba(245, 245, 245, 0.7);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #FFF;
    box-shadow: 0 0 20px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.value-circle:hover {
    transform: scale(1.02);
    box-shadow: 0 0 30px rgba(0,0,0,0.1);
}

.value-content {
    text-align: center;
    width: 265px;
}

.value-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 120%;
    color: #222;
    text-align: center;
    font-family: "Hanken Grotesk";
}

.value-text {
    font-size: 14px;
    font-weight: 400;
    font-family: 'Noto Sans JP', sans-serif;
    line-height: 1.7em;
    color: #222;
    text-align: center;
}

/* Careers Section */
.careers-section {
    padding: 30px 0;
    color: #222;
    position: relative;
    overflow: hidden;
    margin: 15px;
}

.careers-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('./assets/site/sp_noise_effect.png');
    background-repeat: repeat;
    opacity: 0.05;
    mix-blend-mode: overlay;
    z-index: 1;
}

.careers-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 0;
    position: relative;
    z-index: 2;
}

.careers-title {
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    font-family: 'Noto Sans JP', sans-serif;
    margin-bottom: 50px;
    line-height: 1.3;
}

/* Footer */
.footer {
    padding: 20px 20px;
    position: relative;
    background-repeat: no-repeat;
    background-position: top;
    overflow: hidden;
    z-index: 1;
}

/* Wave Canvas Styles */
#wave-canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 120vw;
    height: 100%;
    z-index: 0;
    opacity: 0.8;
    mix-blend-mode: overlay;
    pointer-events: none;
}

#wave-canvas-container canvas {
    width: 150%;
    height: 150%;
    display: block;
    mask-image: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%);
}

.shadow-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    backdrop-filter: blur(5px);
    z-index: 0;
}

.overlay-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.wave-background-container {
    position: relative;
    width: 300%;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    margin-top: -100vh; /* フッターの後に配置されるが、上に移動してフッターと重なるようにする */
    mask-image: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%);
}

/* フッターの内容を背景の上に表示するためのスタイル */
.footer-content {
    position: relative;
    z-index: 10; /* 背景よりも前面に表示 */
    display: flex;
    flex-direction: column;
}

/* フッターの会社情報と拠点情報のスタイル */
.footer-company-info {
    display: flex;
    flex-direction: column;
    margin-top: 20px;
    margin-bottom: 10px;
}

.footer-office-info {
    margin-top: 10px;
}

.footer-logo {
    background: url('./assets/site/sp_logo.png') no-repeat center center;
    background-size: contain;
    width: 395px;
    height: 52px;
    margin-bottom: 32px;
}

.footer-info {
    display: flex;
    gap: 20px;
}

.footer-info-item {
    display: flex;
    flex-direction: column;
}

.footer-info-label {
    font-size: 8px;
    font-weight: 700;
    font-family: 'Noto Sans JP', sans-serif;
    margin-bottom: 5px;
}

.footer-info-text {
    font-size: 18px;
    font-weight: 500;
    font-family: 'Noto Sans JP', sans-serif;
}

.footer-nav {
    display: flex;
    gap: 30px;
    margin-top: 30px;
    margin-bottom: 50px;
}

.footer-nav-item {
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    color: #fff;
}

.copyright-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 50px;
    width: 100%;
}

.copyright {
    font-size: 12px;
    font-weight: 500;
}

.back-to-top {
    width: 91px;
    height: 91px;
    opacity: 0.7;
    background-color: #fff;
    border: 2px solid #222;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    text-decoration: none;
}

.back-to-top-text {
    font-size: 24px;
    font-weight: 700;
    color: #2E71A0;
}

/* Mask effect for text */
.masked-title {
    position: relative;
    width: 100%;
    height: 100%;
}

.masked-title-text {
    position: relative;
    z-index: 3;
}

.masked-title-overlay {
    position: absolute;
    top: -100px;
    left: -100px;
    width: calc(100% + 200px);
    height: calc(100% + 200px);
    z-index: 1;
    mix-blend-mode: multiply;
    pointer-events: none;
}

/* モバイル向けのハンバーガーメニュー */
.hamburger-menu {
    display: block;
}

.nav-container {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    height: 100vh;
    background-color: rgba(255, 255, 255, 0.95);
    flex-direction: column;
    justify-content: center;
    padding: 80px 40px;
    transition: right 0.3s ease;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
}

.nav-container.active {
    right: 0;
}

.nav {
    flex-direction: column;
    gap: 20px;
    margin-right: 0;
    margin-bottom: 40px;
    align-items: center;
}

.nav-item {
    font-size: 18px;
}

.language-selector {
    margin-left: 0;
}

/* 小さいモバイル画面向けの調整 */
@media (max-width: 480px) {
    .main-visual::before {
        left: -50%;
        width: 200%;
        height: 80%;
        top: 15%;
    }
    
    .main-content {
        width: 95%;
        padding: 0 10px;
    }
    
    .main-title {
        font-size: 36px;
    }
    
    .main-subtitle {
        font-size: 16px;
    }
    
    .section-title {
        font-size: 60px;
    }
    
    .product-title {
        font-size: 40px;
        line-height: 1em;
    }
    
    .product-image {
        height: 200px;
    }
    
    .message-title {
        font-size: 28px;
        font-weight: 700;
        line-height: 1.6em;
        letter-spacing: 2%;
    }
    
    .value-item {
        width: 280px;
        height: 280px;
    }
    
    .value-circle {
        width: 280px;
        height: 280px;
    }
    
    .value-title {
        font-size: 18px;
        margin-bottom: 15px;
    }
    
    .value-text {
        font-size: 12px;
    }
    
    .footer-nav {
        flex-wrap: wrap;
    }
}