/* Shared circular orbits for the homepage and AI service. */
.home-hero .home-title-wrap::before {
    display: none;
    content: none;
}
.home-hero .home-title-wrap::after {
    display: none;
    content: none;
}

.home-hero-orbit {
    position: absolute;
    z-index: 0;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.home-hero-copy,
.home-hero-note {
    position: relative;
    z-index: 1;
}

.home-hero-copy {
    grid-column: 1 / -1;
    justify-self: center;
    width: min(100%, 1120px);
    text-align: center;
}

/* Match the service titles: 46px above the viewport center on desktop. */
@media (min-width: 761px) and (min-height: 640px) {
    .home-intro.home-hero {
        padding-block: 0;
    }

    .home-intro .home-hero-copy {
        display: grid;
        height: 100svh;
        padding-bottom: 94px;
        grid-template-rows: minmax(0, 1fr) auto minmax(0, 1fr);
    }

    .home-intro .home-title-wrap {
        grid-row: 2;
    }

    .home-intro .home-hero-support {
        grid-row: 3;
        align-self: start;
    }
}

.home-hero-note {
    position: absolute;
    inset: auto;
    bottom: clamp(24px, 3vh, 32px);
    grid-column: 1 / -1;
    justify-self: center;
    width: fit-content;
    max-width: 100%;
    text-align: center;
}

.home-hero-actions {
    justify-content: center;
    gap: 12px;
    margin-top: 28px;
}

.home-hero h1 {
    font-weight: 600;
}

.home-hero .hero-action {
    min-height: 50px;
    padding: 13px 19px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: var(--green);
    color: var(--ink);
    font-size: 13px;
    font-weight: 700;
}

.home-hero .hero-action:hover {
    background: var(--green-hover);
}

.home-hero .hero-action--secondary {
    border-color: #c6cec6;
    background: transparent;
    color: var(--ink);
}

.home-hero .hero-action--secondary:hover {
    background: var(--paper);
}

.home-hero .hero-action .link-arrow {
    flex: 0 0 18px;
}

@media (max-width: 760px) {
    .home-hero-actions {
        flex-direction: column;
        gap: 12px;
    }

    .home-hero-actions .hero-action {
        width: 100%;
        justify-content: space-between;
    }
}

.home-hero-orbit__ring,
.home-hero-orbit__track {
    position: absolute;
    top: 50%;
    left: 50%;
    width: var(--orbit-diameter);
    aspect-ratio: 1;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.home-hero-orbit__ring {
    border: 1px solid rgb(34 61 53 / 8%);
}

.home-hero-orbit__ring--one {
    --orbit-diameter: 760px;
}

.home-hero-orbit__ring--two {
    opacity: 0.65;
    --orbit-diameter: 1000px;
    border-style: dashed;
    border-color: rgb(0 154 68 / 15%);
}

.home-hero-orbit__moving {
    position: absolute;
    inset: 0;
    mask-image: radial-gradient(
        ellipse 500px 255px at 50% 50%,
        transparent 0 95%,
        #000 100%
    );
}

.home-hero-orbit__track {
    --orbit-angle: calc(
        1turn * var(--orbit-slot) / var(--orbit-count) +
            var(--orbit-phase, 0deg)
    );
    transform: translate(-50%, -50%) rotate(var(--orbit-angle));
    animation: home-orbit-turn var(--orbit-duration, 64s) linear infinite;
    animation-delay: var(--orbit-delay, 0s);
}

.home-hero-orbit__tile {
    position: absolute;
    top: 0;
    left: 50%;
    display: flex;
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid rgb(23 34 27 / 9%);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 5px 16px rgb(25 52 40 / 7%);
    align-items: center;
    gap: 8px;
    color: #28352e;
    transform: translate(-50%, -50%) rotate(calc(0deg - var(--orbit-angle)));
    animation: home-orbit-counter var(--orbit-duration, 64s) linear infinite;
    animation-delay: var(--orbit-delay, 0s);
    animation-direction: inherit;
    white-space: nowrap;
}

.home-hero-orbit__tile img {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    filter: none;
    opacity: 1;
    object-fit: contain;
}

.home-hero-orbit__tile > span {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.home-hero-orbit__type-tile {
    position: absolute;
    top: 0;
    left: 50%;
    display: grid;
    width: 54px;
    height: 44px;
    place-items: center;
    border: 1px solid rgb(30 49 41 / 10%);
    border-radius: 9px;
    box-shadow: 0 8px 22px rgb(28 45 39 / 12%);
    color: #1e2924;
    background: #e8f4ef;
    font-family: Georgia, serif;
    font-size: 23px;
    line-height: 1;
    transform: translate(-50%, -50%) rotate(calc(0deg - var(--orbit-angle)));
    animation: home-orbit-counter var(--orbit-duration, 64s) linear infinite;
    animation-delay: var(--orbit-delay, 0s);
    animation-direction: inherit;
}

.home-hero-orbit__type-tile--yellow {
    background: #f3e58b;
    font-family: Manrope, Arial, sans-serif;
    font-weight: 750;
}

.home-hero-orbit__type-tile--coral {
    color: #fff;
    background: #e06e59;
    font-style: italic;
}

.home-hero-orbit__type-tile--ink {
    color: #fff;
    background: #26342e;
    font-family: Manrope, Arial, sans-serif;
    font-weight: 800;
}

.home-hero-orbit__type-tile--blue {
    color: #133d46;
    background: #a6dce2;
    font-family: 'Arial Narrow', Arial, sans-serif;
    font-weight: 700;
}

.home-hero-orbit__type-tile--violet {
    color: #fff;
    background: #5f55a6;
    font-style: italic;
}

.home-hero-orbit__type-tile--lime {
    background: #b8e875;
    font-family: Manrope, Arial, sans-serif;
    font-weight: 700;
}

.home-hero-orbit__type-tile--peach {
    color: #43231e;
    background: #e9a184;
    font-weight: 700;
}

.home-hero-orbit__type-tile--sky {
    color: #132d45;
    background: #a9c8ec;
    font-family: 'Arial Narrow', Arial, sans-serif;
    font-weight: 700;
}

.home-hero-orbit__type-tile--rose {
    color: #fff;
    background: #a94161;
    font-style: italic;
}

.home-hero-orbit__type-tile--sand {
    color: #2f261a;
    background: #d8bd8e;
    font-family: Manrope, Arial, sans-serif;
    font-weight: 700;
}

.home-hero-orbit__type-tile--slate {
    color: #fff;
    background: #536b72;
    font-family: 'Arial Narrow', Arial, sans-serif;
    font-weight: 700;
}

/* All items on the same circle share speed and direction, avoiding overtakes. */
.home-hero-orbit__track--inner {
    --orbit-diameter: 760px;
    --orbit-count: 14;
    --orbit-duration: 61s;
    --orbit-delay: -14s;
}

.home-hero-orbit__track--middle {
    opacity: 0.65;
    --orbit-diameter: 1000px;
    --orbit-count: 18;
    --orbit-duration: 78s;
    --orbit-delay: -38s;
    --orbit-phase: 10deg;
    animation-direction: reverse;
}

@keyframes home-orbit-turn {
    to {
        transform: translate(-50%, -50%)
            rotate(calc(var(--orbit-angle) + 1turn));
    }
}

@keyframes home-orbit-counter {
    to {
        transform: translate(-50%, -50%)
            rotate(calc(0deg - var(--orbit-angle) - 1turn));
    }
}

@media (max-width: 760px) {
    .home-intro.home-hero {
        --hero-header-clearance: calc(
            max(10px, env(safe-area-inset-top)) + 60px
        );
        display: flex;
        min-height: 0;
        flex-direction: column;
        justify-content: center;
        gap: 24px;
        padding: calc(var(--hero-header-clearance) + 48px) 22px 48px;
        border: 0;
    }

    .home-hero-copy {
        padding: 0;
    }

    .home-hero-note {
        position: relative;
        bottom: auto;
        margin: 0;
    }

    .home-hero-orbit__moving:not([data-hero-mask-ready]) {
        visibility: hidden;
    }

    html[data-home-opening] .site-header:not([data-home-started])::before {
        left: -1px;
        width: calc(100% + 2px);
    }

    html[data-home-opening] .site-header .site-mark:not([data-home-started]) {
        position: static;
        transform: none;
    }

    .home-hero-orbit__ring--one {
        --orbit-diameter: 360px;
    }

    .home-hero-orbit__ring--two {
        --orbit-diameter: 520px;
    }

    .home-hero-orbit__tile {
        min-height: 36px;
        padding: 7px;
        gap: 0;
    }

    .home-hero-orbit__tile img {
        width: 21px;
        height: 21px;
        flex-basis: 21px;
    }

    .home-hero-orbit__tile > span {
        display: none;
    }

    .home-hero-orbit__type-tile {
        width: 43px;
        height: 36px;
        border-radius: 7px;
        font-size: 19px;
    }

    .home-hero-orbit__track--inner {
        --orbit-diameter: 360px;
    }

    .home-hero-orbit__track--middle {
        --orbit-diameter: 520px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-hero-orbit__track,
    .home-hero-orbit__tile,
    .home-hero-orbit__type-tile {
        animation: none;
    }
}

/* Full-bleed homepage sections keep their content aligned to the page gutter. */
.home-content {
    border-radius: 0;
}
.home-macro--web,
.home-macro--ai {
    width: 100%;
    max-width: none;
    margin: 0;
    border-radius: 0;
}
.home-macro--ai {
    padding-inline: var(--gutter);
}
.home-macro .home-work-card,
.home-macro .home-work-card img,
.home-macro .home-work-card .home-work-overlay {
    border-radius: 0;
}
.home-macro .home-carousel {
    width: calc(100% + 2 * var(--gutter));
    max-width: 1440px;
    margin-inline: max(calc(-1 * var(--gutter)), calc((100% - 1440px) / 2));
}
.home-macro .home-carousel .home-work-grid {
    margin-inline: 0;
    padding-inline: 0;
    scroll-padding-inline: 0;
}
.contact-section {
    width: 100%;
    max-width: none;
    margin: 0;
    border: 0;
    border-radius: 0;
}

/* A white homepage surface with readable text on every section. */
:root:has(.home-intro) {
    --home-section-space: clamp(64px, 8vw, 104px);
}
.home-macro--web,
.home-macro--ai,
.home-benefits,
.contact-section {
    background: #fff;
}
.home-macro {
    padding-block: var(--home-section-space);
}
.home-macro--web {
    padding-top: var(--home-section-space);
}
.home-stack,
.home-benefits,
.home-faq,
.home-reading,
.contact-section {
    padding-block: var(--home-section-space);
}
.home-stack {
    background: #f1f6f1;
}
.home-stack-heading h2 span {
    line-height: 0.95;
    padding-block: 0.02em 0.04em;
    background: var(--green);
}
.home-keyword,
.home-benefit > h3 mark {
    display: inline-block;
    box-decoration-break: clone;
    line-height: 0.95;
    padding: 0.02em 0.14em 0.04em;
    border-radius: 0.04em;
    background: var(--green-hover);
    color: #fff;
}
.home-macro--ai {
    --macro-text: var(--ink);
    --macro-muted: var(--muted);
    --macro-line: var(--line);
    color: var(--ink);
}
.home-macro--ai .eyebrow {
    color: var(--green);
}
.home-macro--ai .text-link:is(:hover, :focus-visible) {
    color: var(--green-hover);
}
.contact-section {
    color: var(--ink);
    padding-inline: 0;
}
@media (max-width: 760px) {
    :root:has(.home-intro) {
        --home-section-space: 64px;
    }
}
