/* acknowledgements.css - the Acknowledgements ("Special Thanks") page.
 *
 * v7 "Mission Control" (Oct 2026): a credits roll. One wide card per
 * creator (scripts/site_pages_lib.php sp_ack_html: article.ack-card >
 * .ack-card-img + .ack-card-body [+ .ack-card-admin]): the picture on the
 * left in a dark window (any shape fits: the whole picture over a blurred
 * copy of itself), and a cassette-label body on the right with the four
 * stripes down its edge, a "Credit 01" plate, the name, the words and the
 * links as pill switches. On a phone the picture goes on top.
 * Colours are the v7 tokens only (css/root.css).
 */

.ack-wrapper {
    box-sizing: border-box;
    width: 100%;
    max-width: var(--page-w);
    margin: 0 auto;
    padding: 0.5rem var(--gutter) clamp(2.5rem, 5vw, 4rem);
}

.ack-head {
    margin-bottom: clamp(1.6rem, 3.5vw, 2.4rem);
}

.ack-head .v7-plate {
    margin: 0 0 0.6rem;
}

.ack-title {
    margin: 0;
    font-size: clamp(1.5rem, 2.8vw, 2.3rem);
    line-height: 1.1;
    text-align: left;
    text-transform: none;
}

.ack-lead {
    max-width: 56ch;
    margin: 0.9rem 0 0;
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--ink-2);
}

/* ------------------------------------------------------- The roll */

.ack-grid {
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
    counter-reset: ack-credit;
}

.ack-card {
    counter-increment: ack-credit;
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr);
    grid-template-areas:
        "img body"
        "img admin";
    grid-template-rows: 1fr auto;
    overflow: hidden;
    text-align: left;
    background: var(--sheet);
    border: 1px solid var(--rule);
    border-radius: 0;
    box-shadow: 0 0 0 transparent;
    color: var(--ink);
    transition: none;
}

.ack-card:hover,
.ack-card:focus-within {
    transform: none;
    border-color: var(--rule);
    box-shadow: 0 0 0 transparent;
}

/* The picture window. */
.ack-card-img {
    grid-area: img;
    position: relative;
    display: block;
    min-width: 0;
    min-height: 240px;
    overflow: hidden;
    background: var(--crt);
    border-right: 1px solid var(--rule);
}

.ack-card-img img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.ack-card-img .ack-card-blur {
    object-fit: cover;
    filter: blur(18px) brightness(0.5);
    transform: scale(1.15);
}

.ack-card-img .ack-card-pic {
    object-fit: contain;
}

.ack-card-img.noimg {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--phosphor);
    font-family: var(--font-crt);
    font-size: 1.40rem;
    text-transform: none;
    font-weight: 500;
}

/* The cassette label. */
.ack-card-body {
    grid-area: body;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 1.3rem 1.5rem 1.4rem;
}

.ack-card-body::after {
    content: "Credit " counter(ack-credit, decimal-leading-zero);
    order: -1;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0;
    text-transform: uppercase;
    color: var(--ink-3);
    font-weight: 500;
}

.ack-card h2.ack-card-name {
    margin: 0 0 0.2rem;
    font-size: clamp(1.1rem, 1.8vw, 1.4rem);
    line-height: 1.2;
    letter-spacing: 0.02em;
    text-align: left;
    text-transform: uppercase;
    color: var(--ink);
    overflow-wrap: anywhere;
}

.ack-card .ack-card-text {
    max-width: 68ch;
    margin: 0;
    font-size: 0.98rem;
    line-height: 1.6;
    text-align: left;
    color: var(--ink-2);
    overflow-wrap: anywhere;
}

.ack-card-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 0.7rem;
}

/* Pill switches, like .os-btn. */
.ack-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: var(--control-h);
    padding: 0.4rem 1.2rem;
    box-sizing: border-box;
    background: var(--solid);
    color: var(--on-solid);
    border: 1px solid var(--rule);
    border-radius: 0;
    box-shadow: none;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0;
    text-transform: uppercase;
    text-decoration: none;
    transition: background 0.15s ease;
    font-weight: 500;
}

.ack-link .fa {
    font-size: 0.85em;
}

.ack-link:hover,
.ack-link:focus-visible {
    background: var(--solid-hi);
    color: var(--on-solid);
    box-shadow: none;
    transform: none;
}

.ack-empty {
    margin: 0;
    color: var(--ink-2);
}

/* SuperAdmin tools: a strip along the bottom of the label. */
.ack-card-admin {
    grid-area: admin;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 0.7rem 1.5rem 0.8rem;
    background: var(--sheet-2);
    border-top: 1px dashed var(--rule-soft);
    position: relative;
}

.ack-add {
    display: flex;
    justify-content: flex-start;
    margin-top: 1.4rem;
}

.ack-add p {
    max-width: 40rem;
    text-align: left;
}

.ack-card.is-new {
    border-color: var(--accent);
    box-shadow: 0 4px 0 var(--accent);
}

/* ------------------------------------------------- Narrow screens */

@media (max-width: 760px) {
    .ack-card {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "img"
            "body"
            "admin";
        grid-template-rows: auto 1fr auto;
    }

    .ack-card-img {
        min-height: 0;
        aspect-ratio: 16 / 9;
        border-right: 0;
        border-bottom: 1px solid var(--rule);
    }

    .ack-card-body {
        padding: 1.1rem 1.1rem 1.2rem;
    }

    .ack-card-admin {
        padding: 0.6rem 1.1rem 0.7rem;
    }
}

/* Picture band on a phone: root.css sets the title at 3rem, which is too
   wide in Michroma for a long word ("OFFICERS", "SPECIAL THANKS") at 390px.
   Scoped here until the shared rule is changed. */
@media (max-width: 560px) {
    main .bg-container:not(.bg-home) .bg-container-text h1 {
        font-size: clamp(1.6rem, 8vw, 2.4rem);
        overflow-wrap: anywhere;
    }

    main .bg-container:not(.bg-home) .bg-container-text p {
        font-size: 0.68rem;
    }
}
