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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans JP', 'Inter', sans-serif;
    line-height: 1.7;
    color: #2d3748;
    background-color: #ffffff;
}

/* Custom Variables */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #64748b;
    --accent-color: #f59e0b;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --bg-light: #f8fafc;
    --border-light: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}

/* Typography */
.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--text-primary);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Navigation */
.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

/* ナビゲーションメニューコンテナ */
.nav-menu {
    display: flex;
}

/* デスクトップ表示でのナビゲーションメニュー */
@media (min-width: 769px) {
    .nav-menu {
        display: flex;
    }

    .nav-link {
        display: block;
    }
}

/* モバイル表示でのナビゲーションメニュー */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    .nav-link {
        display: block;
    }
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

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

/* Mobile Menu */
.mobile-menu {
    transform: translateX(100%);
    transition: transform 0.3s ease;
    opacity: 0;
    visibility: hidden;
    display: flex;
    justify-content: flex-end;
}

.mobile-menu.active {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
}

.mobile-menu-btn {
    padding: 8px;
    border: none;
    background: none;
    cursor: pointer;
    display: none;
    /* デフォルトで非表示 */
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
}

/* モバイル表示でのみ表示 */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }
}

.mobile-menu-close {
    padding: 8px;
    border: none;
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(67, 56, 202, 0.05) 100%),
        url('../images/hero-bg.jpg') center/cover no-repeat;
    position: relative;
    display: flex;
    align-items: center;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.85);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background-color: transparent;
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Feature Cards */
#features {
    padding-top: 6rem;
    /* ナビゲーションバーの高さ分のパディングを追加 */
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid var(--border-light);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.feature-icon {
    width: 4rem;
    height: 4rem;
    background: linear-gradient(135deg, var(--primary-color), #3b82f6);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: var(--shadow-md);
}

.feature-icon i {
    font-size: 1.5rem;
    color: white;
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.feature-description {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Service Cards */
#services {
    padding-top: 6rem;
    /* ナビゲーションバーの高さ分のパディングを追加 */
}

.service-card {
    background: white;
    border-radius: 1.5rem;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--border-light);
}

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

.service-image {
    position: relative;
    overflow: hidden;
}

.service-image img {
    transition: transform 0.3s ease;
}

.service-card:hover .service-image img {
    transform: scale(1.05);
}

.service-content {
    padding: 2rem;
}

.service-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.service-description {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.service-details {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Mission Items */
#mission {
    padding-top: 6rem;
    /* ナビゲーションバーの高さ分のパディングを追加 */
}

.mission-item {
    padding: 1.5rem;
    background: white;
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.mission-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(5px);
}

/* Prose Styles */
.prose {
    max-width: none;
}

.prose p {
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
    line-height: 1.7;
}

.prose strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

.animate-fade-in {
    animation: fadeIn 0.6s ease forwards;
}

/* Scroll Animations */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.scroll-animate.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

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

    .feature-card,
    .service-card {
        margin-bottom: 2rem;
    }

    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }

    /* モバイルでのセクション間隔調整 */
    #features,
    #services,
    #mission,
    #about,
    #team {
        padding-top: 4rem;
        /* モバイルでは少し小さめのパディング */
    }
}

@media (max-width: 640px) {
    .hero-title {
        font-size: 2rem;
    }

    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .feature-icon {
        width: 3rem;
        height: 3rem;
    }

    .feature-icon i {
        font-size: 1.25rem;
    }
}

/* Loading Animation */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

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

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Utility Classes */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-padding {
    padding: 5rem 0;
}

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

/* Enhanced Focus States for Accessibility */
a:focus,
button:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Profile Photo Styles */
.placeholder-overlay {
    transition: opacity 0.3s ease;
}

#ceo-photo[src*="placeholder"],
#dev-photo[src*="placeholder"] {
    opacity: 0;
}

#ceo-photo[src*="placeholder"]+.placeholder-overlay,
#dev-photo[src*="placeholder"]+.placeholder-overlay {
    opacity: 1;
}

#ceo-photo:not([src*="placeholder"]),
#dev-photo:not([src*="placeholder"]) {
    opacity: 1;
}

#ceo-photo:not([src*="placeholder"])+.placeholder-overlay,
#dev-photo:not([src*="placeholder"])+.placeholder-overlay {
    opacity: 0;
}

/* Profile Section Enhancements */
.profile-photo-container {
    position: relative;
    width: 160px;
    height: 160px;
    margin: 0 auto;
}

.profile-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.profile-photo:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
}

.profile-placeholder {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary-color), #3b82f6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.5rem;
    border: 4px solid white;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.profile-info {
    text-align: center;
    margin-bottom: 2rem;
}

.profile-note {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    display: inline-block;
    margin-top: 0.5rem;
}

/* Team Section Specific Styles */
#team .profile-placeholder {
    background: linear-gradient(135deg, #10b981, #059669);
}

/* Enhanced About and Team Sections */
#about,
#team {
    position: relative;
    padding-top: 6rem;
    /* ナビゲーションバーの高さ分のパディングを追加 */
}

#about::before,
#team::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-light), transparent);
}

/* Responsive Adjustments for Profile Sections */
@media (max-width: 768px) {
    .profile-photo-container {
        width: 120px;
        height: 120px;
    }

    .profile-placeholder {
        font-size: 1.25rem;
    }

    .prose p {
        font-size: 1rem;
    }
}

/* Print Styles */
@media print {
    .hero-section {
        background: none !important;
        min-height: auto;
    }

    .btn {
        display: none;
    }

    nav {
        display: none;
    }

    .profile-note {
        display: none;
    }
}