/* LeafLit Design System & Styles */
:root {
    /* Colors */
    --color-bg-primary: #FDFBF7;
    --color-bg-secondary: #F5F0E8;
    --color-text-primary: #2C3E2D;
    --color-text-secondary: #7A8B7C;
    --color-accent-green: #4C7050;
    --color-accent-dark: #3D5A40;
    --color-accent-light: #7A9A7C;
    --color-accent-magic: linear-gradient(135deg, #4C7050 0%, #3D5A5B 100%);
    --color-border: #E5E0D8;
    --color-white: #FFFFFF;
    --color-error: #9A5A4A;
    --color-error-bg: rgba(193, 123, 107, 0.1);

    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing */
    --container-width: 1200px;
    --header-height: 80px;
    --section-spacing: 120px;

    /* Shadows */
    --shadow-sm: 0 4px 12px rgba(76, 112, 80, 0.1);
    --shadow-md: 0 8px 32px rgba(76, 112, 80, 0.15);
    --shadow-lg: 0 24px 80px rgba(44, 62, 45, 0.2);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

ul {
    list-style: none;
}

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

/* Utilities */
.container {
    width: 90%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

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

.hidden {
    display: none !important;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 32px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-family: var(--font-body);
}

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

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

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

.btn-secondary:hover {
    border-color: var(--color-accent-green);
    color: var(--color-accent-green);
}

.btn-text {
    color: var(--color-text-secondary);
    font-weight: 500;
    padding: 0;
}

.btn-text:hover {
    color: var(--color-accent-green);
}

/* Magic / AI Styles */
.magic-text {
    background: var(--color-accent-magic);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* Increased specificity to override .feature-card defaults */
.feature-card.ai-card {
    border: 1px solid rgba(76, 112, 80, 0.3);
    box-shadow: 0 4px 20px rgba(76, 112, 80, 0.08);
    position: relative;
    overflow: hidden;
}

/* Removed ::after pseudo-element to prevent padding perception issues */

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.05);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 0.8;
    }
}


/* Header */
header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(253, 251, 247, 0.9);
    backdrop-filter: blur(10px);
    z-index: 100;
    border-bottom: 1px solid rgba(229, 224, 216, 0.5);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 24px;
    color: var(--color-text-primary);
}

.logo img {
    height: 32px;
    width: auto;
}

.logo span.leaf {
    color: var(--color-accent-light);
}

.logo span.lit {
    color: var(--color-text-primary);
}

/* Hero Section */
.hero {
    padding-top: calc(var(--header-height) + 60px);
    padding-bottom: 80px;
    overflow: hidden;
}

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

.hero-text h1 {
    font-size: 56px;
    /* Punchy */
    margin-bottom: 24px;
    letter-spacing: -1px;
}

.hero-text .subhead {
    font-size: 20px;
    color: var(--color-text-secondary);
    margin-bottom: 40px;
    max-width: 500px;
}

.hero-ctas {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
    align-items: center;
}

.microproof {
    display: flex;
    gap: 16px;
    color: var(--color-text-secondary);
    font-size: 13px;
    font-weight: 500;
    opacity: 0.8;
    animation: fadeInUp 1s ease 0.4s backwards;
}

.microproof span {
    position: relative;
    padding-left: 12px;
}


.microproof span:first-child {
    padding-left: 0;
}

.microproof span:not(:first-child)::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--color-border);
}

/* Phone Mockup */
.phone-mockup-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
}

.phone-mockup {
    width: 280px;
    /* Slightly narrower for better proportion */
    height: 580px;
    /* Slightly shorter to fit above fold */
    background-color: var(--color-bg-primary);
    border: 12px solid #2C3E2D;
    border-radius: 40px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    z-index: 10;
    margin: 0 auto;
    /* Center in its column */
    max-width: 100%;
}

.phone-notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 24px;
    background-color: #2C3E2D;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    z-index: 20;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background-color: #F8F8F8;
    position: relative;
    overflow-y: auto;
    scrollbar-width: none;
}

.phone-screen::-webkit-scrollbar {
    display: none;
}

/* Simulated App UI */
.app-header {
    height: 60px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    border-bottom: 1px solid #eee;
    padding-top: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: var(--font-heading);
    font-weight: bold;
    font-size: 14px;
    position: sticky;
    top: 0;
    z-index: 20;
}

.app-feed {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.feed-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    /* Fix for video clipping on Safari/Chrome */
    transform: translateZ(0);
    -webkit-mask-image: -webkit-radial-gradient(white, black);
    mask-image: radial-gradient(white, black);
}

.feed-card-video {
    width: 100% !important;
    max-width: 100% !important;
    height: auto;
    display: block;
    aspect-ratio: 9/16;
    object-fit: cover;
    background: #000;
    border-radius: 12px;
}

/* Simulated Character Overlay */
.character-overlay {
    position: absolute;
    bottom: 12px;
    left: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    padding: 6px 12px;
    border-radius: 20px;
    color: white;
    font-size: 11px;
    font-weight: 500;
    z-index: 5;
}

.char-avatar {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ccc;
}

.feed-card-text {
    height: 8px;
    background: #E0E0E0;
    border-radius: 4px;
    width: 80%;
    margin-bottom: 4px;
}

.feed-card-text.short {
    width: 60%;
}

/* Decorative Elements */
.decorative-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.1;
    z-index: 0;
}

.blob-1 {
    width: 500px;
    height: 500px;
    background: var(--color-accent-green);
    top: -100px;
    right: -100px;
}

.blob-2 {
    width: 400px;
    height: 400px;
    background: #3D5A5B;
    bottom: -50px;
    left: -50px;
}

/* Section Common */
.section {
    padding: var(--section-spacing) 0;
    background-color: var(--color-bg-primary);
    position: relative;
}

/* Demo Section (New) */
.demo-section {
    padding-top: 60px;
    padding-bottom: 120px;
}

.demo-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    background: #1A261B;
    /* Dark mode for contrast */
    color: white;
    padding: 60px;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
}

.demo-text h2 {
    font-size: 36px;
    margin-bottom: 16px;
    color: #FDFBF7;
}

.demo-text p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 18px;
    margin-bottom: 24px;
}

.demo-visual {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    position: relative;
    min-height: 280px;
}

.chat-bubble {
    padding: 16px 20px;
    border-radius: 20px;
    margin-bottom: 16px;
    font-size: 15px;
    line-height: 1.5;
    max-width: 90%;
}

.bubble-user {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.bubble-ai {
    background: var(--color-accent-green);
    color: white;
    margin-right: auto;
    border-bottom-left-radius: 4px;
    position: relative;
    opacity: 0;
    /* JS will trigger this */
    transform: translateY(10px);
    transition: all 0.5s ease;
}

.bubble-ai.visible {
    opacity: 1;
    transform: translateY(0);
    box-shadow: 0 0 20px rgba(76, 112, 80, 0.6);
    /* Glow */
}

.bubble-ai::before {
    content: "📖";
    /* Character icon placeholder */
    position: absolute;
    left: -36px;
    bottom: 0;
    width: 28px;
    height: 28px;
    background: #FDFBF7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: black;
}

.typing-cursor::after {
    content: "|";
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}


.section.alt-bg {
    background-color: var(--color-bg-secondary);
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 60px auto;
}

.section-header h2 {
    font-size: 40px;
    margin-bottom: 16px;
}

.section-header p {
    color: var(--color-text-secondary);
    font-size: 18px;
}

/* How It Works */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.step-card {
    text-align: center;
}

.step-visual {
    height: 200px;
    background: white;
    border-radius: 16px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
}

.step-card h3 {
    font-size: 24px;
    margin-bottom: 8px;
}

.step-card p {
    color: var(--color-text-secondary);
    font-size: 15px;
}

/* Feature Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto;
    gap: 24px;
}

/* Layout for 5 cards: Top 3, Bottom 2 centered */
.feature-card:nth-child(4) {
    grid-column: 1 / span 1;
    margin-left: auto;
}

/* Adjusting for flex or using grid placement */
/* Actually, let's use flex-wrap or just grid placement tricks. 
   Better: First 3, then last 2 are placed in a centered sub-grid or just 
   make the last 2 span differently if using 6-column grid.
   Let's try a simple flex wrap for centering the last row.
*/
.features-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
}

.feature-card {
    background: white;
    border-radius: 20px;
    padding: 32px;
    flex: 1 1 300px;
    max-width: 380px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    transition: transform 0.2s ease;
}

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

.feature-icon {
    font-size: 32px;
    margin-bottom: 16px;
    display: inline-block;
    padding: 12px;
    background: var(--color-bg-secondary);
    border-radius: 12px;
}

.feature-card h3 {
    font-size: 20px;
    margin-bottom: 8px;
}

.feature-desc {
    font-weight: 500;
    margin-bottom: 16px;
    color: var(--color-text-primary);
}

.feature-list li {
    font-size: 14px;
    color: var(--color-text-secondary);
    margin-bottom: 6px;
    padding-left: 16px;
    position: relative;
}

.feature-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--color-accent-green);
}

/* Authenticity Section */
.authenticity-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.trust-badge-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.trust-item {
    background: #F8F8F8;
    padding: 24px;
    border-radius: 16px;
}

.trust-item h4 {
    margin-bottom: 8px;
    font-size: 16px;
}

.trust-item p {
    font-size: 13px;
    color: var(--color-text-secondary);
}

/* Community / Social Proof */
.community-banner {
    background-color: var(--color-accent-green);
    color: white;
    border-radius: 24px;
    padding: 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.community-banner h2 {
    color: white;
    margin-bottom: 16px;
}

.community-banner p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 32px;
    font-size: 18px;
}

/* FAQ */
.faq-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    padding: 24px;
    border-radius: 16px;
    border: 1px solid var(--color-border);
}

.faq-item h4 {
    margin-bottom: 8px;
    font-size: 16px;
}

.faq-item p {
    font-size: 14px;
    color: var(--color-text-secondary);
}

/* Final CTA */
.final-cta {
    text-align: center;
    padding-bottom: 120px;
}

.final-cta h2 {
    font-size: 48px;
    margin-bottom: 24px;
}

.no-spam {
    margin-top: 16px;
    font-size: 13px;
    color: var(--color-text-secondary);
}

/* Footer */
footer {
    padding: 40px 0;
    background: #1A261B;
    color: #8C9E8E;
    font-size: 14px;
}

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

/* Modal Styles */
/* Reusing mostly existing modal logic but restyled */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(44, 62, 45, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: #FDFBF7;
    border-radius: 24px;
    padding: 40px;
    width: 90%;
    max-width: 480px;
    box-shadow: var(--shadow-lg);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--color-text-secondary);
}

.form-step {
    display: none;
}

.form-step.active {
    display: block;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--color-border);
    border-radius: 12px;
    font-family: inherit;
    font-size: 16px;
}

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

.link-btn {
    background: none;
    border: none;
    color: var(--color-text-secondary);
    text-decoration: underline;
    cursor: pointer;
    font-size: 13px;
    margin-top: 12px;
}

/* Responsive */
@media (max-width: 900px) {

    .hero-content,
    .authenticity-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

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

    .microproof {
        justify-content: center;
    }

    .phone-mockup-wrapper {
        margin-top: 40px;
    }

    .steps-grid,
    .faq-grid {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 40px;
    }

    h2 {
        font-size: 32px;
    }
}