/* B-マネジメントシステム メインページスタイル */
/* AppleのiOSページを参考にしたモダンなデザイン */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #1d1d1f;
    background: #000;
    overflow-x: hidden;
}

/* ヒーローセクション */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: #ffffff;
    position: relative;
    overflow: hidden;
    padding: 80px 0;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../img/hero-bg.jpg') center/cover;
    opacity: 0.1;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1400px;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 60px;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 600;
    color: #007aff;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: #1d1d1f;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.hero-description {
    font-size: clamp(1.2rem, 2.5vw, 1.6rem);
    color: #1d1d1f;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.4;
    font-weight: 400;
}

.hero-button {
    display: inline-block;
    padding: 18px 36px;
    background: #007aff;
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 600;
    border: 2px solid #007aff;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
    margin-top: 20px;
}

.hero-button:hover {
    background: #0056b3;
    border-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 122, 255, 0.3);
}

/* デバイス表示エリア */
.hero-devices {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 40px;
    perspective: 1000px;
}

.device-mockup {
    width: 200px;
    height: 400px;
    background: #1d1d1f;
    border-radius: 30px;
    padding: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: rotateY(-15deg) rotateX(5deg);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.device-mockup:nth-child(1) {
    transform: rotateY(-25deg) rotateX(5deg) scale(0.9);
    z-index: 1;
}

.device-mockup:nth-child(2) {
    transform: rotateY(-10deg) rotateX(5deg) scale(0.95);
    z-index: 2;
}

.device-mockup:nth-child(3) {
    transform: rotateY(0deg) rotateX(5deg) scale(1);
    z-index: 3;
}

.device-mockup:nth-child(4) {
    transform: rotateY(10deg) rotateX(5deg) scale(0.95);
    z-index: 2;
}

.device-mockup:nth-child(5) {
    transform: rotateY(25deg) rotateX(5deg) scale(0.9);
    z-index: 1;
}

.device-mockup:hover {
    transform: rotateY(0deg) rotateX(0deg) scale(1.05);
    z-index: 10;
}

.device-screen {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.device-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.device-content {
    text-align: center;
    z-index: 2;
    position: relative;
}

.device-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.device-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.device-subtitle {
    font-size: 0.7rem;
    opacity: 0.8;
}

/* サービスセクション */
.services-section {
    padding: 120px 0;
    background: #ffffff;
}

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

.section-header {
    text-align: center;
    margin-bottom: 80px;
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.section-description {
    font-size: 1.3rem;
    color: #86868b;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
}

.services-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 20px;
    margin-top: 60px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    height: 500px;
}

/* メインサービスカード（大きく表示） */
.service-card.main-service {
    grid-column: 1;
    grid-row: 1 / 3;
    min-height: 100%;
}

/* サブサービスカード（小さく表示） */
.service-card.sub-service {
    min-height: 200px;
}

.service-card {
    background: linear-gradient(135deg, #007bff, #0056b3);
    border-radius: 20px;
    padding: 30px 25px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
    color: white;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* メインサービスのスタイル */
.service-card.main-service {
    padding: 50px 40px;
    text-align: left;
}

.service-card.main-service .service-icon {
    width: 100px;
    height: 100px;
    margin: 0 0 30px 0;
    font-size: 2.5rem;
}

.service-card.main-service .service-title {
    font-size: 2.2rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.service-card.main-service .service-description {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 30px;
}

.service-card.main-service .service-link {
    padding: 15px 30px;
    font-size: 1rem;
    align-self: flex-start;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.service-card:hover::before {
    opacity: 1;
}

.service-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    transition: all 0.3s ease;
    font-weight: bold;
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
}

.service-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}

.service-description {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
    margin-bottom: 20px;
    flex-grow: 1;
}

.service-link {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    margin-top: auto;
}

.service-link:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

/* サービスカードの色バリエーション */
.service-card.card-1 {
    background: linear-gradient(135deg, #007bff, #0056b3);
}

.service-card.card-2 {
    background: linear-gradient(135deg, #28a745, #1e7e34);
}

.service-card.card-3 {
    background: linear-gradient(135deg, #ffc107, #e0a800);
}

.service-card.card-4 {
    background: linear-gradient(135deg, #dc3545, #c82333);
}

.service-card.card-5 {
    background: linear-gradient(135deg, #6f42c1, #5a32a3);
}

.service-card.card-6 {
    background: linear-gradient(135deg, #fd7e14, #e55a00);
}

.service-card.card-7 {
    background: linear-gradient(135deg, #20c997, #17a2b8);
}

.service-card.card-8 {
    background: linear-gradient(135deg, #e83e8c, #d63384);
}

/* フッター */
.footer {
    background: #1d1d1f;
    color: #f5f5f7;
    padding: 60px 0 40px;
    text-align: center;
}

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

.footer-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.footer-description {
    font-size: 1rem;
    color: #86868b;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.footer-link {
    color: #f5f5f7;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: #495057;
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 20px;
    color: #86868b;
    font-size: 0.9rem;
}

/* レスポンシブ */
@media (max-width: 1200px) {
    .hero-devices {
        gap: 15px;
    }
    
    .device-mockup {
        width: 160px;
        height: 320px;
    }
    
    .services-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto auto;
        height: auto;
    }
    
    .service-card.main-service {
        grid-column: 1 / 3;
        grid-row: 1;
        min-height: 300px;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0;
    }
    
    .hero-content {
        gap: 40px;
    }
    
    .hero-devices {
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
    }
    
    .device-mockup {
        width: 120px;
        height: 240px;
        transform: none !important;
        scale: 1;
    }
    
    .device-mockup:nth-child(n) {
        transform: none !important;
        scale: 1;
    }

    .services-section {
        padding: 80px 0;
    }

    .services-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        height: auto;
        gap: 20px;
    }
    
    .service-card.main-service {
        grid-column: 1;
        grid-row: 1;
        text-align: center;
        padding: 40px 30px;
    }
    
    .service-card.main-service .service-icon {
        margin: 0 auto 20px auto;
    }
    
    .service-card.main-service .service-link {
        align-self: center;
    }

    .service-card {
        padding: 30px 20px;
    }

    .footer-links {
        flex-direction: column;
        gap: 20px;
    }
}

/* アニメーション */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

/* スクロール効果 */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

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