/* Match the numerals in aidabach's TextQuilting reference: Fredericka the Great. */
@font-face {
    font-family: 'Fredericka the Great';
    src: url('fonts/fredericka-the-great/FrederickaTheGreat-Digits.woff2') format('woff2');
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    unicode-range: U+0030-0039;
}

/* The slideshow lives in the upper-right of the hero, never over page text. */
.hero.hero--with-showcase {
    display: grid;
    grid-template-columns: minmax(170px, 240px) minmax(0, 1fr) minmax(220px, 268px);
    justify-content: center;
    align-items: center;
    gap: clamp(1.25rem, 2.5vw, 2.5rem);
    padding: 2.75rem max(1.5rem, calc((100vw - 1440px) / 2));
}

.hero-quilt {
    display: block;
    width: 100%;
    max-width: 240px;
    justify-self: start;
    align-self: start;
    margin-top: .4rem;
    border-radius: 8px;
}

.hero-quilt img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: inherit;
    box-shadow: 0 8px 24px #19466512;
}

.hero-quilt:focus-visible {
    outline: 3px solid #1957c2;
    outline-offset: 5px;
}

.hero--with-showcase .hero-copy {
    min-width: 0;
    padding-block: 2rem;
}

.hero--with-showcase .hero-copy h1 {
    font-size: clamp(2.25rem, 3.5vw, 3.3rem);
    text-wrap: balance;
}

.hero--with-showcase .tagline {
    text-wrap: balance;
}

.tq-showcase {
    width: 100%;
    max-width: 268px;
    min-width: 0;
    justify-self: end;
    padding: 1rem 1rem .8rem;
    background: linear-gradient(155deg, #effbff 0%, #f8fcff 50%, #ffffff 100%);
    border: 1px solid #d5e8ee;
    border-radius: 18px;
    box-shadow: 0 10px 28px #1946650d;
    text-align: center;
}

.tq-showcase-heading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    margin-bottom: .75rem;
}

.tq-showcase-heading h2 {
    margin: 0;
    color: #244e68;
    font-size: 1.1rem;
    line-height: 1.3;
    font-weight: 600;
}

.tq-showcase-heading h2 a {
    color: #245bd6;
    font: inherit;
    text-decoration-thickness: .06em;
    text-underline-offset: .16em;
}

.tq-project-total {
    margin: -.25rem 0 .6rem;
    line-height: 1.2;
}

.tq-project-total a {
    display: inline-block;
    padding: .1rem .35rem;
    color: #1919ff;
    background-color: #ffe6cf;
    font-family: 'Fredericka the Great', Georgia, serif;
    font-size: 1.125rem;
    font-weight: 400;
    font-synthesis: none;
    text-decoration: none;
    text-underline-offset: .15em;
}

.tq-project-total a:hover,
.tq-project-total a:focus-visible {
    text-decoration: underline;
    color: #1919ff;
}

.tq-showcase-rule {
    flex: 0 0 18px;
    height: 2px;
    background: #ba8a38;
}

.tq-cover-figure {
    margin: 0;
}

.tq-cover-stage {
    position: relative;
    width: 100%;
    height: 286px;
    display: grid;
    place-items: center;
    border-radius: 7px;
    background: #e9f2f5;
    overflow: hidden;
    isolation: isolate;
}

.tq-cover-link {
    position: absolute;
    inset: 0;
    display: block;
    border-radius: inherit;
    z-index: 1;
}

.tq-cover-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 9px;
    object-fit: contain;
    object-position: center;
    opacity: 0;
    transition: opacity 900ms ease-in-out;
}

.tq-cover-image.is-current {
    opacity: 1;
}

.tq-cover-loading {
    margin: 0;
    padding: 1rem;
    color: #486372;
    font-size: .85rem;
    line-height: 1.5;
}

.tq-cover-loading[hidden] {
    display: none;
}

.tq-cover-caption {
    min-height: 4.35rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .15rem;
    padding: .65rem 0 .35rem;
}

.tq-cover-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    overflow-wrap: anywhere;
    color: #234a63;
    font-family: 'Crimson Text', Georgia, serif;
    font-size: 1rem;
    line-height: 1.25;
}

.tq-cover-count {
    color: #546a77;
    font-size: .72rem;
    font-variant-numeric: tabular-nums;
    letter-spacing: .04em;
}

.tq-cover-controls {
    display: grid;
    grid-template-columns: 46px 1fr 46px;
    gap: .5rem;
    align-items: center;
}

.tq-cover-controls button {
    min-width: 44px;
    min-height: 44px;
    padding: .35rem .5rem;
    border: 1px solid #c8dde7;
    border-radius: 50%;
    background: #fff;
    color: #244f6c;
    font: inherit;
    font-size: 1.25rem;
    line-height: 1.2;
    cursor: pointer;
    touch-action: manipulation;
    transition: background-color 160ms, border-color 160ms;
}

.tq-cover-controls button:hover:not(:disabled) {
    background: #e6f5fc;
    border-color: #77a5bd;
}

.tq-cover-controls .tq-cover-play {
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 600;
}

.tq-cover-controls button:disabled {
    opacity: .45;
    cursor: default;
}

.tq-showcase a:focus-visible,
.tq-showcase button:focus-visible {
    outline: 3px solid #1957c2;
    outline-offset: 3px;
}

.tq-cover-link:focus-visible {
    outline-offset: -4px;
}

.tq-cover-browse {
    display: inline-block;
    margin-top: .5rem;
    padding: .2rem;
    color: #255b7b;
    font-size: .74rem;
}

.tq-cover-noscript {
    margin: .5rem 0 0;
    font-size: .75rem;
}

.tq-visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

@media (max-width: 850px) {
    .hero.hero--with-showcase {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.5rem;
        padding: 2.5rem 1.25rem;
    }

    .hero--with-showcase .hero-copy {
        padding: 0;
    }

    .hero-quilt {
        justify-self: center;
        max-width: 220px;
        margin-top: 0;
    }

    .hero--with-showcase .hero-copy h1 {
        font-size: clamp(2.15rem, 7vw, 3rem);
    }

    .hero--with-showcase .tagline {
        font-size: 1.15rem;
    }

    .tq-showcase {
        justify-self: center;
        max-width: 260px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tq-cover-image,
    .tq-cover-controls button {
        transition: none;
    }
}
