/* JJIO palette + warm paper; Steam-like row layout (capsule | copy + CTA) */
:root {
    --paper: #fffdf9;
    --paper-2: #fff5ec;
    --bloom-mint: rgba(92, 186, 168, 0.22);
    --bloom-gold: rgba(232, 184, 74, 0.28);
    --bloom-coral: rgba(232, 107, 92, 0.18);
    --text: #3a3640;
    --text-soft: #5c5666;
    --text-muted: #8a8494;
    --gold: #d9a42e;
    --coral: #e06356;
    --mint: #47a894;
    --card: #ffffff;
    --card-edge: rgba(58, 54, 64, 0.26);
    --shadow-card: rgba(58, 54, 64, 0.15);
    --shadow-logo: rgba(58, 54, 64, 0.15);
    --page-width: 8.5in;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    font-family: "DM Sans", system-ui, sans-serif;
    font-optical-sizing: auto;
    color: var(--text);
    background: var(--paper);
    line-height: 1.5;
}

.stage {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse 100% 80% at 50% -15%, var(--bloom-gold), transparent 50%),
        radial-gradient(ellipse 70% 55% at 100% 30%, var(--bloom-mint), transparent 45%),
        radial-gradient(ellipse 60% 50% at 0% 70%, var(--bloom-coral), transparent 42%),
        linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
}

.stage::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.35;
    background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.5) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.35) 0%, transparent 35%);
}

.masthead,
.catalog,
.foot {
    position: relative;
    z-index: 1;
}

.masthead {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem 1.25rem 1.65rem;
}

.brand-logo {
    position: relative;
    z-index: 1;
    max-width: min(90vw, 20rem);
    height: auto;
    display: block;
    filter: drop-shadow(0 3px 0 rgba(255, 255, 255, 0.9)) drop-shadow(0 6px 16px var(--shadow-logo));
}

/* Centered subtitle — same type + overlap as before; reads like de-emphasized UI */
.brand-subtitle {
    position: relative;
    z-index: 2;
    margin: clamp(-5rem, -1.55em - 2.9rem, -2.4rem) 0 0;
    padding: 0;
    font-family: "Archivo Black", sans-serif;
    font-size: clamp(1.45rem, 4.8vw, 2rem);
    font-weight: 400;
    letter-spacing: 0.22em;
    line-height: 1.12;
    text-align: center;
    text-transform: uppercase;
    color: var(--text-muted);
    opacity: 0.72;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}

@media (max-width: 380px) {
    .brand-subtitle {
        font-size: 1.2rem;
        letter-spacing: 0.18em;
    }
}

.catalog {
    box-sizing: border-box;
    flex: 1 1 auto;
    max-width: var(--page-width);
    width: 100%;
    margin-inline: auto;
    padding: 0 1.25rem 2.5rem;
}

.catalog-kicker {
    margin: 0 0 0.65rem;
    font-family: "Archivo Black", sans-serif;
    font-size: 0.6875rem;
    font-weight: 400;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--coral);
}

.game-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    width: 100%;
}

.game-card {
    width: 100%;
    display: grid;
    grid-template-columns: 6.75rem 1fr;
    gap: 0.85rem 1rem;
    align-items: stretch;
    background: linear-gradient(172deg, #ffffff 0%, #fffbf7 40%, #f2ebe4 100%);
    border: 1px solid rgba(48, 44, 54, 0.38);
    border-radius: 0.85rem;
    padding: 0.65rem 0.85rem 0.65rem 0.65rem;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.98),
        inset 0 0 0 1px rgba(58, 54, 64, 0.07),
        0 2px 0 rgba(232, 184, 74, 0.4),
        0 4px 0 rgba(232, 107, 92, 0.3),
        0 6px 0 rgba(92, 186, 168, 0.24),
        0 0 0 1px rgba(58, 54, 64, 0.1),
        0 2px 5px rgba(48, 44, 54, 0.1),
        0 14px 36px rgba(48, 44, 54, 0.14),
        0 36px 72px rgba(40, 36, 48, 0.09);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.game-card:hover {
    border-color: rgba(71, 168, 148, 0.58);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 1),
        inset 0 0 0 1px rgba(58, 54, 64, 0.08),
        0 2px 0 rgba(232, 184, 74, 0.46),
        0 4px 0 rgba(232, 107, 92, 0.36),
        0 6px 0 rgba(92, 186, 168, 0.3),
        0 0 0 1px rgba(71, 168, 148, 0.22),
        0 3px 8px rgba(48, 44, 54, 0.12),
        0 18px 44px rgba(48, 44, 54, 0.16),
        0 42px 80px rgba(40, 36, 48, 0.1);
}

.game-card__media {
    position: relative;
    align-self: stretch;
    display: flex;
    align-items: stretch;
}

.preview-link {
    display: block;
    flex: 1;
    align-self: stretch;
    text-decoration: none;
    color: inherit;
    border-radius: 0.45rem;
    outline-offset: 3px;
}

.preview-link:hover .preview-shell {
    box-shadow: inset 0 0 0 1px rgba(58, 54, 64, 0.08), 0 6px 18px var(--shadow-card);
}

.preview-link:focus-visible {
    outline: 2px solid var(--mint);
}

.preview-link:focus-visible .preview-shell {
    box-shadow: inset 0 0 0 1px rgba(71, 168, 148, 0.35), 0 4px 14px var(--shadow-card);
}

.preview-shell {
    position: relative;
    width: 100%;
    flex: 1;
    min-height: 8.5rem;
    aspect-ratio: 2 / 3;
    border-radius: 0.45rem;
    overflow: hidden;
    background: linear-gradient(160deg, #f0faf7 0%, #fff8f0 100%);
    box-shadow: inset 0 0 0 1px rgba(58, 54, 64, 0.06), 0 4px 14px var(--shadow-card);
}

.preview-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.preview-img.is-loaded {
    opacity: 1;
}

.preview-img.is-broken {
    display: none;
}

.preview-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0.35rem;
    background:
        radial-gradient(circle at 30% 30%, rgba(232, 184, 74, 0.18), transparent 52%),
        radial-gradient(circle at 70% 60%, rgba(92, 186, 168, 0.15), transparent 48%),
        linear-gradient(165deg, #e8f5f1 0%, #fff5eb 100%);
}

.preview-fallback__label {
    font-size: 0.5625rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--mint);
    font-weight: 700;
    margin-bottom: 0.15rem;
}

.preview-fallback__title {
    font-family: "Archivo Black", sans-serif;
    font-size: 0.75rem;
    color: var(--text);
    margin-bottom: 0.3rem;
}

.preview-fallback__hint {
    font-size: 0.5625rem;
    color: var(--text-muted);
    max-width: 100%;
    padding: 0 0.2rem;
    line-height: 1.3;
}

.preview-fallback__hint code {
    font-size: inherit;
    color: var(--coral);
    font-weight: 600;
    word-break: break-all;
}

.game-card__body {
    min-width: 0;
    padding: 0.15rem 0 0.15rem 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.game-title {
    margin: 0 0 0.35rem;
    font-size: 1.0625rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.01em;
}

.game-title__link {
    color: var(--text);
    text-decoration: none;
    font-family: "Archivo Black", sans-serif;
    font-weight: 400;
    font-size: 1em;
}

.game-title__link:hover {
    color: var(--coral);
}

.game-title__link:focus-visible {
    outline: 2px solid var(--mint);
    outline-offset: 3px;
    border-radius: 2px;
}

.game-blurb {
    margin: 0 0 0.4rem;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: var(--text-soft);
}

.game-meta {
    margin: 0 0 0.65rem;
    font-size: 0.6875rem;
    letter-spacing: 0.03em;
    color: var(--text-muted);
}

.game-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-top: auto;
}

.cta-play,
.cta-watch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.95rem;
    font-family: "Archivo Black", sans-serif;
    font-size: 0.6875rem;
    letter-spacing: 0.05em;
    border-radius: 999px;
    box-sizing: border-box;
}

.cta-play {
    text-decoration: none;
    color: var(--text);
    background: #fff;
    border: 2px solid var(--text);
    box-shadow: 0 3px 0 var(--gold);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.cta-play:hover {
    transform: translate(0, -1px);
    box-shadow: 0 4px 0 var(--mint);
    background: #fffef9;
}

.cta-play:active {
    transform: translate(0, 1px);
    box-shadow: 0 2px 0 var(--gold);
}

.cta-play:focus-visible {
    outline: 3px solid var(--coral);
    outline-offset: 3px;
}

.cta-watch {
    margin: 0;
    color: var(--text);
    background: #fff;
    border: 2px solid var(--text);
    box-shadow: 0 3px 0 var(--gold);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, opacity 0.15s ease;
}

.cta-watch:disabled {
    opacity: 0.5;
    color: var(--text-muted);
    border-color: #c8c4cf;
    background: #f3f1ee;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.cta-watch:focus-visible:not(:disabled) {
    outline: 3px solid var(--coral);
    outline-offset: 3px;
}

.foot {
    flex-shrink: 0;
    width: 100%;
    margin-top: auto;
    padding: 1.35rem 1.25rem calc(1.5rem + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid rgba(58, 54, 64, 0.14);
    background: linear-gradient(180deg, rgba(255, 250, 242, 0.55) 0%, #efe6dc 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.65),
        0 -10px 28px rgba(58, 54, 64, 0.04);
}

.foot__inner {
    max-width: var(--page-width);
    margin-inline: auto;
    padding: 0 0.25rem;
    text-align: center;
}

.foot__copy {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--text-soft);
}
