/*
 * Impact! Editorial v1.0.0
 * Black-and-white underground zine styling.
 * Scoped exclusively to native blog/posts.
 */

body.impact-editorial-active .impact-editorial {
    --ie-fg: #fafafa;
    --ie-muted: #bdbdc7;
    --ie-line: #52525c;

    background: rgba(5, 5, 9, .96);
    color: var(--ie-fg);
    min-height: 55vh;
    padding: clamp(34px, 5vw, 75px) 22px
             clamp(60px, 7vw, 110px);
    font-family: inherit;
}

body.impact-editorial-active .impact-editorial :is(h1,h2,h3,h4) {
    color: #fff;
}

body.impact-editorial-active .impact-editorial a {
    color: #fff;
}

body.impact-editorial-active .impact-editorial a:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 4px;
}

/* Archive container */

.impact-editorial__wrap {
    max-width: 1120px;
    margin: 0 auto;
}

/* Masthead */

.impact-editorial__masthead {
    border-bottom: 2px solid #eee;
    padding-bottom: 25px;
}

.impact-editorial__eyebrow,
.impact-editorial__meta {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .11em;
    color: var(--ie-muted);
    line-height: 1.6;
}

.impact-editorial__masthead h1 {
    font-size: clamp(44px, 7vw, 82px);
    line-height: 1.05;
    font-weight: 900;
    margin: 8px 0 12px;
}

.impact-editorial__masthead > p:last-child {
    color: var(--ie-muted);
    margin: 0;
    font-size: 17px;
}

/* Scamper-style horizontal article rows */

.impact-editorial__row {
    display: grid;
    grid-template-columns: minmax(0, 31%) minmax(0, 1fr);
    gap: clamp(22px, 4vw, 54px);
    padding: 33px 0;
    border-bottom: 1px solid var(--ie-line);
    background: transparent;
    box-shadow: none;
}

/* Article artwork */

.impact-editorial__art {
    aspect-ratio: 16 / 10;
    display: block;
    width: 100%;
    overflow: hidden;
    background: #13131a;
    border: 1px solid #393942;
}

.impact-editorial__art img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .2s ease;
}

.impact-editorial__art:hover img {
    transform: scale(1.035);
}

/* Placeholder when featured image is missing */

.impact-editorial__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    color: #ddd;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .16em;
}

.impact-editorial__star {
    font-size: clamp(32px, 5vw, 70px);
    line-height: 1;
}

/* Editorial copy */

.impact-editorial__copy {
    min-width: 0;
    align-self: center;
}

.impact-editorial__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.impact-editorial__copy h2 {
    font-size: clamp(23px, 2.8vw, 37px);
    line-height: 1.15;
    margin: 10px 0 14px;
    font-weight: 850;
}

.impact-editorial__copy h2 a {
    text-decoration: none;
}

.impact-editorial__copy h2 a:hover {
    text-decoration: underline;
    text-underline-offset: 5px;
}

.impact-editorial__excerpt {
    color: #e1e1e7;
    font-size: 16px;
    line-height: 1.7;
    margin: 0 0 17px;
}

.impact-editorial__read,
.impact-editorial__back {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .045em;
    text-decoration: none;
}

.impact-editorial__read:hover,
.impact-editorial__back:hover {
    text-decoration: underline;
}

/* Pagination */

.impact-editorial__pagination {
    margin-top: 32px;
}

.impact-editorial__pagination .page-numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    padding: 0;
}

.impact-editorial__pagination a,
.impact-editorial__pagination span {
    display: inline-block;
    padding: 7px 12px;
    border: 1px solid var(--ie-line);
}

.impact-editorial__pagination .current {
    background: #fff;
    color: #08080d;
}

/* Individual articles */

.impact-editorial__story-wrap {
    max-width: 860px;
    margin: 0 auto;
}

.impact-editorial__story-header {
    padding-bottom: 30px;
    border-bottom: 1px solid var(--ie-line);
}

.impact-editorial__back {
    display: inline-block;
    margin-bottom: 35px;
}

.impact-editorial__story-header h1 {
    font-size: clamp(36px, 5.3vw, 70px);
    line-height: 1.1;
    font-weight: 900;
    margin: 10px 0 22px;
}

.impact-editorial__hero {
    margin: 33px 0 0;
}

.impact-editorial__hero img {
    display: block;
    max-width: 100%;
    height: auto;
    width: 100%;
}

.impact-editorial__body {
    padding: 35px 0;
    font-size: 17px;
    line-height: 1.85;
    overflow-wrap: anywhere;
}

.impact-editorial__body :is(p,ul,ol,blockquote) {
    margin-bottom: 1.4em;
}

.impact-editorial__body :is(h2,h3,h4) {
    margin: 1.5em 0 .6em;
    line-height: 1.25;
}

.impact-editorial__body :is(img,video,iframe) {
    max-width: 100%;
}

.impact-editorial__body img {
    height: auto;
}

.impact-editorial__body blockquote {
    border-left: 3px solid #aaa;
    padding-left: 24px;
    color: #ddd;
}

.impact-editorial__body a {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.impact-editorial__story-footer {
    border-top: 1px solid var(--ie-line);
    padding-top: 30px;
}

.impact-editorial__empty {
    padding-top: 30px;
    color: var(--ie-muted);
}

/* Mobile layout */

@media (max-width: 700px) {

    .impact-editorial__row {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 28px 0;
    }

    .impact-editorial__art {
        max-width: 100%;
    }

    .impact-editorial__copy h2 {
        font-size: clamp(24px, 6vw, 32px);
    }

    .impact-editorial__body {
        font-size: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .impact-editorial__art img {
        transition: none;
    }
}

/*
 * Impact! Editorial footer continuity r2
 *
 * The editorial main section has a dark background.
 * Blocksy's otherwise transparent footer exposes the
 * site-wide background underneath.
 *
 * Match the editorial background on editorial pages only.
 *
 * Does not affect the normal footer on other pages.
 */

body.impact-editorial-active footer.ct-footer {
    background: rgba(5, 5, 9, 0.96) !important;
}



/*
 * Impact! Editorial outer wrapper continuity r3
 *
 * Blocksy owns the outer #main.site-main element.
 * It stretches to fill available height.
 *
 * The editorial content previously ended before
 * the outer wrapper, exposing the site background.
 *
 * Apply a continuous opaque editorial background
 * to the actual Blocksy layout wrapper and footer.
 *
 * Scoped to editorial pages only.
 */

body.impact-editorial-active #main-container > main.site-main,
body.impact-editorial-active #main-container > footer.ct-footer {
    background: #050509 !important;
}
