/* ═════════════════════════════════════════════════════════════
   BRB Drama — Warm Minimalist Indie Theme
   Inspired by itch.io & fromjason.xyz
   
   Principles:
   • Warm, paper-like backgrounds (eye comfort)
   • Serif headings for literary temperament
   • Sans-serif body for crisp readability
   • Copper/rust accent against cream canvas
   • Generous whitespace, minimal chrome
   ═════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,300..800;1,6..72,300..800&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

/* ─── Variables ───────────────────────────────────────────── */
:root {
    /* Canvas & Surface */
    --bg-body:       #25232e; /* Modern purple-tinted dark gray */
    --bg-card:       #2d2b38; /* Elevated surface */
    --bg-warm:       #383546; /* Tags & accents */
    --bg-dark:       #1c1926; /* Navbar/Footer */
    --bg-dark-hover: #2a2638;

    /* Typography */
    --text:          #e2e4e9;
    --text-muted:    #bdc1cc; /* Lighter slate-purple for better contrast */
    --text-inverse:  #ffffff;

    /* Accent */
    --accent:        #d48a42; /* Soft modern copper pairs well with purple */
    --accent-hover:  #e09e5a;
    --accent-soft:   #403125;

    /* Borders */
    --border:        #403d52; /* Purple-tinted border */
    --border-focus:  #5c5775;

    /* Typefaces */
    --font-head:     "Newsreader", Georgia, "Times New Roman", serif;
    --font-body:     "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ─── Base ────────────────────────────────────────────────── */
html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-size: 1.0625rem;        /* 17 px */
    font-weight: 400;
    line-height: 1.65;
    color: var(--text);
    background-color: var(--bg-body) !important;
}

.site-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    padding-bottom: 4rem;
}

/* ─── Typography Scale ────────────────────────────────────── */
h1, h2, h3, h4, h5, h6,
.title {
    font-family: var(--font-head);
    font-weight: 500;
    letter-spacing: -0.02em;
    color: var(--text);
}

h1.title.is-1 { font-size: 2.5rem; }
h2.title.is-2,
.title.is-2  { font-size: 2rem; }
h2.title.is-3,
.title.is-3  { font-size: 1.75rem; }
.title.is-5  { font-size: 1.25rem; line-height: 1.35; }

/* High contrast for specific page headers like Newsletter, Contact Us, Privacy */
h1.title.is-2.has-text-centered.has-text-weight-bold {
    color: var(--text-inverse);
}

.subtitle    { font-family: var(--font-body); color: var(--text-muted); }

.content {
    font-size: 1.0625rem;
    line-height: 1.75;
    color: var(--text); /* Override Bulma's default dark grey */
}

.content p { margin-bottom: 1.25rem; }

.content h2,
.content h3 {
    color: var(--text);
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.content a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-bottom-color 0.2s ease, color 0.2s ease;
}

.content a:hover {
    color: var(--accent-hover);
    border-bottom-color: var(--accent-hover);
}

/* ─── Navbar ──────────────────────────────────────────────── */
.navbar {
    background-color: var(--bg-dark) !important;
    box-shadow: none;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.navbar-brand strong {
    font-family: var(--font-head);
    font-size: 1.35rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--text-inverse) !important;
}

.navbar-item {
    font-family: var(--font-body);
    font-weight: 450;
    font-size: 0.9375rem;
    color: rgba(250,248,245,0.85) !important;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.navbar-item:hover,
.navbar-item.is-active {
    color: var(--text-inverse) !important;
    background-color: var(--bg-dark-hover) !important;
}

.navbar-burger {
    color: rgba(250,248,245,0.85);
}

.navbar-burger:hover {
    background-color: var(--bg-dark-hover) !important;
}

/* ─── Footer ──────────────────────────────────────────────── */
.footer {
    background-color: var(--bg-dark);
    color: rgba(250,248,245,0.65);
    border-top: none;
    padding: 3.5rem 1.5rem 2.5rem;
}

.footer p {
    font-family: var(--font-body);
    font-size: 0.9375rem;
    color: rgba(250,248,245,0.55);
}

.footer .button.is-light {
    background-color: transparent;
    border: 1px solid rgba(250,248,245,0.15);
    color: rgba(250,248,245,0.7);
    transition: all 0.2s ease;
}

.footer .button.is-light:hover {
    background-color: rgba(250,248,245,0.08);
    border-color: rgba(250,248,245,0.3);
    color: var(--text-inverse);
}

/* ─── Cards ───────────────────────────────────────────────── */
.card {
    background-color: var(--bg-card);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(43,38,34,0.03);
    transition: transform 0.3s cubic-bezier(0.2, 0, 0.2, 1),
                box-shadow 0.3s ease,
                border-color 0.3s ease;
    overflow: hidden;
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(43,38,34,0.08);
    border-color: var(--border-focus);
}

.card-content .title.is-5 {
    font-family: var(--font-head);
    font-weight: 600;
    color: var(--text);
    transition: color 0.2s ease;
}

.card-hover:hover .card-content .title.is-5 {
    color: var(--accent);
}

.card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.card-footer {
    border-top: 1px solid var(--border);
}

.card-footer-item {
    border-right: 1px solid var(--border);
}
.card-footer-item:last-child {
    border-right: none;
}

/* ─── Tags ────────────────────────────────────────────────── */
.tag {
    font-family: var(--font-body);
    font-weight: 450;
    font-size: 0.8125rem;
    border-radius: 9999px !important;
    padding: 0.35em 0.9em;
}

.tag.is-light {
    background-color: var(--bg-warm);
    color: var(--text); /* Increased contrast */
    border: 1px solid var(--border);
}

.tag.is-light.is-medium {
    font-weight: 450;
    letter-spacing: 0.01em;
}

.category-tags {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(43,38,34,0.03);
}

.category-tags__tag {
    border: 1px solid var(--border);
    background-color: var(--bg-warm);
    color: var(--text); /* Increased contrast */
    transition: all 0.2s ease;
    text-decoration: none;
}

.category-tags__tag:hover {
    background-color: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(196,112,42,0.08);
}

/* ─── Forms / Search ──────────────────────────────────────── */
.input {
    font-family: var(--font-body);
    font-size: 1rem;
    background-color: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: 10px !important;
    box-shadow: none;
    color: var(--text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.input:focus,
.input:active {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px rgba(196,112,42,0.12) !important;
    outline: none;
}

/* ─── Buttons ─────────────────────────────────────────────── */
.button {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.9375rem;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.button.is-light {
    background-color: var(--bg-warm);
    border-color: var(--border);
    color: var(--text);
}

.button.is-light:hover {
    background-color: var(--bg-body);
    border-color: var(--border-focus);
}

.button.is-link.is-medium {
    background-color: var(--accent) !important;
    color: #fff !important;
    border: none;
}

.button.is-link.is-medium:hover {
    background-color: var(--accent-hover) !important;
}

.back-to-games-button {
    border-radius: 9999px;
    background-color: var(--accent) !important;
    color: #fff !important;
    box-shadow: 0 8px 24px rgba(196,112,42,0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    min-width: 190px;
}

.back-to-games-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(196,112,42,0.28);
    background-color: var(--accent-hover) !important;
}

/* ─── Press Kit Button ────────────────────────────────────── */
.presskit-button {
    border-radius: 9999px;
    background-color: #4a7c59 !important;
    color: #fff !important;
    box-shadow: 0 8px 24px rgba(74,124,89,0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    min-width: 190px;
    border: none;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.9375rem;
    padding: 1em 1.5em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.presskit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(74,124,89,0.28);
    background-color: #3a6347 !important;
}

/* ─── Game Cover ──────────────────────────────────────────── */
.game-cover {
    position: relative;
    aspect-ratio: 13 / 5;
    overflow: hidden;
    border-radius: 18px;
    background-color: var(--bg-dark);
    box-shadow: 0 8px 32px rgba(43,38,34,0.1);
}

.game-cover__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* ─── Game Short Description (below title, always visible) ─── */
.game-short-desc {
    max-width: 720px;
    margin: 1rem auto 2rem;
    text-align: center;
    font-family: var(--font-body);
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--text);
    font-style: italic;
    letter-spacing: 0.01em;
}

/* ─── Game Thumbnails ─────────────────────────────────────── */
.game-thumbnail-figure {
    aspect-ratio: 13 / 5;
    position: relative;
    margin: 0;
    background-color: var(--bg-warm);
    overflow: hidden;
}

.game-thumbnail-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s cubic-bezier(0.2, 0, 0.2, 1);
}

.card-hover:hover .game-thumbnail-img {
    transform: scale(1.03);
}

/* ─── Pagination ──────────────────────────────────────────── */
.pagination {
    font-family: var(--font-body);
}

.pagination-link,
.pagination-previous,
.pagination-next {
    border-color: var(--border);
    color: var(--text-muted);
    background-color: var(--bg-card);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.pagination-link:hover,
.pagination-previous:not([disabled]):hover,
.pagination-next:not([disabled]):hover {
    border-color: var(--accent);
    color: var(--accent);
    background-color: var(--accent-soft);
}

.pagination-link.is-current {
    background-color: var(--accent) !important;
    border-color: var(--accent) !important;
    color: #fff !important;
    font-weight: 500;
}

/* ─── Bulma overrides that stop generic colors leaking ───── */
.has-text-dark    { color: var(--text) !important; }
.has-text-grey    { color: var(--text-muted) !important; }
.has-text-grey-dark { color: var(--text) !important; }
.has-text-grey-light { color: var(--text-muted) !important; }
.has-background-grey-lighter { background-color: var(--bg-warm) !important; }

/* Override Bulma strong (content area) — make it clearly visible */
strong, b, .content strong, .content b {
    color: #ffffff !important;
    font-weight: 600;
}

/* ─── Utility / Misc ──────────────────────────────────────── */
@media screen and (max-width: 768px) {
    body { font-size: 1rem; }
    h1.title.is-1 { font-size: 2rem; }
    .game-cover { aspect-ratio: 13 / 5; }
    .main-content { padding-bottom: 2rem; }
}

/* Smooth fade for lazy-loaded elements */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeInUp 0.5s cubic-bezier(0.2, 0, 0.2, 1) both;
}
