:root {
    /* Pop-art / Swiss-inspired: deep teal base, orange + bright teal circles */
    --color-deep-teal: #0d4a52;
    --color-deep-teal-dark: #0a3a42;
    --color-primary: #0d4a52;
    --color-secondary: #f97316;
    --color-bright-teal: #2dd4bf;
    --color-bright-teal-muted: #14b8a6;
    --color-surface: #ecfaf7;
    --color-border: #b8e8df;
    --color-text: #0f172a;
    --color-text-light: #475569;
    --color-white: #ffffff;
    --color-footer-bg: #061a1d;
    --radius-lg: 0;
    --shadow-lg: 0 24px 50px rgba(6, 26, 29, 0.35);
    --max-width: 1080px;
    --font-body: 'Lato', system-ui, sans-serif;
    --font-display: 'Bungee', system-ui, sans-serif;
    --hero-panel-bg: linear-gradient(
        155deg,
        rgba(6, 26, 29, 0.62) 0%,
        rgba(13, 74, 82, 0.66) 42%,
        rgba(10, 58, 66, 0.72) 100%
    );
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

body {
    margin: 0;
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--color-text);
    background:
        radial-gradient(ellipse 85% 55% at 100% 8%, rgba(249, 115, 22, 0.22) 0%, transparent 58%),
        radial-gradient(ellipse 75% 65% at 0% 92%, rgba(45, 212, 191, 0.28) 0%, transparent 58%),
        linear-gradient(165deg, #0d4a52 0%, #0a3a42 38%, #0d4a52 72%, #061a1d 100%);
    min-height: 100vh;
}

.site-shell {
    position: relative;
    overflow: hidden;
}

/* Layered flat circles (inspiration: orange TR, large bright teal BL) */
.brand-backdrop {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.brand-circle {
    position: absolute;
    border-radius: 50%;
}

.brand-circle--orange {
    width: min(52vw, 280px);
    height: min(52vw, 280px);
    top: -6%;
    right: -8%;
    background: radial-gradient(
        circle at 40% 40%,
        rgba(249, 115, 22, 0.92) 0%,
        rgba(249, 115, 22, 0.55) 42%,
        rgba(249, 115, 22, 0) 72%
    );
    filter: blur(0.5px);
}

.brand-circle--cyan {
    width: min(95vw, 520px);
    height: min(95vw, 520px);
    bottom: -18%;
    left: -22%;
    background: radial-gradient(
        circle at 55% 45%,
        rgba(45, 212, 191, 0.55) 0%,
        rgba(20, 184, 166, 0.28) 45%,
        rgba(13, 74, 82, 0) 70%
    );
}

/* Full-bleed hero photo behind site title + both columns (not only the header strip) */
.hero-with-bg {
    position: relative;
    z-index: 1;
    overflow: hidden;
    isolation: isolate;
    background-color: #0d4a52;
    background-image: url('https://res.cloudinary.com/dbtcg826q/image/upload/v1774461653/common/sp-buckets/img/lucre-hero.webp');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

.hero-with-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 106, 96, 0.6);
    pointer-events: none;
    z-index: 0;
}

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1rem;
    position: relative;
    z-index: 1;
}

/* Title sits on same hero photo as .hero-with-bg (full bleed) */
.site-header {
    position: relative;
    z-index: 1;
    padding: 1rem 0 1.15rem;
    background: transparent;
}

.site-header .container {
    text-align: left;
}

.site-title {
    margin: 0;
    font-size: clamp(1.15rem, 2.5vw, 1.35rem);
    color: #ffffff;
    font-weight: 700;
    text-align: left;
    text-shadow:
        0 1px 2px rgba(0, 0, 0, 0.55),
        0 2px 14px rgba(6, 26, 29, 0.55);
}

.form-section {
    position: relative;
    z-index: 1;
    min-height: 520px;
    padding: 1rem 0 2.75rem;
    background: transparent;
}

/* Desktop: left column background bleeds to viewport edge (strip anchored to viewport, not padded .container — avoids ~1rem gap) */
@media (min-width: 981px) {
    .form-section::before {
        content: '';
        position: absolute;
        top: 1rem;
        bottom: 2.75rem;
        left: 0;
        width: 50vw;
        z-index: 0;
        pointer-events: none;
        background: var(--hero-panel-bg);
        /* Match .hero-panel so the bleed strip doesn’t read lighter/darker than the column */
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }

    .form-section > .container .hero-grid {
        position: relative;
        z-index: 1;
    }
}

/* PLACEHOLDER: swap URL on .hero-with-bg above when final Lucre News Cloudinary hero is ready */

/* Same horizontal bounds as `.site-header .container` — full width inside shared `.container` */
.hero-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    align-items: stretch;
    width: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.hero-panel {
    background: none;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 0;
    color: var(--color-white);
    padding: 1.85rem 2rem 1.85rem 2.1rem;
    box-shadow: none;
    border: none;
    position: relative;
    overflow: hidden;
}

.hero-panel::before {
    content: '';
    position: absolute;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    top: -70px;
    right: -60px;
    background: radial-gradient(circle, rgba(249, 115, 22, 0.28) 0%, transparent 68%);
    pointer-events: none;
}

.hero-panel .hero-title,
.hero-panel .hero-copy,
.hero-panel .hero-points,
.hero-panel .hero-panel-art {
    position: relative;
    z-index: 1;
}

.hero-panel-art {
    margin: 1.35rem 0 0;
    padding: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.hero-panel-art img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.hero-title {
    margin: 0 0 0.75rem;
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(2.4rem, 7vw, 4.25rem);
    line-height: 1.12;
    letter-spacing: 0.02em;
    max-width: 22ch;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

.hero-copy {
    margin: 0;
    font-size: clamp(1.15rem, 2.5vw, 1.4rem);
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.95);
    max-width: 52ch;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.hero-points {
    margin: 1.4rem 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.85rem;
}

.hero-points li {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.hero-point-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.85rem;
    height: 2.85rem;
    border-radius: 50%;
    flex-shrink: 0;
    background: #e9953e;
    color: #ffffff;
    font-size: 1.15rem;
    box-shadow: 0 3px 14px rgba(233, 149, 62, 0.45);
}

.hero-point-icon i {
    line-height: 1;
}

.hero-point-text {
    flex: 1;
    min-width: 0;
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(1.2rem, 3.2vw, 1.65rem);
    line-height: 1.15;
    letter-spacing: 0.02em;
    color: #ffffff;
}

.form-card {
    border-radius: 0;
    background: var(--color-white);
    border: none;
    box-shadow: none;
    overflow: hidden;
}

.form-container {
    padding: 0.35rem;
}

/* Form button hover (embedded static markup; iframe content uses its own theme) */
.form-card button:hover,
.form-container button:hover {
    background-color: var(--color-secondary) !important;
}

.steps-section {
    position: relative;
    z-index: 1;
    padding: 2rem 0 3.5rem;
    background: linear-gradient(180deg, rgba(236, 250, 247, 0.98) 0%, #f8fffe 100%);
    border-top: 1px solid rgba(13, 74, 82, 0.12);
    border-bottom: 1px solid rgba(13, 74, 82, 0.08);
}

@media (max-width: 980px) {
    .steps-section {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    #hero-steps .steps-header {
        padding-left: 0;
        padding-right: 0;
    }
}

/* Steps header + copy injected by renderHeroSteps */
#hero-steps .steps-header {
    text-align: center;
    margin-bottom: 1.5rem;
    max-width: var(--max-width);
    margin-left: auto;
    margin-right: auto;
    padding: 0 1rem;
}

#hero-steps .steps-main-title {
    margin: 0 0 0.75rem;
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 7vw, 4.25rem);
    font-weight: 400;
    color: var(--color-deep-teal);
    line-height: 1.12;
    letter-spacing: 0.02em;
    max-width: 22ch;
}

#hero-steps .steps-subtitle {
    margin: 0 0 4rem 0;
    font-size: clamp(1.05rem, 2.05vw, 1.15rem);
    line-height: 1.5;
    color: var(--color-text-light);
}

#hero-steps .step-title {
    margin: 0 0 0.45rem;
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 2.5vw, 1.65rem);
    font-weight: 400;
    color: var(--color-deep-teal);
    line-height: 1.2;
}

#hero-steps .step-description {
    margin: 0;
    font-size: clamp(1.05rem, 2.05vw, 1.15rem);
    line-height: 1.5;
    color: var(--color-text-light);
}

/* Desktop: 2×2 grid with gap between cards */
#hero-steps .steps-container {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    max-width: var(--max-width);
    margin: 0 auto;
    border: none;
    border-radius: 0;
    overflow: visible;
    background: transparent;
    box-shadow: none;
}

#loan-form-container {
    scroll-margin-top: 1rem;
}

#hero-steps .step {
    text-align: center;
    padding: 1.4rem 1.15rem 1.25rem;
    background: #ffffff;
    border: 1px solid rgba(13, 74, 82, 0.14);
    border-radius: 0.75rem;
    box-shadow: 0 4px 14px rgba(6, 26, 29, 0.06);
}

#hero-steps .step-icon {
    width: 54px;
    height: 54px;
    margin: 0 auto 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #e9953e;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(233, 149, 62, 0.35);
}

#hero-steps .step-icon i {
    font-size: 1.25rem;
}

.disclaimer {
    position: relative;
    z-index: 1;
    background: linear-gradient(180deg, #f0fdf9 0%, var(--color-surface) 100%);
    padding: 2rem 1rem;
    font-size: 0.875rem;
    color: var(--color-text-light);
    border-top: 1px solid rgba(13, 74, 82, 0.12);
}

.disclaimer-content {
    max-width: var(--max-width);
    margin: 0 auto;
}

.site-footer {
    position: relative;
    z-index: 1;
    background: linear-gradient(180deg, #0a2f35 0%, var(--color-footer-bg) 100%);
    color: #ffffff;
    padding: 2rem 1rem;
    border-top: 1px solid rgba(45, 212, 191, 0.15);
}

.footer-content {
    max-width: var(--max-width);
    margin: 0 auto;
    text-align: center;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.footer-links a {
    color: #d9e3ee;
    text-decoration: none;
    font-size: 0.92rem;
}

.footer-links a:hover {
    color: var(--color-bright-teal);
    text-decoration: underline;
}

.footer-info {
    margin-bottom: 0.7rem;
    color: #e5edf5;
    text-align: center;
}

.footer-info p {
    margin: 0.2rem 0;
}

.copyright {
    margin: 0;
    color: #ced9e4;
    font-size: 0.9rem;
}

/* Loading state before renderHeroSteps replaces content */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    min-height: 200px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(45, 212, 191, 0.35);
    border-top: 3px solid var(--color-secondary);
    border-radius: 50%;
    animation: lucre-spin 1s linear infinite;
    margin-bottom: 0.75rem;
}

.loading-text {
    color: var(--color-text-light);
    font-size: 0.95rem;
    margin: 0;
}

@keyframes lucre-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.popup-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.popup-overlay[aria-hidden='false'] {
    display: flex;
}

.popup-content {
    background: #fff;
    border-radius: 0;
    border-top: 4px solid var(--color-secondary);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow: auto;
    position: relative;
    padding: 2rem;
    box-shadow: 0 24px 60px rgba(6, 26, 29, 0.35);
}

.popup-close {
    position: absolute;
    top: 0.5rem;
    right: 0.75rem;
    background: #000000 !important;
    color: #ffffff !important;
    border: none !important;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.popup-close:hover {
    background: var(--color-deep-teal) !important;
    color: #ffffff !important;
}

@media (max-width: 980px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        border-radius: 0;
        overflow: visible;
        box-shadow: none;
        border: none;
    }

    .hero-panel {
        padding: 1.5rem 1.35rem 1.5rem 1.5rem;
        border-radius: var(--radius-lg);
        border: 1px solid rgba(45, 212, 191, 0.4);
        box-shadow: var(--shadow-lg);
    }

    .form-card {
        border-radius: var(--radius-lg);
        border: 1px solid rgba(45, 212, 191, 0.45);
        box-shadow: var(--shadow-lg);
    }

    #loan-form-container {
        order: -1;
    }

    .form-container {
        padding: 0;
    }
}

/* Small phones: single column steps — inset from viewport + space between cards */
@media (max-width: 640px) {
    .site-title {
        font-size: 2rem;
    }

    #hero-steps .steps-container {
        grid-template-columns: 1fr;
        gap: 0.85rem;
        overflow: visible;
        border: none;
        border-radius: 0;
        box-shadow: none;
        background: transparent;
    }

    #hero-steps .step {
        background: #ffffff;
        border: 1px solid rgba(13, 74, 82, 0.14);
        border-radius: 0.75rem;
        box-shadow: 0 4px 14px rgba(6, 26, 29, 0.06);
    }

    #hero-steps .step + .step {
        border-left: 0;
        border-top: 0;
    }

    #hero-steps .step:nth-child(2n) {
        border-left: 0;
    }
}
