/* ===== CSS Variables (from app_theme.dart) ===== */
:root {
    --brand: #E8345A;
    --brand-light: #FF6B8A;
    --brand-dark: #B0204A;
    --brand-faint: rgba(232, 52, 90, 0.12);

    --success: #22C55E;
    --error: #EF4444;
    --warning: #F59E0B;

    --bg: #0A0A0A;
    --surface: #161616;
    --surface-elevated: #1F1F1F;
    --card: #161616;
    --divider: #2A2A2A;

    --text-primary: #FFFFFF;
    --text-secondary: #AAAAAA;
    --text-muted: #666666;
    --text-disabled: #444444;

    --analyst-psychologist: #E8345A;
    --analyst-sociologist: #56CCF2;
    --analyst-linguist: #6FCF97;
    --analyst-love: #F2994A;
    --analyst-attachment: #BB6BD9;

    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 20px;

    --font-display: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: var(--brand);
}

ul { list-style: none; }

img { max-width: 100%; display: block; }

/* ===== Utilities ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.text-brand {
    color: var(--brand);
}

.section-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 16px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 60px;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    outline: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--brand-light), var(--brand));
    color: #fff;
    box-shadow: 0 4px 20px rgba(232, 52, 90, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 28px rgba(232, 52, 90, 0.5);
}

.btn-outline {
    background: transparent;
    color: var(--brand);
    border: 2px solid var(--brand);
}

.btn-outline:hover {
    background: var(--brand-faint);
    transform: translateY(-2px);
}

.btn-lg {
    padding: 16px 36px;
    font-size: 1.05rem;
}

.btn-block {
    width: 100%;
}

/* ===== Navbar ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: all 0.3s ease;
    background: transparent;
}

.navbar.scrolled {
    background: rgba(10, 10, 10, 0.92);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--divider);
    padding: 10px 0;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--brand-light), var(--brand));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 4px 16px rgba(232, 52, 90, 0.3);
}

.logo-text {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--brand);
    transition: width 0.3s;
}

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

.nav-cta {
    background: var(--brand);
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.nav-cta:hover {
    background: var(--brand-dark);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s;
}

/* ===== Hero ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 120px 24px 80px;
    overflow: hidden;
}

.hero-bg-gradient {
    position: absolute;
    top: -200px;
    right: -200px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(232, 52, 90, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.hero-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 80px;
    max-width: 1100px;
    width: 100%;
}

.hero-content {
    max-width: 560px;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 24px;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 60px;
}

.hero-stats {
    display: flex;
    gap: 48px;
}

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

.stat-number {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--brand);
}

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

/* Phone Mockup */
.hero-phone {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.phone-mockup {
    width: 280px;
    height: 560px;
    background: var(--surface);
    border-radius: 36px;
    border: 3px solid var(--divider);
    padding: 12px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5), 0 0 60px rgba(232, 52, 90, 0.1);
    position: relative;
    overflow: hidden;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: var(--bg);
    border-radius: 26px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.phone-header {
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1rem;
    border-bottom: 1px solid var(--divider);
}

.phone-logo-small {
    color: var(--brand);
}

.phone-match-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--divider);
    transition: background 0.3s;
    animation: slideInCard 0.6s ease forwards;
    opacity: 0;
}

.phone-match-card:nth-child(2) { animation-delay: 0.3s; }
.phone-match-card:nth-child(3) { animation-delay: 0.6s; }
.phone-match-card:nth-child(4) { animation-delay: 0.9s; }

@keyframes slideInCard {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.match-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-light), var(--brand));
    flex-shrink: 0;
}

.match-avatar.avatar-2 {
    background: linear-gradient(135deg, #56CCF2, #2F80ED);
}

.match-avatar.avatar-3 {
    background: linear-gradient(135deg, #6FCF97, #27AE60);
}

.match-info {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.match-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.match-score {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--success);
}

.match-score.score-low {
    color: var(--error);
}

.phone-nav {
    margin-top: auto;
    display: flex;
    justify-content: space-around;
    padding: 14px 0;
    border-top: 1px solid var(--divider);
}

.phone-nav-item {
    color: var(--text-muted);
    transition: color 0.3s;
}

.phone-nav-item.active {
    color: var(--brand);
}

/* ===== Features ===== */
.features {
    padding: 120px 0;
    background: linear-gradient(180deg, var(--bg), var(--surface), var(--bg));
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card {
    background: linear-gradient(135deg, var(--surface), var(--surface-elevated));
    border: 1px solid var(--divider);
    border-radius: var(--radius-md);
    padding: 36px 28px;
    transition: all 0.4s ease;
    opacity: 0;
    transform: translateY(30px);
}

.feature-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.feature-card:hover {
    border-color: var(--brand);
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(232, 52, 90, 0.1);
}

.feature-icon {
    width: 56px;
    height: 56px;
    background: var(--brand-faint);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand);
    margin-bottom: 20px;
}

.feature-card h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ===== How it works ===== */
.how-it-works {
    padding: 120px 0;
}

.steps {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.step {
    display: flex;
    gap: 28px;
    align-items: flex-start;
    opacity: 0;
    transform: translateY(30px);
}

.step.visible {
    opacity: 1;
    transform: translateY(0);
}

.step-number {
    width: 56px;
    height: 56px;
    min-width: 56px;
    background: linear-gradient(135deg, var(--brand-light), var(--brand));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    box-shadow: 0 8px 24px rgba(232, 52, 90, 0.3);
}

.step-content h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.step-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

.step-connector {
    width: 2px;
    height: 48px;
    background: linear-gradient(180deg, var(--brand), var(--divider));
    margin-left: 27px;
}

/* ===== Analysis ===== */
.analysis {
    padding: 120px 0;
    background: linear-gradient(180deg, var(--bg), var(--surface), var(--bg));
}

.analysts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}

.analyst-card {
    background: var(--surface);
    border: 1px solid var(--divider);
    border-radius: var(--radius-md);
    padding: 32px 24px;
    text-align: center;
    transition: all 0.4s ease;
    opacity: 0;
    transform: translateY(30px);
}

.analyst-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.analyst-card:hover {
    transform: translateY(-4px);
    border-color: var(--analyst-color, var(--divider));
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
}

.analyst-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--analyst-color);
    margin: 0 auto 20px;
    border: 2px solid var(--analyst-color);
}

.analyst-card h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.analyst-card p {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.analyst-bar {
    height: 6px;
    background: var(--divider);
    border-radius: 3px;
    overflow: hidden;
}

.analyst-bar-fill {
    height: 100%;
    width: 0;
    background: var(--analyst-color);
    border-radius: 3px;
    transition: width 1.5s ease;
}

.analyst-card.visible .analyst-bar-fill {
    width: var(--bar-width);
}

/* ===== Plans ===== */
.plans {
    padding: 120px 0;
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: start;
}

.plan-card {
    background: var(--surface);
    border: 1px solid var(--divider);
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    position: relative;
    transition: all 0.4s ease;
    opacity: 0;
    transform: translateY(30px);
}

.plan-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.plan-card:hover {
    transform: translateY(-4px);
}

.plan-featured {
    border-color: var(--brand);
    box-shadow: 0 0 40px rgba(232, 52, 90, 0.15);
    transform: scale(1.05);
}

.plan-featured.visible {
    transform: scale(1.05);
}

.plan-featured:hover {
    transform: scale(1.05) translateY(-4px);
}

.plan-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--brand-light), var(--brand));
    color: #fff;
    padding: 6px 20px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.plan-header {
    text-align: center;
    margin-bottom: 32px;
}

.plan-header h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
}

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

.price-amount {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 700;
    color: var(--brand);
}

.price-currency {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

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

.plan-features {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 32px;
}

.plan-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.92rem;
    color: var(--text-secondary);
}

.plan-features li.disabled {
    color: var(--text-disabled);
}

/* ===== Languages ===== */
.languages {
    padding: 120px 0;
    background: linear-gradient(180deg, var(--bg), var(--surface), var(--bg));
}

.languages-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
}

.lang-card {
    background: var(--surface);
    border: 1px solid var(--divider);
    border-radius: var(--radius-md);
    padding: 32px 16px;
    text-align: center;
    transition: all 0.4s ease;
    opacity: 0;
    transform: translateY(20px);
}

.lang-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.lang-card:hover {
    border-color: var(--brand);
    transform: translateY(-4px);
}

.lang-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--brand-faint);
    color: var(--brand);
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.lang-name {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ===== CTA ===== */
.cta {
    padding: 120px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(232, 52, 90, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.cta-content {
    position: relative;
    z-index: 1;
}

.cta-title {
    font-family: var(--font-display);
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.cta-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 40px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* ===== Footer ===== */
.footer {
    border-top: 1px solid var(--divider);
    padding: 60px 0 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand {
    max-width: 320px;
}

.footer-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 16px;
    line-height: 1.6;
}

.footer-links {
    display: flex;
    gap: 60px;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-col h4 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.footer-col a {
    font-size: 0.88rem;
    color: var(--text-muted);
}

.footer-bottom {
    padding: 24px 0;
    border-top: 1px solid var(--divider);
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ===== Animations ===== */
[data-aos] {
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .hero-phone {
        display: none;
    }

    .hero-content {
        max-width: 100%;
        text-align: center;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .plans-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .plans-grid .plan-card:last-child {
        grid-column: 1 / -1;
        max-width: 400px;
        justify-self: center;
    }

    .analysts-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .languages-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }

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

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(10, 10, 10, 0.98);
        flex-direction: column;
        padding: 24px;
        gap: 20px;
        border-bottom: 1px solid var(--divider);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-cta {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

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

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

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

    .features-grid {
        grid-template-columns: 1fr;
    }

    .plans-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }

    .plans-grid .plan-card:last-child {
        max-width: 100%;
    }

    .plan-featured {
        transform: scale(1);
    }

    .plan-featured.visible {
        transform: scale(1);
    }

    .plan-featured:hover {
        transform: translateY(-4px);
    }

    .analysts-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .languages-grid {
        grid-template-columns: repeat(3, 1fr);
    }

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

    .footer-links {
        flex-wrap: wrap;
        gap: 40px;
    }

    .hero-stats {
        flex-direction: column;
        gap: 20px;
        align-items: center;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

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

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

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

    .analysts-grid {
        grid-template-columns: 1fr;
    }

    .languages-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
