/* ==========================================================================
   LendSwift — Site footer
   Newsletter band + link grid + legal row. Square, token-driven.
   ========================================================================== */

.ftr-shell {
    box-sizing: border-box;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding-inline: clamp(1rem, 3vw, 2rem);
}

.site-footer *, .ftr-newsletter * { box-sizing: border-box; }

/* ============================ NEWSLETTER BAND =========================== */

.ftr-newsletter {
    background: linear-gradient(120deg, var(--ls-brand-700), var(--ls-brand-900));
    color: #fff;
    padding: clamp(2.5rem, 5vw, 3.5rem) 0;
    position: relative;
    overflow: hidden;
}

/* Subtle depth without an image asset. */
.ftr-newsletter::after {
    content: '';
    position: absolute;
    top: -60%; right: -8%;
    width: 460px; height: 460px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.13), transparent 62%);
    pointer-events: none;
}

.ftr-newsletter-inner {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
    gap: var(--ls-space-8);
    align-items: center;
}

.ftr-newsletter-copy { display: flex; gap: var(--ls-space-4); align-items: flex-start; }

.ftr-newsletter-icon {
    flex: 0 0 auto;
    width: 54px; height: 54px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.26);
    font-size: 1.35rem;
}

.ftr-newsletter h2 {
    margin: 0 0 var(--ls-space-2);
    font-size: clamp(1.25rem, 2.4vw, 1.7rem);
    font-weight: 720;
    letter-spacing: -0.02em;
    color: #fff;
    line-height: 1.25;
}

.ftr-newsletter p { margin: 0; font-size: var(--ls-text-sm); line-height: 1.6; opacity: 0.85; max-width: 52ch; }

.ftr-newsletter-form .nl-field {
    border-color: rgba(255, 255, 255, 0.32);
    background: rgba(255, 255, 255, 0.1);
}

.ftr-newsletter-form .nl-field:focus-within {
    border-color: #fff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.18);
}

.ftr-newsletter-form input[type="email"] { color: #fff; }
.ftr-newsletter-form input[type="email"]::placeholder { color: rgba(255, 255, 255, 0.62); }
.ftr-newsletter-form .nl-field button { background: #fff; color: var(--ls-brand-800); }
.ftr-newsletter-form .nl-field button:hover { background: rgba(255, 255, 255, 0.9); }
.ftr-newsletter-form .nl-result.is-ok { background: rgba(255, 255, 255, 0.18); color: #fff; }

/* ================================ FOOTER =============================== */

.site-footer {
    position: relative;
    background: var(--ls-surface-2);
    border-top: 1px solid var(--ls-border);
    padding: clamp(3rem, 6vw, 4.5rem) 0 var(--ls-space-6);
    color: var(--ls-text-secondary);
}

:root[data-theme="dark"] .site-footer { background: #0e1017; }

.ftr-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)) minmax(0, 1.2fr);
    gap: var(--ls-space-8);
    padding-bottom: var(--ls-space-10);
    border-bottom: 1px solid var(--ls-border);
}

/* ---- Brand column ---- */

.ftr-brand { display: inline-block; margin-bottom: var(--ls-space-4); text-decoration: none; }
/* The generated logo is a wide lockup (mark + wordmark), not a square.
   height + width:auto keeps its aspect ratio; a fixed square crushed it. */
.ftr-brand img { height: 36px; width: auto; max-width: 100%; display: block; }
.ftr-brand-name { font-size: var(--ls-text-xl); font-weight: 750; color: var(--ls-text); letter-spacing: -0.02em; }

.ftr-about { margin: 0 0 var(--ls-space-5); font-size: var(--ls-text-sm); line-height: 1.7; color: var(--ls-text-muted); max-width: 42ch; }

.ftr-badges { list-style: none; margin: 0 0 var(--ls-space-5); padding: 0; display: flex; flex-direction: column; gap: var(--ls-space-2); }

.ftr-badges li {
    display: flex;
    align-items: flex-start;
    gap: var(--ls-space-2);
    font-size: var(--ls-text-xs);
    color: var(--ls-text-muted);
    line-height: 1.5;
}

.ftr-badges i { color: var(--ls-success); margin-top: 2px; }

.ftr-social { display: flex; gap: var(--ls-space-2); }

.ftr-social a {
    width: 38px; height: 38px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--ls-border);
    background: var(--ls-surface);
    color: var(--ls-text-muted);
    text-decoration: none;
    transition: all var(--ls-duration) var(--ls-ease);
}

.ftr-social a:hover {
    background: var(--ls-brand-600);
    border-color: var(--ls-brand-600);
    color: #fff;
    transform: translateY(-2px);
}

/* ---- Link columns ---- */

.ftr-col h3 {
    margin: 0 0 var(--ls-space-4);
    font-size: var(--ls-text-xs);
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--ls-text);
}

.ftr-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--ls-space-3); }

.ftr-col a {
    color: var(--ls-text-muted);
    text-decoration: none;
    font-size: var(--ls-text-sm);
    line-height: 1.5;
    transition: color var(--ls-duration) var(--ls-ease), padding-left var(--ls-duration) var(--ls-ease);
    display: inline-block;
}

.ftr-col a:hover { color: var(--ls-brand-600); padding-left: 4px; }

.ftr-contact { gap: var(--ls-space-4) !important; }
.ftr-contact li { display: flex; align-items: flex-start; gap: var(--ls-space-3); font-size: var(--ls-text-sm); color: var(--ls-text-muted); line-height: 1.55; }
.ftr-contact i { color: var(--ls-brand-600); margin-top: 3px; width: 15px; text-align: center; flex: 0 0 auto; }
.ftr-contact a { color: var(--ls-text-muted); text-decoration: none; }
.ftr-contact a:hover { color: var(--ls-brand-600); }

/* ---- Regulatory + bottom ---- */

.ftr-reg {
    margin: var(--ls-space-6) 0 0;
    padding: var(--ls-space-4);
    background: var(--ls-surface-3);
    border-left: 3px solid var(--ls-brand-600);
    font-size: var(--ls-text-xs);
    line-height: 1.65;
    color: var(--ls-text-muted);
}

.ftr-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--ls-space-4);
    margin-top: var(--ls-space-6);
    padding-top: var(--ls-space-5);
    border-top: 1px solid var(--ls-border);
}

.ftr-copy { margin: 0; font-size: var(--ls-text-xs); color: var(--ls-text-muted); }

.ftr-legal { display: flex; flex-wrap: wrap; gap: var(--ls-space-5); align-items: center; }

.ftr-legal a,
.ftr-cookie-link {
    color: var(--ls-text-muted);
    text-decoration: none;
    font-size: var(--ls-text-xs);
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    font-family: var(--ls-font-sans);
    transition: color var(--ls-duration) var(--ls-ease);
}

.ftr-legal a:hover,
.ftr-cookie-link:hover { color: var(--ls-brand-600); text-decoration: underline; }

/* ---- Back to top ---- */

.ftr-top {
    position: fixed;
    right: var(--ls-space-5);
    bottom: calc(var(--ls-space-5) + 76px);   /* clear of the help widget */
    width: 42px; height: 42px;
    display: flex; align-items: center; justify-content: center;
    background: var(--ls-surface);
    border: 1px solid var(--ls-border-strong);
    color: var(--ls-text-secondary);
    cursor: pointer;
    z-index: calc(var(--ls-z-widget) - 1);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity var(--ls-duration) var(--ls-ease),
                transform var(--ls-duration) var(--ls-ease),
                background var(--ls-duration) var(--ls-ease);
    box-shadow: var(--ls-shadow-md);
}

.ftr-top.is-visible { opacity: 1; transform: translateY(0); }
.ftr-top[hidden] { display: none; }
.ftr-top:hover { background: var(--ls-brand-600); border-color: var(--ls-brand-600); color: #fff; }

/* ============================== RESPONSIVE ============================== */

@media (max-width: 1100px) {
    .ftr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--ls-space-8); }
    .ftr-brand-col { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
    .ftr-newsletter-inner { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
    .ftr-grid { grid-template-columns: 1fr; gap: var(--ls-space-6); }
    .ftr-bottom { flex-direction: column; align-items: flex-start; }
    .ftr-legal { gap: var(--ls-space-4); }
    .ftr-top { right: var(--ls-space-3); bottom: calc(var(--ls-space-3) + 70px); }
}
