/* ==========================================================================
   Newsletter archive (newsletter.html) + unsubscribe page.
   Builds on book.css: same .qp scope, colours and type.
   ========================================================================== */

/* Hero */
.nl-hero {
    text-align: center;
    padding: 150px 0 100px;
}

.nl-hero .qp-label {
    color: var(--qp-lilac);
}

.nl-title {
    max-width: 17ch;
    margin: 20px auto 0;
    font-size: clamp(38px, 5.2vw, 64px);
    line-height: 1.1;
    font-weight: 500;
    color: #fff;
}

.nl-title em {
    font-style: italic;
    color: var(--qp-lilac);
}

.nl-hero .qp-rule {
    margin: 30px auto 0;
}

.nl-lede {
    max-width: 60ch;
    margin: 26px auto 0;
    font-size: 18px;
    line-height: 1.75;
    color: var(--qp-lilac-soft);
}

.nl-hero .qp-btns {
    justify-content: center;
    margin-top: 36px;
}

/* Issues, by year */
.nl-year + .nl-year {
    margin-top: 72px;
}

.nl-year-title {
    display: flex;
    align-items: center;
    gap: 22px;
    font-size: clamp(34px, 3.6vw, 46px);
    line-height: 1;
    color: var(--qp-navy);
}

.nl-year-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--qp-line);
}

.nl-list {
    list-style: none;
    margin: 30px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.nl-list li {
    display: flex;
}

.qp .nl-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    padding: 26px 24px 24px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid var(--qp-line);
    text-decoration: none;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.qp .nl-card:hover {
    transform: translateY(-3px);
    border-color: rgba(112, 58, 207, 0.35);
    box-shadow: 0 16px 36px rgba(0, 12, 132, 0.1);
}

.qp .nl-card:focus-visible {
    outline: 3px solid var(--qp-violet);
    outline-offset: 3px;
}

.nl-month {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--qp-purple);
}

.nl-latest {
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--qp-violet);
    color: #fff;
    font-size: 10px;
    letter-spacing: 0.12em;
}

.nl-card-title {
    font-family: var(--qp-serif);
    font-size: 22px;
    line-height: 1.3;
    color: var(--qp-navy);
}

.nl-card-sum {
    font-size: 15px;
    line-height: 1.6;
    color: var(--qp-muted);
}

.nl-read {
    margin-top: auto;
    padding-top: 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--qp-purple);
}

.nl-read i {
    margin-left: 4px;
    transition: transform 180ms ease;
}

.qp .nl-card:hover .nl-read i {
    transform: translateX(3px);
}

/* The newest issue gets the wide navy card */
.nl-list li:has(.nl-card--latest) {
    grid-column: span 2;
}

.qp .nl-card--latest {
    padding: 34px 32px 30px;
    background:
        radial-gradient(60% 90% at 90% 10%, rgba(137, 89, 255, 0.3) 0%, rgba(0, 12, 132, 0) 70%),
        var(--qp-navy);
    border-color: var(--qp-navy);
}

.nl-card--latest .nl-month {
    color: var(--qp-lilac);
}

.nl-card--latest .nl-card-title {
    font-size: clamp(26px, 2.6vw, 34px);
    color: #fff;
}

.nl-card--latest .nl-card-sum {
    font-size: 17px;
    color: var(--qp-lilac-soft);
}

.nl-card--latest .nl-read {
    color: #fff;
}

/* Unsubscribe */
.nl-unsub {
    padding-top: 170px;
    min-height: 70vh;
}

.nl-unsub-card {
    max-width: 520px;
    margin: 0 auto;
    padding: 44px 40px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid var(--qp-line);
    text-align: center;
}

.nl-unsub-card .qp-h2 {
    margin-top: 14px;
}

.nl-unsub-card .qp-lede {
    margin: 16px auto 26px;
    font-size: 16px;
}

.nl-unsub-note {
    margin-top: 22px;
    font-size: 14px;
    color: var(--qp-muted);
}

@media (max-width: 991px) {
    .nl-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .nl-hero {
        padding: 130px 0 80px;
    }

    .nl-list {
        grid-template-columns: 1fr;
    }

    .nl-list li:has(.nl-card--latest) {
        grid-column: auto;
    }

    .nl-unsub {
        padding-top: 140px;
    }

    .nl-unsub-card {
        padding: 34px 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .qp .nl-card,
    .nl-read i {
        transition: none;
    }

    .qp .nl-card:hover {
        transform: none;
    }
}
