/*
 * Editorial footer — motion + graphics edition.
 * Layout: compact newsletter strip | marquee tagline strip | brand +
 * 3 link columns | trust + payment row | bottom strip.
 * Decorations: huge ghosted brand watermark, asterisk-in-ring ornament,
 * diagonal-lines SVG corner, animated marquee, 3D hover lifts on cards
 * and chips, floating back-to-top button.
 */

.footer {
    background: var(--color-text);
    color: var(--color-surface);
    padding: clamp(2rem, 4vw, 3.5rem) 0 clamp(1.5rem, 3vw, 2.5rem);
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

/* ---------- Decorative SVG corner ---------- */
.footer-deco {
    position: absolute;
    top: 0;
    right: 0;
    width: 180px;
    height: 180px;
    color: var(--color-accent);
    pointer-events: none;
    z-index: 0;
    transform: scaleX(-1);
}

/* ---------- Asterisk + ring ornament ---------- */
.footer-aster-wrap {
    position: absolute;
    top: clamp(1rem, 2vw, 1.75rem);
    left: clamp(1rem, 2vw, 1.75rem);
    width: 38px;
    height: 38px;
    z-index: 1;
    color: var(--color-accent);
    animation: footerFloat 6s ease-in-out infinite;
}
.footer-aster-ring {
    position: absolute;
    inset: -8px;
    width: 54px;
    height: 54px;
    opacity: 0.55;
    animation: footerSpin 22s linear infinite reverse;
}
.footer-aster {
    position: absolute;
    inset: 4px;
    width: 30px;
    height: 30px;
    animation: footerSpin 14s linear infinite;
}
@keyframes footerSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
@keyframes footerFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-4px); }
}

/* ---------- Huge ghosted brand watermark ---------- */
.footer-watermark {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -4vw;
    text-align: center;
    font-family: var(--font-heading);
    font-size: clamp(7rem, 18vw, 22rem);
    line-height: 0.85;
    color: var(--color-surface);
    opacity: 0.04;
    letter-spacing: -0.04em;
    font-weight: 400;
    pointer-events: none;
    user-select: none;
    z-index: 0;
    white-space: nowrap;
}
.footer.is-in .footer-watermark {
    animation: footerWatermarkIn 1200ms cubic-bezier(0.2, 0.8, 0.2, 1) 200ms both;
}
@keyframes footerWatermarkIn {
    0%   { opacity: 0;    transform: translateY(40px); }
    100% { opacity: 0.04; transform: translateY(0); }
}

/* ---------- Compact newsletter strip ---------- */
.footer-news {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(1.5rem, 3vw, 2.5rem);
    padding: 0 0 clamp(1.5rem, 2.5vw, 2rem);
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

.footer-news-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    flex: 1 1 320px;
    padding-left: 56px;
}

.footer-news-eyebrow {
    font-size: 10.5px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--color-accent);
    position: relative;
    padding-left: 22px;
}
.footer-news-eyebrow::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 14px;
    height: 1.5px;
    background: var(--color-accent);
}

.footer-news-headline {
    font-family: var(--font-heading);
    font-size: clamp(1.2rem, 1.8vw, 1.6rem);
    line-height: 1.15;
    margin: 0;
    font-weight: 400;
    color: var(--color-surface);
    letter-spacing: -0.005em;
}
.footer-news-hook {
    color: var(--color-accent);
    font-style: italic;
}

.footer-news-form {
    flex: 1 1 360px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    max-width: 460px;
}

.footer-news-field {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    padding: 4px 4px 4px 20px;
    transition: border-color 250ms ease, background 250ms ease, transform 250ms ease;
}
.footer-news-field:focus-within {
    border-color: rgba(255, 255, 255, 0.42);
    background: rgba(255, 255, 255, 0.10);
    transform: translateY(-1px);
}

.footer-news-field input[type=email] {
    flex: 1;
    background: transparent;
    border: 0;
    outline: 0;
    color: var(--color-surface);
    font-size: 13px;
    padding: 10px 6px;
    font-family: inherit;
    min-width: 0;
}
.footer-news-field input[type=email]::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.footer-news-submit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--color-surface);
    color: var(--color-text);
    border: 0;
    border-radius: 999px;
    padding: 9px 16px;
    font-size: 10.5px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 600;
    cursor: pointer;
    transition: background 280ms ease, color 280ms ease, transform 280ms ease;
    flex-shrink: 0;
}
.footer-news-submit:hover {
    background: var(--color-accent);
    color: var(--color-surface);
    transform: translateX(2px);
}
.footer-news-submit i {
    font-size: 9px;
    transition: transform 280ms ease;
}
.footer-news-submit:hover i {
    transform: translateX(2px);
}

.footer-news-fine {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
    padding-left: 20px;
}
.footer-news-fine i {
    font-size: 9px;
    color: var(--color-accent);
}

@media (max-width: 768px) {
    .footer-news {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-3);
    }
    .footer-news-text { padding-left: 0; }
    .footer-news-field {
        padding: 4px 4px 4px 16px;
    }
}
@media (max-width: 480px) {
    .footer-news-field {
        flex-direction: column;
        align-items: stretch;
        padding: 4px;
        border-radius: 14px;
        gap: 4px;
    }
    .footer-news-field input[type=email] { padding: 11px 12px; }
    .footer-news-submit { justify-content: center; }
    .footer-news-fine { padding-left: 0; }
}

/* ---------- Marquee strip ---------- */
.footer-marquee {
    overflow: hidden;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    z-index: 2;
    margin-bottom: clamp(1.5rem, 2.5vw, 2.25rem);
    mask-image: linear-gradient(to right, transparent 0, #000 60px, #000 calc(100% - 60px), transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 60px, #000 calc(100% - 60px), transparent 100%);
}
.footer-marquee-track {
    display: inline-flex;
    align-items: center;
    gap: clamp(20px, 3vw, 40px);
    white-space: nowrap;
    animation: footerMarquee 40s linear infinite;
    padding-right: clamp(20px, 3vw, 40px);
}
.footer-marquee-item {
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.55);
}
.footer-marquee-sep {
    color: var(--color-accent);
    font-size: 9px;
    opacity: 0.85;
}
@keyframes footerMarquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ---------- Inner grid ---------- */
.footer-inner {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1.3fr;
    gap: clamp(1.5rem, 3vw, 3rem);
    padding-bottom: clamp(2rem, 3.5vw, 3rem);
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
    position: relative;
    z-index: 2;
}

/* Reveal cascade on columns */
.footer .footer-brand,
.footer .footer-col {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 600ms cubic-bezier(0.2, 0.8, 0.2, 1) calc(var(--fd, 0) * 90ms + 200ms),
                transform 700ms cubic-bezier(0.2, 0.8, 0.2, 1) calc(var(--fd, 0) * 90ms + 200ms);
}
.footer.is-in .footer-brand,
.footer.is-in .footer-col { opacity: 1; transform: translateY(0); }
.footer .footer-brand { --fd: 0; }
.footer .footer-col:nth-of-type(2) { --fd: 1; }
.footer .footer-col:nth-of-type(3) { --fd: 2; }
.footer .footer-col:nth-of-type(4) { --fd: 3; }
.footer .footer-col:nth-of-type(5) { --fd: 4; }

/* ---------- Brand block ---------- */
.footer-brand {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    max-width: 320px;
}

.footer-logo {
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
    text-decoration: none;
    color: var(--color-surface);
}
.footer-logo-word {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 2.6vw, 2.4rem);
    color: var(--color-surface);
    letter-spacing: 0.06em;
    font-weight: 400;
    line-height: 1;
    background: linear-gradient(135deg, var(--color-surface) 0%, var(--color-accent-soft, var(--color-surface)) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.footer-logo-sub {
    font-size: 9.5px;
    letter-spacing: 0.30em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--color-accent);
    padding-left: 1px;
}

.footer-tagline {
    color: rgba(255, 255, 255, 0.62);
    font-size: 13px;
    line-height: 1.55;
    max-width: 30ch;
    margin: 0;
}

.footer-locale {
    list-style: none;
    margin: 0;
    padding: var(--space-2) 0 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 11px;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.65);
}
.footer-locale li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.footer-locale i {
    color: var(--color-accent);
    font-size: 10px;
    width: 12px;
}

.footer-social {
    margin-top: var(--space-2);
}
.footer-social .social-links {
    color: rgba(255, 255, 255, 0.82);
}

/* ---------- Link columns ---------- */
.footer-col {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    min-width: 0;
}

.footer-col-heading {
    color: rgba(255, 255, 255, 0.5);
    font-size: 10.5px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    font-weight: 600;
    display: block;
    position: relative;
    padding-left: 22px;
}
.footer-col-heading::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 14px;
    height: 1.5px;
    background: var(--color-accent);
}

.footer-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.footer-col a {
    color: rgba(255, 255, 255, 0.85);
    font-size: 13.5px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 0;
    transition: color 200ms ease, transform 220ms ease;
}
.footer-col a > i {
    font-size: 9px;
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity 220ms ease, transform 220ms ease;
}
.footer-col a:hover {
    color: var(--color-surface);
    transform: translateX(2px);
}
.footer-col a:hover > i {
    opacity: 0.7;
    transform: translateX(0);
    color: var(--color-accent);
}

/* ---------- Contact column ---------- */
.footer-col-contact .footer-contact {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}
.footer-col-contact .footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 8px 0;
    transition: transform 260ms ease;
}
.footer-col-contact .footer-contact li:hover {
    transform: translateX(2px);
}
.footer-col-contact .footer-contact > li > i {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--color-accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
    margin-top: 2px;
    transition: background 280ms ease, transform 280ms ease;
}
.footer-col-contact .footer-contact li:hover > i {
    background: var(--color-accent);
    color: var(--color-surface);
    transform: scale(1.08) rotate(-6deg);
}
.footer-col-contact .footer-contact > li > div {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}
.footer-contact-label {
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
}
.footer-col-contact .footer-contact a {
    color: var(--color-surface);
    font-size: 13.5px;
    padding: 0;
}
.footer-col-contact .footer-contact a:hover {
    color: var(--color-accent);
    transform: none;
}
.footer-col-contact address {
    font-style: normal;
    color: var(--color-surface);
    font-size: 13px;
    line-height: 1.4;
}

/* ---------- Trust + payment row ---------- */
.footer-trust {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    padding: var(--space-4) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}
.footer-trust-items {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 14px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 11.5px;
    letter-spacing: 0.04em;
}
.footer-trust-items > span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: color 220ms ease;
}
.footer-trust-items > span:hover { color: var(--color-surface); }
.footer-trust-items i {
    color: var(--color-accent);
    font-size: 10px;
    transition: transform 280ms ease;
}
.footer-trust-items > span:hover i {
    transform: scale(1.18) rotate(-6deg);
}
.footer-trust-sep {
    opacity: 0.3;
    color: rgba(255, 255, 255, 0.6);
}

.footer-pay {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.footer-pay-label {
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
}
.footer-pay-list {
    display: inline-flex;
    gap: 5px;
    flex-wrap: wrap;
    perspective: 600px;
}
.footer-pay-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    padding: 4px 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.10);
    color: var(--color-surface);
    font-size: 9.5px;
    letter-spacing: 0.04em;
    font-weight: 700;
    line-height: 1;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 320ms cubic-bezier(0.2, 0.8, 0.2, 1),
                background 220ms ease,
                border-color 220ms ease,
                box-shadow 320ms ease;
    transform-style: preserve-3d;
}
.footer-pay-chip:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: var(--color-accent);
    transform: translateY(-2px) rotateX(8deg);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
}

/* ---------- Bottom strip ---------- */
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-4);
    color: rgba(255, 255, 255, 0.48);
    font-size: 11.5px;
    position: relative;
    z-index: 2;
}

.footer-policy {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: var(--space-4);
}
.footer-policy a {
    color: rgba(255, 255, 255, 0.62);
    font-size: 11.5px;
    text-decoration: none;
    transition: color 200ms ease;
}
.footer-policy a:hover {
    color: var(--color-surface);
}

/* ---------- Back to top button ---------- */
.footer-totop {
    position: absolute;
    right: clamp(1rem, 2vw, 2rem);
    bottom: clamp(1rem, 2vw, 2rem);
    z-index: 5;
    width: 54px;
    height: 54px;
    border-radius: 999px;
    border: 1.5px solid rgba(255, 255, 255, 0.20);
    background: rgba(255, 255, 255, 0.04);
    color: var(--color-surface);
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    cursor: pointer;
    overflow: hidden;
    transition: background 260ms ease, color 260ms ease,
                border-color 260ms ease, transform 320ms cubic-bezier(0.2, 0.8, 0.2, 1);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.footer-totop i {
    font-size: 14px;
    transition: transform 320ms cubic-bezier(0.2, 0.8, 0.2, 1);
    animation: footerBounce 2.4s ease-in-out infinite;
}
.footer-totop span {
    font-size: 8px;
    letter-spacing: 0.20em;
    text-transform: uppercase;
    font-weight: 700;
    opacity: 0.75;
}
.footer-totop:hover {
    background: var(--color-accent);
    color: var(--color-surface);
    border-color: var(--color-accent);
    transform: translateY(-3px) scale(1.04);
}
.footer-totop:hover i {
    animation: none;
    transform: translateY(-2px);
}
@keyframes footerBounce {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-3px); }
}

/* ---------- Mobile ---------- */
@media (max-width: 992px) {
    .footer-inner {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-5);
    }
    .footer-brand {
        grid-column: 1 / -1;
        max-width: 100%;
        padding-bottom: var(--space-4);
        border-bottom: 1px solid rgba(255, 255, 255, 0.10);
    }
    .footer-trust {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-3);
    }
    .footer-bottom {
        flex-direction: column;
        gap: var(--space-3);
        align-items: flex-start;
    }
    .footer-deco { width: 120px; height: 120px; }
    .footer-aster-wrap { width: 30px; height: 30px; }
    .footer-aster-ring { inset: -6px; width: 42px; height: 42px; }
    .footer-aster { inset: 4px; width: 22px; height: 22px; }
    .footer-totop {
        width: 46px;
        height: 46px;
        bottom: 12px;
        right: 12px;
    }
    .footer-totop span { display: none; }
}

@media (max-width: 560px) {
    .footer-inner { grid-template-columns: 1fr; }
    .footer-policy { gap: var(--space-3); flex-wrap: wrap; }
    .footer-watermark { font-size: clamp(5rem, 30vw, 9rem); }
}

@media (prefers-reduced-motion: reduce) {
    .footer-aster,
    .footer-aster-ring,
    .footer-aster-wrap,
    .footer-marquee-track,
    .footer .footer-brand,
    .footer .footer-col,
    .footer-watermark,
    .footer-totop i,
    .footer-pay-chip,
    .footer-col-contact .footer-contact li,
    .footer-news-field {
        transition: none !important;
        animation: none !important;
        transform: none !important;
        opacity: 1 !important;
    }
    .footer-watermark { opacity: 0.04 !important; }
}
