/* ========================================
   NebulaTech - 宇宙テーマ CSS
   ======================================== */

/* CSS Variables */
:root {
    --primary-color: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --secondary-color: #a855f7;
    --accent-color: #06b6d4;
    --text-color: #f1f5f9;
    --text-muted: #94a3b8;
    --bg-dark: #0a0a1a;
    --bg-darker: #050510;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: rgba(0, 0, 0, 0.3);
    --gradient-1: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #06b6d4 100%);
    --gradient-2: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #0f172a 100%);
    --font-heading: 'Orbitron', sans-serif;
    --font-body: 'Noto Sans JP', sans-serif;
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-darker);
    color: var(--text-color);
    line-height: 1.7;
    overflow-x: hidden;
}

/* ========================================
   宇宙背景
   ======================================== */
.space-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -10;
    background: radial-gradient(ellipse at center, #1a1a3e 0%, #0a0a1a 50%, #050510 100%);
}

/* 星のアニメーション */
.stars, .stars2, .stars3 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.stars {
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #fff, transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 90px 40px, #fff, transparent),
        radial-gradient(2px 2px at 160px 120px, rgba(255,255,255,0.9), transparent),
        radial-gradient(1px 1px at 230px 80px, #fff, transparent),
        radial-gradient(2px 2px at 300px 150px, rgba(255,255,255,0.7), transparent),
        radial-gradient(1px 1px at 370px 200px, #fff, transparent),
        radial-gradient(2px 2px at 450px 50px, rgba(255,255,255,0.8), transparent);
    background-repeat: repeat;
    background-size: 500px 300px;
    animation: twinkle 4s ease-in-out infinite;
}

.stars2 {
    background-image: 
        radial-gradient(1px 1px at 50px 100px, #fff, transparent),
        radial-gradient(2px 2px at 100px 200px, rgba(255,255,255,0.7), transparent),
        radial-gradient(1px 1px at 180px 50px, #fff, transparent),
        radial-gradient(1px 1px at 250px 180px, rgba(255,255,255,0.9), transparent),
        radial-gradient(2px 2px at 320px 100px, #fff, transparent),
        radial-gradient(1px 1px at 400px 250px, rgba(255,255,255,0.6), transparent);
    background-repeat: repeat;
    background-size: 450px 300px;
    animation: twinkle 5s ease-in-out infinite 1s;
}

.stars3 {
    background-image: 
        radial-gradient(1px 1px at 80px 60px, #a5b4fc, transparent),
        radial-gradient(2px 2px at 150px 130px, #c4b5fd, transparent),
        radial-gradient(1px 1px at 220px 90px, #67e8f9, transparent),
        radial-gradient(1px 1px at 300px 200px, #a5b4fc, transparent),
        radial-gradient(2px 2px at 380px 30px, #c4b5fd, transparent);
    background-repeat: repeat;
    background-size: 400px 250px;
    animation: twinkle 6s ease-in-out infinite 2s;
}

@keyframes twinkle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* 星雲エフェクト */
.nebula {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 30%, rgba(168, 85, 247, 0.1) 0%, transparent 40%),
        radial-gradient(ellipse at 60% 80%, rgba(6, 182, 212, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 10% 70%, rgba(139, 92, 246, 0.08) 0%, transparent 40%);
    animation: nebulaPulse 15s ease-in-out infinite;
}

@keyframes nebulaPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.05); }
}

/* ========================================
   ヘッダー
   ======================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: rgba(10, 10, 26, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.header.scrolled {
    background: rgba(10, 10, 26, 0.95);
    padding: 0.8rem 2rem;
}

/* ロゴ */
.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-color);
}

.logo-icon {
    font-size: 1.5rem;
    color: var(--primary-light);
    animation: rocketBounce 2s ease-in-out infinite;
}

@keyframes rocketBounce {
    0%, 100% { transform: translateY(0) rotate(-45deg); }
    50% { transform: translateY(-5px) rotate(-45deg); }
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* デスクトップナビゲーション */
.desktop-nav {
    display: none;
    gap: 2rem;
}

/* 言語切り替えボタン */
.lang-switcher {
    display: flex;
    gap: 0.5rem;
    margin-right: 1rem;
}

.lang-btn {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: var(--font-heading);
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
}

.lang-btn.active {
    background: var(--gradient-1);
    border-color: transparent;
    color: white;
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.3);
}

@media (min-width: 768px) {
    .lang-switcher {
        margin-right: 0;
        margin-left: 1.5rem;
    }
}

.desktop-nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.desktop-nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-1);
    transition: width 0.3s ease;
}

.desktop-nav a:hover {
    color: var(--text-color);
}

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

@media (min-width: 768px) {
    .desktop-nav {
        display: flex;
    }
}

/* ========================================
   ハンバーガーメニュー
   ======================================== */
.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    cursor: pointer;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all 0.3s ease;
    gap: 5px;
    z-index: 1001;
}

.hamburger:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.hamburger-line {
    width: 22px;
    height: 2px;
    background: var(--text-color);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.hamburger.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

@media (min-width: 768px) {
    .hamburger {
        display: none;
    }
}

/* ========================================
   グラススタイル モバイルメニュー
   ======================================== */
.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 350px;
    height: 100vh;
    z-index: 999;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.glass-menu {
    background: rgba(20, 20, 50, 0.7);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-left: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 
        -10px 0 40px rgba(0, 0, 0, 0.5),
        inset 1px 0 0 rgba(255, 255, 255, 0.1);
}

.mobile-nav-content {
    display: flex;
    flex-direction: column;
    padding: 100px 2rem 2rem;
    height: 100%;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateX(30px);
}

.mobile-nav.active .mobile-nav-link {
    opacity: 1;
    transform: translateX(0);
}

.mobile-nav.active .mobile-nav-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-nav.active .mobile-nav-link:nth-child(2) { transition-delay: 0.15s; }
.mobile-nav.active .mobile-nav-link:nth-child(3) { transition-delay: 0.2s; }
.mobile-nav.active .mobile-nav-link:nth-child(4) { transition-delay: 0.25s; }
.mobile-nav.active .mobile-nav-link:nth-child(5) { transition-delay: 0.3s; }

.mobile-nav-link:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateX(10px);
}

.mobile-nav-link i {
    font-size: 1.2rem;
    color: var(--primary-light);
    width: 30px;
    text-align: center;
}

/* メニューオーバーレイ */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 998;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ========================================
   グラスカード共通スタイル
   ======================================== */
.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.4s ease;
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* ========================================
   ヒーローセクション
   ======================================== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 6rem 1.5rem 3rem;
    position: relative;
}

.hero-content {
    max-width: 900px;
    animation: fadeInUp 1s ease-out;
}

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

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 6vw, 4rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.title-line {
    display: block;
}

.gradient-text {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 5s ease infinite;
    background-size: 200% 200%;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

/* ボタン */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--gradient-1);
    color: white;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.6);
}

.btn-secondary {
    background: transparent;
    color: var(--text-color);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* スクロールインジケーター */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    animation: scrollBounce 2s ease-in-out infinite;
}

.mouse {
    width: 24px;
    height: 38px;
    border: 2px solid var(--text-muted);
    border-radius: 12px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--text-muted);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: wheelScroll 1.5s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
}

@keyframes wheelScroll {
    0% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(15px); }
}

/* ========================================
   セクション共通
   ======================================== */
.section {
    padding: 6rem 1.5rem;
    position: relative;
}

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

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    text-align: center;
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.title-icon {
    font-size: 1.5rem;
    color: var(--primary-light);
}

/* ========================================
   アバウトセクション
   ======================================== */
.about-content {
    max-width: 900px;
    margin: 0 auto;
}

.about-text {
    padding: 2.5rem;
}

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

.about-text p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-family: var(--font-heading);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

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

.service-card {
    padding: 2rem;
    text-align: center;
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: var(--gradient-1);
    border-radius: 20px;
    color: white;
}

.service-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.service-features {
    list-style: none;
    text-align: left;
}

.service-features li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.service-features li::before {
    content: '✦';
    position: absolute;
    left: 0;
    color: var(--primary-light);
}

/* ========================================
   実績セクション
   ======================================== */
.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.work-card {
    overflow: hidden;
}

.work-image {
    height: 180px;
    background: var(--gradient-2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.work-placeholder {
    font-size: 3rem;
    color: var(--primary-light);
    opacity: 0.5;
}

.work-content {
    padding: 1.5rem;
}

.work-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(99, 102, 241, 0.2);
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--primary-light);
    margin-bottom: 0.75rem;
}

.work-content h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.work-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ========================================
   お問い合わせセクション
   ======================================== */
.contact-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .contact-content {
        grid-template-columns: 1fr 1fr;
    }
}

.contact-info {
    padding: 2rem;
}

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

.contact-info > p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

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

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    color: var(--text-muted);
}

.contact-item i {
    font-size: 1.25rem;
    color: var(--primary-light);
    width: 30px;
    text-align: center;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    color: var(--text-muted);
    font-size: 1.25rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

/* フォーム */
.contact-form {
    padding: 2rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-muted);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text-color);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.2);
}

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

/* ========================================
   フッター
   ======================================== */
.footer {
    padding: 3rem 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid var(--glass-border);
}

.footer-content {
    text-align: center;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.footer-text {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.copyright {
    font-size: 0.85rem;
    color: var(--text-muted);
    opacity: 0.7;
}

/* ========================================
   レスポンシブ調整
   ======================================== */
@media (max-width: 767px) {
    .header {
        padding: 0.75rem 1rem;
    }
    
    .stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-item {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 1rem;
    }
    
    .planet-1 {
        width: 200px;
        height: 200px;
    }
    
    .planet-4 {
        width: 120px;
        height: 120px;
    }
}

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

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