@font-face {
    font-family: "Qiell Footer Manrope";
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url("../fonts/manrope/manrope-300.ttf") format("truetype");
}

@font-face {
    font-family: "Qiell Footer Manrope";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/manrope/manrope-400.ttf") format("truetype");
}

html[data-page-theme="light"] {
    --footer-cut-bg: #ffffff;
}

.footer-contour {
    display: block;
    position: absolute;
    inset: 0 0 auto;
    width: 100%;
    height: 22px;
    overflow: visible;
    z-index: 10;
    pointer-events: none;
}

.footer-contour-fill {
    fill: var(--footer-cut-bg, #010101);
}

.footer-contour-edge {
    fill: none;
    stroke: color-mix(in srgb, var(--navbar-footer-fg) 15%, transparent);
    stroke-width: 1px;
}

.site-footer {
    --footer-rem: 1rem;
    --footer-pad-y: calc(3.25 * var(--footer-rem));
    --footer-pad-x: 8.2%;
    background: transparent;
    color: #0b0c14;
    font-family: var(--font-body);
    font-weight: 700;
    line-height: 1.6;
    letter-spacing: -0.01em;
    position: relative;
    box-sizing: border-box;
    min-height: 100vh;
    min-height: 100svh;
    padding: var(--footer-pad-y) var(--footer-pad-x) calc(1.6 * var(--footer-rem));
    scroll-snap-align: start;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

@media (min-width: 769px) {
    .site-footer {
        --footer-pad-y: calc(8.5 * var(--footer-rem));
    }
}

@media (max-width: 768px) {
    .site-footer {
        padding-top: calc(78px + var(--footer-pad-y));
    }
}

.about-footer-wrap {
    width: 100%;
    flex: 1;
    max-width: 1500px;
    margin: 0 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: calc(2 * var(--footer-rem));
}

.about-footer-top {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: calc(2 * var(--footer-rem));
}

.about-footer-tagline {
    font-size: clamp(calc(1.7 * var(--footer-rem)), 2.8vw, calc(2.8 * var(--footer-rem)));
    font-weight: 400;
    letter-spacing: -0.02em;
    color: #000000;
    transform: translateX(calc(-3.7 * var(--footer-rem) - 1px));
}

.about-footer-nav {
    display: flex;
    gap: clamp(calc(2.5 * var(--footer-rem)), 9vw, calc(10 * var(--footer-rem)));
}

.about-footer-nav ul {
    list-style: none;
    display: grid;
    margin: 0;
    padding: 0;
    gap: calc(0.72 * var(--footer-rem));
}

.about-footer-nav a {
    color: #000000;
    text-decoration: none;
    font-size: calc(1.05 * var(--footer-rem));
    font-weight: 100;
    opacity: 0.9;
}

.about-footer-nav a:hover {
    opacity: 1;
}

.about-footer-word {
    position: relative;
    z-index: 1;
    mix-blend-mode: screen;
    display: block;
    font-family: var(--font-google-sans-flex);
    font-size: clamp(calc(3.8 * var(--footer-rem)), 20.5vw, calc(27 * var(--footer-rem)));
    line-height: 0.9;
    font-weight: 670 !important;
    font-variation-settings: "wght" 670, "wdth" 100, "opsz" 144;
    letter-spacing: -0.02em;
    color: #000000;
    width: max-content;
    max-width: none;
    margin: 0;
    align-self: center;
    white-space: nowrap;
    transform: translate(calc(-0.03em + 3px), -0.02em) scaleX(0.97);
    --about-footer-chroma-cyan-x: 5.2px;
    --about-footer-chroma-red-x: -4.8px;
    --about-footer-chroma-alpha: 0.96;
    animation: about-footer-word-chroma-double-blink 3.2s steps(1, end) infinite;
    animation-play-state: paused;
    will-change: text-shadow;
    text-shadow: none;
}

.about-footer-word.is-chroma-active {
    animation-play-state: running;
}

.about-footer-word::before {
    content: "";
    position: absolute;
    top: -500vmax;
    bottom: -500vmax;
    left: -500vmax;
    right: -500vmax;
    background: #ffffff;
    z-index: -1;
    pointer-events: none;
}

.footer-stars-bg .about-footer-word::before {
    /* Keep white — the screen blend on .about-footer-word reveals stars through black text */
}

@keyframes about-footer-word-chroma-double-blink {
    0%,
    29.2%,
    36.6%,
    37.9%,
    39.5%,
    100% {
        text-shadow: none;
    }

    30% {
        text-shadow:
            var(--about-footer-chroma-cyan-x) 0 0 rgba(0, 255, 255, var(--about-footer-chroma-alpha)),
            var(--about-footer-chroma-red-x) 0 0 rgba(255, 0, 0, var(--about-footer-chroma-alpha)),
            calc(var(--about-footer-chroma-cyan-x) * 1.9) 0 0 rgba(0, 255, 255, 0.34),
            calc(var(--about-footer-chroma-red-x) * 1.9) 0 0 rgba(255, 0, 0, 0.34);
    }

    36.8%,
    38.4% {
        text-shadow:
            var(--about-footer-chroma-cyan-x) 0 0 rgba(0, 255, 255, var(--about-footer-chroma-alpha)),
            var(--about-footer-chroma-red-x) 0 0 rgba(255, 0, 0, var(--about-footer-chroma-alpha)),
            calc(var(--about-footer-chroma-cyan-x) * 1.9) 0 0 rgba(0, 255, 255, 0.34),
            calc(var(--about-footer-chroma-red-x) * 1.9) 0 0 rgba(255, 0, 0, 0.34);
    }
}

.about-footer-bottom {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: calc(1.25 * var(--footer-rem));
    padding-top: calc(0.75 * var(--footer-rem));
}

.about-footer-brand {
    display: inline-flex;
    align-items: center;
    gap: calc(0.24 * var(--footer-rem));
    color: #000000;
    text-decoration: none;
    font-size: clamp(calc(1.45 * var(--footer-rem)), 2.15vw, calc(1.95 * var(--footer-rem)));
    font-weight: 100;
    line-height: 1.6;
    letter-spacing: -0.02em;
    transform: translateX(calc(-3.5 * var(--footer-rem) - 3px));
}

.about-footer-brand-mark {
    width: clamp(46px, 5.2vw, 62px);
    height: auto;
    filter: brightness(0);
    opacity: 0.84;
}

.about-footer-brand-word {
    color: inherit;
    font-family: var(--font-google-sans-flex);
    font-weight: 400;
}

.about-footer-copyright {
    margin-left: auto;
    color: #000000;
    font-size: calc(0.95 * var(--footer-rem));
    font-weight: 100;
    letter-spacing: -0.01em;
    opacity: 0.78;
}

.about-footer-legal {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: calc(1.2 * var(--footer-rem));
}

.about-footer-legal a {
    color: #000000;
    text-decoration: none;
    font-size: calc(1 * var(--footer-rem));
    font-weight: 100;
}

.about-footer-legal a:hover {
    color: #000000;
}


#footer .about-footer-brand-word {
    font-size: 0.79em;
    color: #111111;
    font-family: "Montserrat", "Segoe UI", sans-serif;
    font-weight: 400;
}

#footer .about-footer-brand-word .tm {
    display: inline-block;
    font-size: 0.66em;
    transform: translateY(calc(-0.3em - 1px));
    margin-left: 0.02em;
    font-family: inherit;
    font-weight: inherit;
}

#footer .about-footer-tagline {
    color: #111111;
    position: absolute;
    top: var(--footer-pad-y);
    left: var(--footer-pad-x);
    transform: translateX(calc(-3.7 * var(--footer-rem) - 1px));
    max-width: calc(100% - (2 * var(--footer-pad-x)));
}

#footer .about-footer-meta {
    margin-left: auto;
    margin-right: -52px;
    display: inline-flex;
    align-items: center;
    gap: calc(1.2 * var(--footer-rem));
}

#footer .about-footer-bottom .about-footer-brand {
    transform: none;
    font-size: calc(1.45 * var(--footer-rem));
    gap: calc(0.28 * var(--footer-rem));
}

#footer .about-footer-bottom .about-footer-brand-mark {
    width: 46px;
}

#footer .about-footer-meta-item {
    color: #3a3a3a;
    opacity: 0.95;
    font-family: "Qiell Footer Manrope", "Segoe UI", sans-serif;
    font-size: calc(1.3 * var(--footer-rem));
    font-weight: 400;
    line-height: 1;
    text-decoration: none;
    margin: 0;
}

#footer .about-footer-bottom {
    display: flex;
    align-items: flex-end;
}

#footer .about-footer-legal {
    display: inline-flex;
    align-items: center;
    margin: 0;
}

#footer .about-footer-top {
    position: static;
    justify-content: flex-end;
    transform: none;
}

#footer .about-footer-nav {
    transform: translateX(calc(-4 * var(--footer-rem)));
}

#footer .about-footer-legal a {
    display: inline-block;
}

#footer .about-footer-nav a {
    color: #111111;
    opacity: 1;
    font-size: calc(1.22 * var(--footer-rem));
    font-weight: 400;
}

#footer .about-footer-nav a,
#footer .about-footer-legal a {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-bottom: calc(0.24 * var(--footer-rem));
}

#footer .about-footer-nav a::after,
#footer .about-footer-legal a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1px;
    background: #111111;
    transform-origin: left center;
    transform: scaleX(0);
    transition: transform 0.64s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
    pointer-events: none;
}

#footer .about-footer-nav a.nav-line-reset::after,
#footer .about-footer-legal a.nav-line-reset::after {
    transition: none;
    transform: scaleX(0);
}

#footer .about-footer-nav a.nav-line-entering::after,
#footer .about-footer-nav a.nav-line-visible::after,
#footer .about-footer-legal a.nav-line-entering::after,
#footer .about-footer-legal a.nav-line-visible::after {
    transform: scaleX(1);
}

#footer .about-footer-nav a.nav-line-exiting::after,
#footer .about-footer-legal a.nav-line-exiting::after {
    transform: translate3d(104%, 0, 0);
}

@media (max-width: 900px) {
    .about-footer-wrap {
        min-height: 0;
    }

    .about-footer-top {
        flex-direction: column;
        gap: calc(1.25 * var(--footer-rem));
    }

    #footer .about-footer-top,
    #footer .about-footer-tagline,
    #footer .about-footer-nav,
    #footer .about-footer-bottom .about-footer-brand,
    #footer .about-footer-meta {
        transform: none;
    }

    #footer .about-footer-tagline {
        position: static;
        max-width: 100%;
    }

    #footer .about-footer-meta {
        margin-left: 0;
        margin-right: 0;
    }

    #footer .about-footer-bottom {
        align-items: flex-start;
    }

    .about-footer-tagline {
        max-width: 100%;
    }

    .about-footer-nav {
        width: 100%;
        justify-content: space-between;
        gap: calc(1.5 * var(--footer-rem));
        align-items: flex-start;
    }

    .about-footer-word {
        margin-top: calc(0.5 * var(--footer-rem));
    }

    .about-footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }

    .about-footer-copyright {
        margin-left: 0;
    }

    .about-footer-legal {
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .site-footer {
        scroll-snap-align: start;
        scroll-snap-stop: always;
    }
}

@media (max-width: 640px) {
    .site-footer {
        --footer-pad-y: calc(2.4 * var(--footer-rem));
        min-height: 100vh;
        min-height: 100svh;
    }

    #footer .about-footer-nav a {
        font-size: calc(1.1 * var(--footer-rem));
    }

    #footer .about-footer-meta-item {
        font-size: calc(0.98 * var(--footer-rem));
    }
}

/* Keep the same footer scale regardless of each page's root font size. */
@media (max-width: 500px) {
    .footer-stars-bg .site-footer {
        --footer-rem: 13.4px;
        font-size: 13.4px;
    }
}
