/* ==========================================================================
   Wazo — blog, articles, CMS content pages and the 404 page
   Loaded on those pages only (templates/layouts/head.php), on top of the
   shared layer in site.css. They have no cover photograph, so each opens with
   a navy banner the transparent header sits on.
   ========================================================================== */

.wz-banner,
.wz-notfound {
    --focus: var(--wz-turq-light);

    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding-block: clamp(8.5rem, 16vw, 12rem) clamp(3rem, 6vw, 5rem);
    background-color: var(--wz-navy-deep);
    color: #fff;
}

/* One large arch, barely there, as the banner's only ornament. */
.wz-banner::before,
.wz-notfound::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset-inline-end: max(-6rem, calc((100% - var(--wz-max)) / 2 - 2rem));
    top: 5rem;
    width: min(38vw, 30rem);
    aspect-ratio: 4 / 5.4;
    border-radius: var(--wz-arch);
    background: linear-gradient(160deg, rgba(37, 170, 225, 0.22), rgba(37, 170, 225, 0.02) 70%);
}

.wz-banner__title {
    max-width: 18ch;
    margin: 0;
    font-size: clamp(2.6rem, 6vw, 5rem);
    font-weight: 300;
    line-height: 1.02;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

.wz-banner__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1rem;
    margin: 0 0 1.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--wz-turq-light);
}

.wz-content {
    min-height: 40vh;
}

/* --- Blog list ----------------------------------------------------------------- */

.wz-posts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
    gap: 3rem 2rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.wz-post {
    position: relative;
}

.wz-post__cover {
    aspect-ratio: 4 / 3;
    margin-bottom: 1.25rem;
}

.wz-post__cover img {
    transition: transform 0.7s var(--wz-ease);
}

@media (hover: hover) and (pointer: fine) {
    .wz-post:hover .wz-post__cover img {
        transform: scale(1.05);
    }
}

.wz-post__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.9rem;
    margin: 0 0 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--wz-teal-ink);
}

.wz-post__title {
    margin-bottom: 0.6rem;
}

/* The whole card is the link: the title's link stretches over it. */
.wz-post__link::after {
    content: "";
    position: absolute;
    inset: 0;
}

.wz-post__link:focus-visible {
    outline: none;
}

.wz-post:has(.wz-post__link:focus-visible) {
    outline: 3px solid var(--wz-navy);
    outline-offset: 8px;
    border-radius: var(--wz-panel);
}

.wz-post__more {
    margin-top: 0.9rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--wz-navy);
}

.wz-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1rem 1.5rem;
    margin-top: 4rem;
}

.wz-pagination__current {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--wz-muted);
}

/* --- Article and content page body ------------------------------------------------- */

.wz-post-cover {
    width: 100%;
    max-width: 52rem;
    height: auto;
    margin: 0 auto 3rem;
    border-radius: var(--wz-panel);
}

.wz-prose {
    max-width: 44rem;
    margin-inline: auto;
    font-size: 1.0625rem;
    line-height: 1.85;
    color: var(--wz-ink);
}

.wz-prose > :first-child {
    margin-top: 0;
}

.wz-prose h2,
.wz-prose h3,
.wz-prose h4 {
    margin: 2.5rem 0 1rem;
    color: var(--wz-navy);
    line-height: 1.15;
}

.wz-prose h2 {
    font-size: clamp(1.9rem, 3.4vw, 2.6rem);
    font-weight: 300;
}

.wz-prose h3 {
    font-size: clamp(1.4rem, 2.4vw, 1.8rem);
}

.wz-prose h4 {
    font-size: 1.05rem;
}

.wz-prose p,
.wz-prose ul,
.wz-prose ol,
.wz-prose blockquote,
.wz-prose figure,
.wz-prose table {
    margin: 0 0 1.4rem;
}

.wz-prose ul,
.wz-prose ol {
    padding-inline-start: 1.4rem;
}

.wz-prose ul {
    list-style: disc;
}

.wz-prose ol {
    list-style: decimal;
}

.wz-prose li::marker {
    color: var(--wz-teal-ink);
}

.wz-prose li + li {
    margin-top: 0.35rem;
}

.wz-prose a {
    color: var(--wz-teal-ink);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.wz-prose a:hover,
.wz-prose a:focus-visible {
    color: var(--wz-navy);
}

.wz-prose blockquote {
    padding: 0.25rem 0 0.25rem 1.5rem;
    border-inline-start: 3px solid var(--wz-turq);
    font-size: 1.2rem;
    font-style: italic;
    font-weight: 500;
    line-height: 1.65;
    color: var(--wz-navy);
}

.wz-prose img {
    max-width: 100%;
    height: auto;
    border-radius: 20px;
}

.wz-prose table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.wz-prose th,
.wz-prose td {
    padding: 0.6rem 0.9rem;
    border: 1px solid var(--wz-line);
    text-align: start;
}

.wz-prose th {
    background-color: var(--wz-sand);
    font-weight: 600;
}

.wz-post-back {
    max-width: 44rem;
    margin: 3rem auto 0;
}

.wz-post-back__link {
    min-height: 44px;
    font-weight: 600;
    color: var(--wz-navy);
}

/* Pointing backwards: the shared arrow, turned around. */
.wz-post-back__link::after {
    display: none;
}

.wz-post-back__link::before {
    content: "";
    flex-shrink: 0;
    width: 0.42em;
    height: 0.42em;
    border-bottom: 1.5px solid currentColor;
    border-left: 1.5px solid currentColor;
    rotate: 45deg;
}

/* --- 404 ------------------------------------------------------------------------------ */

.wz-notfound {
    padding-block-end: clamp(4rem, 8vw, 7rem);
}

.wz-notfound__code {
    margin: 0 0 0.5rem;
    font-family: var(--wz-display);
    font-size: clamp(6rem, 20vw, 14rem);
    font-style: italic;
    font-weight: 300;
    line-height: 0.9;
    letter-spacing: -0.03em;
    color: var(--wz-turq-light);
}

.wz-notfound__text {
    max-width: 34rem;
    margin: 1.5rem 0 0;
    font-size: 1.0625rem;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.86);
}

.wz-notfound .wz-cover__actions {
    animation: none;
}

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