/* News page and blog post styles. Loaded after main.css on news/*.html */

/* news.html */
.page-news {
    border-top: 0;
    padding-top: calc(var(--nav-h) + 72px);
    padding-bottom: 104px;
}

.news-feature {
    display: grid;
    gap: 40px;
    align-items: center;
}

.news-date {
    display: block;
    color: var(--muted);
    font-size: 14px;
}

.news-feature h1 {
    margin-top: 20px;
    max-width: 11ch;
    font-size: 48px;
    line-height: 1;
}

.news-feature-copy p {
    margin: 24px 0 32px;
    max-width: 40ch;
    color: #d4d4d4;
    font-size: 18px;
    line-height: 1.55;
}

.news-feature-art {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 24px;
    background: #f4f3ef;
}

.news-feature-art img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-cards {
    display: grid;
    gap: 40px 24px;
    margin: 72px 0 0;
    padding: 0;
    list-style: none;
}

.news-card {
    display: block;
}

.news-thumb {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    aspect-ratio: 1.9 / 1;
    overflow: hidden;
    border-radius: 18px;
    transition: opacity 0.2s var(--ease);
}

.news-card:hover .news-thumb {
    opacity: 0.88;
}

.news-glyph {
    display: grid;
    place-items: center;
    height: 100%;
    font-size: 64px;
    font-weight: 450;
    line-height: 1;
}

.news-glyph svg {
    width: 30px;
    height: auto;
}

.news-label {
    padding: 0 14px;
    color: #fff;
    font-size: 17px;
    line-height: 1.2;
}

.tone-mint { background: #0f3a2e; }
.tone-mint .news-glyph { background: #5fd8b0; color: #0a2a20; }
.tone-violet { background: #2a2150; }
.tone-violet .news-glyph { background: #8b6cf6; color: #fff; }
.tone-amber { background: #4a2a10; }
.tone-amber .news-glyph { background: #ef8a3f; color: #3a1c06; }
.tone-graphite { background: #161616; }
.tone-graphite .news-glyph { background: #f2f2f2; color: #0a0a0a; }

.news-meta {
    margin-top: 16px;
    color: var(--muted);
    font-size: 14px;
}

.news-meta i {
    margin: 0 6px;
    font-style: normal;
    opacity: 0.6;
}

.news-card h3 {
    margin-top: 6px;
    color: var(--ink);
    font-size: 18px;
    font-weight: 450;
    letter-spacing: -0.015em;
    line-height: 1.3;
    text-wrap: balance;
}

.news-card:hover h3,
.news-row:hover h3 {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}

.news-all {
    border-top: 0;
    padding-top: 0;
}

.news-all h2 {
    margin-bottom: 40px;
}

.news-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.news-list li {
    border-bottom: 1px solid var(--line);
}

.news-list li:first-child {
    border-top: 1px solid var(--line);
}

.news-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 32px;
    padding: 28px 0;
}

.news-row h3 {
    color: var(--ink);
    font-size: 20px;
    font-weight: 450;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.news-row p {
    margin-top: 6px;
    max-width: 70ch;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.5;
}

.news-row time {
    flex: none;
    color: var(--muted);
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}

@media (min-width: 560px) {
    .news-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 960px) {
    .news-feature {
        grid-template-columns: 5fr 7fr;
        gap: 64px;
    }

    .news-cards {
        grid-template-columns: repeat(4, 1fr);
        margin-top: 96px;
    }

    .news-label {
        font-size: 15px;
        padding: 0 12px;
    }

    .news-glyph {
        font-size: 52px;
    }
}

@media (max-width: 640px) {
    .page-news {
        padding-top: calc(var(--nav-h) + 40px);
        padding-bottom: 72px;
    }

    .news-feature-copy p {
        font-size: 17px;
    }

    .news-cards {
        margin-top: 56px;
    }

    .news-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        padding: 22px 0;
    }

    .news-row time {
        order: -1;
    }
}

/* zbuild.html (blog post) */
.page-post {
    border-top: 0;
    padding-top: calc(var(--nav-h) + 56px);
    padding-bottom: 104px;
}

.post {
    width: min(680px, 100%);
    margin-inline: auto;
}

.post-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    color: var(--muted);
    font-size: 14px;
}

.post-top time {
    font-variant-numeric: tabular-nums;
}

.post-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
    transition: color 0.15s var(--ease);
}

.post-back::before {
    content: "";
    width: 7px;
    height: 7px;
    border-left: 1.6px solid currentColor;
    border-bottom: 1.6px solid currentColor;
    transform: rotate(45deg);
}

.post-back:hover {
    color: var(--ink);
}

.post-head {
    margin: 56px 0 40px;
    text-align: center;
}

.post-head h1 {
    margin-top: 18px;
    color: var(--ink);
    font-size: 48px;
    font-weight: 450;
    letter-spacing: -0.04em;
    line-height: 1.05;
    text-wrap: balance;
}

.post-dek {
    margin-top: 16px;
    color: #d4d4d4;
    font-size: 18px;
    line-height: 1.35;
    letter-spacing: -0.01em;
}

.post-body p {
    margin-top: 24px;
    font-size: 16px;
    line-height: 1.7;
}

.post-body .post-lead {
    margin-top: 0;
    color: var(--ink);
}

.post-body strong {
    color: var(--ink);
    font-weight: 500;
}

.post-body a {
    color: var(--ink);
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.35);
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
    transition: text-decoration-color 0.15s var(--ease);
}

.post-body a:hover {
    text-decoration-color: var(--ink);
}

.post-offer {
    margin: 32px 0 8px;
    padding: 0;
    list-style: none;
}

.post-offer li {
    padding: 20px 0;
    border-top: 1px solid var(--line);
    font-size: 16px;
    line-height: 1.6;
}

.post-offer li:last-child {
    border-bottom: 1px solid var(--line);
}

.post-offer strong {
    display: block;
    margin-bottom: 4px;
    font-size: 16px;
    letter-spacing: -0.02em;
}

.post-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 56px;
}

@media (max-width: 640px) {
    .page-post {
        padding-top: calc(var(--nav-h) + 32px);
        padding-bottom: 72px;
    }

    .post-head {
        margin: 32px 0 36px;
    }

    .post-cta .btn {
        flex: 1 1 100%;
    }
}

/* blog post: paragraph text white (back link, date and subtitle stay grey) */
.post-body p,
.post-offer li {
    color: var(--ink);
}

/* posts marked data-published="false" stay hidden; sections with nothing published disappear */
[data-published="false"] {
    display: none !important;
}

.news-cards:not(:has(> li:not([data-published="false"]))),
.news-all:not(:has(li:not([data-published="false"]))) {
    display: none;
}