/* Base Reset & Modern Variables */
*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --primary: #0f172a;
    --primary-light: #1e293b;
    --accent: #f59e0b;
    --accent-hover: #d97706;
    --text-main: #1f2937;
    --text-muted: #4b5563;
    --bg-surface: #ffffff;
    --bg-screen: #f3f4f6;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
}

html,
body {
    width: 100%;
    overflow-x: hidden;
    position: relative;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text-main);
    background-color: var(--bg-screen);
    margin: 0;
    padding: 0;
    line-height: 1.5;
    /* Slightly tighter line height */
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
    font-family: 'Merriweather', serif;
    color: var(--primary);
    line-height: 1.2;
    margin-top: 0;
}

h1 {
    font-size: 2.75rem;
    letter-spacing: -0.02em;
    font-weight: 800;
    margin-bottom: 1rem;
}

.highlight {
    color: var(--accent);
    white-space: nowrap;
}

.subheadline {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-weight: 400;
    max-width: 600px;
}

.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
    box-sizing: border-box;
}

/* Hero Section */
.hero {
    width: 100%;
    min-height: 90vh;
    display: flex;
    align-items: center;
    background-color: #f8fafc;
    background-image: radial-gradient(#cbd5e1 1px, transparent 1px);
    background-size: 24px 24px;
    position: relative;
    padding: 2rem 0;
    box-sizing: border-box;
}

/* Mobile: Remove Gradient to save space */
.hero::after {
    display: none;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
    width: 100%;
}

/* 3D Book Animation */
.book-container {
    perspective: 1500px;
    display: flex;
    justify-content: center;
}

.book-cover {
    width: 320px;
    border-radius: 6px;
    box-shadow: -20px 20px 40px rgba(0, 0, 0, 0.25);
    transform: rotateY(-15deg);
    animation: float 6s ease-in-out infinite;
    max-width: 100%;
}

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

    50% {
        transform: translateY(-10px) rotateY(-13deg);
    }

    100% {
        transform: translateY(0px) rotateY(-15deg);
    }
}

/* Content Elements */
.feature-list {
    margin: 1.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 1rem;
}

.check-icon {
    color: var(--accent);
    background: #fffbeb;
    padding: 2px;
    border-radius: 50%;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

/* Form Styles */
.optin-form {
    background: var(--bg-surface);
    padding: 2rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.input-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    /* 16px prevents iOS zoom */
    background-color: #f8fafc;
    box-sizing: border-box;
}

.form-control:focus {
    border-color: var(--accent);
    outline: none;
    background: white;
}

.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    color: white;
    font-weight: 700;
    padding: 1rem;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(217, 119, 6, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.trust-badge {
    text-align: center;
    margin-top: 0.75rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.footer {
    background-color: var(--primary);
    color: #94a3b8;
    padding: 2rem 0;
    font-size: 0.85rem;
    border-top: 4px solid var(--accent);
}

/* === MOBILE OPTIMIZATION (CRITICAL) === */
@media (max-width: 900px) {
    .hero {
        align-items: flex-start;
        /* Start from top */
        padding: 1rem 0 3rem 0;
        /* Minimal top padding */
        min-height: auto;
        /* Allow auto height */
    }

    .container {
        padding: 0 1rem;
        /* Tighter sides */
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Flex Reordering for "Above The Fold" */
    .hero-content {
        display: flex;
        flex-direction: column;
        text-align: center;
    }

    /* 1. Label ("Free Guide") */
    .hero-content>div:first-child {
        order: 1;
        margin-bottom: 0.5rem !important;
        font-size: 0.75rem;
    }

    /* 2. Headline */
    .hero-content h1 {
        order: 2;
        font-size: 1.75rem;
        /* Significant reduction */
        margin-bottom: 0.5rem;
        line-height: 1.1;
    }

    /* 3. Subheadline */
    .hero-content .subheadline {
        order: 3;
        font-size: 1rem;
        margin-bottom: 1rem;
        line-height: 1.4;
    }

    /* 4. Form (MOVED UP) */
    .optin-form {
        order: 4;
        padding: 1.25rem;
        /* Tighter padding */
        margin-top: 0.5rem;
        margin-bottom: 2rem;
        text-align: left;
        /* Keep form inputs LTR */
        background: white;
        /* Ensure contrast */
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    }

    .form-label {
        font-size: 0.9rem;
        /* Smaller label */
    }

    .btn-primary {
        padding: 0.875rem;
        /* Slightly smaller button */
    }

    /* 5. Features (MOVED DOWN) */
    .feature-list {
        order: 5;
        text-align: left;
        /* Keep bullets readable */
        font-size: 0.95rem;
        background: rgba(255, 255, 255, 0.5);
        padding: 1rem;
        border-radius: 8px;
    }

    /* Book: Hide on small mobile to prioritize form? 
       Or show at very bottom. */
    .book-container {
        order: 6;
        /* Send to very bottom */
        margin-top: 2rem;
        display: none;
        /* HIDING BOOK on mobile to ensure form is 100% visible */
    }
}

/* === MODAL STYLES === */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    /* Dark backdrop */
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    /* Hidden by default */
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    /* Flex to center */
    opacity: 1;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    border-radius: var(--radius-xl);
    padding: 2rem;
    position: relative;
    overflow-y: auto;
    /* Scrollable content */
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

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

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: transparent;
    border: none;
    font-size: 2rem;
    line-height: 1;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
}

.close-modal:hover {
    color: var(--primary);
}

.modal-body h2 {
    margin-top: 0;
    font-size: 1.5rem;
    border-bottom: 2px solid var(--bg-screen);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.modal-body p,
.modal-body ul {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.modal-body ul {
    padding-left: 1.5rem;
}

/* Mobile Tweak for Modals */
@media (max-width: 600px) {
    .modal-content {
        width: 95%;
        padding: 1.5rem;
        max-height: 85vh;
    }
}
/* === SOCIAL PROOF BADGE === */
.social-proof-badge {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.avatar-group {
    display: flex;
    margin-right: 0.5rem;
}

.avatar-group img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid white; /* Border creates overlap effect */
    margin-left: -8px;
}

.avatar-group img:first-child {
    margin-left: 0;
}

/* === TESTIMONIALS SECTION === */
.testimonials {
    padding: 4rem 0;
    background: white;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

@media (max-width: 900px) {
    .testimonial-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.testimonial-card {
    background: var(--bg-screen);
    padding: 2rem;
    border-radius: var(--radius-lg);
    position: relative;
    border: 1px solid rgba(0,0,0,0.05);
}

.testimonial-text {
    font-size: 0.95rem;
    font-style: italic;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info strong {
    display: block;
    color: var(--primary);
    font-size: 0.95rem;
}

.author-info span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* === THANK YOU PAGE STYLES === */
.thank-you-card {
    background: #ffffff;
    padding: 3rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    max-width: 600px;
    margin: 0 auto;
}

.step-card {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    text-align: left;
    margin-bottom: 1rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.step-number {
    background-color: var(--accent);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
    margin-top: 2px;
}

.step-content strong {
    display: block;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.step-content p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.highlight-box {
    background-color: #fffbeb;
    border: 1px dashed var(--accent);
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-top: 1.5rem;
    color: #92400e;
    font-size: 0.9rem;
    display: flex;
    gap: 0.75rem;
    align-items: center;
    text-align: left;
}

.ty-icon-circle {
    background: #fffbeb;
    padding: 1rem;
    border-radius: 50%;
    display: inline-block;
    margin-bottom: 1.5rem;
}

.ty-icon {
    width: 48px;
    height: 48px;
    color: var(--accent);
}

/* Mobile Tweaks for Thank You Page */
@media (max-width: 600px) {
    .thank-you-card {
        padding: 1.5rem; /* Reduced from 3rem */
        border-radius: var(--radius-lg);
    }

    .thank-you-card h1 {
        font-size: 1.75rem !important; /* Force smaller size */
    }

    .step-card {
        padding: 1rem;
        gap: 0.75rem;
    }
}

/* === ONE TIME OFFER (OTO) STYLES === */
.oto-container {
    background: #f0f9ff;
    border: 2px solid #bae6fd;
    border-radius: var(--radius-xl);
    padding: 2rem;
    margin-top: 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.oto-badge {
    background: #ef4444;
    color: white;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.8rem;
    padding: 0.25rem 1rem;
    border-radius: 999px;
    display: inline-block;
    margin-bottom: 1rem;
}

.oto-image {
    max-width: 100%;
    margin: 1.5rem 0;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-oto {
    background: #0ea5e9;
    color: white;
    width: 100%;
    display: block;
    padding: 1rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: var(--radius-lg);
    text-transform: uppercase;
    transition: background 0.2s;
}

.btn-oto:hover {
    background: #0284c7;
}

/* Mobile Tweaks for OTO */
@media (max-width: 600px) {
    .oto-container {
        padding: 1.5rem;
    }
}

/* === CTR BOOSTERS === */
@keyframes pulse-blue {
    0% { box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(14, 165, 233, 0); }
    100% { box-shadow: 0 0 0 0 rgba(14, 165, 233, 0); }
}

.btn-oto.pulse {
    animation: pulse-blue 2s infinite;
}

.live-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #059669;
    font-weight: 600;
    margin-bottom: 1rem;
    background: #ecfdf5;
    padding: 0.25rem 0.75rem;
    border-radius: 99px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 2px #d1fae5;
}

/* === ABOVE THE FOLD LAYOUT === */
.ty-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
    text-align: left;
    max-width: 1000px;
    margin: 0 auto;
}

.ty-col-left {
    padding-right: 1rem;
}

.ty-col-right {
    /* The Offer Column */
}

.oto-container {
    margin-top: 0; /* Reset margin for grid */
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Mobile Reordering */
@media (max-width: 900px) {
    .ty-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .thank-you-card {
        padding: 1.5rem;
        max-width: 100%;
    }

    /* Mobile: Offer comes high up */
    .ty-container-mobile-wrapper {
        display: flex;
        flex-direction: column;
    }

    .ty-header-group { order: 1; text-align: center; margin-bottom: 1rem; }
    .ty-offer-group { order: 2; margin-bottom: 2rem; }
    .ty-instructions-group { order: 3; opacity: 0.9; }
    
    .oto-container {
        border: 2px solid #bae6fd;
        box-shadow: 0 10px 15px -3px rgba(14, 165, 233, 0.15);
    }
}
