/* TextSplitter-style scroll reveal for main headings only. */
body.heading-motion-ready main :where(h1, h2) {
    overflow: visible;
}

body.heading-motion-ready main :where(h1, h2) .text-split-word {
    display: inline-block;
    transform: translate3d(0, 112%, 0) rotate(2deg);
    opacity: 0;
    transition:
        transform 1000ms cubic-bezier(0.22, 1, 0.36, 1),
        opacity 900ms cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: calc(var(--text-split-index, 0) * 42ms);
    will-change: transform, opacity;
}

body.heading-motion-ready main :where(h1, h2).is-heading-visible .text-split-word {
    transform: translate3d(0, 0, 0) rotate(0deg);
    opacity: 1;
}

body.heading-motion-ready main :where(h1, h2) .text-split-word:nth-of-type(1) { --text-split-index: 0; }
body.heading-motion-ready main :where(h1, h2) .text-split-word:nth-of-type(2) { --text-split-index: 1; }
body.heading-motion-ready main :where(h1, h2) .text-split-word:nth-of-type(3) { --text-split-index: 2; }
body.heading-motion-ready main :where(h1, h2) .text-split-word:nth-of-type(4) { --text-split-index: 3; }
body.heading-motion-ready main :where(h1, h2) .text-split-word:nth-of-type(5) { --text-split-index: 4; }
body.heading-motion-ready main :where(h1, h2) .text-split-word:nth-of-type(6) { --text-split-index: 5; }
body.heading-motion-ready main :where(h1, h2) .text-split-word:nth-of-type(7) { --text-split-index: 6; }
body.heading-motion-ready main :where(h1, h2) .text-split-word:nth-of-type(8) { --text-split-index: 7; }
body.heading-motion-ready main :where(h1, h2) .text-split-word:nth-of-type(9) { --text-split-index: 8; }
body.heading-motion-ready main :where(h1, h2) .text-split-word:nth-of-type(10) { --text-split-index: 9; }
body.heading-motion-ready main :where(h1, h2) .text-split-word:nth-of-type(n+11) { --text-split-index: 10; }

body.heading-motion-ready main :where(
    .hero-section,
    .about-hero-section,
    .projects-hero,
    .blog-hero,
    .blog-detail-hero,
    .contact-hero,
    .project-detail-hero
) :where(h1, h2) {
    overflow: visible;
}

body.heading-motion-ready main :where(
    .hero-section,
    .about-hero-section,
    .projects-hero,
    .blog-hero,
    .blog-detail-hero,
    .contact-hero,
    .project-detail-hero
) .text-split-word {
    opacity: 1;
    transform: none;
    transition: none;
}

/* Site-wide editorial motion for body copy, media, and repeated content blocks. */
body.site-motion-ready .motion-fade-item {
    opacity: 0;
    transform: translate3d(0, 26px, 0);
    transition:
        opacity 850ms cubic-bezier(0.22, 1, 0.36, 1),
        transform 950ms cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: var(--motion-delay, 0ms);
    will-change: opacity, transform;
}

body.site-motion-ready .motion-fade-item.is-motion-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

main :where(a, button, input, textarea, select) {
    transition:
        color 260ms ease,
        background-color 260ms ease,
        border-color 260ms ease,
        box-shadow 260ms ease,
        transform 300ms cubic-bezier(0.22, 1, 0.36, 1),
        opacity 260ms ease;
}

main :where(figure, article) {
    transition:
        transform 420ms cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

main :where(figure, article) img {
    transition:
        transform 850ms cubic-bezier(0.22, 1, 0.36, 1),
        filter 850ms cubic-bezier(0.22, 1, 0.36, 1),
        opacity 520ms ease;
}

@media (hover: hover) and (pointer: fine) {
    main :where(figure, article):hover > img,
    main :where(figure, article):hover figure > img,
    main :where(figure, article):hover picture > img {
        transform: scale(1.035);
        filter: saturate(1.04) contrast(1.02);
    }

    main :where(.collection-card, .project-slide, .blog-card, .team-card, .venture-card):hover {
        transform: translate3d(0, -4px, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    body.heading-motion-ready main :where(h1, h2) {
        overflow: visible;
    }

    body.heading-motion-ready main :where(h1, h2) .text-split-word {
        transform: none;
        opacity: 1;
        transition: none;
    }

    body.site-motion-ready .motion-fade-item,
    main :where(a, button, input, textarea, select, figure, article, img) {
        animation: none;
        transform: none;
        transition: none;
    }
}

/* Shared footer */
.site-footer {
    padding: 25px 0 15px;
    background: var(--primary);
    color: var(--black);
}

.footer-inner {
    width: 90%;
    max-width: none;
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    margin: 0 auto;
}

.footer-brand,
.footer-nav-wrap,
.footer-policy {
    display: grid;
    gap: 28px;
}

.footer-logo {
    width: 132px;
    display: inline-flex;
}

.footer-logo img {
    width: 100%;
    height: auto;
    filter: brightness(0);
}

.footer-contact {
    display: grid;
    gap: 12px;
    font-style: normal;
    font-size: 12px;
    line-height: 22px;
    font-weight: 500;
}

.footer-policy,
.footer-links {
    font-size: 12px;
    line-height: 22px;
    font-weight: 500;
}

.footer-policy {
    align-content: start;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 28px;
}

.footer-socials {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    align-items: center;
}

.footer-socials a {
    width: 26px;
    height: 26px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid var(--black);
    background: var(--black);
    color: var(--primary);
    font-size: 13px;
    transition: transform 0.3s ease, background 0.3s ease, color 0.3s ease;
}

.footer-socials a:hover {
    transform: translateY(-2px);
    background: transparent;
    color: var(--black);
}

.footer-bottom {
    display: grid;
    gap: 12px;
    padding-top: 8px;
    font-size: 12px;
    line-height: 22px;
    font-weight: 500;
}

.site-footer,
.site-footer a,
.site-footer p {
    font-family: var(--body-font);
}

.footer-contact,
.footer-policy,
.footer-links,
.footer-bottom {
    font-size: 14px;
    line-height: 24px;
    font-weight: 500;
}

.footer-bottom p {
    margin-bottom: 0;
}

@media (min-width: 768px) {
    .site-footer {
        padding: 30px 0 15px;
    }

    .footer-inner {
        grid-template-columns: 1.05fr 0.7fr 1.25fr;
        gap: var(--content-gap);
        align-items: start;
    }

    .footer-brand {
        gap: var(--content-gap);
    }

    .footer-logo {
        width: 146px;
    }

    .footer-policy {
        gap: var(--text-gap);
        padding-top: calc(28px + var(--content-gap));
    }

    .footer-nav-wrap {
        gap: var(--content-gap);
        padding-top: 0;
    }

    .footer-socials {
        justify-content: flex-start;
    }

    .footer-links {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: var(--text-gap) var(--content-gap);
    }

    .footer-bottom {
        grid-column: 1 / -1;
        grid-template-columns: 1fr 1fr;
        padding-top: var(--section-space);
    }

    .footer-bottom p:last-child {
        text-align: right;
    }
}

@media (min-width: 1200px) {
    .site-footer {
        padding: 60px 0 25px;
    }

    .footer-inner {
        grid-template-columns: 1.1fr 0.65fr 1.35fr;
        gap: var(--content-gap);
    }

    .footer-logo {
        width: 160px;
    }

    .footer-socials {
        gap: var(--text-gap);
    }

    .footer-socials a {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }

    .footer-policy {
        padding-top: calc(28px + var(--content-gap));
    }

    .footer-contact,
    .footer-policy,
    .footer-links,
    .footer-bottom {
        font-size: 16px;
        line-height: 26px;
    }
}
