/* ========================================
   Reset & Base Styles
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors - Nova Astral Light Theme */
    --background: #FFFFFF;
    --text: #0F0F0F;
    --text-secondary: #5C5C5C;
    --primary: #0F0F0F;
    --secondary: #5C5C5C;
    --card-bg: #F5F5F5;
    --card-border: #E0E0E0;
    --surface: #FAFAFA;

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

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html {
    scroll-behavior: smooth;
}

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

#background-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* ========================================
   Container & Layout
   ======================================== */

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

section {
    padding: var(--spacing-xl) 0;
}

/* ========================================
   Navigation
   ======================================== */

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md) 0;
}

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

.logo-image {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    object-fit: contain;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.logo span {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.5px;
}

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

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--text);
}

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

.nav-links .cta-button:hover {
    background: var(--text-secondary);
    transform: translateY(-2px);
}

/* ========================================
   Hero Section
   ======================================== */

.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    display: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 600px;
    margin-top: var(--spacing-lg);
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: var(--spacing-md);
    color: var(--text);
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
    line-height: 1.8;
}

.hero-cta {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.primary-button,
.secondary-button {
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

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

.primary-button:hover {
    background: var(--text-secondary);
    transform: translateY(-3px);
}

.secondary-button {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.secondary-button:hover {
    border-color: var(--text);
    transform: translateY(-3px);
}

.hero-image {
    position: absolute;
    right: -10%;
    top: 20%;
    z-index: 0;
    opacity: 0.6;
}

.app-mockup {
    width: 400px;
    height: 600px;
    background: var(--card-bg);
    border-radius: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    border: 1px solid var(--card-border);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

/* ========================================
   Features Section
   ======================================== */

.features {
    background: transparent;
}

.section-title {
    font-size: 3rem;
    text-align: center;
    margin-bottom: var(--spacing-lg);
    color: var(--text);
    letter-spacing: -1px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.feature-card {
    background: var(--card-bg);
    padding: var(--spacing-lg);
    border-radius: 20px;
    border: 1px solid var(--card-border);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: var(--text);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.feature-icon svg {
    width: 48px;
    height: 48px;
    stroke-width: 1.5;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
}

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

/* ========================================
   Technology Section
   ======================================== */

.technology {
    background: var(--surface);
    text-align: center;
}

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

.tech-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: var(--spacing-md);
}

.tech-description strong {
    color: var(--text);
    font-weight: 600;
}

/* ========================================
   Download Section
   ======================================== */

.download {
    text-align: center;
}

.download-subtitle {
    color: var(--text-secondary);
    font-size: 1.25rem;
    margin-bottom: var(--spacing-lg);
}

.download-buttons {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    flex-wrap: wrap;
    margin-bottom: var(--spacing-lg);
}

.store-button {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    background: var(--card-bg);
    padding: 1rem 2rem;
    border-radius: 15px;
    text-decoration: none;
    color: var(--text);
    border: 1px solid var(--card-border);
    transition: all 0.3s ease;
}

.store-button:hover {
    background: var(--surface);
    border-color: var(--text);
    transform: translateY(-5px);
}

.store-icon {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.store-icon svg {
    width: 24px;
    height: 24px;
}

.store-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.store-text span {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.store-text strong {
    font-size: 1.25rem;
}

.email-signup {
    margin-top: var(--spacing-xl);
    background: var(--card-bg);
    padding: var(--spacing-lg);
    border-radius: 20px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.email-signup p {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-md);
    color: var(--text-secondary);
}

.signup-form {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.signup-form input {
    flex: 1;
    min-width: 250px;
    padding: 1rem 1.5rem;
    border-radius: 50px;
    border: 1px solid var(--card-border);
    background: var(--surface);
    color: var(--text);
    font-size: 1rem;
    font-family: var(--font-family);
    transition: border-color 0.3s ease;
}

.signup-form input:focus {
    outline: none;
    border-color: var(--text);
}

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

.signup-form button:hover {
    background: var(--text-secondary);
    transform: translateY(-3px);
}

/* ========================================
   Footer
   ======================================== */

.footer {
    background: var(--background);
    border-top: 1px solid var(--card-border);
    padding: var(--spacing-lg) 0 var(--spacing-md);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.footer-logo {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.footer-brand h3 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
    color: var(--text);
}

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

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

.footer-column h4 {
    margin-bottom: var(--spacing-sm);
    color: var(--text);
}

.footer-column a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: var(--spacing-xs);
    transition: color 0.3s ease;
}

.footer-column a:hover {
    color: var(--text);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--card-border);
    color: var(--text-secondary);
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 768px) {
    .hero {
        min-height: auto;
        padding-top: var(--spacing-xl);
        padding-bottom: var(--spacing-xl);
        align-items: flex-start;
    }

    .hero-content {
        margin-top: 0;
    }

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

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

    .nav-links {
        gap: var(--spacing-sm);
    }

    .nav-links a:not(.cta-button) {
        display: none;
    }

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

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

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

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

    .hero-image {
        display: none;
    }

    .download-buttons {
        flex-direction: column;
        align-items: center;
    }

    .signup-form {
        flex-direction: column;
    }

    .signup-form input {
        min-width: 100%;
    }
}

/* ========================================
   Legal Pages
   ======================================== */

body.legal-page {
    background: var(--background);
    color: var(--text);
}

.legal-hero {
    padding: var(--spacing-xl) 0 var(--spacing-lg);
    position: relative;
}

.legal-hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.legal-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--text-secondary);
    font-weight: 600;
    letter-spacing: 0.01em;
    margin-bottom: var(--spacing-sm);
}

.legal-title {
    font-size: clamp(2.4rem, 4vw, 3.2rem);
    margin-bottom: var(--spacing-sm);
    color: var(--text);
}

.legal-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 640px;
    margin-bottom: var(--spacing-sm);
}

.legal-meta {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.legal-section {
    padding-bottom: var(--spacing-xl);
}

.legal-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: var(--spacing-lg);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
    max-width: 800px;
    margin: 0 auto;
}

.legal-card h2 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
    color: var(--text);
}

.legal-card h3 {
    font-size: 1.1rem;
    margin-top: var(--spacing-md);
    margin-bottom: var(--spacing-xs);
    color: var(--text);
}

.legal-card p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
}

.legal-card ul,
.legal-card ol {
    margin: var(--spacing-xs) 0 var(--spacing-sm) 1.2rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.legal-card li+li {
    margin-top: 0.35rem;
}

.legal-back {
    margin-top: var(--spacing-lg);
}

.legal-back a {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
}

.legal-back a:hover {
    text-decoration: underline;
}

/* ========================================
   Auth Pages
   ======================================== */

.auth-container {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md);
}

.auth-card {
    background: var(--card-bg);
    padding: var(--spacing-lg);
    border-radius: 24px;
    border: 1px solid var(--card-border);
    width: 100%;
    max-width: 480px;
    text-align: center;
}

.auth-title {
    font-size: 2rem;
    margin-bottom: var(--spacing-sm);
    color: var(--text);
}

.auth-description {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    line-height: 1.6;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.form-group {
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: var(--spacing-xs);
    color: var(--text);
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    background: var(--surface);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--text);
    background: var(--background);
}

.full-width {
    width: 100%;
    border: none;
    cursor: pointer;
}

.auth-footer {
    border-top: 1px solid var(--card-border);
    padding-top: var(--spacing-md);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: var(--text);
}

.back-link svg {
    width: 16px;
    height: 16px;
}

.auth-message {
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: var(--spacing-md);
    font-size: 0.95rem;
    text-align: left;
    font-weight: 500;
}

.auth-message.error {
    background: rgba(255, 59, 48, 0.1);
    color: #D32F2F;
    border: 1px solid rgba(255, 59, 48, 0.3);
}

.auth-message.success {
    background: rgba(52, 199, 89, 0.1);
    color: #34C759;
    border: 1px solid rgba(52, 199, 89, 0.2);
}

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