/* SWC Archive theme — the "badge" look shared by every light page: News posts, search results and other plain
   listings (index.php), and the 404 page. A starfield page, a title band in white on it, then a light sheet framed
   like a Celebration badge: gold hairline and outer ring, the lanyard slot near the top, and a starfield strip with
   the logo along the bottom (template-parts/badge-foot.php). Those pages get body.swc-badge-page
   (swc_theme_is_badge_page() in functions.php); news.css adds the News layouts on top. Loaded on every page, so the
   plugin's cards can borrow the frame and the strip. */

:root {
    --news-bg: #020817;
    --news-gold: #f6c84c;
    --news-text: #e5edf8;
    --news-muted: #9fb0cc;
    --news-card: linear-gradient(135deg, #0b1830 0%, #10284a 54%, #0c1f3a 100%);
    --news-line: rgba(255, 255, 255, 0.10);
    --sheet-bg: #fbfaf7;
    --sheet-text: #1f2430;
    --sheet-muted: #5f6675;
    --sheet-line: #e5e1d6;
    --sheet-link: #1d4ed8;
}
body.swc-badge-page {
    background: url("../img/starfield.svg") 0 0 / 1600px 1200px repeat, var(--news-bg);
    color: var(--news-text);
}
.swc-badge-page .swc-kicker {
    margin: 0 0 8px;
    color: var(--news-gold);
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.13em;
    line-height: 1.3;
    text-transform: uppercase;
}

/* ---- Page wrapper and the title band on the starfield ---- */
.swc-badge-wrap { max-width: 1180px; margin: 0 auto; padding: 40px 22px 64px; }
.swc-badge-head { max-width: 860px; padding: 0 0 32px; }
.swc-badge-crumbs { margin-bottom: 18px; color: var(--news-muted); font-size: 0.85rem; }
.swc-badge-crumbs a { color: var(--news-muted); text-decoration: none; }
.swc-badge-crumbs a:hover, .swc-badge-crumbs a:focus-visible { color: var(--news-gold); }
.swc-badge-crumbs span { margin: 0 4px; }
.swc-badge-title {
    margin: 0 0 14px;
    color: #fff;
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.04em;
    text-transform: uppercase;
    text-wrap: balance;
}
.swc-badge-title span { color: var(--news-gold); }
.swc-badge-meta { margin: 0; color: var(--news-muted); font-size: 0.9rem; }

/* ---- The sheet ---- */
.swc-sheet {
    --pad-x: clamp(24px, 3.5vw, 44px);
    --sheet-radius: 24px;
    position: relative;
    padding: var(--pad-x) var(--pad-x) 0; /* no bottom padding: the badge strip closes the sheet */
    border-radius: var(--sheet-radius);
    background: var(--sheet-bg);
    color: var(--sheet-text);
}
.swc-sheet__body { max-width: 760px; }
.swc-sheet a { color: var(--sheet-link); }

/* Hairline: a thin gold line all the way round. */
.swc-sheet--hairline {
    box-shadow: 0 0 0 2px var(--news-gold);
}
/* Tab: the lanyard slot of a Celebration badge, an empty slot punched just below the top edge. It shows the dark
   starfield through the sheet (same background, inset shadow for depth, faint gold rim). Purely decorative. */
.swc-sheet--tab { padding-top: clamp(56px, 5.5vw, 68px); }
.swc-sheet--tab::before {
    content: "";
    position: absolute;
    top: 20px;
    left: 50%;
    width: 132px;
    height: 16px;
    transform: translateX(-50%);
    border: 1px solid rgba(246, 200, 76, 0.5);
    border-radius: 999px;
    background: url("../img/starfield.svg") 37px 11px / 800px 600px repeat, var(--news-bg);
    box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.85), 0 1px 0 rgba(255, 255, 255, 0.95);
    pointer-events: none;
}

/* The badge's bottom strip: full sheet width (cancels the side padding), the starfield of the header and the Next
   Celebration card, a gold rule on top, and the logo centred. */
.swc-badge-foot {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 40px calc(-1 * var(--pad-x)) 0;
    padding: 26px var(--pad-x) 28px;
    border-top: 2px solid var(--news-gold);
    border-radius: 0 0 var(--sheet-radius) var(--sheet-radius);
    background: url("../img/starfield.svg") 211px 97px / 800px 600px repeat, linear-gradient(135deg, #0b1830 0%, #10284a 54%, #0c1f3a 100%);
}
.swc-badge-foot a { display: block; line-height: 0; }
.swc-badge-foot img { display: block; width: 240px; max-width: 60vw; height: auto; max-height: 60px; object-fit: contain; transition: opacity 0.15s ease; }
.swc-badge-foot a:hover img, .swc-badge-foot a:focus-visible img { opacity: 0.85; }
.swc-badge-foot span { color: var(--news-gold); font-weight: 900; letter-spacing: 0.14em; text-transform: uppercase; line-height: 1.4; }

/* ---- Search results, other listings and the 404 page (index.php, 404.php) ---- */
.swc-sheet .search-form { display: flex; gap: 8px; max-width: 560px; margin: 0 0 8px; }
.swc-sheet .search-form label { flex: 1; }
.swc-sheet .search-form .search-field { width: 100%; }
.swc-sheet__intro { margin: 0 0 20px; font-size: 1.05rem; line-height: 1.6; }
.swc-sheet .swc-results { margin-top: 20px; }
.swc-sheet .swc-results__item { border-bottom-color: var(--sheet-line); }
.swc-sheet .swc-results__title { font-weight: 700; }
.swc-sheet .swc-results__type { color: var(--sheet-muted); }
.swc-sheet .navigation.pagination { margin-top: 24px; }
.swc-sheet .nav-links { display: flex; flex-wrap: wrap; gap: 6px; }
.swc-sheet .page-numbers { padding: 6px 12px; border: 1px solid var(--sheet-line); border-radius: 999px; text-decoration: none; }
.swc-sheet .page-numbers.current { background: var(--news-gold); border-color: var(--news-gold); color: #241a00; }

/* ---- Phones ---- */
@media (max-width: 600px) {
    /* A 14 px gutter keeps the hairline frame and its outer ring (9 px) on screen at the sides. */
    .swc-badge-wrap { padding: 24px 14px 40px; }
    .swc-badge-head { padding: 0 2px 24px; }
    .swc-sheet { --pad-x: 16px; --sheet-radius: 18px; padding-top: 24px; }
    .swc-sheet--tab { padding-top: 50px; }
    .swc-sheet--tab::before { top: 16px; width: 104px; height: 14px; }
    .swc-sheet .search-form { flex-direction: column; }
}
