/* リセットCSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* CSS変数 */
:root {
    --primary-color: #5E3AEE;
    --secondary-color: #FF6B6B;
    --accent-color: #4ECDC4;
    --dark-color: #1A1A2E;
    --light-color: #F8F9FA;
    --text-color: #333333;
    --text-light: #666666;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ベーススタイル */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-color);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* コンテナ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ヘッダー */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: var(--transition);
}

.nav {
    padding: 1rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background-color: var(--dark-color);
    margin: 3px 0;
    transition: var(--transition);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    font-weight: 500;
    color: var(--text-color);
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* ヒーローセクション */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 80px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 1200 800" xmlns="http://www.w3.org/2000/svg"><g opacity="0.1"><circle cx="100" cy="100" r="50" fill="white"/><circle cx="300" cy="200" r="30" fill="white"/><circle cx="900" cy="400" r="60" fill="white"/><circle cx="600" cy="600" r="40" fill="white"/></g></svg>');
    opacity: 0.3;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    color: white;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease-out;
    white-space: nowrap;
}

.hero-subtitle {
    display: block;
    font-size: 1.2rem;
    font-weight: 400;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.hero-description {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    opacity: 0.95;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

/* ボタン */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    text-align: center;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: white;
    color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: var(--primary-color);
}

/* フローティングカード */
.hero-visual {
    position: relative;
    height: 400px;
}

.floating-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 1.5rem 2rem;
    font-weight: 600;
    color: white;
    font-size: 1.2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    animation: float 6s ease-in-out infinite;
}

.card-1 {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.card-2 {
    top: 30%;
    right: 20%;
    animation-delay: 1s;
}

.card-3 {
    bottom: 30%;
    left: 30%;
    animation-delay: 2s;
}

.card-4 {
    bottom: 10%;
    right: 10%;
    animation-delay: 3s;
}

/* セクション共通 */
section {
    padding: 5rem 0;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* サービスセクション */
.services {
    background: white;
    position: relative;
    z-index: 10;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--light-color);
    border-radius: 20px;
    padding: 2.5rem;
    transition: var(--transition);
    border: 1px solid transparent;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.service-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.service-icon svg {
    width: 30px;
    height: 30px;
    color: white;
}

.service-card:hover .service-icon {
    transform: rotate(5deg) scale(1.1);
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.service-card p {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.service-features {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    background: rgba(94, 58, 238, 0.1);
    color: var(--primary-color);
    padding: 0.375rem 0.875rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

/* 開発内容セクション */
.features {
    background: linear-gradient(to bottom, white, var(--light-color));
    position: relative;
    z-index: 10;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.feature-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.feature-icon-wrapper {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    transition: var(--transition);
}

.feature-card:hover .feature-icon-wrapper {
    transform: rotate(10deg) scale(1.1);
}

.feature-icon {
    width: 40px;
    height: 40px;
    color: white;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.feature-card p {
    color: var(--text-light);
    line-height: 1.8;
}

/* お問い合わせセクション */
.contact {
    background: white;
    position: relative;
    z-index: 10;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-form {
    background: var(--light-color);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
}

.form-group {
    position: relative;
    margin-bottom: 2rem;
}

.form-input {
    width: 100%;
    padding: 1rem;
    border: 2px solid transparent;
    border-radius: 10px;
    font-size: 1rem;
    background: white;
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-label {
    position: absolute;
    left: 1rem;
    top: 1rem;
    color: var(--text-light);
    transition: var(--transition);
    pointer-events: none;
}

.form-input:focus ~ .form-label,
.form-input:not(:placeholder-shown) ~ .form-label {
    top: -0.75rem;
    left: 0.5rem;
    font-size: 0.875rem;
    color: var(--primary-color);
    background: var(--light-color);
    padding: 0 0.5rem;
}

textarea.form-input {
    resize: vertical;
    min-height: 120px;
}

.btn-submit {
    width: 100%;
    background: var(--primary-color);
    color: white;
}

.btn-submit:hover {
    background: #4B2DD5;
    transform: translateY(-2px);
}

.info-card {
    background: var(--light-color);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
}

.info-card h3 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--dark-color);
}

.info-item {
    margin-bottom: 1.5rem;
}

.info-item strong {
    display: block;
    color: var(--text-light);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.info-item p {
    color: var(--text-color);
}

.info-item a {
    color: var(--primary-color);
}

.info-item a:hover {
    text-decoration: underline;
}

/* フッター */
.footer {
    background: var(--dark-color);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

/* アニメーション */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-20px) rotate(2deg);
    }
    75% {
        transform: translateY(10px) rotate(-2deg);
    }
}

/* レスポンシブ */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow-md);
        padding: 2rem 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-visual {
        display: none;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-title {
        white-space: normal;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        max-width: 100%;
    }
    
    .contact-wrapper {
        grid-template-columns: 1fr;
    }
    
    .contact-form {
        padding: 2rem;
    }
}

/* スクロールエフェクト */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.scroll-reveal.active {
    opacity: 1;
    transform: translateY(0);
}