/* aimpayment.com — Avenue Link */

:root {
    /* Brand blue (gradients anchored on #2664a9) */
    --aim-teal-500: #4a8fd9;
    --aim-teal-700: #1e5288;
    --aim-teal-600: #2664a9;
    --aim-ink: #0f172a;
    --aim-slate: #334155;
    --aim-muted: #64748b;
    --aim-border: #e2e8f0;

    --aim-bubble-pink: #fb7185;
    --aim-bubble-coral: #fb7185;
    --aim-bubble-sun: #fbbf24;

    --aim-amount-orange: #f6891e;
    --aim-amount-orange-light: #ffb04a;
    --aim-amount-orange-deep: #e07812;

    --aim-radius-lg: 18px;
    --aim-radius-md: 14px;
    /* Warm shadow for form card on orange hero (avoids cool slate read as “blue”) */
    --aim-shadow-card: 0 14px 42px rgba(90, 45, 12, 0.12);
    --aim-shadow-lift: 0 12px 28px rgba(15, 23, 42, 0.18);
    --aim-focus: 0 0 0 4px rgba(38, 100, 169, 0.22), 0 0 0 7px rgba(251, 113, 133, 0.18);

    /* Hero figure size (HTML width/height are hints only; CSS controls display) */
    --hero-person-max-width: 760px;
    --hero-person-max-height: min(92vh, 930px);
    --hero-person-nudge-x: 2.25rem;

    /* Aim mark (favicon + .step-icon::after); duplicate href in index.html <link rel="icon"> */
    --aim-step-mark-bg: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20305.78%20308.56%22%20aria-hidden%3D%22true%22%3E%3Cdefs%3E%3Cstyle%3E.st0%7Bfill%3A%23f7941d%7D.st1%7Bfill%3A%23f15a29%7D.st2%7Bfill%3A%23fbb040%7D%3C%2Fstyle%3E%3C%2Fdefs%3E%3Cpolygon%20class%3D%22st2%22%20points%3D%22274.68%20255.53%20274.68%20276.54%20253.67%20276.54%20191.57%20214.45%20191.57%20246.65%20161.85%20246.65%20161.85%20164.21%20244.29%20164.21%20244.29%20193.93%20213.09%20193.93%20274.68%20255.53%22%2F%3E%3Cpath%20class%3D%22st2%22%20d%3D%22M161.85%2C246.75v27.82c-2.18.12-4.37.19-6.58.19-64.3%2C0-116.42-52.12-116.42-116.42h27.76c0%2C48.97%2C39.7%2C88.66%2C88.66%2C88.66%2C2.22%2C0%2C4.41-.08%2C6.58-.24Z%22%2F%3E%3Cpath%20class%3D%22st0%22%20d%3D%22M155.27%2C41.9v27.76c-48.96%2C0-88.66%2C39.7-88.66%2C88.66h-27.76c0-64.3%2C52.13-116.42%2C116.42-116.42Z%22%2F%3E%3Cpath%20class%3D%22st1%22%20d%3D%22M271.7%2C158.32c0%2C1.98-.05%2C3.94-.15%2C5.89h-27.81c.13-1.95.2-3.9.2-5.89%2C0-48.96-39.69-88.66-88.66-88.66v-27.76c64.3%2C0%2C116.42%2C52.13%2C116.42%2C116.42Z%22%2F%3E%3C%2Fsvg%3E");
}

.site-title::before {
    content: none;
    display: none;
}

.site-header {
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.12);
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e2e8f0;
    position: relative;
    z-index: 10;
}

.header-content {
    max-width: var(--max-width, 1200px);
    margin: 0 auto;
    padding: 0 var(--spacing, 1rem);
}

.site-title {
    font-family: 'Caprasimo', Georgia, serif;
    font-weight: 600;
    color: #0f172a;
    letter-spacing: 0.02em;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.site-title-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.site-title-link:focus-visible {
    outline: 2px solid var(--aim-teal-600);
    outline-offset: 4px;
    border-radius: 6px;
}

.site-title .site-logo {
    display: block;
    height: clamp(2rem, 5.2vw, 2.875rem);
    width: auto;
    max-width: 100%;
    flex-shrink: 0;
}

/* Below 768px: show steps → mobile banner image → CTA (DOM order differs on desktop) */
@media (max-width: 767.98px) {
    #main-content {
        display: flex;
        flex-direction: column;
    }

    #main-content > .form-section {
        order: 1;
    }

    #main-content > #hero-steps {
        order: 2;
    }

    #main-content > .hero-mobile-figure {
        order: 3;
    }

    #main-content > .post-steps-section {
        order: 4;
    }

    #main-content > .additional-content {
        order: 5;
    }
}

@media (min-width: 768px) {
    #main-content > .form-section,
    #main-content > #hero-steps,
    #main-content > .hero-mobile-figure,
    #main-content > .post-steps-section,
    #main-content > .additional-content {
        order: unset;
    }
}

/* Form hero */
.form-section {
    position: relative;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.form-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: 420px;
    background-image: url('https://res.cloudinary.com/dbtcg826q/image/upload/v1775160897/common/sp-buckets/img/ap-hero.webp');
    background-size: cover;
    background-position: center 20%;
    background-repeat: no-repeat;
    z-index: 1;
    overflow: hidden;
}

.form-background::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(520px 360px at 88% 82%, rgba(251, 113, 133, 0.22), rgba(251, 113, 133, 0) 70%);
    filter: blur(0.3px);
    pointer-events: none;
}

.hero-spacer {
    display: none;
}

.hero-spacer-img {
    display: block;
    width: auto;
    height: auto;
    max-width: var(--hero-person-max-width);
    max-height: var(--hero-person-max-height);
    object-fit: contain;
    object-position: bottom right;
    margin-left: auto;
    margin-bottom: 0;
    pointer-events: none;
}

.hero-split {
    position: relative;
    z-index: 2;
    max-width: var(--max-width, 1200px);
    margin: 0 auto;
    padding: 2.25rem 1rem 2.75rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: center;
    justify-items: center;
}

.hero-left {
    color: rgba(255, 255, 255, 0.92);
    text-shadow: 0 10px 34px rgba(15, 23, 42, 0.35);
}

.hero-headline {
    margin: 0 0 0.75rem 0;
    font-size: clamp(2.1rem, 4.4vw, 3.4rem);
    line-height: 1.02;
    letter-spacing: -0.04em;
    font-weight: 800;
}

.hero-headline-line1,
.hero-headline-line2,
.hero-headline-line3 {
    display: block;
}

.hero-highlight {
    color: #ffffff;
    background: linear-gradient(90deg, rgba(251, 113, 133, 0.92), rgba(251, 191, 36, 0.92));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subcopy {
    margin: 0 0 1.25rem 0;
    max-width: 54ch;
    color: rgba(255, 255, 255, 0.86);
    font-size: 1.02rem;
    line-height: 1.55;
}

.hero-features {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin: 0 0 1.5rem 0;
    max-width: 42ch;
}

.hero-feature {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.hero-feature-icon {
    width: 2.05rem;
    height: 2.05rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--aim-bubble-pink);
    box-shadow: 0 12px 28px rgba(251, 113, 133, 0.35), 0 10px 24px rgba(15, 23, 42, 0.18);
    color: #ffffff;
}

.hero-feature-text {
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
}

.hero-trust {
    margin-top: 1rem;
    display: grid;
    gap: 0.6rem;
}

.hero-trust-line {
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.95rem;
}

.hero-rating {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem 0.85rem;
}

.hero-avatars {
    display: inline-flex;
    align-items: center;
}

.hero-avatar {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.75);
    background: linear-gradient(135deg, rgba(251, 113, 133, 0.9), rgba(38, 100, 169, 0.85));
    margin-left: -10px;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.22);
}

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

.hero-stars {
    color: rgba(251, 191, 36, 0.96);
    letter-spacing: 0.12em;
    text-shadow: 0 8px 22px rgba(15, 23, 42, 0.25);
}

.hero-rating-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
}

.form-container {
    position: relative;
    z-index: 2;
    background: transparent;
    padding: 1rem;
    min-height: 0;
    max-width: none;
    margin: 0 auto;
    box-shadow: none;
    border-radius: 0;
}

/* ProLabel iframe embed (same card pattern as moneypiper.com) */
.hero-split .form-container#loan-form-container {
    width: min(100%, 600px);
    max-width: min(100%, 600px);
    margin-left: auto;
    margin-right: auto;
    padding: 0;
    background: #ffffff;
    border-radius: var(--aim-radius-lg);
    box-shadow: var(--aim-shadow-card);
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-sizing: border-box;
    overflow: hidden;
}

#loan-form-container #form-frame {
    display: block;
    width: 100%;
    min-height: 500px;
    border: none;
    overflow: hidden;
}

@media (min-width: 768px) {
    /* Allow figure to grow past 50% column; overflow:hidden would clip him */
    .form-section {
        padding: 3rem 0 0;
        overflow: visible;
    }

    .hero-split {
        grid-template-areas: "heroForm heroSpacer";
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 2.25rem;
        max-width: var(--max-width, 1200px);
        padding: 2.5rem 1rem 0;
        margin: 0 auto;
        justify-items: start;
        align-items: end;
    }

    /* Orange band below form only; hero figure stays flush to section bottom */
    .hero-split .form-container#loan-form-container {
        margin-bottom: 2.75rem;
    }

    .hero-split .form-container {
        grid-area: heroForm;
        padding: 0;
        margin-left: 0;
        justify-self: center;
        padding-bottom: 1.5rem;
    }

    .hero-spacer {
        display: flex;
        grid-area: heroSpacer;
        align-items: flex-end;
        justify-content: flex-end;
        align-self: end;
        justify-self: end;
        width: 100%;
        min-height: 0;
        overflow: visible;
    }

    .hero-spacer-img {
        transform: translateX(var(--hero-person-nudge-x));
    }

    .hero-features {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-width: 58ch;
        gap: 0.9rem 1.25rem;
    }
}


.hero-mobile-figure {
    display: block;
    width: 100%;
    background: #ffffff;
    padding: 0;
    margin: 0;
}

.hero-mobile-figure-img {
    display: block;
    width: 100%;
    max-width: none;
    height: auto;
    pointer-events: none;
}

@media (min-width: 768px) {
    .hero-mobile-figure {
        display: none;
    }
}

/* CTA under steps */
.post-steps-section {
    background: var(--color-surface, #f8fafc);
    padding: 2rem 1rem;
    text-align: center;
}

.post-steps-inner {
    max-width: var(--max-width, 1200px);
    margin: 0 auto;
}

.post-steps-cta {
    display: inline-block;
    padding: 0.875rem 1.75rem;
    background: linear-gradient(135deg, var(--aim-teal-700) 0%, var(--aim-teal-500) 100%);
    color: #ffffff;
    border: none;
    border-radius: var(--aim-radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', system-ui, sans-serif;
    box-shadow: 0 12px 28px rgba(38, 100, 169, 0.2);
    transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.post-steps-cta:hover {
    filter: brightness(1.02) saturate(1.05);
    box-shadow: 0 16px 36px rgba(38, 100, 169, 0.26);
    transform: translateY(-1px);
}

.post-steps-cta:active {
    transform: translateY(1px);
}

.post-steps-cta:focus-visible {
    outline: none;
    box-shadow: var(--aim-focus), 0 16px 36px rgba(38, 100, 169, 0.26);
}

/* Steps */
.steps-section {
    background: #ffffff;
    padding: 3rem 1rem;
}

.steps-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.steps-main-title {
    color: var(--aim-teal-700);
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    line-height: 1.2;
}

.steps-subtitle {
    color: #64748b;
    font-size: 1rem;
    margin: 0;
}

.steps-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 960px;
    margin: 0 auto;
}

.step {
    text-align: center;
}

.step-icon {
    position: relative;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--aim-teal-700) 0%, var(--aim-teal-500) 100%);
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    line-height: 1;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.16);
}

.step-icon::before {
    content: "";
    position: absolute;
    inset: -7px;
    border-radius: 999px;
    border: 3px solid rgba(255, 255, 255, 0.55);
    box-shadow: 0 0 0 3px rgba(251, 113, 133, 0.18);
    pointer-events: none;
}

@keyframes aim-step-mark-float {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-6px);
    }
}

.step-icon::after {
    content: "";
    position: absolute;
    top: -10px;
    right: -10px;
    width: 28px;
    height: 28px;
    background: var(--aim-step-mark-bg) no-repeat center / contain;
    pointer-events: none;
    opacity: 0.98;
    will-change: transform;
    animation: aim-step-mark-float 2.4s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
    .step-icon::after {
        animation: none;
    }
}

.step-icon i {
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(15, 23, 42, 0.25);
}

.step-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
    color: #0f172a;
}

.step-description {
    font-size: 0.9375rem;
    color: #475569;
    line-height: 1.5;
    margin: 0;
}

@media (min-width: 768px) {
    .steps-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

/* ---------------------------
   Hero steps responsive grid
   --------------------------- */
#hero-steps {
    max-width: var(--max-width, 1200px);
    margin: 0 auto;
    padding: 3rem 1rem;
}

/* Title block: not a multi-column grid (avoids 2-col split with step cards) */
#hero-steps .steps-header {
    display: block;
}

/* Single column until 3-across fits — no 2+1 wrapped row */
#hero-steps .steps-container {
    grid-template-columns: 1fr;
}

@media (min-width: 1024px) {
    #hero-steps .steps-container {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1.5rem;
    }
}

#hero-steps h1,
#hero-steps h2,
#hero-steps p {
    grid-column: 1 / -1;
    text-align: center;
    margin: 0 auto;
    max-width: 72ch;
}

/* ---------------------------
   Dummy form (Prime-style flow; brand blue)
   --------------------------- */
#dummy-form-container {
    max-width: 600px;
    margin: 0;
    padding: 2.25rem 1.25rem;
    background: #ffffff;
    border-radius: var(--aim-radius-lg);
    box-shadow: var(--aim-shadow-card);
    border: 1px solid rgba(226, 232, 240, 0.9);
    backdrop-filter: blur(6px);
}

.form-step {
    display: none;
}

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

.form-step.hidden {
    display: none;
}

#step-1 {
    text-align: center;
}

.form-step-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--aim-teal-700);
    text-align: center;
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
}

.amount-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
    text-align: left;
}

.amount-btn {
    position: relative;
    padding: 1.25rem 1rem;
    border: 2px solid transparent;
    border-radius: var(--aim-radius-md);
    background-image:
        linear-gradient(#f8f9fa, #f8f9fa),
        linear-gradient(
            145deg,
            var(--aim-amount-orange) 0%,
            var(--aim-amount-orange-light) 42%,
            var(--aim-amount-orange-deep) 100%
        );
    background-origin: padding-box, border-box;
    background-clip: padding-box, border-box;
    font-size: 1rem;
    font-weight: 500;
    color: var(--aim-ink);
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease, color 180ms ease, filter 180ms ease;
    font-family: 'Inter', system-ui, sans-serif;
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.amount-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    background: transparent;
    opacity: 0;
    pointer-events: none;
}

.amount-btn:hover {
    background-image:
        linear-gradient(#f8f9fa, #f8f9fa),
        linear-gradient(
            145deg,
            var(--aim-amount-orange-light) 0%,
            #ffc878 48%,
            var(--aim-amount-orange) 100%
        );
    background-origin: padding-box, border-box;
    background-clip: padding-box, border-box;
    transform: translateY(-3px);
    box-shadow: var(--aim-shadow-lift);
}

.amount-btn.active {
    background-image:
        linear-gradient(#2563eb, #1d4ed8),
        linear-gradient(
            145deg,
            var(--aim-amount-orange) 0%,
            var(--aim-amount-orange-light) 50%,
            var(--aim-amount-orange-deep) 100%
        );
    background-origin: padding-box, border-box;
    background-clip: padding-box, border-box;
    border: 2px solid transparent;
    color: #ffffff;
    box-shadow: 0 14px 36px rgba(37, 99, 235, 0.28);
}

.amount-btn.active::before {
    opacity: 0.22;
}

.amount-btn:focus-visible {
    outline: none;
    box-shadow: var(--aim-focus), var(--aim-shadow-lift);
}

.ssl-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #10b981;
    color: #ffffff;
    border-radius: 4px;
    font-size: 0.875rem;
    margin: 0 auto 0.5rem auto;
    font-weight: 600;
}

.ssl-text-bold {
    font-weight: 700;
}

.ssl-text-normal {
    font-weight: 400;
}

.ssl-icon {
    flex-shrink: 0;
}

.ssl-description {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0.5rem 0 1rem 0;
    text-align: center;
}

.advertising-disclosure {
    text-align: center;
    margin-top: 1rem;
}

.advertising-disclosure a {
    color: var(--aim-teal-700);
    text-decoration: none;
    font-size: 0.875rem;
}

.advertising-disclosure a:hover {
    text-decoration: underline;
}

#dummy-loan-form {
    max-width: 100%;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #0f172a;
    font-size: 0.875rem;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 1rem;
    font-family: 'Inter', system-ui, sans-serif;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: var(--aim-teal-500);
    box-shadow: 0 0 0 3px rgba(38, 100, 169, 0.15);
}

.form-group input:focus-visible {
    outline: none;
    box-shadow: var(--aim-focus);
    border-color: var(--aim-teal-500);
}

.btn-submit {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--aim-teal-700) 0%, var(--aim-teal-500) 100%);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
    font-family: 'Inter', system-ui, sans-serif;
    box-shadow: 0 16px 36px rgba(38, 100, 169, 0.22);
}

.btn-submit:hover {
    filter: brightness(1.02) saturate(1.05);
    box-shadow: 0 18px 44px rgba(38, 100, 169, 0.26);
    transform: translateY(-1px);
}

.btn-submit:active {
    transform: translateY(1px);
}

.btn-submit:focus-visible {
    outline: none;
    box-shadow: var(--aim-focus), 0 18px 44px rgba(38, 100, 169, 0.24);
}

.success-content {
    text-align: center;
    padding: 2rem 0;
}

.success-content h2 {
    color: var(--aim-teal-700);
    margin-bottom: 1rem;
}

.success-content p {
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.selected-amount-display {
    margin-top: 1.5rem;
    font-size: 1.125rem;
}

.selected-amount-display strong {
    color: var(--aim-teal-700);
    font-size: 1.25rem;
}

@media (max-width: 640px) {
    .amount-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .amount-btn {
        padding: 1rem;
        font-size: 0.9375rem;
    }

    .form-step-title {
        font-size: 1.25rem;
    }
}

/* Footer */
.site-footer .footer-content {
    max-width: var(--max-width, 1200px);
    margin: 0 auto;
    text-align: center;
}

.site-footer .footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.65rem 1.1rem;
    margin-bottom: 1.25rem;
}

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

.site-footer .copyright {
    margin: 0.75rem 0 0;
}

.site-footer .footer-links a {
    color: #ffffff;
    text-decoration: underline;
}

.site-footer .footer-links a:hover {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: underline;
}

#footer-company,
#footer-site-name {
    font-style: normal;
}
