/* ==========================================================================
   Updates (Admin > Updates, App\Models\Post): the cards on the home page and
   /updates, and an update's own page. The page band, reading column and pager
   are page.css's; the cards were the home page's own until they moved here.
   ========================================================================== */

/* --------------------------------------------------------------- cards --- */

.cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
    margin-top: 34px;
}

.card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #F6E2C7;
    border-radius: var(--radius);
    background: #FFFCF7;
    box-shadow: 0 30px 60px -36px rgba(140, 60, 10, .55);
    color: var(--ink);
    text-decoration: none;
    transition: transform .25s;
}

.card:hover { transform: translateY(-4px); }
.card .media { position: relative; aspect-ratio: 16 / 9; max-width: 100%; overflow: hidden; }
.card .media img { width: 100%; height: 100%; object-fit: cover; }

/* drawn cover for announcements without photography: warm light and gold line work */
.cover {
    display: grid;
    place-items: center;
    width: 100%;
    /* no height: the .media ratio sets it, so every card's picture is the same
       size and a shorter summary leaves room in the body, not the picture */
    background:
        url("../images/gold-lines.webp") right -70px top -50px / 320px auto no-repeat,
        radial-gradient(120% 120% at 80% 10%, #FFF6E6 0%, #FBD9B0 70%, #F7C08A 100%);
}

.cover .tile {
    display: grid;
    place-items: center;
    width: 92px;
    height: 92px;
    border: 1.5px solid var(--gold-soft);
    border-radius: 50%;
    background: rgba(255, 255, 255, .7);
    box-shadow: 0 0 0 10px rgba(255, 255, 255, .25);
    color: var(--primary);
}

.cover .tile svg { width: 40px; height: 40px; }

.card .body { display: flex; flex: 1; flex-direction: column; gap: 10px; padding: 22px 24px 26px; }

.card .tag {
    align-self: flex-start;
    padding: 4px 10px;
    border-radius: 99px;
    background: #FFEAD2;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--secondary-ink);
}

.card h3 { font-size: 1.3rem; font-weight: 700; letter-spacing: -.01em; color: var(--primary-deep); }
.card p { font-size: .95rem; color: #5D4A62; }
.card .more { margin-top: auto; padding-top: 6px; font-size: .92rem; font-weight: 700; color: var(--primary-ink); }
.card .more span { display: inline-block; transition: transform .2s; }
.card:hover .more span { transform: translateX(4px); }

/* --------------------------------------------------------- /updates --- */

/* on .lined, like the home page's updates; the pattern wave that rose behind
   the cards went with the home page's on 2026-11-03 (home.css, .updates-wave) */
.update-list { padding-block: 56px 104px; }
.update-list .cards { margin-top: 0; }
.update-list .empty { font-size: 1.1rem; color: var(--muted); text-align: center; }

/* ------------------------------------------------------ an update's page --- */

.update-date { margin-top: 14px; font-size: .95rem; font-weight: 600; color: var(--muted); }
[data-hero="dark"] .update-date { color: var(--on-dark); }

/* the team's preview of a draft or a scheduled update */
.update-draft {
    display: inline-block;
    margin-top: 14px;
    padding: 6px 14px;
    border-radius: 99px;
    background: #FFEAD2;
    font-size: .85rem;
    font-weight: 700;
    color: var(--secondary-ink);
}

.update-photo { margin-top: 0; }

.update-photo img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid #F6E2C7;
    border-radius: var(--radius);
    box-shadow: 0 30px 60px -36px rgba(140, 60, 10, .55);
}

.update-photo + .prose { margin-top: 0; }

.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .35em; }
.prose h3 { font-size: 1.3rem; font-weight: 700; color: var(--primary-deep); }
.prose blockquote { margin-inline: 0; padding-left: 20px; border-left: 3px solid var(--gold-soft); color: var(--ink); }
.prose hr { border: 0; border-top: 1px solid var(--rule); }
.prose table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.prose th, .prose td { padding: 10px 12px; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.prose th { color: var(--primary-deep); }

.update-action { margin-top: 2.2em; }

/* ------------------------------------------- the gallery (demo option A) --- */

.gallery-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px 16px;
    margin-bottom: 22px;
}

.gallery-head h2 {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 1.7rem;
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--primary-deep);
}

/* the orange diamond of the story's headings, here in line with the word */
.gallery-head h2::before {
    content: "";
    flex: none;
    width: 12px;
    height: 12px;
    border-radius: 2px;
    background: linear-gradient(135deg, #FFB45A, var(--secondary));
    transform: rotate(45deg);
}

.gallery-head span { font-size: .95rem; font-weight: 600; color: var(--muted); }

.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 24px; }
.gallery figure { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.gallery figure[hidden] { display: none; }

.gallery a {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border: 1px solid #F6E2C7;
    border-radius: 18px;
    box-shadow: 0 24px 48px -32px rgba(140, 60, 10, .5);
}

.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.gallery a:hover img { transform: scale(1.03); }
.gallery a:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }

/* the sixth tile when there are more: how many the lightbox still holds */
.gallery .more {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(42, 20, 56, .62);
    font-size: 1.9rem;
    font-weight: 800;
    color: #fff;
}

.gallery figcaption { font-size: .95rem; line-height: 1.45; color: var(--muted); }

/* ---------------------------------------------------------- lightbox --- */

.lightbox {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 24px clamp(16px, 6vw, 96px) 28px;
    border: 0;
    background: #1E0F2B;
    color: rgba(255, 255, 255, .86);
}

.lightbox[open] { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.lightbox::backdrop { background: #1E0F2B; }
html:has(.lightbox[open]) { overflow: hidden; }

.lb-top { align-self: stretch; display: flex; align-items: center; justify-content: space-between; }
.lb-count { font: 700 1.4rem/1 var(--font-display); letter-spacing: .06em; color: var(--gold-soft); }

.lb-stage {
    flex: 1;
    min-height: 0;
    align-self: stretch;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 28px;
}

.lb-figure {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    height: 100%;
    min-height: 0;
    margin: 0;
}

.lb-img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: calc(100dvh - 230px);
    border-radius: 12px;
    box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .7);
}

.lb-caption { max-width: 720px; font-size: 1.05rem; line-height: 1.5; text-align: center; }

/* flat plum, as the site's main buttons (.btn-purple), round here */
.lb-btn {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--primary-deep);
    color: var(--gold-soft);
    cursor: pointer;
}

.lb-btn:hover { background: var(--plum-hover); }
.lb-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.lb-btn svg { width: 22px; height: 22px; }
.lb-btn[hidden] { display: none; }
.lb-close { width: 48px; height: 48px; }
.lb-hint { font-size: .82rem; color: rgba(255, 255, 255, .6); }

/* --------------------------------------------------------- responsive --- */

@media (max-width: 980px) {
    .cards { grid-template-columns: minmax(0, 1fr); max-width: 560px; }
    .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; }
}

/* phones: the arrows sit over the photo's edges, and a swipe moves too */
@media (max-width: 640px) {
    .lb-stage { position: relative; grid-template-columns: minmax(0, 1fr); }
    .lb-prev, .lb-next { position: absolute; top: 50%; z-index: 1; width: 44px; height: 44px; transform: translateY(-50%); }
    .lb-prev { left: -6px; }
    .lb-next { right: -6px; }
    .lb-img { max-height: calc(100dvh - 190px); }
    .lb-hint { display: none; }
}
