/* News: homepage section, overview page and post page */
.news-section {
    min-height: auto;
    overflow: hidden;
}

.news-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.news-header .field-header {
    margin-bottom: 0;
}

.news-all-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #B2BCB9;
    font-family: 'Suisse Intl', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1rem;
    line-height: 1.25;
    text-decoration: none;
    transition: color 200ms ease;
}

.news-all-link svg {
    transition: transform 200ms cubic-bezier(0.23, 1, 0.32, 1);
}

/* Card */
.news-card {
    display: flex;
    flex-direction: column;
    padding: 12px 12px 24px;
    border: 1px solid rgba(246, 243, 239, 0.3);
    color: #F6F3EF;
    text-decoration: none;
    transition: border-color 200ms ease, transform 160ms cubic-bezier(0.23, 1, 0.32, 1);
}

.news-card:active {
    transform: scale(0.98);
}

.news-card:focus-visible,
.news-featured:focus-visible,
.news-back:focus-visible,
.news-all-link:focus-visible,
.news-shuffle-btn:focus-visible {
    outline: 2px solid #9CC0C0;
    outline-offset: 2px;
}

.news-placeholder {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 2px;
    background: #2A2A2A;
}

.news-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 10px;
    padding: 20px 8px 0;
}

.news-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 20px;
}

.news-card-meta:has(.news-label) {
    padding-bottom: 10px;
}

.news-date,
.news-card-dates {
    font-family: 'Suisse Intl', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.875rem;
    line-height: 1.43;
    color: #B2BCB9;
}

.news-card-dates {
    display: flex;
    gap: 1rem;
    margin-top: auto;
    padding-top: 14px;
}

.news-card-arrow {
    flex-shrink: 0;
    transition: transform 200ms cubic-bezier(0.23, 1, 0.32, 1);
}

.news-card-title {
    margin: 0;
    font-family: 'Brockmann', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1.375rem;
    font-weight: normal;
    line-height: 1.25;
}

.news-card-summary {
    margin: 0;
    font-family: 'Suisse Intl', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1rem;
    line-height: 1.5;
    color: #B2BCB9;
}

.news-label {
    display: inline-flex;
    align-self: flex-start;
    padding: 6px 12px;
    border-radius: 4px;
    background: rgba(246, 243, 239, 0.08);
    color: rgba(246, 243, 239, 0.9);
    font-family: 'Suisse Intl', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.8125rem;
    line-height: 16px;
}

@media (hover: hover) and (pointer: fine) {
    .news-card:hover {
        border-color: rgba(246, 243, 239, 0.6);
    }

    .news-card:hover .news-card-arrow {
        transform: translate(2px, -2px);
    }

    .news-all-link:hover {
        color: #F6F3EF;
    }

    .news-all-link:hover svg {
        transform: translateX(2px);
    }
}

/* Homepage shuffle */
.news-shuffle {
    --news-card-width: clamp(280px, 27vw, 460px);
    position: relative;
    margin-right: -3rem;
    padding-block: 4px;
    overflow: hidden;
}

.news-track {
    display: flex;
    gap: 24px;
    padding-right: 3rem;
    transition: transform 700ms cubic-bezier(0.32, 0.72, 0, 1);
}

.news-track .news-card {
    flex: 0 0 var(--news-card-width);
}

.news-shuffle-btn {
    --news-btn-size: 44px;
    position: absolute;
    top: calc(50% - var(--news-btn-size) / 2);
    display: grid;
    place-items: center;
    width: var(--news-btn-size);
    height: var(--news-btn-size);
    padding: 0;
    border: 1px solid rgba(246, 243, 239, 0.2);
    border-radius: 50%;
    background: rgba(10, 10, 10, 0.55);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    color: #F6F3EF;
    cursor: pointer;
    opacity: 0;
    transform: scale(0.96);
    transition: opacity 200ms ease, transform 200ms cubic-bezier(0.23, 1, 0.32, 1), border-color 200ms ease;
}

.news-shuffle-btn[hidden] {
    display: none;
}

.news-shuffle-next {
    right: max(16px, calc((100% - 3 * (var(--news-card-width) + 24px) - var(--news-btn-size)) / 2));
}

.news-shuffle-prev {
    left: 16px;
}

.news-shuffle:hover .news-shuffle-btn,
.news-shuffle:focus-within .news-shuffle-btn {
    opacity: 1;
    transform: scale(1);
}

.news-shuffle .news-shuffle-btn:active {
    transform: scale(0.94);
}

@media (hover: hover) and (pointer: fine) {
    .news-shuffle-btn:hover {
        border-color: rgba(246, 243, 239, 0.5);
    }
}

@media (prefers-reduced-motion: reduce) {
    .news-track {
        transition: none;
    }
}

@media (max-width: 768px) {
    .news-shuffle {
        --news-card-width: 78vw;
        margin-right: -1.5rem;
    }

    .news-track {
        overflow-x: auto;
        padding-right: 1.5rem;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        transform: none !important;
    }

    .news-track::-webkit-scrollbar {
        display: none;
    }

    .news-track .news-card {
        scroll-snap-align: start;
    }

    .news-shuffle-btn {
        display: none;
    }
}

/* Shared page shell */
.news-page {
    background: #0A0A0A;
    color: #F6F3EF;
}

.news-main {
    padding: 140px 3rem 0;
}

/* Overview */
.news-page-header {
    padding: 80px 0;
}

.news-page-title {
    margin: 0;
    font-family: 'Brockmann', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 4rem;
    font-weight: normal;
    line-height: 1.2;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}

.news-page-intro {
    margin: 16px 0 0;
    font-family: 'Suisse Intl', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #F6F3EF;
}

.news-featured {
    display: grid;
    grid-template-columns: minmax(0, 984fr) minmax(0, 566fr);
    align-items: center;
    gap: 64px;
    color: #F6F3EF;
    text-decoration: none;
}

.news-featured .news-placeholder {
    border: 1px solid rgba(246, 243, 239, 0.3);
}

.news-featured-text {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.news-featured-title {
    margin: 0;
    font-family: 'Brockmann', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 2.5rem;
    font-weight: normal;
    line-height: 1.2;
}

.news-featured-summary {
    max-width: 500px;
    margin: 0;
    font-family: 'Suisse Intl', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #B2BCB9;
}

.news-featured .news-card-dates {
    padding-top: 12px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    padding: 112px 0 160px;
}

.news-grid .news-card-title {
    font-size: 1.5rem;
}

/* Post */
.news-article {
    display: grid;
    grid-template-columns: 1fr min(800px, 100%) 1fr;
    column-gap: 64px;
    padding: 56px 0 160px;
}

.news-back,
.news-toc {
    grid-column: 1;
    justify-self: end;
    width: 256px;
}

.news-back-wrap {
    grid-column: 1;
    grid-row: 1;
    justify-self: end;
    width: 256px;
}

.news-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: auto;
    height: 40px;
    padding: 0 20px 0 14px;
    border: 1px solid rgba(246, 243, 239, 0.3);
    border-radius: 8px;
    color: #F6F3EF;
    font-family: 'Brockmann', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.875rem;
    text-decoration: none;
    transition: border-color 200ms ease, transform 160ms cubic-bezier(0.23, 1, 0.32, 1);
}

.news-back:active {
    transform: scale(0.97);
}

.news-article-header {
    grid-column: 2;
    grid-row: 1;
}

.news-article-title {
    margin: 0;
    font-family: 'Brockmann', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 3rem;
    font-weight: normal;
    line-height: 56px;
}

.news-article-meta {
    display: flex;
    gap: 64px;
    margin: 0;
    padding: 36px 0 56px;
}

.news-article-meta div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.news-article-meta dt {
    font-family: 'Suisse Intl', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.875rem;
    line-height: 20px;
    color: #B2BCB9;
}

.news-article-meta dd {
    margin: 0;
    font-family: 'Suisse Intl', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1rem;
    line-height: 24px;
}

.news-toc-wrap {
    grid-column: 1;
    grid-row: 2;
    justify-self: end;
    width: 256px;
}

.news-toc {
    --news-toc-active: 0px;
    position: sticky;
    top: 120px;
    padding-left: 36px;
}

.news-toc::before,
.news-toc::after {
    content: '';
    position: absolute;
    left: 0;
    pointer-events: none;
}

.news-toc::before {
    top: 0;
    bottom: 0;
    width: 12px;
    background: repeating-linear-gradient(to bottom, rgba(246, 243, 239, 0.28) 0 1px, transparent 1px 6px);
}

.news-toc::after {
    top: var(--news-toc-active);
    width: 16px;
    height: 19px;
    background: repeating-linear-gradient(to bottom, #F6F3EF 0 1px, #0A0A0A 1px 6px);
    transition: top 300ms cubic-bezier(0.23, 1, 0.32, 1);
}

.news-toc-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.news-toc-link {
    display: block;
    color: #B2BCB9;
    opacity: 0.8;
    font-family: 'Suisse Intl', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.875rem;
    line-height: 20px;
    text-decoration: none;
    transition: color 200ms ease, opacity 200ms ease;
}

.news-toc-link[aria-current='true'] {
    color: #F6F3EF;
    opacity: 1;
}

.news-article-content {
    grid-column: 2;
    grid-row: 2;
}

.news-figure {
    margin: 0 0 48px;
}

.news-figure figcaption {
    margin-top: 12px;
    font-family: 'Suisse Intl', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.8125rem;
    line-height: 18px;
    color: #B2BCB9;
}

.news-article-body p {
    margin: 0 0 28px;
    font-family: 'Suisse Intl', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1.0625rem;
    line-height: 30px;
}

.news-article-body h2 {
    margin: 72px 0 20px;
    font-family: 'Brockmann', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1.75rem;
    font-weight: normal;
    line-height: 34px;
    scroll-margin-top: 120px;
}

.news-article-body .news-key {
    font-family: 'Brockmann', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1.5rem;
    line-height: 32px;
}

.news-article-body .news-figure {
    margin: 0 0 28px;
}

.news-more {
    max-width: 1179px;
    margin: 0 auto;
    padding-bottom: 160px;
}

.news-more-title {
    margin: 0 0 32px;
    font-family: 'Brockmann', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1.5rem;
    font-weight: normal;
    line-height: 29px;
}

.news-more-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.news-more-grid .news-card-title {
    font-size: 1.25rem;
}

@media (hover: hover) and (pointer: fine) {
    .news-back:hover {
        border-color: rgba(246, 243, 239, 0.6);
    }

    .news-toc-link:hover {
        color: #F6F3EF;
    }

    .news-featured:hover .news-placeholder,
    .news-featured:hover .news-card-image {
        border-color: rgba(246, 243, 239, 0.6);
    }
}

@media (max-width: 1024px) {
    .news-featured {
        grid-template-columns: minmax(0, 1fr);
        gap: 32px;
    }

    .news-grid,
    .news-more-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .news-article {
        grid-template-columns: minmax(0, 1fr);
    }

    .news-back-wrap,
    .news-article-header,
    .news-article-content {
        grid-column: 1;
        grid-row: auto;
        justify-self: stretch;
        width: auto;
    }

    .news-back-wrap {
        margin-bottom: 32px;
    }

    .news-toc-wrap {
        display: none;
    }
}

@media (max-width: 768px) {
    .news-main {
        padding: 120px 1.5rem 0;
    }

    .news-page-header {
        padding: 40px 0 48px;
    }

    .news-page-title {
        font-size: 2.75rem;
    }

    .news-featured-title {
        font-size: 1.75rem;
    }

    .news-grid,
    .news-more-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .news-grid {
        padding: 64px 0 96px;
    }

    .news-article {
        padding-bottom: 96px;
    }

    .news-article-title {
        font-size: 2rem;
        line-height: 40px;
    }

    .news-article-meta {
        flex-wrap: wrap;
        gap: 24px 40px;
    }

    .news-more {
        padding-bottom: 96px;
    }
}

html:has(.news-page) {
    scroll-behavior: smooth;
}

.news-figure[id] {
    scroll-margin-top: 120px;
}

@media (prefers-reduced-motion: reduce) {
    html:has(.news-page) {
        scroll-behavior: auto;
    }
}

@media (min-width: 1351px) and (max-width: 1600px) {
    .navbar-menu-content {
        gap: 1rem;
    }
}

/* Long-form post content */
.news-article-body .news-lede {
    margin-bottom: 40px;
    font-size: 1.375rem;
    line-height: 34px;
}

.news-article-body a {
    color: #9CC0C0;
    text-decoration: underline;
    text-decoration-color: rgba(156, 192, 192, 0.4);
    text-underline-offset: 3px;
}

.news-article-body sup {
    font-size: 0.65em;
    line-height: 0;
}

.news-article-body sup a {
    padding: 0 1px;
    text-decoration: none;
}

.news-article-body [id] {
    scroll-margin-top: 120px;
}

.news-h2-number {
    display: inline-block;
    min-width: 2.25rem;
    color: #9CC0C0;
}

.news-media video,
.news-media img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid rgba(246, 243, 239, 0.12);
    border-radius: 2px;
    background: #000;
}

.news-article-body .news-figure {
    margin: 12px 0 40px;
}

.news-duo {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-items: center;
    gap: 24px;
    margin: 12px 0 40px;
}

.news-article-body .news-duo .news-figure {
    margin: 0;
}

.news-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.news-pair video {
    aspect-ratio: 3 / 2;
    object-fit: contain;
}

.news-claim {
    display: grid;
    grid-template-columns: 2.25rem minmax(0, 1fr);
    margin-bottom: 28px;
}

.news-claim-number {
    padding-top: 2px;
    color: #B2BCB9;
    font-family: 'Suisse Intl', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.9375rem;
}

.news-article-body .news-claim p {
    margin: 0;
}

.news-article-body b {
    font-weight: normal;
    font-family: 'Brockmann', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.news-quote {
    margin: 40px 0 0;
    padding: 0;
}

.news-article-body .news-quote p {
    margin: 0;
    font-family: 'Brockmann', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1.375rem;
    line-height: 34px;
}

.news-list,
.news-numbered {
    margin: 0 0 28px;
    padding-left: 1.25rem;
    font-family: 'Suisse Intl', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1.0625rem;
    line-height: 30px;
}

.news-numbered li::marker {
    color: #B2BCB9;
}

.news-list li,
.news-numbered li {
    margin-bottom: 8px;
    padding-left: 8px;
}

.news-gifs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.news-gifs img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 2px;
    background: #2A2A2A;
}

.news-article-body .news-closing {
    margin: 64px 0 20px;
    font-family: 'Brockmann', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1.75rem;
    line-height: 1.4;
}

.news-closing em {
    font-style: normal;
    color: #9CC0C0;
}

.news-article-body .news-tagline {
    color: #9CC0C0;
    font-size: 0.75rem;
    line-height: 16px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.news-references {
    margin-top: 96px;
    color: #B2BCB9;
    font-family: 'Suisse Intl', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.875rem;
    line-height: 1.55;
}

.news-article-body .news-references h2 {
    margin: 0 0 20px;
    color: #F6F3EF;
    font-size: 1.25rem;
    line-height: 28px;
}

.news-references ol {
    margin: 0 0 28px;
    padding-left: 1.25rem;
}

.news-references li {
    margin-bottom: 10px;
}

.news-article-body .news-signature {
    margin: 0;
    color: #B2BCB9;
    font-size: 0.875rem;
    line-height: 1.55;
}

.news-card-image {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 2px;
    background: #2A2A2A;
}

.news-featured .news-card-image {
    border: 1px solid rgba(246, 243, 239, 0.3);
}

@media (max-width: 768px) {
    .news-article-body .news-lede,
    .news-article-body .news-quote p {
        font-size: 1.1875rem;
        line-height: 30px;
    }

    .news-duo,
    .news-pair {
        grid-template-columns: minmax(0, 1fr);
    }

    .news-gifs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .news-article-body .news-closing {
        font-size: 1.375rem;
    }
}

.news-main > .news-featured:last-child {
    margin-bottom: 160px;
}

@media (max-width: 768px) {
    .news-main > .news-featured:last-child {
        margin-bottom: 96px;
    }
}

.news-section[hidden] {
    display: none;
}

.navbar-menu .nav-link.nav-page-btn,
html[lang='de'] .navbar-menu .nav-link.nav-page-btn {
    min-width: 0;
    gap: 0.5rem;
    padding: calc(0.6rem - 1px) 1.2rem;
    border: 1px solid rgba(246, 243, 239, 0.3);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.nav-page-btn svg {
    transition: transform 200ms cubic-bezier(0.23, 1, 0.32, 1);
}

@media (hover: hover) and (pointer: fine) {
    .navbar-menu .nav-link.nav-page-btn:hover {
        border-color: rgba(246, 243, 239, 0.6);
    }

    .nav-page-btn:hover svg {
        transform: translateX(2px);
    }
}
