/* リセットCSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    list-style-type: none;
}

/* 基本スタイル */
:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --text-color: #333;
    --bg-color: #f8fafc;
    --white: #ffffff;
    --gray-light: #e5e7eb;
    --gray-medium: #9ca3af;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--bg-color);
}

/* ローディング画面 */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--white);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

.loading.hidden {
    opacity: 0;
    pointer-events: none;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--gray-light);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ヘッダー */
.header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    text-decoration: none;
}
.logo img {
    width: 1.2rem;
    height: 1.2rem;
    margin-right: 0.5rem;
}

.logo h1 {
    clear: both;
    font-size: 1.5rem;
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s ease;
}


.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 3px 0;
    transition: 0.3s;
}

/* メインコンテンツ */
.main-content {
    min-height: calc(100vh - 60px);
}

.section {
    padding: 4rem 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-color);
}

/* ヒーローセクション */
.hero {
    position: relative;
    color: var(--white);
    text-align: center;
    padding: 8rem 0;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 動画背景 */
.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.video-background video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
}

/* 動画にオーバーレイ */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(37, 99, 235, 0.8), 
        rgba(30, 64, 175, 0.8));
    z-index: 1;
}

/* アニメーション背景（動画の代替） */
.animated-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(45deg, #0f172a 25%, transparent 25%),
        linear-gradient(-45deg, #0f172a 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #0f172a 75%),
        linear-gradient(-45deg, transparent 75%, #0f172a 75%);
    background-size: 50px 50px;
    background-position: 0 0, 0 25px, 25px -25px, -25px 0px;
    animation: animatedBackground 20s linear infinite;
    opacity: 0.1;
}

@keyframes animatedBackground {
    from {
        transform: translateX(0) translateY(0);
    }
    to {
        transform: translateX(50px) translateY(50px);
    }
}

/* 都会的なパーティクル効果 */
.video-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, rgba(255,255,255,0.1), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.05), transparent),
        radial-gradient(1px 1px at 50px 90px, rgba(255,255,255,0.05), transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.08), transparent),
        radial-gradient(2px 2px at 80px 10px, rgba(255,255,255,0.05), transparent);
    background-repeat: repeat;
    background-size: 200px 200px;
    animation: particleMove 50s linear infinite;
    z-index: 0;
}

@keyframes particleMove {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(-200px);
    }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

.hero-title {
    font-size: 3rem;
    text-shadow: 1px 1px 0 #FFFFCC;
    margin-bottom: 1rem;
    color: #333333;
    animation: fadeInUp 1s ease;
}

.hero-subtitle {
    font-size: 1.25rem;
    text-shadow: 1px 1px 0 #FFFFCC;
    margin-bottom: 2rem;
    color: #333333;
    animation: fadeInUp 1s ease 0.2s;
    animation-fill-mode: both;
}

.cta-button {
    display: inline-block;
    background-color: var(--white);
    color: var(--primary-color);
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeInUp 1s ease 0.4s;
    animation-fill-mode: both;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

/* 会社概要セクション */
.about {
    background-color: var(--white);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr ;
    gap: 3rem;
    align-items: start;
}

.about-text h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.about-text p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.company-info h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.info-table {
    width: 100%;
    border-collapse: collapse;
}

.info-table th,
.info-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-light);
}

.info-table th {
    font-weight: 600;
    width: 40%;
    color: var(--gray-medium);
}

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

.service-card {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.service-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.service-card p {
    color: var(--gray-medium);
    line-height: 1.6;
}

/* 実績セクション */
.works {
    background-color: var(--white);
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.work-item {
    background-color: var(--bg-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.work-item:hover {
    transform: scale(1.05);
}

.work-image {
    height: 200px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    opacity: 0.8;
}

.work-item h3 {
    padding: 1rem 1.5rem 0.5rem;
    color: var(--primary-color);
}

.work-item p {
    padding: 0 1.5rem 1.5rem;
    color: var(--gray-medium);
}

/* お問い合わせセクション */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.contact-details {
    margin-top: 2rem;
}

.contact-item {
    margin-bottom: 1rem;
}

.contact-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.contact-item a:hover {
    text-decoration: underline;
}

/* フォーム */
.contact-form {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

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

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

.required {
    color: #ef4444;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--gray-light);
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.submit-button {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.submit-button:hover {
    background-color: var(--secondary-color);
}

/* フッター */
.footer {
    background-color: var(--text-color);
    color: var(--white);
    text-align: center;
    padding: 2rem 0;
}

/* モバイルでの動画パフォーマンス最適化 */
@media (max-width: 768px) {
    .video-background video {
        transform: translate(-50%, -50%) scale(1.5);
    }
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background-color: var(--white);
        flex-direction: column;
        align-items: center;
        justify-content: start;
        padding-top: 2rem;
        transition: right 0.3s ease;
        box-shadow: var(--shadow);
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .services-grid,
    .works-grid {
        grid-template-columns: 1fr;
    }
}
