/* ============================================
   Lead Magnet — Self-Contained CSS
   Property Valuation Wizard + Hero Layout
   ============================================ */

/* ============================================
   CSS Custom Properties
   ============================================ */
:root {
    --color-primary: #3d5a80;
    --color-primary-light: #5a7a9a;
    --color-primary-dark: #2c4a6a;
    --color-accent: #98c1a4;
    --color-accent-light: #b5d4be;
    --color-text: #1a2e35;
    --color-text-light: #5a7a85;
    --color-text-muted: #8aa5ae;
    --color-bg-cream: #f8f9fa;
    --color-bg-warm: #f0f2f4;
    --color-bg-blue-light: #e8f0f4;
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2.5rem;
    --space-xl: 4rem;
    --space-2xl: 6rem;
    --space-3xl: 8rem;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 100px;
    --shadow-soft: 0 4px 20px rgba(26, 46, 53, 0.08);
    --shadow-medium: 0 8px 40px rgba(26, 46, 53, 0.12);
    --shadow-glow: 0 8px 32px rgba(61, 90, 128, 0.25);
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   Container (if not already defined)
   ============================================ */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* ============================================
   Hero CTA Buttons (.btn .btn-primary)
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: 1.1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-smooth);
    border: none;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, #98c1a4 0%, #7aab88 100%);
    color: white;
    box-shadow: var(--shadow-glow), 0 4px 15px rgba(152, 193, 164, 0.4);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #a8d1b4 0%, #8abb98 100%);
    opacity: 0;
    transition: opacity var(--transition-fast);
    border-radius: var(--radius-full);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow), 0 8px 25px rgba(152, 193, 164, 0.5);
    color: white;
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary span {
    position: relative;
    z-index: 1;
}

.btn-primary:focus {
    outline: 3px solid rgba(152, 193, 164, 0.5);
    outline-offset: 3px;
}

.cta-microcopy {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: var(--space-md);
}

@media (max-width: 767px) {
    .btn {
        width: 100%;
        padding: 1.1rem 2rem;
    }
}

/* ============================================
   Hero Section — Split Layout
   ============================================ */
.hero {
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #2c4a6a 0%, #3d5a80 50%, #5a7a9a 100%);
}

/* Background image layer */
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
}

.hero-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.15;
    filter: grayscale(30%);
}

/* Animated gradient overlay */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 20% 80%, rgba(152, 193, 164, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(90, 122, 154, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
    animation: gradientShift 15s ease-in-out infinite;
    z-index: 1;
}

@keyframes gradientShift {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

/* Subtle particle effect */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(2px 2px at 20px 30px, rgba(255,255,255,0.3), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.2), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(255,255,255,0.4), transparent),
        radial-gradient(2px 2px at 130px 80px, rgba(255,255,255,0.2), transparent),
        radial-gradient(1px 1px at 160px 120px, rgba(255,255,255,0.3), transparent);
    background-size: 200px 200px;
    opacity: 0.5;
    animation: twinkle 8s ease-in-out infinite;
    z-index: 1;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.3; }
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: var(--space-3xl) var(--space-md) var(--space-2xl);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero Split Layout */
.hero-split {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    align-items: center;
    animation: fadeInUp 1s ease-out;
}

@media (min-width: 768px) {
    .hero-split {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }
}

/* Hero Copy (Left Column) */
.hero-copy {
    text-align: center;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

@media (min-width: 768px) {
    .hero-copy {
        text-align: left;
    }
}

.hero-split.expanded .hero-copy {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    pointer-events: none;
}

.hero-split.expanded {
    grid-template-columns: 1fr;
    justify-items: center;
    transition: grid-template-columns 0.4s ease;
}

.hero-split.expanded .hero-lead-magnet {
    max-width: 520px;
    width: 100%;
}

.hero h1 {
    color: white;
    margin-bottom: var(--space-md);
    text-shadow: 0 2px 40px rgba(0, 0, 0, 0.2);
    font-size: clamp(2rem, 4vw, 3.2rem);
}

/* Hero Bullets */
.hero-bullets {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--space-md) 0;
}

.hero-bullets li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.1rem;
    font-weight: 500;
    padding: 0.4rem 0;
}

@media (min-width: 768px) {
    .hero-bullets li {
        justify-content: flex-start;
    }
}

@media (max-width: 767px) {
    .hero-bullets li {
        justify-content: center;
    }
}

.hero-bullets li svg {
    color: var(--color-accent);
    flex-shrink: 0;
}

.hero-closing {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: var(--space-lg);
    line-height: 1.6;
}

.hero .cta-microcopy {
    text-align: center;
}

@media (min-width: 768px) {
    .hero .cta-microcopy {
        text-align: left;
    }
}

/* Hero Lead Magnet (Right Column) */
.hero-lead-magnet {
    width: 100%;
    transition: max-width 0.4s ease;
    min-height: 480px;
}

/* ============================================
   Lead Magnet Wizard Styles
   (namespaced under .lead-magnet)
   ============================================ */

/* Card base */
.lead-magnet .lm-card {
    background: white;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.15);
}

@media (max-width: 480px) {
    .lead-magnet .lm-card {
        padding: 20px;
    }
}

.lead-magnet .lm-card h2 {
    font-size: 1.35rem;
    margin-bottom: 6px;
    color: var(--color-text);
    text-align: left;
}

.lead-magnet .lm-card h3 {
    font-size: 1.05rem;
    margin: 20px 0 10px;
    color: var(--color-text);
}

/* Hidden utility */
.lm-hidden {
    display: none !important;
}

/* Loading state */
.lead-magnet .lm-loading {
    text-align: center;
    padding: 48px 20px;
}

.lead-magnet .lm-loading p {
    color: var(--color-text-light);
    font-size: 0.95rem;
    margin-top: 8px;
}

/* Spinner */
.lm-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--color-bg-warm);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    margin: 0 auto 16px;
    animation: lmSpin 0.8s linear infinite;
}

@keyframes lmSpin {
    to { transform: rotate(360deg); }
}

/* Subtitle */
.lead-magnet .lm-subtitle {
    color: var(--color-text-light);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

/* Progress bar */
.lm-progress-bar-container {
    margin-bottom: 20px;
}

.lm-progress-bar-track {
    width: 100%;
    height: 6px;
    background: var(--color-bg-warm);
    border-radius: 3px;
    overflow: hidden;
}

.lm-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    border-radius: 3px;
    transition: width 0.4s ease;
}

.lm-progress-bar-text {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-top: 6px;
    text-align: right;
}

/* Inputs */
.lead-magnet .lm-input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--color-bg-warm);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    margin-bottom: 12px;
    transition: border-color 0.2s;
    background-color: var(--color-bg-cream);
    color: var(--color-text);
}

.lead-magnet .lm-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(61, 90, 128, 0.12);
    background-color: white;
}

.lead-magnet .lm-input::placeholder {
    color: var(--color-text-muted);
}

/* Social proof */
.lm-social-proof {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #5a8a45;
    margin: 12px 0 4px;
}

.lm-social-proof-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: rgba(152, 193, 164, 0.25);
    color: #5a8a45;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* Address confirmation bar */
.lm-address-bar {
    background: rgba(152, 193, 164, 0.15);
    border: 1px solid rgba(152, 193, 164, 0.3);
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 16px;
    font-size: 0.85rem;
    color: #2c6e3f;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lm-address-bar-icon {
    color: var(--color-accent);
    font-size: 0.6rem;
}

/* Condition feedback */
.lm-condition-feedback {
    font-size: 0.83rem;
    padding: 8px 12px;
    border-radius: 6px;
    margin-top: 10px;
    transition: all 0.2s ease;
}

.lm-condition-feedback.positive {
    color: #2c6e3f;
    background: rgba(152, 193, 164, 0.15);
}

.lm-condition-feedback.neutral {
    color: var(--color-text-light);
    background: var(--color-bg-cream);
}

.lm-condition-feedback.negative {
    color: #92400e;
    background: #fffbeb;
}

/* Helper text */
.lead-magnet .lm-helper-text {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-top: -6px;
    margin-bottom: 12px;
}

/* Radio options — card style */
.lm-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lm-options label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 2px solid var(--color-bg-warm);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.15s, border-color 0.15s;
    color: var(--color-text);
}

.lm-options label:hover {
    background: var(--color-bg-cream);
    border-color: var(--color-primary-light);
}

.lm-options label:has(input:checked) {
    border-color: var(--color-primary);
    background: var(--color-bg-blue-light);
}

.lm-options input[type="radio"] {
    accent-color: var(--color-primary);
}

/* Nav buttons */
.lm-nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 24px;
}

/* Buttons */
.lm-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    cursor: pointer;
    font-weight: 500;
    font-family: inherit;
    transition: background 0.2s, opacity 0.2s, transform 0.2s;
}

.lm-btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: #fff;
}

.lm-btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.lm-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.lm-btn-secondary {
    background: var(--color-bg-cream);
    color: var(--color-text-light);
}

.lm-btn-secondary:hover {
    background: var(--color-bg-warm);
}

/* Blurred estimate teaser */
.lm-blurred-estimate {
    text-align: center;
    background: linear-gradient(135deg, var(--color-bg-blue-light), rgba(61, 90, 128, 0.12));
    border: 1px solid rgba(61, 90, 128, 0.2);
    border-radius: 12px;
    padding: 20px 16px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.lm-blurred-estimate-label {
    font-size: 0.82rem;
    color: var(--color-text-light);
    margin-bottom: 6px;
}

.lm-blurred-estimate-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    filter: blur(8px);
    user-select: none;
}

/* Trust badge */
.lm-trust-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: var(--color-text-muted);
    margin-top: -8px;
    margin-bottom: 12px;
}

.lm-trust-badge-icon {
    font-size: 0.85rem;
}

/* Stats box */
.lm-stats-box {
    background: var(--color-bg-cream);
    border: 1px solid var(--color-bg-warm);
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
}

.lm-stats-box .lm-stat-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 0.9rem;
}

.lm-stats-box .lm-stat-row .lm-label {
    color: var(--color-text-light);
}

.lm-stats-box .lm-stat-row .lm-value {
    font-weight: 600;
    color: var(--color-text);
}

/* Estimate box */
.lm-estimate-box {
    text-align: center;
    background: linear-gradient(135deg, var(--color-bg-blue-light), rgba(61, 90, 128, 0.12));
    border: 1px solid rgba(61, 90, 128, 0.2);
    border-radius: 12px;
    padding: 28px 20px;
    margin: 20px 0;
}

.lm-estimate-box .lm-range-label {
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin-bottom: 8px;
}

.lm-estimate-box .lm-range-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--color-primary);
}

@media (max-width: 480px) {
    .lm-estimate-box .lm-range-value {
        font-size: 1.3rem;
    }
}

/* Comparison indicator */
.lm-comparison-indicator {
    text-align: center;
    font-size: 0.88rem;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 12px;
    font-weight: 500;
}

.lm-comparison-indicator.above {
    color: #2c6e3f;
    background: rgba(152, 193, 164, 0.15);
    border: 1px solid rgba(152, 193, 164, 0.3);
}

.lm-comparison-indicator.below {
    color: #92400e;
    background: #fffbeb;
    border: 1px solid #fde68a;
}

/* Explanation text */
.lm-explanation-text {
    font-size: 0.83rem;
    color: var(--color-text-light);
    line-height: 1.5;
    margin-bottom: 8px;
    padding: 12px;
    background: var(--color-bg-cream);
    border-radius: 8px;
}

/* CTA section (Step 6) */
.lm-cta-section {
    text-align: center;
    margin: 20px 0 4px;
}

.lm-cta-button {
    width: 100%;
    padding: 14px 24px !important;
    font-size: 1.05rem !important;
    font-weight: 600 !important;
    background: linear-gradient(135deg, #98c1a4 0%, #7aab88 100%) !important;
}

.lm-cta-button:hover {
    opacity: 0.9;
}

.lm-cta-subtext {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-top: 8px;
}

/* Calculating container */
.lm-calculating-container {
    text-align: center;
    padding: 48px 20px;
}

.lm-calculating-message {
    color: var(--color-text-light);
    font-size: 0.95rem;
    margin-top: 8px;
    transition: opacity 0.3s ease;
}

/* Consent checkbox */
.lm-consent-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    font-size: 0.82rem;
    line-height: 1.5;
    color: #64748b;
    margin: 12px 0;
}
.lm-consent-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 2px;
    accent-color: #3d5a80;
    cursor: pointer;
}
.lm-consent-text {
    flex: 1;
}

/* Error */
.lead-magnet .lm-error {
    color: #dc2626;
    font-size: 0.85rem;
    margin-top: 4px;
}

/* Suggestions dropdown */
.lm-suggestions {
    border: 1px solid var(--color-bg-warm);
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    display: none;
    margin-top: -12px;
    margin-bottom: 12px;
    background: white;
}

.lm-suggestions.active {
    display: block;
}

.lm-suggestions .lm-suggestion-item {
    padding: 10px 14px;
    font-size: 0.9rem;
    cursor: pointer;
    border-bottom: 1px solid var(--color-bg-cream);
    color: var(--color-text);
}

.lm-suggestions .lm-suggestion-item:hover {
    background: var(--color-bg-blue-light);
}

.lm-suggestions .lm-suggestion-item:last-child {
    border-bottom: none;
}

/* Data provenance footer */
.lm-data-footer {
    text-align: center;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 12px;
    padding: 4px;
}

/* Step transition animations */
.lm-step.lm-step-enter {
    animation: lmStepFadeIn 0.3s ease forwards;
}

@keyframes lmStepFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
