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

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

:root {
    /* Sophisticated Sage Theme Colors */
    --sage: #346751;
    --cream: #ECDBBA;
    --terracotta: #C84B31;
    --teal: #2C5F5F;
    --gold: #D4A574;

    /* Semantic Colors */
    --primary: #346751;
    --secondary: #C84B31;
    --accent: #D4A574;
    --background: #0A0A0A;
    --surface: #1A1A1A;
    --surface-light: #2A2A2A;
    --text-primary: #ECDBBA;
    --text-secondary: #A8A8A8;
    --border: rgba(236, 219, 186, 0.1);

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

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

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

html {
    scroll-behavior: smooth;
}

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

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

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-md) var(--spacing-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.logo-icon {
    width: 32px;
    height: 32px;
    color: var(--primary);
}

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

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

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
    position: relative;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width var(--transition-base);
}

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

.nav-link-cta {
    color: var(--primary);
    font-weight: 600;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.hamburger span {
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s ease;
    border-radius: 2px;
}

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

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

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

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

.hero {
    position: relative;
    padding: calc(80px + var(--spacing-3xl)) var(--spacing-lg) var(--spacing-3xl);
    overflow: hidden;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-3xl);
    align-items: center;
}

.hero-badge {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-md);
    background: rgba(52, 103, 81, 0.2);
    border: 1px solid rgba(52, 103, 81, 0.3);
    border-radius: 100px;
    color: var(--primary);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: var(--spacing-md);
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.hero-buttons {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-2xl);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-md);
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-base);
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-icon {
    width: 20px;
    height: 20px;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 20px rgba(52, 103, 81, 0.3);
}

.btn-primary:hover {
    background: #2a5442;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(52, 103, 81, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    background: var(--surface);
    border-color: var(--primary);
}

.hero-stats {
    display: flex;
    gap: var(--spacing-xl);
    padding-top: var(--spacing-xl);
    border-top: 1px solid var(--border);
}

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

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: var(--spacing-xs);
}

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

.stat-divider {
    width: 1px;
    background: var(--border);
}

.hero-gradient {
    position: absolute;
    top: 0;
    left: 50%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(52, 103, 81, 0.15) 0%, transparent 70%);
    pointer-events: none;
    transform: translateX(-50%);
}

/* Phone Mockup */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.phone-mockup {
    position: relative;
    filter: drop-shadow(0 20px 60px rgba(0, 0, 0, 0.5));
}

.phone-frame {
    width: 320px;
    height: 650px;
    background: #1C1C1E;
    border-radius: 40px;
    padding: 12px;
    position: relative;
}

.phone-notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 30px;
    background: #1C1C1E;
    border-radius: 0 0 20px 20px;
    z-index: 10;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: #000000;
    border-radius: 32px;
    overflow: hidden;
    position: relative;
}

.mock-app {
    padding: var(--spacing-lg);
    padding-top: 50px;
}

.mock-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
}

.mock-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--cream);
}

.mock-badge {
    padding: 6px 12px;
    background: rgba(52, 103, 81, 0.3);
    border-radius: 100px;
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 600;
}

.mock-card {
    background: rgba(26, 26, 26, 0.8);
    border: 1px solid rgba(236, 219, 186, 0.1);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.mock-card-header {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.mock-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--gold));
    border-radius: 50%;
}

.mock-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mock-name {
    width: 100px;
    height: 12px;
    background: rgba(236, 219, 186, 0.3);
    border-radius: 4px;
}

.mock-book {
    width: 120px;
    max-width: 100%;
    height: 10px;
    background: rgba(236, 219, 186, 0.2);
    border-radius: 4px;
}

.mock-progress {
    width: 100%;
    height: 6px;
    background: rgba(236, 219, 186, 0.1);
    border-radius: 100px;
    overflow: hidden;
}

.mock-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--gold));
    border-radius: 100px;
    width: 65%;
    animation: progress-grow 2s ease-out forwards;
}

.mock-progress-bar.short {
    width: 35%;
}

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

.features {
    padding: var(--spacing-3xl) var(--spacing-lg);
    background: var(--surface);
}

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

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-3xl);
}

.section-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.7;
}

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

.feature-card {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--gold));
    transform: scaleX(0);
    transition: transform var(--transition-base);
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(52, 103, 81, 0.3);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

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

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-md);
}

.feature-icon.sage {
    background: rgba(52, 103, 81, 0.2);
    color: var(--primary);
}

.feature-icon.terracotta {
    background: rgba(200, 75, 49, 0.2);
    color: var(--terracotta);
}

.feature-icon.gold {
    background: rgba(212, 165, 116, 0.2);
    color: var(--gold);
}

.feature-icon.teal {
    background: rgba(44, 95, 95, 0.2);
    color: var(--teal);
}

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

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

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

.feature-badge {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(200, 75, 49, 0.2);
    border-radius: 100px;
    color: var(--terracotta);
    font-size: 0.75rem;
    font-weight: 600;
}

.feature-badge.sage {
    background: rgba(52, 103, 81, 0.2);
    color: var(--primary);
}

/* ========================================
   Themes Section
   ======================================== */

.themes {
    padding: var(--spacing-3xl) var(--spacing-lg);
    background: var(--background);
}

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

.themes-showcase {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.theme-card {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    cursor: pointer;
    transition: all var(--transition-base);
}

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

.theme-card.active {
    border-color: var(--primary);
    background: rgba(52, 103, 81, 0.1);
}

.theme-preview {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: var(--spacing-md);
}

.theme-color {
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.theme-name {
    text-align: center;
    font-weight: 600;
    color: var(--text-primary);
}

.themes-note {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1rem;
}

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

.download {
    padding: var(--spacing-3xl) var(--spacing-lg);
    background: linear-gradient(135deg, rgba(52, 103, 81, 0.1) 0%, rgba(44, 95, 95, 0.1) 100%);
    position: relative;
    overflow: hidden;
}

.download::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(52, 103, 81, 0.2) 0%, transparent 70%);
    pointer-events: none;
}

.download-container {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-3xl);
    align-items: center;
    position: relative;
    z-index: 1;
}

.download-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
    line-height: 1.2;
}

.download-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xl);
    line-height: 1.7;
}

.btn-download {
    background: var(--primary);
    color: white;
    box-shadow: 0 8px 30px rgba(52, 103, 81, 0.4);
    margin-bottom: var(--spacing-md);
}

.btn-download:hover {
    background: #2a5442;
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(52, 103, 81, 0.5);
}

.download-requirements {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.download-features {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.feature-check {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    background: rgba(26, 26, 26, 0.5);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.check-icon {
    width: 20px;
    height: 20px;
    color: var(--primary);
    flex-shrink: 0;
}

.feature-check span {
    color: var(--text-primary);
    font-weight: 500;
}

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

.footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: var(--spacing-2xl) var(--spacing-lg) var(--spacing-lg);
}

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

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--spacing-xl);
}

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

.footer-tagline {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.footer-note {
    text-align: right;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.footer-note p {
    margin-bottom: var(--spacing-xs);
}

.footer-bottom {
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* ========================================
   Animations
   ======================================== */

@keyframes fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes slide-in-card {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes progress-grow {
    from {
        width: 0;
    }
}

.fade-in {
    animation: fade-in 0.6s ease-out forwards;
}

.fade-in-up {
    animation: fade-in-up 0.8s ease-out forwards;
    opacity: 0;
}

.fade-in-up.delay-1 {
    animation-delay: 0.2s;
}

.fade-in-up.delay-2 {
    animation-delay: 0.4s;
}

.fade-in-up.delay-3 {
    animation-delay: 0.6s;
}

.slide-in-card {
    animation: slide-in-card 0.6s ease-out forwards;
    opacity: 0;
}

.slide-in-card.delay-1 {
    animation-delay: 0.3s;
}

.slide-in-card.delay-2 {
    animation-delay: 0.5s;
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* Scroll-triggered animations */
.scroll-fade {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.scroll-fade.visible {
    opacity: 1;
    transform: translateY(0);
}

.scroll-fade.delay-1 {
    transition-delay: 0.2s;
}

.scroll-fade.delay-2 {
    transition-delay: 0.4s;
}

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

@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: var(--spacing-2xl);
    }

    .hero-visual {
        order: -1;
    }

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

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

    .download-container {
        grid-template-columns: 1fr;
        gap: var(--spacing-2xl);
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: var(--spacing-md);
    }

    .hamburger {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        max-width: 300px;
        height: 100vh;
        background: rgba(10, 10, 10, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 80px var(--spacing-lg) var(--spacing-lg);
        gap: var(--spacing-lg);
        transition: right 0.3s ease;
        border-left: 1px solid var(--border);
        z-index: 1000;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-link {
        font-size: 1.25rem;
        padding: var(--spacing-sm) 0;
    }

    .nav-link::after {
        display: none;
    }

    .logo-text {
        font-size: 1.25rem;
    }

    .hero {
        padding: calc(80px + var(--spacing-2xl)) var(--spacing-md) var(--spacing-2xl);
    }

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

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

    .hero-buttons {
        flex-direction: column;
    }

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

    .hero-stats {
        flex-direction: column;
        gap: var(--spacing-md);
    }

    .stat-divider {
        display: none;
    }

    .phone-frame {
        width: 280px;
        height: 570px;
    }

    .features,
    .themes,
    .download {
        padding: var(--spacing-2xl) var(--spacing-md);
    }

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

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

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

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

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

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

    .phone-frame {
        width: 240px;
        height: 490px;
    }

    .mock-card {
        padding: 10px;
    }

    .mock-name {
        width: 80px;
    }

    .mock-book {
        width: 100px;
    }

    .themes-showcase {
        grid-template-columns: 1fr;
    }
}
