/* =============================================================================
   BOOK LANDING PAGE - Clean Professional Theme
   Matches budget.saltnfork.com styling
   ============================================================================= */

/* =============================================================================
   COLOR PALETTE
   ============================================================================= */
:root {
    /* Light backgrounds */
    --bg-primary: #f8fafc;
    --bg-secondary: #f1f5f9;
    --bg-card: #ffffff;
    --bg-hover: #e2e8f0;

    /* Ocean blue-green brand colors */
    --primary-color: #0891b2;
    --primary-hover: #0e7490;
    --primary-light: #cffafe;

    /* Accent colors */
    --accent-green: #10b981;
    --accent-amber: #f59e0b;
    --accent-red: #ef4444;

    /* Text colors */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;

    /* Borders */
    --border-color: #e2e8f0;
    --border-hover: #cbd5e1;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.10);

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

    /* Border radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
}

/* =============================================================================
   GLOBAL STYLES
   ============================================================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
    background: linear-gradient(180deg, #f8fafc 0%, #e0f2fe 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* =============================================================================
   CONTAINER
   ============================================================================= */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* =============================================================================
   HEADER / NAVBAR
   ============================================================================= */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    padding: var(--spacing-sm) 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.navbar-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-logo {
    height: 32px;
    width: auto;
}

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

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

.navbar-links a:hover {
    color: var(--primary-color);
}

/* =============================================================================
   THEME TOGGLE BUTTON
   ============================================================================= */
.theme-toggle {
    background: none;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    transition: all 0.3s ease;
    color: var(--text-secondary);
}

.theme-toggle:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: var(--bg-hover);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
}

/* Sun icon (shown in dark mode) */
.theme-toggle .sun-icon {
    display: none;
}

/* Moon icon (shown in light mode) */
.theme-toggle .moon-icon {
    display: block;
}

[data-theme="dark"] .theme-toggle .sun-icon {
    display: block;
}

[data-theme="dark"] .theme-toggle .moon-icon {
    display: none;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .theme-toggle .sun-icon {
        display: block;
    }

    :root:not([data-theme="light"]) .theme-toggle .moon-icon {
        display: none;
    }
}

/* =============================================================================
   HERO SECTION
   ============================================================================= */
.hero {
    padding: var(--spacing-xl) 0;
}

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

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

.hero-image img {
    max-width: 100%;
    height: auto;
    max-height: 500px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

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

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

.hero-text .author {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-lg);
}

.hero-text .tagline {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
    line-height: 1.7;
}

/* =============================================================================
   BUTTONS
   ============================================================================= */
.btn {
    padding: 0.875rem 1.75rem;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-md);
}

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

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

.btn-secondary:hover {
    background: var(--primary-light);
}

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

/* Gumroad button styling */
.gumroad-button {
    background: var(--primary-color) !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 600 !important;
    padding: 1rem 2.5rem !important;
    border-radius: var(--radius-sm) !important;
}

/* =============================================================================
   CARDS
   ============================================================================= */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-md);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--border-hover);
}

/* =============================================================================
   SECTIONS
   ============================================================================= */
section {
    padding: var(--spacing-lg) 0;
}

section h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    text-align: center;
}

section h2 .icon {
    margin-right: var(--spacing-xs);
}

/* =============================================================================
   WHO THIS IS FOR
   ============================================================================= */
.audience-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
}

.audience-card {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    text-align: center;
}

.audience-card .icon {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
}

.audience-card h3 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-xs);
}

.audience-card p {
    color: var(--text-secondary);
}

/* =============================================================================
   3-BUCKET SYSTEM
   ============================================================================= */
.bucket-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.bucket-card {
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    text-align: center;
    border-left: 5px solid;
}

.bucket-card.bucket-1 {
    background: #cffafe;
    border-color: var(--primary-color);
}

.bucket-card.bucket-2 {
    background: #fef3c7;
    border-color: var(--accent-amber);
}

.bucket-card.bucket-3 {
    background: #d1fae5;
    border-color: var(--accent-green);
}

.bucket-card .icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-sm);
}

.bucket-card h3 {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-xs);
}

.bucket-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* =============================================================================
   TABLE OF CONTENTS
   ============================================================================= */
.toc-list {
    max-width: 700px;
    margin: 0 auto;
}

.toc-item {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    margin-bottom: var(--spacing-sm);
}

.toc-item .chapter-num {
    background: var(--primary-color);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.toc-item h4 {
    color: var(--text-primary);
    margin-bottom: 4px;
}

.toc-item p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

/* =============================================================================
   ABOUT AUTHOR
   ============================================================================= */
.author-section {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.author-section blockquote {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-style: italic;
    line-height: 1.8;
    margin-bottom: var(--spacing-md);
}

.author-section .author-name {
    font-weight: 600;
    color: var(--text-primary);
}

/* =============================================================================
   PRICING CTA
   ============================================================================= */
.pricing-section {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    text-align: center;
    color: var(--text-primary);
}

.pricing-section h2 {
    color: var(--text-primary);
}

.price-tag {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: var(--spacing-xs);
}

.price-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
}

.price-features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
}

.price-features span {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}

.btn-cta {
    background: var(--primary-color);
    color: white;
    font-size: 1.1rem;
    padding: 1rem 2.5rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

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

/* =============================================================================
   APP SECTION
   ============================================================================= */
.app-section {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    text-align: center;
}

.app-section h3 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
}

.app-section p {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto var(--spacing-md);
}

/* =============================================================================
   FOOTER
   ============================================================================= */
.footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: var(--spacing-lg) 0;
    margin-top: var(--spacing-xl);
    text-align: center;
    color: var(--text-secondary);
}

.footer a {
    color: var(--primary-color);
    text-decoration: none;
    margin: 0 var(--spacing-sm);
}

.footer a:hover {
    text-decoration: underline;
}

/* =============================================================================
   RESPONSIVE DESIGN
   ============================================================================= */
@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-image {
        order: -1;
    }

    .hero-image img {
        max-height: 350px;
    }

    .hero-text h1 {
        font-size: 2rem;
    }

    section h2 {
        font-size: 1.5rem;
    }

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

    .btn-large {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 1.75rem;
    }

    .price-tag {
        font-size: 2.5rem;
    }

    .price-features {
        flex-direction: column;
    }

    .navbar-brand {
        font-size: 1rem;
    }
}

/* =============================================================================
   DARK MODE
   ============================================================================= */

/* Dark mode color variables - for manual toggle */
[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #1e293b;
    --bg-hover: #334155;

    --primary-color: #22d3ee;
    --primary-hover: #06b6d4;
    --primary-light: #164e63;

    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --border-color: #334155;
    --border-hover: #475569;

    color-scheme: dark;
}

/* Apply dark mode based on system preference (when no manual preference set) */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg-primary: #0f172a;
        --bg-secondary: #1e293b;
        --bg-card: #1e293b;
        --bg-hover: #334155;

        --primary-color: #22d3ee;
        --primary-hover: #06b6d4;
        --primary-light: #164e63;

        --text-primary: #e2e8f0;
        --text-secondary: #94a3b8;
        --text-muted: #64748b;

        --border-color: #334155;
        --border-hover: #475569;

        color-scheme: dark;
    }
}

/* Dark mode body background */
[data-theme="dark"] body {
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) body {
        background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    }
}

/* Dark mode navbar */
[data-theme="dark"] .navbar {
    background: rgba(15, 23, 42, 0.95);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .navbar {
        background: rgba(15, 23, 42, 0.95);
    }
}

/* Dark mode bucket cards */
[data-theme="dark"] .bucket-card.bucket-1 {
    background: #164e63;
}

[data-theme="dark"] .bucket-card.bucket-2 {
    background: #78350f;
}

[data-theme="dark"] .bucket-card.bucket-3 {
    background: #14532d;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .bucket-card.bucket-1 {
        background: #164e63;
    }

    :root:not([data-theme="light"]) .bucket-card.bucket-2 {
        background: #78350f;
    }

    :root:not([data-theme="light"]) .bucket-card.bucket-3 {
        background: #14532d;
    }
}

/* Dark mode author section */
[data-theme="dark"] .author-section {
    background: #1e293b;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .author-section {
        background: #1e293b;
    }
}
