/* ベース設定 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    color: #333;
    overflow-x: hidden;
    background-color: #f8f8f8;
}

/* スプラッシュスクリーン */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    color: white;
    z-index: 2000;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    perspective: 1000px;
}

.splash-quadrant {
    width: 25%;
    height: 100%;
    position: relative;
    overflow: hidden;
    transform-origin: top center;
    transition: transform 0.9s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.9s ease-out;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.3);
}

.splash-quadrant::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    box-shadow: inset 2px 0 5px rgba(0, 0, 0, 0.3);
    z-index: 2;
    pointer-events: none;
}

.splash-quadrant::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: -1px;
    width: 2px;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    z-index: 3;
}

.splash-quadrant-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: translateX(-100%);
    opacity: 0;
    transition: transform 1.2s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 1.2s cubic-bezier(0.22, 0.61, 0.36, 1);
    filter: brightness(0.85);
}

.splash-quadrant.show .splash-quadrant-image {
    transform: translateX(0);
    opacity: 1;
}

.splash-quadrant.fly-away-1 {
    transform: translateY(-5%) rotateX(90deg) rotateY(-10deg) scale(0.9);
    opacity: 0;
}

.splash-quadrant.fly-away-2 {
    transform: translateY(-5%) rotateX(90deg) rotateY(5deg) scale(0.9);
    opacity: 0;
}

.splash-quadrant.fly-away-3 {
    transform: translateY(-5%) rotateX(90deg) rotateY(-5deg) scale(0.9);
    opacity: 0;
}

.splash-quadrant.fly-away-4 {
    transform: translateY(-5%) rotateX(90deg) rotateY(10deg) scale(0.9);
    opacity: 0;
}

.splash-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
    width: 80%;
    max-width: 800px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, visibility 0.8s ease;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.7);
}

.splash-content.show {
    opacity: 1;
    visibility: visible;
}

.splash-title {
    font-size: 4.5rem;
    font-weight: 900;
    letter-spacing: 0.15em;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    color: white;
    text-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.splash-koshiji {
    font-size: 2rem;
    font-weight: 300;
    letter-spacing: 0.1em;
    margin-top: -0.5rem;
    margin-bottom: 2rem;
    color: #f5f5f5;
}

.splash-message {
    font-size: 1.5rem;
    font-weight: 300;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}



/* ヒーローセクション */
.hero {
    height: 100vh;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.video-is-playing .hero-video {
    opacity: 1;
}

.hero-fallback-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1; /* フォールバック画像をデフォルトで表示 */
    transition: opacity 0.5s ease;
}

/* 動画が再生されている場合はフォールバック画像を非表示 */
.video-is-playing .hero-fallback-image {
    opacity: 0;
    pointer-events: none;
}

/* ヒーローオーバーレイ */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
    padding: 2rem;
    z-index: 10;
    background: rgba(0, 0, 0, 0.4); /* 暗めのオーバーレイで文字を目立たせる */
}

.hero-title {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    transform: translateY(50px);
    opacity: 0;
    transition: all 1s ease 0.5s;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8); /* テキストシャドウで文字を目立たせる */
    font-weight: 700;
    letter-spacing: 0.05em;
    max-width: 800px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.8rem;
    max-width: 800px;
    transform: translateY(30px);
    opacity: 0;
    transition: all 1s ease 0.8s;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8); /* テキストシャドウで文字を目立たせる */
    font-weight: 400;
    letter-spacing: 0.03em;
    line-height: 1.5;
}

.hero-content {
    background-color: rgba(0, 0, 0, 0.6); /* 濃い背景色でテキストを浮き立たせる */
    padding: 2.5rem 3rem;
    border-radius: 8px;
    max-width: 90%;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    animation: fadeIn 1.5s ease-out forwards 0.5s;
    opacity: 0;
    transform: translateY(20px);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.loaded .hero-title,
.loaded .hero-subtitle {
    transform: translateY(0);
    opacity: 1;
}

/* ナビゲーション */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
}

nav.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
}

.logo-text {
    position: relative;
}

.logo-koshiji {
    font-size: 0.9rem;
    font-weight: 400;
    margin-left: 0.5rem;
    opacity: 0.9;
}

nav.scrolled .logo {
    color: #333;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease;
}

nav.scrolled .nav-links a {
    color: #333;
}

.nav-links a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 0;
    height: 2px;
    background-color: currentColor;
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* コンテンツセクション */
.section {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.section-title.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* サービスセクション */
.services {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 0;
    transform: translateY(50px);
}

.service-card.in-view {
    opacity: 1;
    transform: translateY(0);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.service-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.service-content {
    padding: 1.5rem;
}

.service-title {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    position: relative;
    padding-bottom: 0.8rem;
}

.service-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: #a8a8a8;
}

.contact-intro {
    max-width: 600px;
    margin: 0 auto 2rem;
    text-align: center;
    line-height: 1.8;
}

.lang-switch a {
    display: inline-block;
    padding: 0.3rem 0.6rem;
    border: 1px solid currentColor;
    border-radius: 4px;
}

.service-description {
    color: #666;
    line-height: 1.6;
}

/* お問い合わせセクション */
.contact-form {
    max-width: 600px;
    margin: 3rem auto 0;
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.contact-form.in-view {
    opacity: 1;
    transform: translateY(0);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #666;
}

.form-textarea {
    min-height: 150px;
    resize: vertical;
}

.submit-btn {
    background-color: #333;
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.submit-btn:hover {
    background-color: #555;
}

/* フッター */
footer {
    background-color: #333;
    color: white;
    padding: 3rem 2rem;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-logo {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
}

.footer-logo-koshiji {
    font-size: 1rem;
    font-weight: 400;
    opacity: 0.8;
    display: block;
    margin-top: 0.3rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    list-style: none;
    margin: 1.5rem 0;
}

.footer-links li {
    margin: 0 1rem;
}

.footer-links a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #ccc;
}

.footer-text {
    color: #999;
    font-size: 0.9rem;
}

/* アニメーション用のクラス */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* アクセシビリティとモバイル対応 */

/* スキップリンク */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #333;
    color: white;
    padding: 8px;
    z-index: 2000;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 0;
    outline: 3px solid #4a90e2;
}

/* フォーカススタイル */
:focus {
    outline: 3px solid #4a90e2;
    outline-offset: 2px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ハンバーガーメニュー */
.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001;
    color: white;
    transition: color 0.3s ease;
    position: absolute;
    right: 1rem;
    top: 1.5rem;
    background: transparent;
    border: none;
    padding: 8px;
}

.menu-toggle:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
}

.hamburger-icon {
    display: block;
    width: 30px;
    height: 3px;
    background-color: currentColor;
    position: relative;
}

.hamburger-icon::before,
.hamburger-icon::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: currentColor;
    transition: transform 0.3s ease;
}

.hamburger-icon::before {
    transform: translateY(-8px);
}

.hamburger-icon::after {
    transform: translateY(8px);
}

.menu-toggle[aria-expanded="true"] .hamburger-icon {
    background-color: transparent;
}

.menu-toggle[aria-expanded="true"] .hamburger-icon::before {
    transform: rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .hamburger-icon::after {
    transform: rotate(-45deg);
}

nav.scrolled .menu-toggle {
    color: #333;
}

/* フォームスタイル改善 */
.required {
    color: #e25c5c;
    font-size: 0.9rem;
    margin-left: 5px;
}

.form-help {
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.3rem;
}

.form-note {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.25rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.form-note:before {
    content: "\2139";
    display: inline-block;
    margin-right: 0.5rem;
    color: #4a90e2;
}

.form-error {
    color: #e25c5c;
    font-size: 0.9rem;
    margin-top: 0.3rem;
    min-height: 1.2em;
}

/* フッターのボタンスタイル */
.footer-links button {
    background: none;
    border: 1px solid #666;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.footer-links button:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* 言語切替ボタン */
.lang-switch button {
    display: inline-block;
    padding: 0.3rem 0.6rem;
    border: 1px solid currentColor;
    border-radius: 4px;
    background: none;
    color: inherit;
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .hero-content {
        padding: 1.5rem 2rem;
        max-width: 95%;
    }
    
    nav {
        padding: 1rem;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background-color: rgba(255, 255, 255, 0.95);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.4s ease;
        z-index: 1000;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-links li {
        margin: 1.5rem 0;
    }
    
    .nav-links a,
    .nav-links button {
        color: #333;
        font-size: 1.2rem;
    }
    
    /* スプラッシュスクリーン調整 */
    .splash-quadrant {
        width: 50%;
        height: 50%;
    }
    
    #quadrant1, #quadrant2 {
        top: 0;
    }
    
    #quadrant1, #quadrant3 {
        left: 0;
    }
    
    #quadrant2, #quadrant4 {
        left: 50%;
    }
    
    #quadrant3, #quadrant4 {
        top: 50%;
    }
    
    /* コンテンツ調整 */
    .section {
        padding: 4rem 1.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .splash-title {
        font-size: 2rem;
    }
    
    .splash-message {
        font-size: 1.2rem;
    }
    
    .service-card {
        margin-bottom: 2rem;
    }
    
    /* フォーム調整 */
    .contact-form {
        padding: 1.5rem;
    }
    
    .submit-btn {
        padding: 1rem 2rem;
        width: 100%;
    }
    
    .form-input {
        padding: 1rem;
        font-size: 16px; /* モバイルでの自動ズームを防止 */
    }
    
    /* フッター調整 */
    .footer-links {
        flex-direction: column;
    }
    
    .footer-links li {
        margin: 0.5rem 0;
    }
    
    /* タッチターゲットのサイズ最適化 */
    .nav-links a,
    .footer-links a,
    button,
    .form-input {
        min-height: 44px;
        min-width: 44px;
    }
}

/* タブレット対応 */
@media (min-width: 769px) and (max-width: 1024px) {
    .section {
        padding: 5rem 1.5rem;
    }
    
    .service-card {
        margin-bottom: 1.5rem;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    /* サービスグリッド調整 */
    .services {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
    }
    
    /* スプラッシュスクリーン */
    .splash-title {
        font-size: 3rem;
    }
    
    .splash-message {
        font-size: 1.3rem;
    }
}

/* 大画面対応 - コンテンツの最大幅制限 */
@media (min-width: 1600px) {
    .section {
        max-width: 1400px;
    }
    
    .hero-overlay {
        max-width: 1400px;
        margin: 0 auto;
    }
}