/**
 * assets/systems.css
 * A system's page and the all-systems page (systems/index.php), scoped to
 * .hg-sys, in the card style of the game pages and listings.
 */

.hg-sys { font-family: var(--font-body); font-size: var(--text-base); line-height: var(--leading-normal); color: var(--color-ink); text-align: left; }
.hg-sys *, .hg-sys *::before, .hg-sys *::after { box-sizing: border-box; }
.hg-sys :is(h1, h2) { width: auto; max-width: none; background: none; border: 0; padding: 0; margin: 0; color: var(--color-ink); font-family: var(--font-display); line-height: var(--leading-tight); text-align: left; }
.hg-sys p { margin: 0; }
.hg-sys a:link, .hg-sys a:visited { font-size: inherit; color: var(--color-brand); text-decoration: none; }
.hg-sys a:hover { color: var(--color-brand-dark); text-decoration: underline; }
.hg-sys img { max-width: 100%; }

/* ---- The banner ---- */
.hg-sys .sy-hero { position: relative; overflow: hidden; padding: var(--space-6); margin: 0 0 var(--space-8); border-radius: 16px; color: #fff;
    background: radial-gradient(circle at 85% 15%, rgba(255, 255, 255, 0.18) 0, rgba(255, 255, 255, 0) 45%), linear-gradient(130deg, #0B2E55 0%, var(--color-brand-darker) 45%, var(--color-brand) 100%);
    box-shadow: 0 10px 28px rgba(15, 77, 140, 0.25); }
.hg-sys .sy-eyebrow { font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: rgba(255, 255, 255, 0.75); }
.hg-sys .sy-eyebrow a:link, .hg-sys .sy-eyebrow a:visited { color: #fff; }
.hg-sys h1.sy-title { margin: var(--space-1) 0 var(--space-3); font-size: 2.6rem; font-weight: 800; letter-spacing: -0.02em; color: #fff; }
.hg-sys .sy-stats { list-style: none; margin: 0 0 var(--space-4); padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.hg-sys .sy-stats li { padding: 4px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.14); font-size: var(--text-sm); color: rgba(255, 255, 255, 0.9); }
.hg-sys .sy-stats a:link, .hg-sys .sy-stats a:visited { color: inherit; }
.hg-sys .sy-stats a:hover { color: #fff; text-decoration: none; }
.hg-sys .sy-stats b { color: #fff; font-weight: 800; }
.hg-sys .sy-links { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0 0 var(--space-4); }
.hg-sys .sy-links a { padding: 7px 14px; border-radius: 8px; background: #fff; font-size: var(--text-sm); font-weight: 700; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12); }
.hg-sys .sy-links a:link, .hg-sys .sy-links a:visited { color: var(--color-brand-darker); }
.hg-sys .sy-links a:hover { background: var(--color-brand-tint); text-decoration: none; }
.hg-sys .sy-letters { display: grid; grid-template-columns: repeat(27, minmax(0, 1fr)); gap: 3px; }
.hg-sys .sy-letters a { padding: 3px 0; border-radius: 5px; background: rgba(255, 255, 255, 0.12); font-size: var(--text-xs); font-weight: 700; text-align: center; }
.hg-sys .sy-letters a:link, .hg-sys .sy-letters a:visited { color: #fff; }
.hg-sys .sy-letters a:hover { background: #fff; color: var(--color-brand-darker); text-decoration: none; }

/* ---- Sections ---- */
.hg-sys .sy-section { margin: 0 0 var(--space-8); }
.hg-sys .sy-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); margin: 0 0 var(--space-4); padding-bottom: var(--space-2); border-bottom: 2px solid var(--color-border); }
.hg-sys .sy-section-head h2 { font-size: var(--text-sm); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-ink-muted); }
.hg-sys .sy-section-head a { font-size: var(--text-sm); font-weight: 600; }
.hg-sys .sy-count { padding: 1px 8px; border-radius: 999px; background: var(--color-bg-subtle); font-size: var(--text-xs); font-weight: 700; color: var(--color-ink-muted); }
.hg-sys .sy-meta { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: var(--text-xs); color: var(--color-ink-muted); }
.hg-sys .sy-kind { align-self: flex-start; padding: 2px 8px; border-radius: 999px; background: var(--color-brand); color: #fff; font-size: 0.6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.hg-sys .sy-kind.is-news { background: #D9822B; }
.hg-sys .sy-kind.is-preview { background: #7A4FD0; }

/* Stars (as on the review pages). */
.hg-sys .article-stars { display: inline-flex; gap: 2px; vertical-align: middle; }
.hg-sys .astar { width: 14px; height: 14px; background: var(--color-border-strong);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01z'/%3E%3C/svg%3E") center / contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01z'/%3E%3C/svg%3E") center / contain no-repeat; }
.hg-sys .astar.is-full { background: #F5A623; }
.hg-sys .astar.is-half { background: linear-gradient(90deg, #F5A623 50%, var(--color-border-strong) 50%); }

/* ---- Reviews ---- */
.hg-sys .sy-lead { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); margin: 0 0 var(--space-4); border: 1px solid var(--color-border); border-radius: 14px; overflow: hidden; background: #fff; transition: box-shadow 0.15s; }
.hg-sys a.sy-lead:hover { box-shadow: var(--shadow-md); text-decoration: none; }
.hg-sys .sy-lead-img { display: block; aspect-ratio: 16 / 10; background: #111; }
.hg-sys .sy-lead-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hg-sys .sy-lead-img img.is-cover { object-fit: contain; }
.hg-sys .sy-lead-body { display: flex; flex-direction: column; justify-content: center; gap: var(--space-2); padding: var(--space-6); }
.hg-sys .sy-lead-title { font-size: var(--text-2xl); font-weight: 800; line-height: var(--leading-tight); color: var(--color-ink); }
.hg-sys a.sy-lead:hover .sy-lead-title { color: var(--color-brand); }
.hg-sys .sy-lead-excerpt { font-size: var(--text-sm); line-height: var(--leading-relaxed); color: var(--color-ink-muted); }
.hg-sys .sy-review-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-3); }
.hg-sys .sy-review, .hg-sys .sy-guide { display: flex; gap: var(--space-3); padding: var(--space-3); border: 1px solid var(--color-border); border-radius: 12px; background: #fff; transition: border-color 0.15s, box-shadow 0.15s; }
.hg-sys a.sy-review:hover, .hg-sys a.sy-guide:hover { border-color: var(--color-border-strong); box-shadow: var(--shadow-md); text-decoration: none; }
.hg-sys .sy-review img, .hg-sys .sy-guide img { flex-shrink: 0; width: 72px; height: 72px; object-fit: cover; border-radius: 8px; background: var(--color-bg-subtle); }
.hg-sys .sy-guide img { width: 56px; height: 56px; }
.hg-sys .sy-review-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.hg-sys .sy-review-title { font-size: var(--text-sm); font-weight: 700; line-height: var(--leading-tight); color: var(--color-ink); }
.hg-sys a.sy-review:hover .sy-review-title, .hg-sys a.sy-guide:hover .sy-review-title { color: var(--color-brand); }

/* ---- News ---- */
.hg-sys .sy-news { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-3); }
.hg-sys .sy-news-item { display: flex; flex-direction: column; gap: 6px; }
.hg-sys a.sy-news-item:hover { text-decoration: none; }
.hg-sys .sy-news-img { display: block; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: linear-gradient(135deg, var(--color-brand-tint), var(--color-bg-subtle)); }
.hg-sys .sy-news-img img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.2s; }
.hg-sys a.sy-news-item:hover .sy-news-img img { transform: scale(1.04); }
.hg-sys .sy-news-title { font-size: var(--text-sm); font-weight: 700; line-height: var(--leading-tight); color: var(--color-ink); }
.hg-sys a.sy-news-item:hover .sy-news-title { color: var(--color-brand); }

/* ---- Guides ---- */
.hg-sys .sy-guides { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }

/* ---- Pictures ---- */
.hg-sys .sy-galleries { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-3); }
.hg-sys .sy-gallery { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: #111; }
.hg-sys .sy-gallery img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.25s; }
.hg-sys a.sy-gallery:hover img { transform: scale(1.05); }
.hg-sys a.sy-gallery:hover { text-decoration: none; }
.hg-sys .sy-gallery-text { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; padding: 28px 10px 8px; background: linear-gradient(to top, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0)); color: #fff; }
.hg-sys .sy-gallery-text b { font-size: var(--text-sm); line-height: var(--leading-tight); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hg-sys .sy-gallery-text small { font-size: var(--text-xs); opacity: 0.8; }

.hg-sys .sy-empty { padding: var(--space-8) var(--space-4); border: 1px dashed var(--color-border-strong); border-radius: 14px; text-align: center; color: var(--color-ink-muted); }
.hg-sys .sy-staff { margin-top: var(--space-6); padding-top: var(--space-3); border-top: 1px dashed var(--color-border); font-size: var(--text-sm); color: var(--color-ink-muted); }
.hg-sys .sy-staff a.is-danger:link, .hg-sys .sy-staff a.is-danger:visited { color: var(--color-danger); }

/* ---- Every system ---- */
.hg-sys .visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.hg-sys .sy-card-name:first-child { margin-top: 2px; }
.hg-sys .sy-hero.is-index { padding-bottom: var(--space-6); }
.hg-sys .sy-intro { max-width: 560px; margin: 0 0 var(--space-4); color: rgba(255, 255, 255, 0.88); }
.hg-sys .sy-find input { width: 100%; max-width: 360px; padding: 10px 14px; border: 0; border-radius: 10px; font: inherit; color: var(--color-ink); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); }
.hg-sys .sy-find input:focus { outline: 3px solid rgba(255, 255, 255, 0.6); }
.hg-sys .sy-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: var(--space-3); }
.hg-sys .sy-card { display: flex; flex-direction: column; gap: 2px; padding: var(--space-3) var(--space-4); border: 1px solid var(--color-border); border-radius: 12px; background: #fff; border-top: 4px solid var(--color-brand); transition: transform 0.12s, box-shadow 0.15s; }
.hg-sys a.sy-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); text-decoration: none; }
.hg-sys .sy-card[hidden] { display: none; }
.hg-sys .sy-group.is-retro .sy-card { border-top-color: #7A4FD0; }
.hg-sys .sy-card-abbr { font-size: 0.6875rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-brand-darker); }
.hg-sys .sy-group.is-retro .sy-card-abbr { color: #5A33A8; }
.hg-sys .sy-card-name { font-weight: 700; line-height: var(--leading-tight); color: var(--color-ink); }
.hg-sys a.sy-card:hover .sy-card-name { color: var(--color-brand); }
.hg-sys .sy-card-meta { font-size: var(--text-xs); color: var(--color-ink-muted); }
.hg-sys .sy-card-meta.is-faint { color: var(--color-ink-faint); }
.hg-sys .sy-foot { text-align: center; font-size: var(--text-sm); }

@media (max-width: 900px) {
    .hg-sys .sy-review-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hg-sys .sy-news, .hg-sys .sy-galleries { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .hg-sys .sy-hero { padding: var(--space-4); }
    .hg-sys h1.sy-title { font-size: var(--text-3xl); }
    .hg-sys .sy-letters { display: flex; flex-wrap: wrap; }
    .hg-sys .sy-letters a { min-width: 28px; padding: 4px 6px; }
    .hg-sys .sy-lead { grid-template-columns: 1fr; }
    .hg-sys .sy-lead-body { padding: var(--space-4); }
    .hg-sys .sy-review-grid, .hg-sys .sy-guides { grid-template-columns: 1fr; }
}
