/*
 * The home page and the catalogue. Mock-ups: home v2, catalogue v1.
 *
 * Loaded on three screens - the home page, the tests index and a tag archive -
 * always after css/base.css, which carries the tokens, the type, the header,
 * the footer, the chip and the button. Nothing here repeats any of that.
 *
 * The column, the five colours and the single-column rule are the site's, not
 * this file's: they live in base.css and apply here unchanged.
 */

/* ---------- the headline ---------- */

.wowtests-hero {
    padding: 26px 0 8px;
}

.wowtests-hero h1 {
    font-family: var(--font-d);
    font-weight: 900;
    font-size: 30px;
    line-height: 1.06;
    letter-spacing: -.02em;
    margin: 0;
    text-wrap: balance;
}

/*
 * The marker under one word. Same shape as the result card's, and the same
 * max-width for the same reason: an inline-block sized to its longest word
 * carries the overflow out of the page.
 */
.wowtests-hero h1 span,
.wowtests-cat-head h1 span {
    display: inline-block;
    max-width: 100%;
    background: linear-gradient(transparent 55%, var(--yellow) 55%);
    padding: 0 6px;
    transform: rotate(var(--tilt));
}

.wowtests-hero-lead p {
    margin: 12px 0 0;
    font-size: 16px;
    line-height: 1.5;
    font-weight: 600;
}

/* ---------- the freshest test, as a poster ---------- */

.wowtests-feature {
    display: block;
    margin-top: 18px;
    background: var(--white);
    border: var(--line) solid var(--ink);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    text-decoration: none;
}

.wowtests-feature-figure {
    position: relative;
    aspect-ratio: 1200 / 630;
    border-bottom: var(--line) solid var(--ink);
    background: var(--paper-2);
}

.wowtests-feature-figure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wowtests-feature-label {
    position: absolute;
    left: 12px;
    top: 12px;
    font-family: var(--font-d);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    background: var(--red);
    color: var(--white);
    border: 2px solid var(--ink);
    border-radius: 999px;
    padding: 5px 10px;
    transform: rotate(var(--tilt));
}

.wowtests-feature-body {
    padding: 14px 16px 16px;
}

.wowtests-feature-body h2 {
    font-family: var(--font-d);
    font-weight: 900;
    font-size: 22px;
    line-height: 1.1;
    letter-spacing: -.02em;
    margin: 10px 0 6px;
}

.wowtests-feature-body .wowtests-btn {
    margin-top: 12px;
}

/* ---------- the ribbon of topics ---------- */

/*
 * Wraps over as many rows as it needs. Not a scroller: the row exists to show
 * the range of the site at a glance, and a scroller hides most of it.
 */
.wowtests-ribbon {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 26px 0 0;
}

.wowtests-ribbon a {
    font-family: var(--font-d);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-decoration: none;
    background: var(--white);
    border: 2px solid var(--ink);
    border-radius: 999px;
    padding: 8px 13px;
    box-shadow: 3px 3px 0 var(--ink);
}

.wowtests-ribbon a.is-on {
    background: var(--yellow);
}

/* ---------- a block with a heading and a "see all" ---------- */

.wowtests-block {
    margin-top: 30px;
}

.wowtests-block-h {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 12px;
}

.wowtests-block-h h2 {
    font-family: var(--font-d);
    font-weight: 700;
    font-size: 17px;
    text-transform: uppercase;
    letter-spacing: .02em;
    margin: 0;
}

.wowtests-block-h h2::before {
    content: "\2605\00a0";
    color: var(--red);
}

.wowtests-block-all {
    font-size: 13px;
    font-weight: 800;
    color: var(--mute);
    text-decoration: none;
    white-space: nowrap;
}

/* ---------- poster cards ---------- */

.wowtests-cards {
    display: grid;
    gap: 14px;
}

.wowtests-tcard {
    display: block;
    text-decoration: none;
    background: var(--white);
    border: var(--line) solid var(--ink);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.wowtests-tcard-figure {
    aspect-ratio: 1200 / 630;
    border-bottom: var(--line) solid var(--ink);
    background: var(--paper-2);
}

.wowtests-tcard-figure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wowtests-tcard-body {
    padding: 12px 14px 14px;
}

.wowtests-tcard-body h3 {
    font-family: var(--font-d);
    font-weight: 700;
    font-size: 16px;
    line-height: 1.2;
    letter-spacing: -.01em;
    margin: 8px 0 6px;
}

.wowtests-tcard-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin: 0;
    font-size: 13px;
    font-weight: 800;
    color: var(--mute);
}

/* ---------- the shelf ---------- */

/*
 * The one horizontal scroller on the site. The negative margin lets it run to
 * both edges of the screen while its cards keep the column's own padding, so
 * the first card lines up with everything above it and the last one is
 * visibly cut off - which is what says there is more to the right.
 */
.wowtests-shelf {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    margin: 0 -14px;
    padding: 4px 14px 10px;
    scrollbar-width: none;
}

.wowtests-shelf::-webkit-scrollbar {
    display: none;
}

.wowtests-mini {
    position: relative;
    flex: 0 0 200px;
    text-decoration: none;
    background: var(--white);
    border: var(--line) solid var(--ink);
    border-radius: var(--radius);
    box-shadow: var(--shadow-s);
    overflow: hidden;
}

.wowtests-mini-n {
    position: absolute;
    left: -2px;
    top: -2px;
    z-index: 2;
    font-family: var(--font-d);
    font-weight: 900;
    font-size: 18px;
    background: var(--yellow);
    border: 2px solid var(--ink);
    border-radius: 0 0 10px 0;
    padding: 4px 10px;
}

.wowtests-mini-figure {
    aspect-ratio: 1200 / 630;
    border-bottom: 2px solid var(--ink);
    background: var(--paper-2);
}

.wowtests-mini-figure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wowtests-mini-body {
    padding: 10px 12px 12px;
}

.wowtests-mini-body h3 {
    font-family: var(--font-d);
    font-weight: 700;
    font-size: 13px;
    line-height: 1.25;
    margin: 0 0 5px;
}

.wowtests-mini .wowtests-tcard-meta {
    font-size: 12px;
    gap: 4px 10px;
}

/* ---------- the yellow strip about the project ---------- */

.wowtests-strip {
    margin-top: 34px;
    background: var(--yellow);
    border: var(--line) solid var(--ink);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px;
}

.wowtests-strip h2 {
    font-family: var(--font-d);
    font-weight: 900;
    font-size: 20px;
    line-height: 1.1;
    letter-spacing: -.02em;
    margin: 0 0 8px;
}

.wowtests-strip p {
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
}

.wowtests-strip p + p {
    margin-top: 8px;
}

.wowtests-strip a {
    font-weight: 800;
}

/* ---------- the head of a catalogue page ---------- */

.wowtests-cat-head {
    padding: 24px 0 0;
}

.wowtests-eyebrow-red {
    font-family: var(--font-d);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--red);
}

.wowtests-cat-head h1 {
    font-family: var(--font-d);
    font-weight: 900;
    font-size: 30px;
    line-height: 1.06;
    letter-spacing: -.02em;
    margin: 6px 0 0;
    text-wrap: balance;
}

.wowtests-count {
    display: inline-block;
    margin: 10px 0 0;
    font-family: var(--font-d);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    background: var(--white);
    border: 2px solid var(--ink);
    border-radius: 999px;
    padding: 5px 10px;
}

.wowtests-cat-head p {
    margin: 12px 0 0;
    font-size: 16px;
    line-height: 1.5;
    font-weight: 600;
}

.wowtests-cat-head + .wowtests-ribbon {
    margin-top: 22px;
}

.wowtests-ribbon + .wowtests-block {
    margin-top: 26px;
}

/* ---------- pagination ---------- */

.wowtests-pager {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 26px;
}

.wowtests-pager a,
.wowtests-pager span {
    min-width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    font-family: var(--font-d);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    background: var(--white);
    border: 2px solid var(--ink);
    border-radius: 999px;
    box-shadow: 3px 3px 0 var(--ink);
}

.wowtests-pager .current {
    background: var(--yellow);
}

.wowtests-pager .dots {
    min-width: auto;
    border: 0;
    background: transparent;
    box-shadow: none;
}

/* ---------- nothing here yet ---------- */

.wowtests-empty {
    margin-top: 26px;
    background: var(--white);
    border: var(--line) solid var(--ink);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px 16px;
    font-size: 15px;
    line-height: 1.5;
}

.wowtests-empty b {
    display: block;
    margin-bottom: 6px;
    font-family: var(--font-d);
    font-weight: 700;
}

.wowtests-empty a {
    display: inline-block;
    margin-top: 8px;
    font-weight: 800;
}

/* ---------- interaction ---------- */

@media (hover: hover) and (pointer: fine) {
    .wowtests-tcard:hover,
    .wowtests-feature:hover,
    .wowtests-mini:hover {
        transform: translate(-1px, -1px);
    }

    .wowtests-ribbon a:hover {
        background: var(--yellow);
    }

    .wowtests-block-all:hover,
    .wowtests-strip a:hover {
        color: var(--red);
    }
}

.wowtests-tcard,
.wowtests-feature,
.wowtests-mini {
    transition: transform .08s;
}

@media (prefers-reduced-motion: reduce) {
    .wowtests-tcard,
    .wowtests-feature,
    .wowtests-mini {
        transition: none;
    }
}
