/* Final public QA: accessibility, mobile navigation, and motion preferences. */

/* Preserve the palette while lifting the dimmest public text/accents into a more readable range. */
.page-public {
    --text-faint: #8b7e6b;
    --accent-bright: #d25567;
}

/* Newsletter keeps the established ENTER language, but the field now has a persistent visible label. */
.page-public .newsletter-field {
    min-width: 0;
}

.page-public .newsletter-field label {
    display: block;
    margin: 0 0 7px;
    color: var(--text-muted);
    font-size: .7rem;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.page-public .newsletter-form .btn-ghost {
    align-self: end;
}

/* Keep carousel dots visually restrained while giving each control a larger pointer/touch target. */
.page-public .hero-carousel-dots {
    gap: 0;
}

.page-public .hero-carousel-dots button,
.page-public .hero-carousel-dots button:hover,
.page-public .hero-carousel-dots button:focus,
.page-public .hero-carousel-dots button.is-active,
.page-public .hero-carousel-dots button.is-active:hover,
.page-public .hero-carousel-dots button.is-active:focus {
    position: relative;
    width: 28px !important;
    min-width: 28px !important;
    height: 28px !important;
    min-height: 28px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    opacity: 1 !important;
    box-shadow: none !important;
}

.page-public .hero-carousel-dots button::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--text-muted);
    opacity: .72;
    transform: translate(-50%, -50%);
}

.page-public .hero-carousel-dots button.is-active::before {
    background: var(--accent-bright);
    opacity: 1;
}

.page-public .hero-carousel-dots button:focus-visible {
    outline: 1px solid var(--text-parchment);
    outline-offset: 1px;
}

/* Work's repeated-navigation delay was not an authored page-entry animation in the repo.
   Still honor the user's OS motion preference across all existing/future public transitions. */
@media (prefers-reduced-motion: reduce) {
    .page-public *,
    .page-public *::before,
    .page-public *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}

/* At phone widths, make the four-item navigation deliberately 2x2 instead of allowing
   a browser-dependent wrap that can strand About by itself on a second row. */
@media (max-width: 640px) {
    .page-public .site-header .wrap {
        row-gap: 18px;
    }

    .page-public .site-nav {
        width: 100%;
    }

    .page-public .site-nav ul {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 13px 24px;
        width: 100%;
    }

    .page-public .site-nav li,
    .page-public .site-nav a {
        min-width: 0;
    }

    .page-public .site-nav a {
        display: block;
        text-align: center;
    }

    /* Keep the featured work dominant without letting a long title consume most of the first viewport. */
    .page-public .hero-copy h1 {
        font-size: 2.2rem;
        line-height: 1.08;
    }
}
