/* arrayfinance.com — Avenue Link */

/* ─── Fonts ─────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@500;600;700;800&family=Nunito:wght@400;500;600&display=swap');

/* ─── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Nunito', system-ui, sans-serif;
    color: #0f172a;
    background: #ffffff;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

/* ─── Site Header ────────────────────────────────────────────── */
.site-header {
    background: #ffffff;
    border-bottom: 1px solid #e0f2fe;
    padding: 0.9rem 1.25rem;
}

.header-content {
    max-width: 1120px;
    margin: 0 auto;
}

.site-title {
    font-family: 'Raleway', sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    color: #155E75;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    letter-spacing: -0.01em;
    margin: 0;
}

.logo-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

/* ─── Hero / Form Section ────────────────────────────────────── */
.form-section {
    position: relative;
    min-height: 520px;
    padding: 3rem 1.25rem;
    overflow: hidden;
    display: flex;
    align-items: center;
}

/* Deep teal background with geometric grid overlay */
.form-background {
    position: absolute;
    inset: 0;
    background-color: #0C3547;
    z-index: 0;
}

.form-background::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(6, 182, 212, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(6, 182, 212, 0.07) 1px, transparent 1px);
    background-size: 48px 48px;
    z-index: 1;
}

.form-background::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(600px 500px at 5% 50%, rgba(8, 145, 178, 0.22) 0%, transparent 70%),
        radial-gradient(500px 400px at 95% 60%, rgba(14, 116, 144, 0.16) 0%, transparent 70%);
    z-index: 2;
    pointer-events: none;
}

/* ─── Hero Layout ────────────────────────────────────────────── */
.hero-split {
    position: relative;
    z-index: 10;
    max-width: 1120px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    align-items: flex-start;
    gap: 3rem;
}

/* Hero text column (visible on wide layouts via config-manager) */
.hero-copy {
    flex: 1;
    color: #ffffff;
}

.hero-spacer {
    display: none;
}

/* ─── Form Container Panel ───────────────────────────────────── */
.form-container {
    width: 100%;
    max-width: 480px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(6, 182, 212, 0.2);
    overflow: hidden;
    flex-shrink: 0;
    margin: 0 auto;
}

/* ─── Dummy Form Container ───────────────────────────────────── */
#dummy-form-container {
    padding: 1.75rem 1.75rem 2rem;
}

.form-step {
    display: none;
}

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

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

.form-step-title {
    font-family: 'Raleway', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #0f172a;
    text-align: center;
    margin: 0 0 1.25rem;
    line-height: 1.35;
    letter-spacing: -0.01em;
}

/* ─── Loan Amount Grid ───────────────────────────────────────── */
.amount-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.amount-btn {
    font-family: 'Nunito', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    color: #155E75;
    background: #f0f9ff;
    border: 1.5px solid #bae6fd;
    border-radius: 8px;
    padding: 0.625rem 0.75rem;
    cursor: pointer;
    transition: all 0.18s ease;
    text-align: center;
    line-height: 1.2;
}

.amount-btn:hover {
    background: #e0f2fe;
    border-color: #0891B2;
    color: #0C3547;
}

.amount-btn.active {
    background: #155E75;
    border-color: #155E75;
    color: #ffffff;
}

/* ─── SSL Badge ──────────────────────────────────────────────── */
.ssl-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    color: #475569;
    margin-bottom: 0.35rem;
}

.ssl-text-bold {
    font-weight: 700;
    color: #0f172a;
}

.ssl-icon {
    color: #16a34a;
}

.ssl-description {
    text-align: center;
    font-size: 0.72rem;
    color: #64748b;
    margin: 0 0 0.5rem;
}

.advertising-disclosure {
    text-align: center;
    font-size: 0.72rem;
    margin: 0;
}

.advertising-disclosure a {
    color: #0E7490;
    text-decoration: none;
}

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

/* ─── Form Fields ────────────────────────────────────────────── */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.35rem;
    letter-spacing: 0.01em;
}

.form-group input {
    width: 100%;
    font-family: 'Nunito', sans-serif;
    font-size: 0.9375rem;
    color: #0f172a;
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    padding: 0.65rem 0.85rem;
    outline: none;
    transition: border-color 0.18s, box-shadow 0.18s;
}

.form-group input:focus {
    border-color: #0891B2;
    box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.15);
    background: #ffffff;
}

.form-group input::placeholder {
    color: #94a3b8;
}

/* ─── Submit Button ──────────────────────────────────────────── */
.btn-submit {
    width: 100%;
    font-family: 'Raleway', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #ffffff;
    background: linear-gradient(135deg, #0E7490 0%, #155E75 100%);
    border: none;
    border-radius: 9px;
    padding: 0.85rem 1.5rem;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 4px 20px rgba(21, 94, 117, 0.4);
    margin-top: 0.5rem;
}

.btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 28px rgba(21, 94, 117, 0.5);
}

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

/* ─── Success Message ────────────────────────────────────────── */
.success-content {
    text-align: center;
    padding: 1rem 0;
}

.success-content .form-step-title {
    color: #155E75;
    margin-bottom: 0.75rem;
}

.success-content p {
    font-size: 0.9375rem;
    color: #475569;
    margin-bottom: 0.5rem;
}

.selected-amount-display {
    font-size: 0.875rem;
    color: #334155;
    margin-top: 0.75rem;
}

/* ─── Steps Section ──────────────────────────────────────────── */
.steps-section {
    background: #F0F9FF;
    padding: 4rem 1.25rem;
    position: relative;
}

.steps-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(900px 600px at 50% 0%, rgba(8, 145, 178, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.steps-header {
    text-align: center;
    margin-bottom: 2.5rem;
    position: relative;
    z-index: 1;
}

.steps-main-title {
    font-family: 'Raleway', sans-serif;
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    font-weight: 800;
    color: #0C3547;
    letter-spacing: -0.02em;
    margin: 0 0 0.5rem;
}

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

/* ─── Steps Container ────────────────────────────────────────── */
.steps-container {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
    position: relative;
    z-index: 1;
}

/* ─── Step Cards ─────────────────────────────────────────────── */
.step {
    background: #ffffff;
    border: 1px solid #e0f2fe;
    border-top: 3px solid #0E7490;
    border-radius: 12px;
    padding: 2rem 1.5rem 1.75rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    animation: step-rise 0.5s ease both;
}

.step:nth-child(2) { animation-delay: 0.1s; }
.step:nth-child(3) { animation-delay: 0.2s; }

@keyframes step-rise {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Ghost step number — bottom right */
.step::after {
    content: '0' attr(data-step);
    position: absolute;
    bottom: -0.35rem;
    right: 0.75rem;
    font-family: 'Raleway', sans-serif;
    font-size: 4.5rem;
    font-weight: 800;
    color: rgba(14, 116, 144, 0.07);
    line-height: 1;
    pointer-events: none;
    user-select: none;
    letter-spacing: -0.04em;
    transition: color 0.22s;
}

.step:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(21, 94, 117, 0.14);
}

.step:hover::after {
    color: rgba(14, 116, 144, 0.12);
}

/* ─── Step Icon ──────────────────────────────────────────────── */
.step-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #E0F2FE 0%, #BAE6FD 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    color: #0E7490;
    transition: transform 0.22s ease, background 0.22s ease;
}

.step:hover .step-icon {
    transform: scale(1.08);
    background: linear-gradient(135deg, #0E7490 0%, #155E75 100%);
    color: #ffffff;
}

/* ─── Step Text ──────────────────────────────────────────────── */
.step-title {
    font-family: 'Raleway', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0C3547;
    margin: 0 0 0.5rem;
    letter-spacing: -0.01em;
}

.step-description {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.6;
    margin: 0;
}

/* ─── Additional Content ─────────────────────────────────────── */
#additional-content:empty {
    display: none;
}

/* ─── Disclaimer ─────────────────────────────────────────────── */
.disclaimer {
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    padding: 2rem 1.25rem;
}

.disclaimer-content {
    max-width: 960px;
    margin: 0 auto;
}

.disclaimer p {
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.65;
    margin-bottom: 0.75rem;
}

.disclaimer p:last-child {
    margin-bottom: 0;
}

/* ─── Footer (floating-card) ─────────────────────────────────── */
.footer-floating-card {
  background: #10131A;
  color: #E8EAF0;
  font-family: 'Nunito', system-ui, sans-serif;
  padding-bottom: 24px;
  box-sizing: border-box;
}
.footer-floating-card *, .footer-floating-card *::before, .footer-floating-card *::after { box-sizing: border-box; }

.footer-floating-card .accent-card {
  margin: 0 16px;
  border-radius: 16px;
  padding: 22px 18px 20px;
  transform: translateY(-22px);
  background: var(--color-primary, #155E75);
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(0,0,0,.18);
}
.footer-floating-card .accent-kicker {
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 8px;
  opacity: 0.7;
}
.footer-floating-card .accent-headline {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
  line-height: 1.15;
}
.footer-floating-card .accent-sub {
  font-size: 13px;
  margin: 0 0 16px;
  opacity: 0.82;
  line-height: 1.5;
}

.footer-floating-card .ca-row { display: grid; gap: 10px; }
.footer-floating-card .ca {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  padding: 14px 38px 14px 16px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform .12s ease, background .15s ease, color .15s ease;
}
.footer-floating-card .ca::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 16px;
  width: 7px;
  height: 7px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: translateY(-50%) rotate(45deg);
  transition: right .15s ease;
}
.footer-floating-card .ca:hover, .footer-floating-card .ca:focus-visible { transform: translateY(-1px); outline: none; }
.footer-floating-card .ca:hover::after, .footer-floating-card .ca:focus-visible::after { right: 12px; }
.footer-floating-card .ca:active { transform: translateY(0); }
.footer-floating-card .ca .ca-sub { font-size: 12px; font-weight: 500; opacity: 0.9; letter-spacing: 0; }

.footer-floating-card .ca.primary {
  background: #ffffff;
  color: var(--color-primary, #155E75);
  box-shadow: 0 2px 6px rgba(0,0,0,.12);
}
.footer-floating-card .ca.primary:hover, .footer-floating-card .ca.primary:focus-visible { background: #f0f9ff; }

.footer-floating-card .ca.secondary {
  background: rgba(255,255,255,.08);
  color: #ffffff;
  border: 1.5px solid rgba(255,255,255,.85);
}
.footer-floating-card .ca.secondary:hover, .footer-floating-card .ca.secondary:focus-visible { background: rgba(255,255,255,.18); }

.footer-floating-card .links {
  padding: 0 34px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px 16px;
}
.footer-floating-card .links .col-full { grid-column: 1 / -1; margin-top: 28px; }

@media (min-width: 600px) {
  .footer-floating-card .links { grid-template-columns: 1fr 1fr 1fr; }
  .footer-floating-card .links .col-full { grid-column: auto; margin-top: 0; }
}

.footer-floating-card .col-title {
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 10px;
  color: #6B7280;
}
.footer-floating-card .col-link {
  display: block;
  font-size: 13.5px;
  padding: 5px 0;
  text-decoration: none;
  color: #B7C0D4;
  transition: color .15s ease;
  cursor: pointer;
}
.footer-floating-card .col-link:hover, .footer-floating-card .col-link:focus-visible { color: #ffffff; outline: none; }

.footer-floating-card .meta {
  padding: 0 22px;
  margin-top: 22px;
  font-size: 12px;
  line-height: 1.6;
  color: #6B7589;
  text-align: center;
}
.footer-floating-card .meta-divider { height: 1px; margin: 0 0 16px; background: #1E232E; }
.footer-floating-card .meta-name { display: block; font-size: 13px; font-weight: 500; color: #C8CCD8; margin-bottom: 2px; }
.footer-floating-card .meta-copy { margin-top: 8px; display: block; }

@media (min-width: 768px) {
  .footer-floating-card { padding: 56px 0 28px; }
  .footer-floating-card .footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    display: grid;
    grid-template-columns: minmax(320px, 380px) 1fr;
    gap: 56px;
    align-items: start;
  }
  .footer-floating-card .accent-card {
    margin: 0;
    transform: none;
    border-radius: 18px;
    padding: 28px 28px 26px;
    box-shadow: 0 4px 12px rgba(0,0,0,.18);
  }
  .footer-floating-card .accent-kicker { font-size: 11px; margin-bottom: 12px; }
  .footer-floating-card .accent-headline { font-size: 28px; margin-bottom: 8px; }
  .footer-floating-card .accent-sub { font-size: 14px; margin-bottom: 20px; }
  .footer-floating-card .ca { padding: 16px 42px 16px 18px; }
  .footer-floating-card .ca::after { right: 18px; width: 8px; height: 8px; }
  .footer-floating-card .ca:hover::after, .footer-floating-card .ca:focus-visible::after { right: 14px; }

  .footer-floating-card .links {
    padding: 0;
    gap: 0 40px;
    grid-template-columns: 1fr 1fr;
  }
  .footer-floating-card .links .col-full { grid-column: 1 / -1; margin-top: 28px; }
  .footer-floating-card .col-title { font-size: 11px; margin-bottom: 14px; }
  .footer-floating-card .col-link { font-size: 14px; padding: 6px 0; }

  .footer-floating-card .meta {
    max-width: 1200px;
    margin: 40px auto 0;
    padding: 22px 40px 0;
    font-size: 13px;
    border-top: 1px solid #1E232E;
  }
  .footer-floating-card .meta-divider { display: none; }
  .footer-floating-card .meta-name { font-size: 14px; font-weight: 600; color: #E8EAF0; margin: 0; }
  .footer-floating-card .meta-copy { margin: 8px 0 0; font-size: 12px; display: block; }
}

@media (min-width: 1100px) {
  .footer-floating-card .links { grid-template-columns: 1fr 1fr 1fr; }
  .footer-floating-card .links .col-full { grid-column: auto; margin-top: 0; }
}

/* ─── Popup Overlay ──────────────────────────────────────────── */
.popup-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(12, 35, 51, 0.75);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

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

.popup-content {
    background: #ffffff;
    border-radius: 12px;
    padding: 2rem;
    max-width: 640px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.4);
}

.popup-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #64748b;
    line-height: 1;
    transition: color 0.15s;
}

.popup-close:hover {
    color: #0f172a;
}

/* ─── Loading Spinner ────────────────────────────────────────── */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    gap: 1rem;
}

.loading-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e0f2fe;
    border-top-color: #0891B2;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.loading-text {
    font-size: 0.875rem;
    color: #94a3b8;
}

/* ─── Utility ────────────────────────────────────────────────── */
.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;
}

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 600px) {
    .form-section {
        padding: 1.75rem 1rem;
    }

    #dummy-form-container {
        padding: 1.4rem 1.25rem 1.75rem;
    }

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

    .amount-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.4rem;
    }

    .amount-btn {
        font-size: 0.8rem;
        padding: 0.55rem 0.5rem;
    }

    .steps-section {
        padding: 2.5rem 1rem;
    }

    .steps-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .step {
        padding: 1.5rem 1.25rem 1.25rem;
    }

    .step::after {
        font-size: 3.5rem;
    }
}

@media (min-width: 768px) {
    .hero-split {
        justify-content: center;
    }
}
