/* リセットとベース設定 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --accent-color: #ec4899;
    --dark-bg: #0f172a;
    --light-bg: #f8fafc;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-accent: linear-gradient(135deg, #ec4899 0%, #f43f5e 100%);
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px rgba(0,0,0,0.15);
}

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

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

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

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

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    color: white;
    margin-top: 20px;
    font-size: 18px;
    animation: pulse 2s ease-in-out infinite;
}

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

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

/* ヘッダー */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: all 0.3s ease;
}

.main-header.scrolled {
    background: rgba(255,255,255,0.98);
    box-shadow: var(--shadow-md);
}

.navbar {
    padding: 1rem 0;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    flex-direction: column;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-tagline {
    font-size: 12px;
    color: var(--text-secondary);
    letter-spacing: 1px;
}

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

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

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

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

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

.cta-button {
    background: var(--gradient-primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

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

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    transition: all 0.3s ease;
}

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

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.particle-network {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0.3;
}

.data-flow {
    position: absolute;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="2" fill="white" opacity="0.5"><animate attributeName="r" from="2" to="8" dur="2s" repeatCount="indefinite"/><animate attributeName="opacity" from="0.5" to="0" dur="2s" repeatCount="indefinite"/></circle></svg>') repeat;
    animation: dataFlow 20s linear infinite;
}

@keyframes dataFlow {
    from { transform: translateY(0); }
    to { transform: translateY(-100px); }
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.title-line-1,
.title-line-2 {
    display: block;
    animation: slideInFromTop 0.8s ease-out backwards;
}

.title-line-2 {
    animation-delay: 0.2s;
    background: linear-gradient(90deg, #fff 0%, #f0f0f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.hero-description {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: fadeIn 1s ease-out 0.4s backwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
    animation: slideInFromBottom 1s ease-out 0.6s backwards;
}

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

.primary-button,
.secondary-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.primary-button {
    background: white;
    color: var(--primary-color);
    box-shadow: var(--shadow-lg);
}

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

.button-icon {
    transition: transform 0.3s ease;
}

.primary-button:hover .button-icon {
    transform: translateX(5px);
}

.secondary-button {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 2px solid rgba(255,255,255,0.3);
    backdrop-filter: blur(10px);
}

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

.play-icon {
    font-size: 0.8em;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    animation: fadeIn 1s ease-out 0.8s backwards;
}

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

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    display: inline-block;
}

.stat-label {
    display: inline-block;
    font-size: 1.5rem;
    opacity: 0.8;
}

.stat-description {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 0.5rem;
}

/* 特徴セクション */
.features-section {
    padding: 5rem 0;
    background: white;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

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

.feature-card {
    background: var(--light-bg);
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

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

.feature-icon {
    margin-bottom: 1.5rem;
}

.icon-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    background: var(--gradient-primary);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.icon-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: rotate(45deg);
    transition: all 0.5s ease;
}

.feature-card:hover .icon-wrapper::before {
    animation: shine 0.5s ease;
}

@keyframes shine {
    from { transform: rotate(45deg) translateX(-200%); }
    to { transform: rotate(45deg) translateX(200%); }
}

.icon-wrapper img {
    width: 50px;
    height: 50px;
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

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

/* 仕組みセクション */
.how-it-works-section {
    padding: 5rem 0;
    background: linear-gradient(180deg, white 0%, var(--light-bg) 100%);
}

.process-timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.process-timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    transform: translateX(-50%);
}

.process-step {
    display: flex;
    align-items: center;
    margin-bottom: 4rem;
    position: relative;
}

.process-step:nth-child(even) {
    flex-direction: row-reverse;
}

.step-number {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    z-index: 1;
    box-shadow: var(--shadow-lg);
}

.step-content {
    width: 45%;
    padding: 2rem;
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.step-content:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-xl);
}

.process-step:nth-child(odd) .step-content {
    margin-right: auto;
}

.process-step:nth-child(even) .step-content {
    margin-left: auto;
}

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

.step-description {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.step-image {
    width: 100%;
    height: 200px;
    background: var(--light-bg);
    border-radius: 10px;
    overflow: hidden;
}

.step-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* メリットセクション */
.benefits-section {
    padding: 5rem 0;
    background: var(--light-bg);
}

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

.benefit-card {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

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

.benefit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.benefit-title {
    font-size: 1.5rem;
    font-weight: 600;
}

.benefit-icon {
    font-size: 2.5rem;
}

.benefit-list {
    list-style: none;
}

.benefit-list li {
    padding: 0.75rem 0;
    padding-left: 2rem;
    position: relative;
    color: var(--text-secondary);
}

.benefit-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.2rem;
}

.student-benefit {
    border-top: 4px solid var(--primary-color);
}

.parent-benefit {
    border-top: 4px solid var(--secondary-color);
}

.teacher-benefit {
    border-top: 4px solid var(--accent-color);
}

/* 料金セクション */
.pricing-section {
    padding: 5rem 0;
    background: white;
}

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

.pricing-card {
    background: var(--light-bg);
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
}

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

.pricing-card.featured {
    background: var(--gradient-primary);
    color: white;
    transform: scale(1.05);
    box-shadow: var(--shadow-xl);
}

.popular-badge {
    position: absolute;
    top: -15px;
    right: 20px;
    background: var(--accent-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.plan-header {
    margin-bottom: 2rem;
}

.plan-name {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.plan-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.25rem;
}

.currency {
    font-size: 1.5rem;
}

.amount {
    font-size: 3rem;
    font-weight: 700;
}

.period {
    font-size: 1rem;
    opacity: 0.8;
}

.custom-price {
    font-size: 1.5rem;
    font-weight: 600;
}

.plan-features {
    list-style: none;
    margin-bottom: 2rem;
}

.plan-features li {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.pricing-card.featured .plan-features li {
    border-bottom-color: rgba(255,255,255,0.2);
}

.plan-button {
    display: inline-block;
    width: 100%;
    padding: 1rem;
    background: var(--gradient-primary);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

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

.featured-button {
    background: white;
    color: var(--primary-color);
}

/* CTAセクション */
.cta-section {
    padding: 5rem 0;
    background: var(--gradient-primary);
    color: white;
    text-align: center;
}

.cta-content {
    max-width: 600px;
    margin: 0 auto;
}

.cta-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta-description {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-form {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.cta-input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    outline: none;
}

.cta-submit {
    padding: 1rem 2rem;
    background: white;
    color: var(--primary-color);
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.cta-note {
    font-size: 0.875rem;
    opacity: 0.8;
}

/* フッター */
.main-footer {
    background: var(--dark-bg);
    color: white;
    padding: 3rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.footer-tagline {
    opacity: 0.8;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.footer-heading {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 0.5rem;
}

.footer-column a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.footer-column a:hover {
    opacity: 1;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    opacity: 0.8;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

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

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

    .hero-actions {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
        margin: 0 auto 3rem;
    }

    .hero-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .process-timeline::before {
        left: 30px;
    }

    .process-step {
        flex-direction: column !important;
        align-items: flex-start;
    }

    .step-number {
        left: 30px;
        transform: translateX(-50%);
    }

    .step-content {
        width: calc(100% - 80px);
        margin-left: 80px !important;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .footer-links {
        grid-template-columns: 1fr;
    }
}

/* アニメーション */
[data-aos] {
    opacity: 0;
    transition-property: transform, opacity;
}

[data-aos="fade-up"] {
    transform: translateY(30px);
}

[data-aos="fade-right"] {
    transform: translateX(-30px);
}

[data-aos="fade-left"] {
    transform: translateX(30px);
}

[data-aos="zoom-in"] {
    transform: scale(0.9);
}

[data-aos="flip-left"] {
    transform: perspective(2500px) rotateY(-100deg);
}

[data-aos].aos-animate {
    opacity: 1;
    transform: none;
}
