/* 
   ==========================================================================
   Design System & Variables
   ========================================================================== 
*/
:root {
    /* Color Palette: Core (Blues/Yellows) + Accent (Greens/Earth Tones for Grit by Design) */
    --color-bg-light: #f8fafc;
    --color-bg-dark: #0f172a;
    --color-text-main: #334155;
    --color-text-muted: #64748b;
    --color-heading: #0f172a;
    
    --color-core-blue: #0284c7;
    --color-core-blue-dark: #0369a1;
    --color-core-yellow: #f59e0b;
    
    --color-accent-green: #10b981;
    --color-accent-earth: #b45309;

    --color-surface: #ffffff;
    --color-surface-glass: rgba(255, 255, 255, 0.7);
    --color-surface-glass-dark: rgba(15, 23, 42, 0.7);

    /* Typography */
    /* Headings: Clean, strong sans-serif */
    --font-heading: 'Outfit', system-ui, -apple-system, sans-serif;
    /* Body: Highly readable serif */
    --font-body: 'Merriweather', Georgia, serif;

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

    /* Borders & Shadows */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 40px rgba(16, 185, 129, 0.3);
}

/* Dark Mode Configuration (Auto-responsive or toggled) */
@media (prefers-color-scheme: dark) {
    :root {
        --color-bg-light: #0f172a;
        --color-bg-dark: #020617;
        --color-text-main: #cbd5e1;
        --color-text-muted: #94a3b8;
        --color-heading: #f8fafc;
        --color-surface: #1e293b;
        --color-surface-glass: rgba(30, 41, 59, 0.7);
    }
}

/* 
   ==========================================================================
   Resets & Base Styles
   ========================================================================== 
*/
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--color-text-main);
    background-color: var(--color-bg-light);
    line-height: 1.7;
    font-size: 1.125rem;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-heading);
    line-height: 1.2;
    margin-bottom: var(--space-sm);
    font-weight: 800;
}

h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }

p {
    margin-bottom: var(--space-sm);
}

a {
    color: var(--color-core-blue);
    text-decoration: none;
    transition: all 0.3s ease;
}

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

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

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

/* 
   ==========================================================================
   Components
   ========================================================================== 
*/

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    font-family: var(--font-heading);
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    font-size: 1rem;
}

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

.btn-primary {
    background-color: var(--color-core-blue);
    color: white;
}

.btn-primary:hover {
    background-color: var(--color-core-blue-dark);
    color: white;
}

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

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--color-core-blue);
    margin-top: var(--space-sm);
}

.link-arrow svg {
    transition: transform 0.3s ease;
}

.link-arrow:hover svg {
    transform: translateX(5px);
}

/* Badge */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: var(--color-accent-green);
    color: white;
    font-family: var(--font-heading);
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 999px;
    margin-bottom: var(--space-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Glass Panel */
.glass-panel {
    background: var(--color-surface-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-panel:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 30px -5px rgba(0, 0, 0, 0.15), 0 0 20px rgba(16, 185, 129, 0.2);
}

/* 
   ==========================================================================
   Layout & Sections
   ========================================================================== 
*/

/* Header */
.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: var(--color-surface-glass);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.site-banner {
    background-color: #fdfbf7; /* Warm ivory */
    color: var(--color-text-main);
    text-align: center;
    padding: 0.5rem 1rem;
    font-family: var(--font-heading);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    margin-top: -1rem;
    margin-bottom: 1rem;
    width: 100%;
}

.site-banner .gold-accent {
    color: #d97706; /* Gold/Amber */
    font-weight: 800;
}

.site-banner .leaf-ornament {
    color: var(--color-accent-green);
    margin: 0 0.5rem;
}

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

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-heading);
    letter-spacing: -0.02em;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-list a {
    color: var(--color-text-main);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    position: relative;
}

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

.nav-list a:hover::after,
.nav-list a.active::after {
    width: 100%;
}

/* Dropdown Menu Styles */
.dropdown {
    position: relative;
}

.dropdown > a {
    padding-right: 1.2rem;
}

.dropdown > a::before {
    content: '▾';
    position: absolute;
    right: 0;
    top: 45%;
    transform: translateY(-50%);
    font-size: 0.9rem;
    pointer-events: none;
    color: var(--color-core-green);
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--color-bg-ivory);
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    z-index: 1000;
    border-radius: var(--radius-sm);
    padding: 0.5rem 0;
    margin-top: 0; /* Remove gap so hover isn't lost */
    list-style: none;
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
    display: block;
    animation: fadeIn 0.3s ease;
}

.dropdown-menu li {
    width: 100%;
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--color-text-main);
    font-weight: 500;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.dropdown-menu a::after {
    display: none;
}

.dropdown-menu a:hover,
.dropdown-menu a:focus {
    background-color: rgba(62, 90, 68, 0.05);
    color: var(--color-core-green);
}

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


.mobile-nav-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--color-heading);
    position: relative;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: var(--color-heading);
    left: 0;
}

.hamburger::before { top: -6px; }
.hamburger::after { bottom: -6px; }

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px; /* Offset for header */
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(16,185,129,0.1) 0%, rgba(255,255,255,0) 70%);
    z-index: -1;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    align-items: center;
}

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

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-md);
    max-width: 500px;
}

.hero-ctas {
    display: flex;
    gap: 1rem;
}

.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
}

.book-mockup {
    position: relative;
    z-index: 2;
    perspective: 1000px;
    animation: float 6s ease-in-out infinite;
}

.placeholder-cover {
    width: 320px;
    height: 480px;
    background: linear-gradient(135deg, var(--color-accent-green) 0%, var(--color-core-blue-dark) 100%);
    border-radius: 4px 12px 12px 4px;
    box-shadow: -10px 0 20px rgba(0,0,0,0.2), inset 4px 0 10px rgba(255,255,255,0.2);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
    padding: 2rem;
    transform: rotateY(-15deg);
    transform-style: preserve-3d;
}

.placeholder-cover h3 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.glow-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: var(--color-accent-green);
    filter: blur(100px);
    opacity: 0.2;
    z-index: 1;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.hero-visual:hover .glow-effect {
    opacity: 0.4;
    transform: translate(-50%, -50%) scale(1.1);
}

@keyframes float {
    0% { transform: translateY(0px) rotateY(-15deg); }
    50% { transform: translateY(-20px) rotateY(-10deg); }
    100% { transform: translateY(0px) rotateY(-15deg); }
}

/* Featured In Section */
.featured-in {
    padding: var(--space-md) 0;
    text-align: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.featured-text {
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 2px;
    color: var(--color-text-muted);
    margin-bottom: var(--space-md);
    font-weight: 600;
}

.logo-grid {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    align-items: center;
    opacity: 0.7;
}

.logo-item {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--color-text-muted);
    filter: grayscale(100%);
    transition: all 0.3s ease;
    cursor: default;
}

.logo-item:hover {
    filter: grayscale(0%);
    color: var(--color-core-blue);
    transform: scale(1.05);
}

/* Benefits Section */
.benefits {
    background-color: var(--color-bg-light);
}

.section-header.text-center {
    text-align: center;
    max-width: 600px;
    margin: 0 auto var(--space-lg);
}

.section-header h2 {
    margin-bottom: var(--space-sm);
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-md);
}

.benefit-card {
    padding: var(--space-md);
    text-align: left;
}

.benefit-card .icon-wrapper {
    width: 60px;
    height: 60px;
    background: rgba(16, 185, 129, 0.1);
    color: var(--color-accent-green);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-md);
}

.benefit-card h3 {
    margin-bottom: var(--space-sm);
    font-size: 1.25rem;
}

/* Testimonials Section */
.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-md);
}

.testimonial-card {
    background: var(--color-surface-glass);
    padding: var(--space-md);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.testimonial-card .stars {
    color: #f59e0b; /* Amber */
    font-size: 1.25rem;
    margin-bottom: var(--space-sm);
}

.testimonial-card .quote {
    font-style: italic;
    margin-bottom: var(--space-md);
}

.testimonial-card .author {
    font-weight: 600;
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

/* Author Preview */
.preview-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    align-items: center;
}

.image-wrapper {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.image-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.4) 0%, transparent 100%);
}

.author-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 4/5;
    transition: transform 0.5s ease;
}

.image-wrapper:hover .author-photo {
    transform: scale(1.05);
}

/* Newsletter */
.dark-section {
    background-color: var(--color-bg-dark);
    color: var(--color-text-main);
    position: relative;
    overflow: hidden;
}

.dark-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+CjxjaXJjbGUgY3g9IjIiIGN5PSIyIiByPSIyIiBmaWxsPSJyZ2JhKDI1NSwyNTUsMjU1LDAuMDUpIi8+Cjwvc3ZnPg==') repeat;
    opacity: 0.5;
}

.newsletter-card {
    padding: var(--space-lg);
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    background: var(--color-surface-glass-dark);
}

.newsletter-card h2 {
    color: white;
}

.newsletter-form {
    display: flex;
    gap: 1rem;
    margin-top: var(--space-md);
    margin-bottom: var(--space-sm);
}

.newsletter-form input {
    flex: 1;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.1);
    color: white;
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.newsletter-form input::placeholder {
    color: rgba(255,255,255,0.5);
}

.newsletter-form input:focus {
    border-color: var(--color-accent-green);
}

.privacy-note {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.6);
}

/* Footer */
.site-footer {
    background-color: var(--color-bg-light);
    padding: var(--space-lg) 0 var(--space-md);
    border-top: 1px solid rgba(0,0,0,0.05);
}

.footer-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-lg);
    margin-bottom: var(--space-md);
}

.footer-links {
    display: flex;
    gap: 4rem;
    flex-wrap: wrap;
}

.footer-brand p {
    color: var(--color-text-muted);
    margin-top: var(--space-sm);
    max-width: 300px;
}

.link-group h4 {
    font-size: 1.125rem;
    margin-bottom: var(--space-sm);
}

.link-group ul {
    list-style: none;
}

.link-group a {
    color: var(--color-text-muted);
    font-size: 1rem;
    display: inline-block;
    padding: 0.25rem 0;
}

.link-group a:hover {
    color: var(--color-core-blue);
}

.copyright {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: var(--color-text-muted);
    font-size: 0.875rem;
    padding-top: var(--space-md);
    border-top: 1px solid rgba(0,0,0,0.05);
}

.footer-policies {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}

.footer-policies a {
    color: var(--color-text-muted);
    font-size: 0.875rem;
    position: relative;
}

.footer-policies a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--color-core-blue);
    transition: width 0.3s ease;
}

.footer-policies a:hover {
    color: var(--color-core-blue);
}

.footer-policies a:hover::after {
    width: 100%;
}

@media (min-width: 768px) {
    .copyright {
        flex-direction: row;
        justify-content: space-between;
    }
}

/* 
   ==========================================================================
   Responsive Design
   ========================================================================== 
*/
@media (max-width: 768px) {
    .mobile-nav-toggle {
        display: block;
    }

    .primary-navigation {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--color-surface);
        padding: var(--space-md);
        box-shadow: var(--shadow-md);
        display: none; /* hidden by default on mobile, toggled via JS */
    }

    .primary-navigation.is-open {
        display: block;
    }

    .nav-list {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        background-color: rgba(62, 90, 68, 0.03);
        margin-top: 0.5rem;
        padding: 0.5rem 0;
        display: block; /* Always visible on mobile to prevent touch issues */
    }

    .dropdown-menu a {
        padding: 0.5rem;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-subtitle {
        margin: 0 auto var(--space-md);
    }

    .hero-ctas {
        justify-content: center;
        flex-direction: column;
    }

    .preview-container {
        grid-template-columns: 1fr;
    }

    .preview-text {
        text-align: center;
    }

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

    .footer-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
        gap: 2rem;
    }
}
