/* ========== THEME VARIABLES ========== */
:root,
[data-theme="dark"] {
    /* Dark theme (default) - from mobile app */
    --primary: #9db2bf;
    --secondary: #dde6ed;
    --tertiary: #526d82;
    --background: #27374d;
    --surface: #27374d;
    --primary-container: #526d82;
    --surface-variant: #3d5a6b;

    --text-primary: #dde6ed;
    --text-secondary: #9db2bf;
    --text-muted: #6b8a9e;
    --text-on-primary: #1b2838;

    --border: rgba(157, 178, 191, 0.15);
    --border-hover: rgba(157, 178, 191, 0.35);

    --card-bg: #3d5a6b;
    --card-bg-hover: #456878;
    --input-bg: rgba(0, 0, 0, 0.25);

    --accent: #9db2bf;
    --accent-hover: #b5c8d3;
    --accent-glow: rgba(157, 178, 191, 0.25);

    --success: #6dbf8b;
    --warning: #d4a856;
    --error: #cf6b6b;

    --shadow-sm: 0 2px 8px rgba(0,0,0,0.2);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.25);
    --shadow-lg: 0 16px 48px rgba(0,0,0,0.3);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

[data-theme="light"] {
    --primary: #ad8b73;
    --secondary: #ceab93;
    --tertiary: #e3caa5;
    --background: #fffbe9;
    --surface: #fffbe9;
    --primary-container: #e3caa5;
    --surface-variant: #f5e8d0;

    --text-primary: #3d2e1f;
    --text-secondary: #7a6552;
    --text-muted: #a8937e;
    --text-on-primary: #fffbe9;

    --border: rgba(173, 139, 115, 0.2);
    --border-hover: rgba(173, 139, 115, 0.4);

    --card-bg: #f5e8d0;
    --card-bg-hover: #efe0c4;
    --input-bg: rgba(173, 139, 115, 0.08);

    --accent: #ad8b73;
    --accent-hover: #9a7a63;
    --accent-glow: rgba(173, 139, 115, 0.2);

    --success: #5a9e6f;
    --warning: #c49840;
    --error: #c25858;

    --shadow-sm: 0 2px 8px rgba(100,80,60,0.08);
    --shadow-md: 0 8px 24px rgba(100,80,60,0.1);
    --shadow-lg: 0 16px 48px rgba(100,80,60,0.12);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background 0.4s ease, color 0.4s ease;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

/* ========== THEME TOGGLE ========== */
.theme-toggle {
    position: relative;
    width: 52px;
    height: 28px;
    background: var(--surface-variant);
    border-radius: 14px;
    border: 2px solid var(--border);
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.theme-toggle::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: var(--accent);
    border-radius: 50%;
    transition: transform 0.3s ease;
}

[data-theme="light"] .theme-toggle::after {
    transform: translateX(24px);
}

.theme-toggle-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    line-height: 1;
    z-index: 1;
    pointer-events: none;
}

.theme-toggle-icon.moon {
    left: 6px;
}

.theme-toggle-icon.sun {
    right: 6px;
}

/* ========== NAVBAR ========== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
    color: var(--accent);
}

.logo svg {
    color: var(--accent);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-login {
    background: transparent;
    color: var(--text-primary);
    padding: 10px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 14px;
    border: 2px solid var(--border);
    transition: all 0.3s ease;
}

.btn-login:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-glow);
}

.btn-download-nav {
    background: var(--accent);
    color: var(--text-on-primary);
    padding: 10px 24px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.btn-download-nav:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* ========== HERO ========== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* Video Background */
.video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    pointer-events: none;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    transition: background 0.4s ease;
}

[data-theme="dark"] .video-overlay {
    background: rgba(39, 55, 77, 0.7);
}

[data-theme="light"] .video-overlay {
    background: rgba(255, 251, 233, 0.75);
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero .navbar {
    position: relative;
    z-index: 3;
}

.hero-content {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    padding: 80px 0 120px;
}

.hero h1 {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.hero h1 br + * {
    color: var(--accent);
}

.hero-highlight {
    color: var(--accent);
}

.hero p {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 36px;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--accent);
    color: var(--text-on-primary);
    padding: 14px 32px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 15px;
    border: none;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-primary svg { flex-shrink: 0; }

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.phone-mockup {
    width: 100%;
    max-width: 340px;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.15));
    animation: float 5s ease-in-out infinite;
}

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

/* ========== SECTIONS ========== */
.section-title {
    font-size: 36px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 12px;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.section-subtitle {
    text-align: center;
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 56px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* ========== FEATURES ========== */
.features {
    padding: 100px 0;
    background: var(--surface-variant);
    transition: background 0.4s ease;
}

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

.feature-card {
    background: var(--background);
    padding: 32px 28px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-hover);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-icon {
    width: 52px;
    height: 52px;
    background: var(--accent-glow);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--accent);
}

.feature-card h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--text-primary);
    font-weight: 700;
}

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

/* ========== SCREENSHOTS ========== */
.screenshots {
    padding: 100px 0;
}

.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    margin-top: 48px;
}

.screenshot {
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.screenshot:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}

/* ========== DOWNLOAD ========== */
.download {
    padding: 100px 0;
    background: var(--surface-variant);
    transition: background 0.4s ease;
}

.download-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 60px;
}

.download h2 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.download p {
    font-size: 16px;
    margin-bottom: 32px;
    color: var(--text-secondary);
}

.qr-code {
    text-align: center;
    flex-shrink: 0;
}

.qr-code img {
    width: 160px;
    height: 160px;
    background: #fff;
    padding: 12px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

.qr-code p {
    margin-top: 12px;
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 600;
}

/* ========== REVIEWS ========== */
.reviews {
    padding: 100px 0;
}

.reviews-grid {
    max-width: 700px;
    margin: 48px auto 0;
}

.review-card {
    background: var(--card-bg);
    padding: 36px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
}

.stars {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
}

.stars svg {
    color: var(--warning);
    fill: var(--warning);
}

.review-text {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 24px;
    font-style: italic;
}

.reviewer {
    display: flex;
    align-items: center;
    gap: 14px;
}

.reviewer-avatar {
    width: 44px;
    height: 44px;
    background: var(--accent);
    color: var(--text-on-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
}

.reviewer-info strong {
    display: block;
    font-size: 15px;
    color: var(--text-primary);
}

.reviewer-info span {
    font-size: 13px;
    color: var(--text-muted);
}

/* ========== CONTACT ========== */
.contact {
    padding: 80px 0;
    text-align: center;
    background: var(--surface-variant);
    transition: background 0.4s ease;
}

.contact-text {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.email-link {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent);
    position: relative;
    display: inline-block;
}

.email-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.email-link:hover::after {
    transform: scaleX(1);
}

/* ========== FOOTER ========== */
.footer {
    background: var(--surface-variant);
    padding: 32px 0;
    border-top: 1px solid var(--border);
    transition: background 0.4s ease;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-links a {
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-links .separator {
    color: var(--text-muted);
}

/* ========== ANIMATIONS ========== */
.fade-in {
    animation: fadeIn 0.8s ease-out;
}

.fade-in-delay {
    animation: fadeIn 0.8s ease-out 0.2s both;
}

.fade-in-delay-2 {
    animation: fadeIn 0.8s ease-out 0.4s both;
}

.fade-in-right {
    animation: fadeInRight 0.8s ease-out 0.3s both;
}

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

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

/* ========== LEGAL PAGES ========== */
.legal-header {
    padding: 20px 0;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 14px;
    border: 2px solid var(--border);
    transition: all 0.3s ease;
}

.btn-back:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-glow);
}

.legal-content {
    padding: 40px 0 80px;
    min-height: 100vh;
}

.legal-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--card-bg);
    padding: 48px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    transition: background 0.4s ease;
}

.legal-title {
    font-size: 36px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
    text-align: center;
}

.legal-date {
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 40px;
}

.legal-section {
    margin-bottom: 32px;
}

.legal-section h2 {
    font-size: 22px;
    color: var(--accent);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border);
    font-weight: 700;
}

.legal-section p {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.8;
    margin-bottom: 12px;
}

.legal-section ul {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.8;
    margin: 12px 0 12px 24px;
}

.legal-section li {
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.legal-section .contact-info {
    background: var(--accent-glow);
    padding: 16px 20px;
    border-radius: var(--radius-md);
    border-left: 4px solid var(--accent);
    margin-top: 16px;
}

.legal-section .contact-info a {
    color: var(--accent);
    transition: opacity 0.3s ease;
}

.legal-section .contact-info a:hover {
    opacity: 0.8;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 16px;
    }

    .nav-links {
        width: 100%;
        justify-content: center;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
        padding: 40px 0 80px;
    }

    .hero h1 { font-size: 32px; }
    .hero p { font-size: 16px; }

    .hero-image { order: -1; }

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

    .phone-mockup { max-width: 240px; }

    .section-title { font-size: 28px; }

    .features, .screenshots, .download, .reviews { padding: 60px 0; }

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

    .download-content {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }

    .download h2 { font-size: 28px; }

    .legal-container { padding: 32px 20px; }
    .legal-title { font-size: 28px; }
}

@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .hero h1 { font-size: 26px; }
    .btn-login, .btn-download-nav { padding: 8px 16px; font-size: 13px; }
    .section-title { font-size: 24px; }
    .btn-primary { padding: 12px 24px; font-size: 14px; }
}

/* Hidden elements */
.mountains { display: none; }
#skyCanvas { display: none; }
