/*
 * Canonical homepage-inline lead-magnet stylesheet — Wave 44F (NEW-CANON-010).
 * Lifted from packages/site-hub/src/css/home.css:387-605 + 1610/1736-1766 (mobile).
 *
 * Pairs with packages/shared/components/lead-magnet-inline.njk. Loaded only on
 * the homepage of each product site (term, whole, iul, mortprot, final-exp).
 * Site-hub continues to load these rules from its own home.css (unchanged) so
 * we don't double-define the section there.
 *
 * Design tokens:
 *   The canonical macro emits classes that reference CSS custom properties
 *   (--charcoal, --ink, --green, --green-deep, --green-glow, --radius-md,
 *   --radius-2xl, --radius-full, --space-4xl, --font-heading, --font-body,
 *   --slate, --cloud, --pink, --pink-glow, --indigo, --indigo-glow, --amber,
 *   --amber-glow). On the 5 product sites these tokens are not defined in the
 *   site stylesheet — so this file declares fleet-safe fallbacks via the
 *   `var(--token, fallback)` pattern. If a site already defines the token in
 *   :root the local value wins (cascade order); otherwise the fallback ships
 *   the same visual the hub renders. This keeps the section visually
 *   consistent fleet-wide without forcing the product sites to adopt hub's
 *   full design-token set.
 */

/* Lead Magnet Section */
.lead-magnet {
    padding: var(--space-4xl, 96px) 0;
    background: linear-gradient(160deg, var(--charcoal, #1a2332) 0%, var(--ink, #0f172a) 60%, #0a1018 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.lead-magnet::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--green-glow, rgba(16, 185, 129, 0.15)) 0%, transparent 70%);
    opacity: 0.3;
    pointer-events: none;
}

.lead-magnet .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.lead-magnet .section-title {
    color: white;
    text-align: center;
    font-family: var(--font-heading, 'Geist', system-ui, -apple-system, sans-serif);
    font-size: 36px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
}

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

.lead-magnet-form {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-2xl, 24px);
    padding: 44px;
    backdrop-filter: blur(20px);
}

.lead-magnet-form h3 {
    font-family: var(--font-heading, 'Geist', system-ui, -apple-system, sans-serif);
    font-size: 28px;
    margin-bottom: 8px;
    color: white;
}

.lead-magnet-form .guide-form-input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--radius-md, 8px);
    background: rgba(255,255,255,0.08);
    color: white;
    font-family: var(--font-body, 'Geist', system-ui, -apple-system, sans-serif);
    font-size: 15px;
    transition: all 0.3s ease;
}

.lead-magnet-form .guide-form-input::placeholder {
    color: rgba(255,255,255,0.4);
}

.lead-magnet-form .guide-form-input:focus {
    outline: none;
    border-color: var(--green, #10b981);
    background: rgba(255,255,255,0.12);
    box-shadow: 0 0 0 3px var(--green-glow, rgba(16, 185, 129, 0.15));
}

.lead-magnet-form .guide-form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
    color: rgba(255,255,255,0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lead-magnet-form .guide-submit-btn {
    width: 100%;
    padding: 16px;
    background: var(--green, #10b981);
    color: white;
    border: none;
    border-radius: var(--radius-md, 8px);
    font-family: var(--font-body, 'Geist', system-ui, -apple-system, sans-serif);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.lead-magnet-form .guide-submit-btn:hover {
    background: var(--green-deep, #047857);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(4,120,87,0.3);
}

.lead-magnet-book {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 440px;
}

.book-mockup {
    position: relative;
    width: 280px;
    perspective: 1000px;
}

.book-cover {
    background: linear-gradient(145deg, var(--green, #10b981), var(--green-deep, #047857));
    border-radius: 4px 16px 16px 4px;
    padding: 40px 30px;
    min-height: 380px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    box-shadow: -6px 6px 20px rgba(0,0,0,0.4), 0 0 60px rgba(4,120,87,0.15);
    position: relative;
    transform: rotateY(-8deg);
    transition: transform 0.4s ease;
}

.book-cover:hover {
    transform: rotateY(-3deg);
}

.book-cover::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 20px;
    background: linear-gradient(90deg, rgba(0,0,0,0.2), transparent);
    border-radius: 4px 0 0 4px;
}

.book-cover .book-badge {
    background: rgba(255,255,255,0.2);
    border-radius: var(--radius-full, 9999px);
    padding: 6px 16px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 24px;
}

.book-cover .book-title {
    font-family: var(--font-heading, 'Geist', system-ui, -apple-system, sans-serif);
    font-size: 24px;
    line-height: 1.3;
    margin-bottom: 16px;
}

.book-cover .book-subtitle {
    font-size: 13px;
    opacity: 0.85;
    margin-bottom: 24px;
    line-height: 1.5;
}

.book-cover .book-author {
    font-size: 12px;
    opacity: 0.7;
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 16px;
    width: 100%;
}

.book-features {
    position: absolute;
    right: -30px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.book-feature-tag {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--radius-full, 9999px);
    padding: 8px 16px;
    font-size: 12px;
    color: rgba(255,255,255,0.8);
    white-space: nowrap;
    backdrop-filter: blur(10px);
}

.lead-magnet-trust {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    font-size: 12px;
    color: rgba(255,255,255,0.5);
}

.lead-magnet-trust svg {
    width: 14px;
    height: 14px;
    opacity: 0.5;
}

/* Field-error state injected by guide-page.js */
.lead-magnet-form .field-error {
    color: #fca5a5;
    font-size: 12px;
    margin-top: 6px;
}

/* TCPA compact consent block — keeps text legible against the dark form bg.
   Mirrors the disclaimer styling on /life-insurance-guide/ for consistency. */
.lead-magnet-form .tcpa-consent,
.lead-magnet-form .tcpa-consent p {
    color: rgba(255,255,255,0.55);
    font-size: 11px;
    line-height: 1.5;
}
.lead-magnet-form .tcpa-consent a {
    color: rgba(255,255,255,0.85);
    text-decoration: underline;
}

/* === Responsive (mirrors site-hub home.css mobile breakpoints) === */
@media (max-width: 1024px) {
    .lead-magnet-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

@media (max-width: 480px) {
    .lead-magnet-form {
        padding: 20px;
    }
    .book-features {
        position: static;
        transform: none;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        margin-top: 24px;
    }
    .book-cover {
        transform: rotateY(0deg);
    }
    .lead-magnet-book {
        min-height: auto;
    }
    .lead-magnet .section-title {
        font-size: 28px;
    }
}
