/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors - Exact Preply Brand Colors */
    --primary: #ff7aac;
    --primary-dark: #ff5c97;
    --primary-light: #ff98c1;
    --secondary: #000000;
    --success: #00C896;
    --text-primary: #000000;
    --text-secondary: #4A4A4A;
    --text-light: #FFFFFF;
    --bg-primary: #FFFFFF;
    --bg-secondary: #FFF5F8;
    --bg-hero: #ff7aac;
    --border: #E8E8E8;

    /* Typography */
    --font-primary: 'Platform', 'Platform-fallback', 'Platform-fallback-android', 'Noto Sans', 'NotoSans-fallback', 'NotoSans-fallback-android', sans-serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.2);
}

body {
    font-family: var(--font-primary);
    color: var(--text-primary);
    background-color: var(--bg-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-weight: 400;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Header */
.header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    padding: var(--spacing-md) 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    text-decoration: none;
}

.logo svg {
    height: 32px;
    width: auto;
    display: block;
}

.discount-badge {
    background: var(--secondary);
    color: var(--text-light);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.nav {
    display: flex;
    gap: var(--spacing-lg);
    align-items: center;
}

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

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

/* Language Selector */
.language-selector {
    position: relative;
}

.language-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.language-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.2);
}

.language-btn svg {
    transition: transform 0.3s ease;
}

.language-btn.active svg {
    transform: rotate(180deg);
}

.language-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.language-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-option {
    width: 100%;
    text-align: left;
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.language-option:hover {
    background: var(--bg-secondary);
}

.language-option:first-child {
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.language-option:last-child {
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

/* Hero Section */
.hero {
    padding: 3rem 0 4rem;
    background: var(--bg-hero);
    position: relative;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: center;
}

.hero-text {
    animation: fadeInUp 0.8s ease;
}

.badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.3);
    color: var(--secondary);
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: var(--spacing-md);
}

.hero-title {
    font-size: 3.2rem;
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: var(--spacing-md);
    color: var(--secondary);
    letter-spacing: -0.02em;
}

.highlight {
    color: var(--secondary);
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--secondary);
    margin-bottom: var(--spacing-xl);
    line-height: 1.5;
    font-weight: 400;
}

/* Hero Button */
.btn-hero {
    font-size: 1.125rem;
    padding: 1.125rem 2rem;
    margin-bottom: var(--spacing-lg);
    border-radius: 14px;
}

/* Buttons - Official Preply Style */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--secondary);
    color: white;
    padding: 0.875rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: none;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    line-height: 1.5;
}

.btn-primary:hover {
    background: #1a1a1a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.btn-large {
    padding: 1.15rem 2.5rem;
    font-size: 1.15rem;
}

/* Trust Indicators */
.trust-indicators {
    display: flex;
    gap: var(--spacing-xl);
    margin-top: var(--spacing-xl);
}

.trust-item {
    display: flex;
    flex-direction: column;
}

.trust-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--secondary);
}

.trust-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Hero Image */
.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-placeholder {
    width: 100%;
    max-width: 600px;
    animation: float 6s ease-in-out infinite;
}

.hero-main-image {
    width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    object-fit: cover;
}

/* Sections */
.section {
    padding: 4rem 0;
}

.section-alt {
    background: #FAFAFA;
}

.section-title {
    font-size: 2.3rem;
    font-weight: 900;
    text-align: center;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.section-subtitle {
    font-size: 1.1rem;
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xl);
    font-weight: 400;
}

/* How It Works - Preply Style */
.how-it-works-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
    margin-top: var(--spacing-xl);
}

.how-card {
    background: white;
    border-radius: 20px;
    padding: 2rem 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.how-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.how-card-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.how-counter {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
}

.how-counter span {
    color: var(--secondary);
}

.how-counter-teal {
    background: #B8F4E8;
}

.how-counter-yellow {
    background: #FFE9A3;
}

.how-counter-blue {
    background: #B8D4FF;
}

.how-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
    line-height: 1.3;
}

.how-card-text {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 1rem;
}

/* How It Works Images */
.how-card-image {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.teacher-cards-stack {
    width: 100%;
    max-width: 280px;
}

.teacher-card-mini {
    background: #F9F9F9;
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    gap: 0.75rem;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.teacher-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #B8F4E8 0%, #7AE0CC 100%);
}

.teacher-info {
    flex: 1;
}

.teacher-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.teacher-rating {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.lesson-illustration,
.progress-illustration {
    width: 100%;
    max-width: 300px;
}

.lesson-illustration svg,
.progress-illustration svg {
    width: 100%;
    height: auto;
    border-radius: 12px;
}

/* Benefits - Grid 2x2 */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-xl);
    margin-top: var(--spacing-xl);
}

.benefit-card {
    background: white;
    border-radius: 20px;
    padding: var(--spacing-xl);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.benefit-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.benefit-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: var(--spacing-sm);
}

.benefit-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: var(--spacing-xs);
}

.benefit-text {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    font-weight: 400;
}

/* Languages Carousel */
.carousel-container {
    overflow: hidden;
    margin-top: var(--spacing-xl);
    position: relative;
    width: 100%;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.carousel-track {
    display: flex;
    gap: var(--spacing-sm);
    animation: scroll 30s linear infinite;
    width: fit-content;
}

.carousel-track:hover {
    animation-play-state: paused;
}

.carousel-slide {
    display: flex;
    gap: var(--spacing-sm);
    flex-shrink: 0;
}

.language-tag {
    background: white;
    padding: 0.7rem 1.2rem;
    border-radius: 20px;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 0.95rem;
    white-space: nowrap;
}

.language-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    background: var(--secondary);
    color: white;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-100% - var(--spacing-sm)));
    }
}

/* FAQ */
.faq {
    max-width: 800px;
    margin: 0 auto;
    margin-top: var(--spacing-xl);
}

.faq-item {
    background: white;
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-md);
    box-shadow: var(--shadow-sm);
}

.faq-question {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

.faq-answer {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* CTA Section */
.cta-section {
    background: var(--bg-hero);
    padding: 4rem 0;
    text-align: center;
    color: var(--secondary);
}

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

.cta-title {
    font-size: 2.3rem;
    font-weight: 900;
    margin-bottom: var(--spacing-md);
    letter-spacing: -0.01em;
}

.cta-text {
    font-size: 1.15rem;
    margin-bottom: var(--spacing-lg);
    opacity: 0.9;
}

.coupon-inline {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.coupon-code-small {
    background: white;
    color: var(--secondary);
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    font-family: var(--font-primary);
}

.btn-copy-small {
    background: var(--secondary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 24px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-copy-small:hover {
    background: #1a1a1a;
}

/* Footer */
.footer {
    background: var(--text-primary);
    color: white;
    padding: var(--spacing-xl) 0;
    text-align: center;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
}

.footer-text {
    margin-bottom: var(--spacing-md);
    opacity: 0.8;
    line-height: 1.6;
}

.footer-links a {
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.3s ease;
}

.footer-links a:hover {
    opacity: 0.8;
}

.footer-copy {
    margin-top: var(--spacing-md);
    opacity: 0.6;
    font-size: 0.9rem;
}

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

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

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

.floating-card {
    animation: floatUp 3s ease-in-out infinite;
}

/* Terms Grid */
.terms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
}

.term-card {
    background: white;
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

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

.term-icon {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-md);
}

.term-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

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

.terms-link {
    margin-top: var(--spacing-xl);
    text-align: center;
}

.terms-link a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: opacity 0.3s ease;
}

.terms-link a:hover {
    opacity: 0.8;
}

/* Japanese Font Support */
body[lang="ja"],
body[lang="ja"] * {
    font-family: 'Noto Sans JP', var(--font-primary);
}

/* Responsive */
@media (max-width: 768px) {
    /* Container */
    .container {
        padding: 0 1rem;
    }

    /* Header */
    .header {
        padding: 1rem 0;
    }

    .nav-link {
        display: none;
    }

    .language-selector {
        position: relative;
    }

    .language-dropdown {
        right: 0;
        left: auto;
    }

    .language-btn {
        background: transparent;
        border-color: rgba(0, 0, 0, 0.08);
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }

    .language-btn #currentLang {
        display: none;
    }

    /* Hero Section */
    .hero {
        padding: 2rem 0 3rem;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

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

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

    .btn-hero {
        font-size: 1rem;
        padding: 1rem 1.5rem;
        width: 100%;
        text-align: center;
        justify-content: center;
        display: inline-flex;
    }

    /* Trust Indicators - Grid 2x3 */
    .trust-indicators {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
        margin-top: var(--spacing-lg);
    }

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

    .trust-number {
        font-size: 1.4rem;
    }

    .trust-label {
        font-size: 0.75rem;
    }

    /* Hero Image */
    .hero-image {
        order: -1;
    }

    .image-placeholder {
        max-width: 100%;
    }

    /* Sections */
    .section {
        padding: 3rem 0;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .section-subtitle {
        font-size: 1rem;
    }

    /* How It Works Grid */
    .how-it-works-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .how-card {
        padding: 1.5rem;
    }

    .how-card-title {
        font-size: 1.25rem;
    }

    /* Benefits Grid */
    .benefits-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .benefit-card {
        padding: var(--spacing-lg);
    }

    .benefit-image {
        height: 200px;
    }

    .benefit-title {
        font-size: 1.25rem;
    }

    .benefit-text {
        font-size: 0.95rem;
    }

    /* CTA Section */
    .cta-section {
        padding: 3rem 0;
    }

    .cta-title {
        font-size: 1.75rem;
    }

    .cta-text {
        font-size: 1rem;
    }

    .btn-large {
        padding: 1rem 2rem;
        font-size: 1rem;
        width: 100%;
    }

    /* Footer */
    .footer {
        padding: var(--spacing-lg) 0;
    }

    .footer-text {
        font-size: 0.9rem;
    }

    /* Terms Grid */
    .terms-grid {
        grid-template-columns: 1fr;
    }

    /* Coupon */
    .coupon-inline {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .coupon-code-small {
        font-size: 1.1rem;
        padding: 0.6rem 1.2rem;
    }

    .coupon-content {
        flex-direction: column;
    }

    .coupon-code {
        font-size: 1.25rem;
        width: 100%;
    }

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

@media (max-width: 480px) {
    /* Hero */
    .hero-title {
        font-size: 1.75rem;
    }

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

    /* Trust Indicators - Stack vertically on very small screens */
    .trust-indicators {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }

    .trust-number {
        font-size: 1.3rem;
    }

    .trust-label {
        font-size: 0.7rem;
    }

    /* Sections */
    .section-title {
        font-size: 1.5rem;
    }

    .cta-title {
        font-size: 1.5rem;
    }

    /* Benefit cards */
    .benefit-image {
        height: 180px;
    }

    .benefit-title {
        font-size: 1.1rem;
    }

    .benefit-text {
        font-size: 0.9rem;
    }
}

/* Print styles for better SEO */
@media print {
    .nav,
    .btn-copy,
    .btn-primary {
        display: none;
    }
}
