/* ─────────────────────────────────────────────────────────────
   footer.css — shared upgraded site footer (.page-footer)
   Used on the landing page and all public content pages.
   Depends on landing.css design tokens (--accent-*, --text-*).
   Provides fallbacks for --font-heading / --border-color, which
   live in styles.css and aren't linked on every page.
   ───────────────────────────────────────────────────────────── */

.page-footer {
    position: relative;
    overflow: hidden;
    border-top: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
    background: linear-gradient(180deg, rgba(167, 119, 227, 0.04), rgba(12, 10, 18, 0.6));
    padding: 72px 6% 32px;
    margin-top: 40px;
}

.footer-glow {
    position: absolute;
    top: -160px;
    left: 50%;
    transform: translateX(-50%);
    width: 620px;
    height: 320px;
    background: radial-gradient(ellipse at center, rgba(110, 142, 251, 0.22), transparent 70%);
    filter: blur(20px);
    pointer-events: none;
    animation: footerGlowPulse 7s ease-in-out infinite;
}

@keyframes footerGlowPulse {
    0%, 100% { opacity: .55; transform: translateX(-50%) scale(1); }
    50%      { opacity: 1;   transform: translateX(-50%) scale(1.08); }
}

/* Woven "loom" threads that fill the empty side gutters */
.footer-threads {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 300px;
    pointer-events: none;
    background-image: repeating-linear-gradient(
        115deg,
        rgba(167, 119, 227, 0.11) 0px,
        rgba(167, 119, 227, 0.11) 1px,
        transparent 1px,
        transparent 22px
    );
    -webkit-mask-image: radial-gradient(ellipse 70% 90% at center, #000 0%, transparent 75%);
    mask-image: radial-gradient(ellipse 70% 90% at center, #000 0%, transparent 75%);
    opacity: .8;
    animation: threadDrift 12s ease-in-out infinite;
}

.footer-threads-left {
    left: 0;
}

.footer-threads-right {
    right: 0;
    transform: scaleX(-1);
    animation-delay: -6s;
}

.footer-threads::after {
    content: "";
    position: absolute;
    top: 40%;
    left: 45%;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, rgba(110, 142, 251, 0.35), rgba(167, 119, 227, 0.08) 60%, transparent 72%);
    filter: blur(4px);
    animation: orbFloat 9s ease-in-out infinite;
}

@keyframes threadDrift {
    0%, 100% { background-position: 0 0; opacity: .55; }
    50%      { background-position: 0 -22px; opacity: .9; }
}

@keyframes orbFloat {
    0%, 100% { transform: translateY(0) scale(1); opacity: .7; }
    50%      { transform: translateY(-16px) scale(1.12); opacity: 1; }
}

@media (max-width: 1100px) {
    .footer-threads { display: none; }
}

.footer-inner {
    position: relative;
    max-width: 920px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px 72px;
    padding-bottom: 40px;
}

.footer-brand {
    flex: 1 1 300px;
    max-width: 380px;
}

.footer-brand .footer-logo {
    font-family: var(--font-heading, var(--font-display));
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 14px;
}

.footer-tagline {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.65;
    margin-bottom: 20px;
}

.footer-socials {
    display: flex;
    gap: 12px;
}

.social-btn {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform .25s ease, color .25s ease, border-color .25s ease, background .25s ease;
}

.social-btn:hover {
    transform: translateY(-3px);
    color: #fff;
    background: var(--accent-gradient);
    border-color: transparent;
    box-shadow: 0 8px 20px -6px rgba(167, 119, 227, 0.6);
}

.footer-cols {
    display: flex;
    flex-wrap: wrap;
    gap: 64px;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-col h4 {
    font-family: var(--font-heading, var(--font-display));
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-faint, var(--text-secondary));
    margin-bottom: 4px;
}

.footer-col a {
    position: relative;
    color: var(--text-secondary);
    font-size: 0.92rem;
    width: fit-content;
    padding-left: 0;
    transition: color .25s ease, transform .25s ease;
}

.footer-col a::before {
    content: "";
    position: absolute;
    left: -14px;
    top: 50%;
    width: 8px;
    height: 1.5px;
    border-radius: 2px;
    background: var(--accent-gradient);
    transform: translateY(-50%) scaleX(0);
    transform-origin: left center;
    opacity: 0;
    transition: transform .25s ease, opacity .25s ease;
}

.footer-col a:hover {
    color: var(--text-primary);
    transform: translateX(14px);
}

.footer-col a:hover::before {
    transform: translateY(-50%) scaleX(1);
    opacity: 1;
}

.footer-col a.is-current {
    color: var(--accent-soft, var(--accent-color));
}

.footer-bottom {
    position: relative;
    max-width: 920px;
    margin: 0 auto;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-madeby {
    color: var(--text-faint, var(--text-secondary));
    font-size: 0.85rem;
}

.footer-madeby i {
    color: var(--accent-color);
    margin-left: 4px;
}

@media (max-width: 640px) {
    .footer-inner { gap: 36px; }
    .footer-cols { gap: 32px; }
    .footer-bottom { justify-content: center; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
    .footer-glow,
    .footer-threads,
    .footer-threads::after { animation: none; }
}
