/* Shared footer used by the homepage and all guest content pages. */
.home-footer {
    --footer-line: #eaded5;
    --footer-muted: #705e55;
    --footer-ink: #2a1b16;
    --footer-accent: #3d2018;
    width: min(1120px, calc(100% - 40px));
    margin: 0 auto;
    padding: 42px 0 24px;
    border-top: 1px solid var(--footer-line);
    background: transparent;
    color: var(--footer-muted);
    font-size: 0.9rem;
}

:root[data-theme="brown"] .home-footer {
    --footer-line: #5b3b2d;
    --footer-muted: #d5bcae;
    --footer-ink: #fff4eb;
    --footer-accent: #f2c79d;
}

:root[data-theme="dark"] .home-footer {
    --footer-line: #4a342b;
    --footer-muted: #c2ada2;
    --footer-ink: #f6ece5;
    --footer-accent: #f0c59d;
}

.home-footer *, .home-footer *::before, .home-footer *::after { box-sizing: border-box; }

.home-footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
    width: 100%;
    padding: 0 0 30px;
}

.home-footer-brand {
    display: grid;
    max-width: none;
    align-content: start;
    gap: 10px;
}

.home-footer .home-brand {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
    width: fit-content;
    max-width: 100%;
    color: var(--footer-accent);
    font-size: 1.15rem;
    font-weight: 800;
    text-decoration: none;
}

.home-footer .home-brand span { display: grid; min-width: 0; gap: 0.05rem; overflow-wrap: anywhere; }
.home-footer .home-brand strong { color: var(--footer-ink); font-size: 1.05rem; line-height: 1.2; }
.home-footer .home-brand small { color: var(--footer-muted); font-size: 0.7rem; line-height: 1.2; }

.home-footer .home-brand img {
    width: 3.65rem;
    height: 3.65rem;
    border-radius: 1rem;
    background: #241f1a;
    object-fit: contain;
    filter: none;
    box-shadow: 0 8px 22px rgba(24, 16, 11, 0.24);
}

.home-footer-brand > p {
    max-width: 260px;
    margin: 0;
    color: var(--footer-muted);
    line-height: 1.9;
}

.home-footer-column {
    display: grid;
    align-content: start;
    justify-items: start;
    gap: 10px;
}

.home-footer-column h2 {
    margin: 0;
    color: var(--footer-accent);
    font-size: 0.9rem;
}

.home-footer-column a,
.home-footer-link-button {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    padding: 4px 0;
    border: 0;
    background: transparent;
    color: var(--footer-muted);
    cursor: pointer;
    font: inherit;
    font-size: 0.84rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
    text-align: start;
    text-decoration: none;
    transition: color 160ms ease;
}

@media (hover: hover) {
    .home-footer-column a:hover,
    .home-footer-link-button:hover { color: var(--footer-accent); }
}

.home-footer :is(a, button):focus-visible {
    outline: 2px solid var(--footer-accent);
    outline-offset: 3px;
    border-radius: 2px;
}

.home-footer-column span {
    color: var(--footer-muted);
    font-size: 0.84rem;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.home-footer-trust {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.home-footer-trust a {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
}

.home-footer-trust img {
    display: block;
    width: auto;
    max-width: 100%;
    height: 110px;
    object-fit: contain;
}

.home-footer-trust .home-footer-licenses-link {
    min-height: 38px;
    padding: 7px 18px;
    border: 1px solid var(--footer-line);
    border-radius: 10px;
    color: var(--footer-accent);
    font-size: .82rem;
    font-weight: 800;
    text-decoration: none;
    transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

@media (hover: hover) {
    .home-footer-trust .home-footer-licenses-link:hover {
        border-color: var(--footer-accent);
        background: var(--footer-accent);
        color: #fff;
    }
}

.home-footer-column a[href^="mailto:"] {
    direction: ltr;
    color: var(--footer-accent);
    font-family: Arial, sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    text-align: start;
}

.home-footer-bottom {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--footer-line);
    color: var(--footer-muted);
    font-size: 0.76rem;
    overflow-wrap: anywhere;
}

@media (min-width: 760px) {
    .home-footer-grid {
        grid-template-columns: minmax(200px, 1fr) minmax(230px, 1.1fr) minmax(180px, 0.8fr) minmax(110px, 0.5fr);
    }
}

@media (min-width: 760px) and (max-width: 919px) {
    .home-footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: clamp(1rem, 2vw, 1.5rem);
    }

    .home-footer-trust { align-items: center; }
}

@media (max-width: 759px) {
    .home-footer {
        width: min(560px, calc(100% - 32px));
        padding: 24px 0 16px;
    }

    .home-footer-grid {
        gap: 18px;
        padding-bottom: 16px;
    }

    .home-footer-brand { gap: 4px; }
    .home-footer-brand > p {
        max-width: none;
        font-size: 0.8rem;
        line-height: 1.6;
    }

    .home-footer .home-brand img {
        width: 3.1rem;
        height: 3.1rem;
        border-radius: .9rem;
    }

    .home-footer-column { gap: 4px 12px; }
    .home-footer-column h2 {
        grid-column: 1 / -1;
        margin-bottom: 2px;
    }

    .home-footer-guides { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .home-footer-guides a { width: 100%; }

    .home-footer-contact {
        grid-template-columns: minmax(0, 1fr) auto;
        padding-top: 14px;
        border-top: 1px solid var(--footer-line);
    }
    .home-footer-contact a { order: 1; }
    .home-footer-contact .home-footer-link-button {
        order: 2;
        min-height: 44px;
        justify-content: center;
        padding: 6px 12px;
        border: 1px solid var(--footer-line);
        border-radius: 10px;
        color: var(--footer-accent);
        font-weight: 700;
    }
    .home-footer-contact span {
        grid-column: 1 / -1;
        order: 3;
        font-size: 0.78rem;
    }

    .home-footer-trust {
        padding-top: 14px;
        border-top: 1px solid var(--footer-line);
    }

    .home-footer-bottom {
        padding-top: 12px;
    }
    .home-footer-bottom span:first-child { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .home-footer-column a,
    .home-footer-link-button { transition: none; }
}
