/* sections common styles */
:target {
    scroll-margin-top: 47px;
}

section {
    width: clamp(280px, 65%, 800px);
    margin: 4rem auto;
    text-align: center;
}

h2,
h3 {
    color: var(--heading-text);
    font-weight: 400;
    font-family: "Yeseva One", Georgia, serif;
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 0.6rem;
}

h3 {
    font-size: 1.1rem;
}

.button-gradient,
.button-plain {
    padding: 0.5rem 1.2rem;
    border: none;
    /* outline: none; */
    border-radius: 20px;
    display: inline-block;
    text-decoration: none;
    font-family: inherit;
    font-weight: 700;
    font-size: 1em;
    transition: all 150ms ease-in;
}

.button-gradient {
    border: none;
    color: #fefefe;
    background: linear-gradient(
        135deg,
        var(--color-tertiary),
        var(--color-primary),
        var(--color-secondary)
    );
}

.button-plain {
    border: var(--gray-border) 1px solid;
    color: var(--main-text);
    background-color: var(--btn-plain-bg);
}

.button-gradient:hover,
.button-plain:hover {
    border-radius: 16px;
    transform: scale(1.05);
}

.pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    font-size: 0.9em;
    justify-content: center;
}

.pills span {
    padding: 0.2rem 1rem;
    border-radius: 18px;
    border: solid var(--primary-border) 1px;
    background-color: color-mix(
        in srgb,
        var(--color-primary-dark),
        transparent 90%
    );
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Remove default for everything */
*:focus {
    outline: none;
}

/* Add custom styling for keyboard navigation only */
*:focus-visible {
    outline: 2px solid var(--focus-outline);
    outline-offset: 3px;
    /* border-radius: 3px; */
}

.focus-transition {
    transition: all 150ms ease-in;
}

/* fade in on scroll */

.reveal {
    opacity: 0;
    transform: translateY(24px);
}

/* When JS fallback is used */
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
    transition:
        opacity 0.6s ease,
        transform 0.6s ease;
}

/* when CSS scroll-driven animations are supported */
@supports (animation-timeline: view()) {
    .reveal {
        opacity: 1; /* animation handles visibility */
        transform: none;

        animation: fadeUp both ease-out;
        animation-timeline: view();
        animation-range: entry 10% cover 30%;
    }

    @keyframes fadeUp {
        from {
            opacity: 0;
            transform: translateY(24px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* medium */
@media only screen and (min-width: 768px) {
    :target {
        scroll-margin-top: 52px;
    }
}

/* large */
@media only screen and (min-width: 992px) {
    :target {
        scroll-margin-top: 60px;
    }
}
